| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <reference xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="table-templates"><?dbhtml dir="fo"?> |
| 3 | |
| 4 | <info> |
| 5 | <title>Formatting Object Table Reference</title> |
| 6 | <releaseinfo role="meta"> |
| 7 | </releaseinfo> |
| 8 | </info> |
| 9 | <partintro xml:id="partintro"> |
| 10 | <title>Introduction</title> |
| 11 | |
| 12 | <para>This is technical reference documentation for the FO |
| 13 | table-processing templates in the DocBook XSL Stylesheets.</para> |
| 14 | |
| 15 | |
| 16 | <para>This is not intended to be user documentation. It is |
| 17 | provided for developers writing customization layers for the |
| 18 | stylesheets.</para> |
| 19 | |
| 20 | </partintro> |
| 21 | |
| 22 | <refentry xml:id="template.calc.column.width"> |
| 23 | <refnamediv> |
| 24 | <refname>calc.column.width</refname> |
| 25 | <refpurpose>Calculate an XSL FO table column width specification from a |
| 26 | CALS table column width specification.</refpurpose> |
| 27 | </refnamediv> |
| 28 | <refsynopsisdiv> |
| 29 | <synopsis><xsl:template name="calc.column.width"> |
| 30 | <xsl:param name="colwidth">1*</xsl:param> |
| 31 | ... |
| 32 | </xsl:template></synopsis> |
| 33 | </refsynopsisdiv> |
| 34 | <refsect1><title>Description</title> |
| 35 | |
| 36 | <para>CALS expresses table column widths in the following basic |
| 37 | forms:</para> |
| 38 | |
| 39 | |
| 40 | |
| 41 | <itemizedlist> |
| 42 | <listitem> |
| 43 | |
| 44 | <para><emphasis>99.99units</emphasis>, a fixed length specifier.</para> |
| 45 | |
| 46 | </listitem> |
| 47 | <listitem> |
| 48 | |
| 49 | <para><emphasis>99.99</emphasis>, a fixed length specifier without any units.</para> |
| 50 | |
| 51 | </listitem> |
| 52 | <listitem> |
| 53 | |
| 54 | <para><emphasis>99.99*</emphasis>, a relative length specifier.</para> |
| 55 | |
| 56 | </listitem> |
| 57 | <listitem> |
| 58 | |
| 59 | <para><emphasis>99.99*+99.99units</emphasis>, a combination of both.</para> |
| 60 | |
| 61 | </listitem> |
| 62 | </itemizedlist> |
| 63 | |
| 64 | |
| 65 | |
| 66 | <para>The CALS units are points (pt), picas (pi), centimeters (cm), |
| 67 | millimeters (mm), and inches (in). These are the same units as XSL, |
| 68 | except that XSL abbreviates picas "pc" instead of "pi". If a length |
| 69 | specifier has no units, the CALS default unit (pt) is assumed.</para> |
| 70 | |
| 71 | |
| 72 | |
| 73 | <para>Relative length specifiers are represented in XSL with the |
| 74 | proportional-column-width() function.</para> |
| 75 | |
| 76 | |
| 77 | |
| 78 | <para>Here are some examples:</para> |
| 79 | |
| 80 | |
| 81 | |
| 82 | <itemizedlist> |
| 83 | <listitem> |
| 84 | |
| 85 | <para>"36pt" becomes "36pt"</para> |
| 86 | |
| 87 | </listitem> |
| 88 | <listitem> |
| 89 | |
| 90 | <para>"3pi" becomes "3pc"</para> |
| 91 | |
| 92 | </listitem> |
| 93 | <listitem> |
| 94 | |
| 95 | <para>"36" becomes "36pt"</para> |
| 96 | |
| 97 | </listitem> |
| 98 | <listitem> |
| 99 | |
| 100 | <para>"3*" becomes "proportional-column-width(3)"</para> |
| 101 | |
| 102 | </listitem> |
| 103 | <listitem> |
| 104 | |
| 105 | <para>"3*+2pi" becomes "proportional-column-width(3)+2pc"</para> |
| 106 | |
| 107 | </listitem> |
| 108 | <listitem> |
| 109 | |
| 110 | <para>"1*+2" becomes "proportional-column-width(1)+2pt"</para> |
| 111 | |
| 112 | </listitem> |
| 113 | </itemizedlist> |
| 114 | |
| 115 | </refsect1><refsect1><title>Parameters</title> |
| 116 | |
| 117 | <variablelist> |
| 118 | <varlistentry><term>colwidth</term> |
| 119 | <listitem> |
| 120 | |
| 121 | <para>The CALS column width specification.</para> |
| 122 | |
| 123 | </listitem> |
| 124 | </varlistentry> |
| 125 | </variablelist> |
| 126 | |
| 127 | </refsect1><refsect1><title>Returns</title> |
| 128 | |
| 129 | <para>The XSL column width specification.</para> |
| 130 | |
| 131 | </refsect1></refentry> |
| 132 | </reference> |