HomeText stylingText colorsSource code
User Manual UDO > The UDO syntax > Text styling Index

Tables

Since Release 5 you are able to print simple tables with UDO. You can define the justification of the columns and where UDO shall print vertical and/or horizontal lines.

To print tables with UDO you need the following commands:

  1. !table_caption [<text>]
  2. !begin_table [...] {!hline}
  3. !end_table
  4. !hline
  5. !!

The command !table_caption defines the title of the next table. It has to be used before the table environment, not inside this environment!

The command !begin_table starts a table, !end_table finishes and prints the table. After !begin_table you can define the justification of the table columns and the usage of vertical lines. Use c for a centred row, l for a left justified row, r for a right justified row, and | for vertical lines inside brackets. If you add a !hline command to this line the table starts with a horizontal line.

After having described the layout of the table with the upper line you can insert the cells of the table. You have to insert a column in one source line and you have to divide the cells by using !!.

If you want to insert a horizontal line you can use the !hline command. !hline has to be at the beginning of the line and it has to be the only command of this line.

Here you will see a short example that demonstrates the usage of the upper described commands:

!table_caption Tables with UDO
!begin_table [|l|c|r|] !hline
upper left      !! up         !! upper right
lower left cell !! lower cell !! lower right cell
!hline
!end_table

This example prints a table with two rows and three columns. The first column is left justified, the second columns is centred and the third columns is printed right justified:

Table 3: Tables with UDO
upper left up upper right
lower left cell lower cell lower right cell

Because I used a | before and after every column they are divided by vertical lines. The table starts with a horizontal line because the !hline command was added at the end of !begin_table. Finally the table ends with a horizontal line because the !hline command is used right before !end_table.

The following example shows the upper table without any lines:

Table 4: Another example
upper left up upper right
lower left cell lower cell lower right cell

UDO offers you a switch called !use_ansi_tables. If you use this switch inside the preamble the lines of the table are printed by using some characters of the IBM PC graphic character set instead of +, - and | when converting into an ASCII like format like ASCII or ST-Guide. This switch has no effect if you convert to Windows Help, RTF, HTML or LaTeX.


Hints:


Copyright © www.udo-open-source.org (Contact)
Last updated on May 19, 2014

HomeText stylingText colorsSource code