Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | Letzte ÜberarbeitungBeide Seiten der Revision | ||
wiki:syntax [27.10.2020 um 12:15 Uhr] – Externe Bearbeitung 127.0.0.1 | wiki:syntax [22.04.2021 um 08:35 Uhr] – [Tables] Lina Förster | ||
---|---|---|---|
Zeile 302: | Zeile 302: | ||
DokuWiki supports a simple syntax to create tables. | DokuWiki supports a simple syntax to create tables. | ||
+ | |||
+ | ^Heading 1 ^Heading 2 ^Heading 3 | | ||
+ | |Row 1 Col 1 |Row 1 Col 2 |Row 1 Col 3 | | ||
+ | |Row 2 Col 1 |some colspan (note the double pipe)|| | ||
+ | |Row 3 Col 1 |Row 3 Col 2 |Row 3 Col 3 | | ||
+ | |||
+ | Table rows have to start and end with a '''' | ||
+ | < | ||
^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
Zeile 308: | Zeile 316: | ||
| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | | | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | | ||
- | Table rows have to start and end with a '' | + | </ |
- | + | ||
- | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | + | |
- | | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | | + | |
- | | Row 2 Col 1 | some colspan (note the double pipe) || | + | |
- | | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | | + | |
To connect cells horizontally, | To connect cells horizontally, | ||
Zeile 319: | Zeile 322: | ||
Vertical tableheaders are possible, too. | Vertical tableheaders are possible, too. | ||
- | | ^ Heading 1 ^ Heading 2 ^ | + | | ^Heading 1 ^Heading 2 | |
+ | ^Heading 3 |Row 1 Col 2 |Row 1 Col 3 | | ||
+ | ^Heading 4 |no colspan this time| | | ||
+ | ^Heading 5 |Row 2 Col 2 |Row 2 Col 3 | | ||
+ | |||
+ | As you can see, it's the cell separator before a cell which decides about the formatting: | ||
+ | < | ||
+ | |||
+ | | ^ Heading 1 ^ Heading 2 ^ | ||
^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | | ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | | ||
- | ^ Heading 4 | no colspan this time | | | + | ^ Heading 4 | no colspan this time | |
^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ||
- | As you can see, it's the cell separator before a cell which decides about the formatting: | + | </ |
- | | ^ Heading 1 ^ Heading 2 ^ | + | You can have rowspans (vertically connected cells) by adding ''< |
- | ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | | + | |
- | ^ Heading 4 | no colspan this time | | | + | |
- | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | + | |
- | You can have rowspans (vertically | + | ^Heading 1 ^Heading 2 ^Heading 3 | |
+ | |Row 1 Col 1 |this cell spans vertically|Row 1 Col 3 | | ||
+ | |Row 2 Col 1 | ::: |Row 2 Col 3 | | ||
+ | |Row 3 Col 1 | ::: |Row 2 Col 3 | | ||
+ | |||
+ | Apart from the rowspan syntax those cells should | ||
+ | < | ||
^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
Zeile 338: | Zeile 352: | ||
| Row 3 Col 1 | ::: | Row 2 Col 3 | | | Row 3 Col 1 | ::: | Row 2 Col 3 | | ||
- | Apart from the rowspan syntax those cells should not contain anything else. | + | </ |
- | + | ||
- | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | + | |
- | | Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | | + | |
- | | Row 2 Col 1 | ::: | Row 2 Col 3 | | + | |
- | | Row 3 Col 1 | ::: | Row 2 Col 3 | | + | |
You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text. | You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text. | ||
+ | |||
+ | ^ Table with alignment | ||
+ | | right| | ||
+ | |left | right| | ||
+ | |xxxxxxxxxxxx|xxxxxxxxxxxx|xxxxxxxxxxxx| | ||
+ | |||
+ | This is how it looks in the source: | ||
+ | < | ||
^ Table with alignment | ^ Table with alignment | ||
Zeile 352: | Zeile 369: | ||
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | ||
- | This is how it looks in the source: | + | </ |
- | ^ Table with alignment | + | Note: Vertical |
- | | | + | |
- | |left | | + | |
- | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | + | |
- | Note: Vertical alignment is not supported. | ||
===== No Formatting ===== | ===== No Formatting ===== |