4.7. Tables

Some ideas are best shown when formatted as tables.

A primitive way to create tables was already presented in Table 4-1 with the use of <simplelist>. However, DocBook has more sophisticated methods to deal with this information.

Example 4-7. Inserting tables

<table frame="all">
  <title>Sample Table</title>
  <tgroup cols="5">
    <colspec colname="column1">
    <colspec colname="column2">
    <colspec colname="column3">
    <colspec colnum="5" colname="column5">
    <spanspec namest="column1" nameend="column2" spanname="span-horiz" align="center">
    <spanspec namest="column2" nameend="column3" spanname="span-horiz-vert" align="center">
        <entry spanname="span-horiz">
           <foreignphrase>Span</foreignphrase> horizontal
        <entry>Heading 2</entry>
        <entry>Heading 3</entry>
        <entry>Heading 4</entry>
        <entry>Footing 1</entry>
        <entry>Footing 2</entry>
        <entry>Footing 3</entry>
        <entry>Footing 4</entry>
        <entry>Footing 5</entry>
        <entry morerows="1" valign="middle">
           Vertical <foreignphrase>Span</foreignphrase>
        <entry spanname="span-horiz-vert" morerows="1" valign="bottom">
           Double <foreignphrase>Span</foreignphrase> 


Table 4-2. Example Table

Horizontal Span Heading 2 Heading 3 Heading 4
Data11 Data12 Data13 Data14 Data15
Data21 Data22 Data23 Data24 Vertical Span
Data31 Double Span Data34
Data41 Data44 Data45
Footing 1 Footing 2 Footing 3 Footing 4 Footing 5