3 <reference xml:id="table-templates"><?dbhtml dir="fo"?>
6 <title>Formatting Object Table Reference</title>
7 <releaseinfo role="meta">
8 $Id: table.xsl 9666 2012-11-14 04:42:56Z bobstayton $
11 <partintro xml:id="partintro">
12 <title>Introduction</title>
14 <para>This is technical reference documentation for the FO
15 table-processing templates in the DocBook XSL Stylesheets.</para>
18 <para>This is not intended to be user documentation. It is
19 provided for developers writing customization layers for the
24 <refentry xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="template.calc.column.width">
26 <refname>calc.column.width</refname>
27 <refpurpose>Calculate an XSL FO table column width specification from a
28 CALS table column width specification.</refpurpose>
31 <synopsis><xsl:template name="calc.column.width">
32 <xsl:param name="colwidth">1*</xsl:param>
34 </xsl:template></synopsis>
36 <refsect1><title>Description</title>
38 <para>CALS expresses table column widths in the following basic
46 <para><emphasis>99.99units</emphasis>, a fixed length specifier.</para>
51 <para><emphasis>99.99</emphasis>, a fixed length specifier without any units.</para>
56 <para><emphasis>99.99*</emphasis>, a relative length specifier.</para>
61 <para><emphasis>99.99*+99.99units</emphasis>, a combination of both.</para>
68 <para>The CALS units are points (pt), picas (pi), centimeters (cm),
69 millimeters (mm), and inches (in). These are the same units as XSL,
70 except that XSL abbreviates picas "pc" instead of "pi". If a length
71 specifier has no units, the CALS default unit (pt) is assumed.</para>
75 <para>Relative length specifiers are represented in XSL with the
76 proportional-column-width() function.</para>
80 <para>Here are some examples:</para>
87 <para>"36pt" becomes "36pt"</para>
92 <para>"3pi" becomes "3pc"</para>
97 <para>"36" becomes "36pt"</para>
102 <para>"3*" becomes "proportional-column-width(3)"</para>
107 <para>"3*+2pi" becomes "proportional-column-width(3)+2pc"</para>
112 <para>"1*+2" becomes "proportional-column-width(1)+2pt"</para>
117 </refsect1><refsect1><title>Parameters</title>
120 <varlistentry><term>colwidth</term>
123 <para>The CALS column width specification.</para>
129 </refsect1><refsect1><title>Returns</title>
131 <para>The XSL column width specification.</para>
133 </refsect1></refentry>