DocBook 5 customization layer - formatting columns

HelenM
Posts: 11
Joined: Mon Mar 25, 2013 9:52 pm

DocBook 5 customization layer - formatting columns

Post by HelenM » Wed Mar 27, 2013 1:36 pm

Hi everyone

I am currently creating a customization layer for output to PDF and my document has to have two columns. I have created the columns, but am wondering how to control the text flow. I actually need two blocks of text to be in the left column and two in the right column. At the moment it flows naturally so that only the fourth block of text is in the right column. Can anyone advise on the best way to achieve equal columns? Perhaps putting the content in an informaltable (or each text block in a different informaltable)?

Thank you very much.

Best wishes,
Helen

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: DocBook 5 customization layer - formatting columns

Post by sorin_ristache » Thu Mar 28, 2013 11:36 am

Hi Helen,

You can do that without a customization layer. Did you try a table with no caption, no border lines displayed, two rows and two columns? It does not matter if one table cell contains just a few words and other cell contains a hundred words, the table cells will still be aligned in two rows and two columns. For example:

Code: Select all

  <informaltable frame="void">
<tbody>
<tr>
<td>para1</td>
<td>para3</td>
</tr>
<tr>
<td>para2</td>
<td>para4</td>
</tr>
</tbody>
</informaltable>

Maybe it looks better if the table has only one row, with two paragraphs in each cell:

Code: Select all

  <informaltable frame="void">
<tbody>
<tr>
<td>
<para>para1<para/>
<para>para2<para/>
</td>
<td>
<para>para3<para/>
<para>para4<para/>
</td>
</tr>
</tbody>
</informaltable>

Regards,
Sorin

HelenM
Posts: 11
Joined: Mon Mar 25, 2013 9:52 pm

Re: DocBook 5 customization layer - formatting columns

Post by HelenM » Thu Mar 28, 2013 4:29 pm

Hi Sorin

Of course! I didn't think of doing it that way! Makes a lot of sense.

Thank you very much.

Helen

Post Reply