Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
wiki:syntax [22.04.2021 um 08:35 Uhr] – [Tables] Lina Försterwiki:syntax [19.07.2023 um 07:27 Uhr] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 247: Zeile 247:
   * ;-) %%  ;-)  %%   * ;-) %%  ;-)  %%
   * ^_^ %%  ^_^  %%   * ^_^ %%  ^_^  %%
 +  * m(  %%  m(   %%
   * :?: %%  :?:  %%   * :?: %%  :?:  %%
   * :!: %%  :!:  %%   * :!: %%  :!:  %%
Zeile 302: Zeile 303:
  
 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 ''''| for normal rows or a ''''^ for headers. 
-<code> 
  
 ^ Heading 1      ^ Heading 2       ^ Heading 3          ^ ^ Heading 1      ^ Heading 2       ^ Heading 3          ^
Zeile 316: Zeile 309:
 | Row 3 Col 1    | Row 3 Col 2     | Row 3 Col 3        | | Row 3 Col 1    | Row 3 Col 2     | Row 3 Col 3        |
  
-</code>+Table rows have to start and end with a ''|'' for normal rows or a ''^'' for headers. 
 + 
 +  ^ 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, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators! To connect cells horizontally, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators!
Zeile 322: Zeile 320:
 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: +
-<code> +
- +
-|   ^ 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        |
  
-</code>+As you can see, it's the cell separator before a cell which decides about the formatting:
  
-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    | 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  | +You can have rowspans (vertically connected cells) by adding ''%%:::%%'' into the cells below the one to which they should connect.
-|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. +
-<code>+
  
 ^ Heading 1      ^ Heading 2                  ^ Heading 3          ^ ^ Heading 1      ^ Heading 2                  ^ Heading 3          ^
Zeile 352: Zeile 339:
 | Row 3 Col 1    | :::                        | Row 2 Col 3        | | Row 3 Col 1    | :::                        | Row 2 Col 3        |
  
-</code>+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|  center  |left  | 
-|left  |  right|  center  | 
-|xxxxxxxxxxxx|xxxxxxxxxxxx|xxxxxxxxxxxx| 
- 
-This is how it looks in the source: 
-<code> 
  
 ^           Table with alignment           ^^^ ^           Table with alignment           ^^^
Zeile 369: Zeile 353:
 | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
  
-</code>+This is how it looks in the source:
  
-Note: Vertical alignment is not supported.+  ^           Table with alignment           ^^^ 
 +  |         right|    center    |left          | 
 +  |left          |         right|    center    | 
 +  | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
  
 +Note: Vertical alignment is not supported.
  
 ===== No Formatting ===== ===== No Formatting =====
Zeile 449: Zeile 437:
  
 If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''.
- 
- 
-===== Embedding HTML and PHP ===== 
- 
-You can embed raw HTML or PHP code into your documents by using the ''%%<html>%%'' or ''%%<php>%%'' tags. (Use uppercase tags if you need to enclose block level elements.) 
- 
-HTML example: 
- 
-<code> 
-<html> 
-This is some <span style="color:red;font-size:150%;">inline HTML</span> 
-</html> 
-<HTML> 
-<p style="border:2px dashed red;">And this is some block HTML</p> 
-</HTML> 
-</code> 
- 
-<html> 
-This is some <span style="color:red;font-size:150%;">inline HTML</span> 
-</html> 
-<HTML> 
-<p style="border:2px dashed red;">And this is some block HTML</p> 
-</HTML> 
- 
-PHP example: 
- 
-<code> 
-<php> 
-echo 'The PHP version: '; 
-echo phpversion(); 
-echo ' (generated inline HTML)'; 
-</php> 
-<PHP> 
-echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 
-echo '<td>'.phpversion().'</td>'; 
-echo '</tr></table>'; 
-</PHP> 
-</code> 
- 
-<php> 
-echo 'The PHP version: '; 
-echo phpversion(); 
-echo ' (inline HTML)'; 
-</php> 
-<PHP> 
-echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 
-echo '<td>'.phpversion().'</td>'; 
-echo '</tr></table>'; 
-</PHP> 
- 
-**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. 
  
 ===== RSS/ATOM Feed Aggregation ===== ===== RSS/ATOM Feed Aggregation =====
Zeile 509: Zeile 446:
 | author     | show item authors names | | author     | show item authors names |
 | date       | show item dates | | date       | show item dates |
-| description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped |+| description| show the item description. All HTML tags will be stripped |
 | nosort     | do not sort the items in the feed | | nosort     | do not sort the items in the feed |
 | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). |