Page 1 of 1

DocBook 5 customization layer - formatting columns

Posted: Wed Mar 27, 2013 1:36 pm
by HelenM
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

Re: DocBook 5 customization layer - formatting columns

Posted: Thu Mar 28, 2013 11:36 am
by sorin_ristache
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

Re: DocBook 5 customization layer - formatting columns

Posted: Thu Mar 28, 2013 4:29 pm
by HelenM
Hi Sorin

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

Thank you very much.

Helen