khajavi / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

Tables in DocBook #268

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Pandoc 1.6 writes DocBook tables in HTML style. That is not the best
solution as you can see here:
http://xmlguru.cz/2006/03/docbook-table-models

But please could you at least add the missing setup of the column width?

<colgroup>
<col width="18%"/>
<col width="11.2%"/>
<col width="17.2%"/>
<col width="53.5%"/>
</colgroup>

If you are there you could add tbody and thead too.
Better would be the DocBook style as described in the link above.

At the moment pandoc writes the width in something like CSS which is not valid:

<tr>
<th align="left" style="{width: 47%;}" colwidth="1*">
Column1
</th>
<th align="left" style="{width: 47%;}" colwidth="10*">
Column2
</th>
</tr>

Original issue reported on code.google.com by schm...@gmx.de on 10 Nov 2010 at 5:06

GoogleCodeExporter commented 9 years ago
You must be using an old version (older than 1.6).
Here's a sample pandoc docbook table, from the test suite:

<table>
  <caption>
    Here's the caption. It may span multiple lines.
  </caption>
  <col width="15%" />
  <col width="13%" />
  <col width="16%" />
  <col width="33%" />
  <thead>
    <tr>
      <th align="center">
        Centered Header
      </th>
      <th align="left">
        Left Aligned
      </th>
      <th align="right">
        Right Aligned
      </th>
      <th align="left">
        Default aligned
      </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td align="center">
        First
      </td>
      <td align="left">
        row
      </td>
      <td align="right">
        12.0
      </td>
      <td align="left">
        Example of a row that spans multiple lines.
      </td>
    </tr>
    <tr>
      <td align="center">
        Second
      </td>
      <td align="left">
        row
      </td>
      <td align="right">
        5.0
      </td>
      <td align="left">
        Here's another one. Note the blank line between rows.
      </td>
    </tr>
  </tbody>
</table>

Original comment by fiddloso...@gmail.com on 24 Nov 2010 at 3:38

GoogleCodeExporter commented 9 years ago
You are right. I had an old version of pandoc.
Now I get the invalid but working docbook output as shown in your post. Thanks.

Original comment by schm...@gmx.de on 25 Nov 2010 at 4:33

GoogleCodeExporter commented 9 years ago
I wasn't aware that the output was invalid -- what is invalid about it?

Original comment by fiddloso...@gmail.com on 26 Nov 2010 at 7:33