doc:tables

part of the GtC documentation

Tables

Try out all these techniques below in the playground.

In the editing toolbar, there is an icon for a few things: . Clicking on that brings up a menu: . It's the second of these, Add table with caption that helps here. Clicking there gives you this …

<table>
<caption>caption</caption>
^ Header1 ^ Header2 ^
| foo    | bar    |
</table>

… and you can extend on this by adapting and repeating the patterns you see there. This takes us into the territory of …

The key to the alignment of table cells are the spaces. In short, put two or more spaces where you don't want the contents to be. Zero or one space either side of cell contents will result in default left-alignment.

<table tab_label>
<caption>A table to demonstrate table cell alignment</caption>
^ Col 1 ^ Col 2 ^ Col 3 ^ Col 4 ^ Col 5 ^ Col 6 ^ padding ^
| xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|left       |  centred  |  right|left       |  centred  |  right|?|
|  centred  |  right|left       |  centred  |  right| left  |?|
|  right | left       |    centred    |  right | left       |  centred  |?|
| xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxxxxxxxxxxxx |
</table>
Table 1: A table to demonstrate table cell alignment
Col 1 Col 2 Col 3 Col 4 Col 5 Col 6 padding
xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx
left centred rightleft centred right?
centred rightleft centred right left ?
right left centred right left centred ?
xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx

More detail on DokuWiki: syntax#tables

  • doc/tables.1774961441.txt.gz
  • Last modified: 2026/03/31 12:50
  • by Simon Grant