table.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?xml version="1.0"?>
  2. <reference xml:id="table-templates"><?dbhtml dir="fo"?>
  3. <info>
  4. <title>Formatting Object Table Reference</title>
  5. <releaseinfo role="meta">
  6. $Id: table.xsl 9666 2012-11-14 04:42:56Z bobstayton $
  7. </releaseinfo>
  8. </info>
  9. <partintro xml:id="partintro">
  10. <title>Introduction</title>
  11. <para>This is technical reference documentation for the FO
  12. table-processing templates in the DocBook XSL Stylesheets.</para>
  13. <para>This is not intended to be user documentation. It is
  14. provided for developers writing customization layers for the
  15. stylesheets.</para>
  16. </partintro>
  17. <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.calc.column.width">
  18. <refnamediv>
  19. <refname>calc.column.width</refname>
  20. <refpurpose>Calculate an XSL FO table column width specification from a
  21. CALS table column width specification.</refpurpose>
  22. </refnamediv>
  23. <refsynopsisdiv>
  24. <synopsis>&lt;xsl:template name="calc.column.width"&gt;
  25. &lt;xsl:param name="colwidth"&gt;1*&lt;/xsl:param&gt;
  26. ...
  27. &lt;/xsl:template&gt;</synopsis>
  28. </refsynopsisdiv>
  29. <refsect1><title>Description</title>
  30. <para>CALS expresses table column widths in the following basic
  31. forms:</para>
  32. <itemizedlist>
  33. <listitem>
  34. <para><emphasis>99.99units</emphasis>, a fixed length specifier.</para>
  35. </listitem>
  36. <listitem>
  37. <para><emphasis>99.99</emphasis>, a fixed length specifier without any units.</para>
  38. </listitem>
  39. <listitem>
  40. <para><emphasis>99.99*</emphasis>, a relative length specifier.</para>
  41. </listitem>
  42. <listitem>
  43. <para><emphasis>99.99*+99.99units</emphasis>, a combination of both.</para>
  44. </listitem>
  45. </itemizedlist>
  46. <para>The CALS units are points (pt), picas (pi), centimeters (cm),
  47. millimeters (mm), and inches (in). These are the same units as XSL,
  48. except that XSL abbreviates picas "pc" instead of "pi". If a length
  49. specifier has no units, the CALS default unit (pt) is assumed.</para>
  50. <para>Relative length specifiers are represented in XSL with the
  51. proportional-column-width() function.</para>
  52. <para>Here are some examples:</para>
  53. <itemizedlist>
  54. <listitem>
  55. <para>"36pt" becomes "36pt"</para>
  56. </listitem>
  57. <listitem>
  58. <para>"3pi" becomes "3pc"</para>
  59. </listitem>
  60. <listitem>
  61. <para>"36" becomes "36pt"</para>
  62. </listitem>
  63. <listitem>
  64. <para>"3*" becomes "proportional-column-width(3)"</para>
  65. </listitem>
  66. <listitem>
  67. <para>"3*+2pi" becomes "proportional-column-width(3)+2pc"</para>
  68. </listitem>
  69. <listitem>
  70. <para>"1*+2" becomes "proportional-column-width(1)+2pt"</para>
  71. </listitem>
  72. </itemizedlist>
  73. </refsect1><refsect1><title>Parameters</title>
  74. <variablelist>
  75. <varlistentry><term>colwidth</term>
  76. <listitem>
  77. <para>The CALS column width specification.</para>
  78. </listitem>
  79. </varlistentry>
  80. </variablelist>
  81. </refsect1><refsect1><title>Returns</title>
  82. <para>The XSL column width specification.</para>
  83. </refsect1></refentry>
  84. </reference>