Next in thread → Next in month →

Re: [docbook-apps] table headers

From
Michael Smith <>
Date
2005-10-11T08:27:20+00:00
ID
Thread
Re: [docbook-apps] table headers
You can either mark it up using HTML markup or CALS (DocBook 4.2+
supports both).

If you want to mark it up in HTML, just user <th> where you have
<headentry> in your pseudo-markup below.

If you want to use CALS, you need multiple <tgroup>s with their
own separate <thead>s (see Neil's earlier response). 

Like this:

<article>
  <title></title>
  <table>
  <!-- this is HTML table markup in a DocBook doc-->
    <caption>foo</caption>
    <tr>
      <th>head1</th>
      <th>head2</th>
    </tr>
    <tr>
      <td>cell1</td>
      <td>cell2</td>
    </tr>
    <tr>
      <th>head3</th>
      <th>head4</th>
    </tr>
    <tr>
      <td>cell3</td>
      <td>cell4</td>
    </tr>
  </table>
  <table>
  <!-- this is CALS table markup -->
    <title>bar</title>
    <tgroup cols="2">
    <thead>
      <row>
        <entry>head1</entry>
        <entry>head2</entry>
      </row>
    </thead>
    <tbody>
       <row>
         <entry>cell1</entry>
         <entry>cell2</entry>
       </row>
    </tbody>
    </tgroup>
    <tgroup cols="2">
    <thead>
      <row>
        <entry>head3</entry>
        <entry>head4</entry>
      </row>
    </thead>
    <tbody>
       <row>
         <entry>cell3</entry>
         <entry>cell4</entry>
       </row>
    </tbody>
    </tgroup>
  </table>
</article>

 writes:

> I'm sorry, I was being lazy and using a very (very) shorthand html snipped 
> to represent what I need to do - which is :more like:
> (although it needs to actually be in docbook). The point is that I have 
> multiple head entries, dotted about the table. Currently I am just using 
> <emphasis> to fake the head entries, but I'd much rather have it defined 
> in terms of the tables structure rather than how I want it to look - hense 
> why I am using Docbook in the first place.
> 
> <table>
>     <row>
>         <headentry></headentry> 
>         <headentry></headentry>
>     </row>
>     <row>
>         <entry></entry> 
>         <entry></entry>
>     </row>
>     <row>
>         <headentry></headentry> 
>         <entry></entry>
>     </row>
>     <row>
>         <entry></entry> 
>         <entry></entry>
>     </row>
> </table>
Next in thread → Next in month →