**This is an old revision of the document!**
part of the GtC documentation
Tables
Try out all these techniques below in the playground.
Using the toolbar
In the editing toolbar, there is an icon for a few miscellaneous things:
. Clicking on that brings up a menu:
. It's the second of these,
that helps here. Clicking there gives you this template …
<table tab_label> <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 …
DokuWiki syntax
The key to the alignment of table cells are the spaces. In short, put two or more spaces on the side where you don't want the contents to be. Zero or one space both sides 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 ^ | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxx | |left | centred | right|left | centred | right | | centred | right|left | centred | right| left | | right | left | centred | right | left | centred | | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxx | </table>
| Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Col 6 |
|---|---|---|---|---|---|
| xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxx |
| left | centred | right | left | centred | right |
| centred | right | left | centred | right | left |
| right | left | centred | right | left | centred |
| xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxx |
Other syntax
Markdown does not work for tables here. Perhaps there is too much overlap in syntax.
MediaWiki tables are quite difficult.
This is one of the places that DokuWiki seems to have hit a sweet spot in terms of intuitive syntax.
See also
More detail on DokuWiki: syntax#tables