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
Next revision
Previous revision
wiki:syntax [2023/09/23 17:00] – [Media Files] gabriek1wiki:syntax [2023/10/14 23:43] (current) – [Tables] gabriek1
Line 117: Line 117:
 ==== Image Links ==== ==== Image Links ====
  
-You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this:+You can also use an image to link to another internal or external page by combining the syntax for links and images (see below) like this: 
 <code> <code>
- +{{https://static.independent.co.uk/2023/08/21/18/newFile.jpg?width=400}}
-{{https://static.independent.co.uk/2023/08/21/18/newFile.jpg?width=1200}}+
  
 </code> </code>
  
-{{https://static.independent.co.uk/2023/08/21/18/newFile.jpg?direct&1200|newfile.jpg}}+{{https://static.independent.co.uk/2023/08/21/18/newFile.jpg?width=400}}
  
 Please note: The image formatting is the only formatting syntax accepted in link names. Please note: The image formatting is the only formatting syntax accepted in link names.
  
 The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links). The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links).
 +
  
 ===== Footnotes ===== ===== Footnotes =====
Line 165: Line 166:
 ===== Media Files ===== ===== Media Files =====
  
-You can include external and internal [[doku>www.dokuwiki.org/www.dokuwiki.org/images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them.+You can include external and internal images, videos and audio files with curly brackets. Optionally you can specify the size of them.
  
 Real size: {{:wiki:logo.png?200}} Real size: {{:wiki:logo.png?200}}
Line 173: Line 174:
 Resize to given width and height((when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing)) : {{:wiki:logo.png?200x50}} Resize to given width and height((when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing)) : {{:wiki:logo.png?200x50}}
  
-Resized external image: {{https://static.independent.co.uk/2023/08/21/18/newFile.jpg?width=1200?linkonly|newFile.jpg?width=1200}}+External image: {{https://static.independent.co.uk/2023/08/21/18/newFile.jpg?width=200}}
 <code> <code>
  
Line 179: Line 180:
 Resize to given width:            {{wiki:logo.png?50}} Resize to given width:            {{wiki:logo.png?50}}
 Resize to given width and height: {{wiki:logo.png?200x50}} Resize to given width and height: {{wiki:logo.png?200x50}}
-Resized external image:           {{https://static.independent.co.uk/2023/08/21/18/newFile.jpg?width=150}}+External image:           {{https://static.independent.co.uk/2023/08/21/18/newFile.jpg?width=200}}
  
 </code> </code>
Line 210: Line 211:
  
 For linking an image to another page see [[#image_links|Image Links]] above. For linking an image to another page see [[#image_links|Image Links]] above.
 +
 +----
  
 ---- ----
Line 348: 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 365: 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 379: 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.
Line 394: Line 404:
 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  ^^| | | | | | | | | +          Table with alignment           ^^^ 
- right|  center  |left    |left   right|  center    |xxxxxxxxxxxx|xxxxxxxxxxxx|xxxxxxxxxxxx|+        right|    center    |left          | 
 +|left                  right|    center    | 
 +| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
  
 This is how it looks in the source: This is how it looks in the source:
Line 488: Line 500:
 ===== Math ===== ===== Math =====
  
-There is support for math rendering using TeX. You can use [[https://www.math.brown.edu/johsilve/ReferenceCards/TeXRefCard.v1.5.pdf|this]] reference card when trying to type mathematical expressions.+There is support for math rendering using TeX syntax. You can use [[https://www.math.brown.edu/johsilve/ReferenceCards/TeXRefCard.v1.5.pdf|this]] reference card when trying to type mathematical expressions.
  
 You can create inline $f(x) = \frac{1}{2\pi} \int_{-\infty}^{\infty} e^{-\frac{x^2}{2}} dx$ notation You can create inline $f(x) = \frac{1}{2\pi} \int_{-\infty}^{\infty} e^{-\frac{x^2}{2}} dx$ notation