9. Tables

Many information are best represented when formatted as tables.

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

Example 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">
               <foreignphrase>Span</foreignphrase> vertical
            <entry spanname="span-horiz-vert" morerows="1" valign="bottom">
               <foreignphrase>Span</foreignphrase> duplo

Table 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