]> git.evergreen-ils.org Git - working/Evergreen.git/blob - style_guide/tips.xml
stylesheet changes.
[working/Evergreen.git] / style_guide / tips.xml
1 <?xml version="1.0" encoding="utf-8"?>\r
2 <chapter xml:id="style-tips" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="EN"\r
3     xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">\r
4 \r
5     <info>\r
6 \r
7         <title>Miscellaneous Tips</title>\r
8     </info>\r
9 \r
10 \r
11     <simplesect>\r
12         <title>Table column width</title>\r
13 \r
14         <para>If column width is not specified in the XML, tables will look different depending on\r
15             the output format. In HTML the columns automatically adjust to fit contents, but in PDF\r
16             the page width is divided evenly by the number of columns. This often wastes space in\r
17             PDF tables so setting relative column widths for all tables is recommended.</para>\r
18         <para>In the example below, the <emphasis>colwidth</emphasis> parameter defines relative\r
19             column width. Columns 1 and 2 are of equal width, each using a quarter of the page.\r
20             Column 3 is twice the size and covers the remaining half of the page.</para>\r
21 \r
22         <programlisting><![CDATA[ \r
23 <table>\r
24    <title>Title of Table Here</title>\r
25       <tgroup cols="3" align="left" colsep="1" rowsep="1">\r
26          <colspec colnum="1" colname="issues" colwidth="1*"/>\r
27          <colspec colnum="2" colname="actions" colwidth="1*"/>\r
28          <colspec colnum="3" colname="tasks" colwidth="2*"/>]]>\r
29     \r
30         </programlisting>\r
31 \r
32         <para>For details see <link\r
33                 xlink:href="http://www.sagehill.net/docbookxsl/ColumnWidths.html"\r
34                 xlink:title="http://www.sagehill.net/docbookxsl/ColumnWidths.html">DocBook XSL: The\r
35                 Complete Guide</link>.</para>\r
36 \r
37     </simplesect>\r
38 \r
39    \r
40 \r
41 </chapter>\r