wiki:syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
wiki:syntax [2023/10/14 23:42] – [Tables] gabriek1wiki:syntax [2023/10/14 23:43] (current) – [Tables] gabriek1
Line 351: Line 351:
 DokuWiki supports a simple syntax to create tables. DokuWiki supports a simple syntax to create tables.
  
-^Heading 1  ^Heading 2  ^Heading 3  | | | | | | | | | +^ 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  |+| 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 | for normal rows or a ^ for headers. Table rows have to start and end with a | for normal rows or a ^ for headers.
Line 368: Line 370:
 Vertical tableheaders are possible, too. Vertical tableheaders are possible, too.
  
-|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  |+| 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: As you can see, it's the cell separator before a cell which decides about the formatting:
Line 382: Line 387:
 You can have rowspans (vertically connected cells) by adding ''<nowiki>:::</nowiki>'' into the cells below the one to which they should connect. You can have rowspans (vertically connected cells) by adding ''<nowiki>:::</nowiki>'' into the cells below the one to which they should connect.
  
-^Heading 1  ^Heading 2  ^Heading 3  | | | | | | | | | +^ 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  |+| 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 not contain anything else. Apart from the rowspan syntax those cells should not contain anything else.