Site Tools


syntax

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
syntax [August 26, 2026 at 15:46] – created - external edit 127.0.0.1syntax [September 17, 2026 at 16:22] (current) – Update for markdowku fixes 0.0.0.0
Line 37: Line 37:
 <code> <code>
 **bold** and //italic// and *italic* and _italic_ **bold** and //italic// and *italic* and _italic_
-__underline__ and ''monospace'' and `monospace`+__underlined text__ and ''monospace'' and `monospace`
 **//combined//** works too **//combined//** works too
 <del>deleted</del>, <sub>subscript</sub>, <sup>superscript</sup> <del>deleted</del>, <sub>subscript</sub>, <sup>superscript</sup>
Line 43: Line 43:
  
 **bold** and //italic// and *italic* and _italic_ **bold** and //italic// and *italic* and _italic_
-__underline__ and ''monospace'' and `monospace`+__underlined text__ and ''monospace'' and `monospace`
 **//combined//** works too **//combined//** works too
 <del>deleted</del>, <sub>subscript</sub>, <sup>superscript</sup> <del>deleted</del>, <sub>subscript</sub>, <sup>superscript</sup>
  
-Note that `''...''` is DokuWiki markup and still parses what is inside it, while backticks are Markdown and take their content literally. Markdown's `~~strikethrough~~` is **not** supported. Use `<del>` instead.+Note that `''...''` is DokuWiki markup and still parses what is inside it, while backticks are Markdown and take their content literally. Markdown's `~~strikethrough~~` is **not** supported. Use `<del>` instead. A single name in double underscores, such as `__init__`, is not underlined and stays as written.
  
 ## Paragraphs and line breaks ## Paragraphs and line breaks
Line 53: Line 53:
 A blank line starts a new paragraph. Single newlines inside a paragraph are ignored. A blank line starts a new paragraph. Single newlines inside a paragraph are ignored.
  
-Forced line breaks come in two forms, both of which need the trailing whitespace:+Forced line breaks come in three forms:
  
 <code> <code>
 DokuWiki style\\ next line DokuWiki style\\ next line
 Markdown style, two trailing spaces   Markdown style, two trailing spaces  
 +next line
 +Markdown style, a trailing backslash\
 next line next line
 </code> </code>
  
-`\\` immediately followed by a letter does nothing. It needs a space or an end of line after it.+`\\` immediately followed by a letter is an escaped backslash and shows as a single `\`. A line break needs a space or an end of line after it. The Markdown forms only break before another line of the same paragraph.
  
 ## Links ## Links
Line 93: Line 95:
 </code> </code>
  
-A **bare e-mail address is not linked**. It needs the angle brackets. The available interwiki shortcuts are listed in `conf/interwiki.conf`.+A bare e-mail address is linked too, and obfuscated the same way. The available interwiki shortcuts are listed in `conf/interwiki.conf`.
  
 Link text is plain text: `**bold**` inside a link title is printed literally, not rendered. Math and images are the exceptions: `[[ket-0|$\lvert 0\rangle$]]` and `[[qubit|{{img.png}}]]` both work. Link text is plain text: `**bold**` inside a link title is printed literally, not rendered. Math and images are the exceptions: `[[ket-0|$\lvert 0\rangle$]]` and `[[qubit|{{img.png}}]]` both work.
Line 260: Line 262:
 | ''%%\CC%%'' | $\CC$ | | ''%%\CC%%'' | $\CC$ |
  
-Two limitations worth knowing:+Two more things worth knowing:
  
- - `\(...\)` and `\[...\]` **do not work**, even though KaTeX is configured for them. The Markdown escape handling eats the backslash before KaTeX ever sees it. Use `$` and `$$`.+ - `\(...\)` and `\[...\]` work as delimiters too.
  - Math inside code blocks and inline code stays literal, which is exactly what you want when writing *about* math syntax.  - Math inside code blocks and inline code stays literal, which is exactly what you want when writing *about* math syntax.
  
Line 363: Line 365:
 ---- ----
  
-Keep a **blank line above it**. A row of dashes directly underneath a line of text is a Setext heading, not a rule. That is true even inside a code block, which is why the example above is a live rule rather than a listing.+Keep a **blank line above it**. A row of dashes directly underneath a line of text is a Setext heading, not a rule.
  
 ## Smileys and typography ## Smileys and typography
Line 381: Line 383:
  
 ^ Type ^ Get ^ Type ^ Get ^ ^ Type ^ Get ^ Type ^ Get ^
-| ''%%->%%'' | -> | ''%%(c)%%'' | (c) |+| ''%%->%%'' | -> | ''%%<=%%'' | <= |
 | ''%%<-%%'' | <- | ''%%(tm)%%'' | (tm) | | ''%%<-%%'' | <- | ''%%(tm)%%'' | (tm) |
-| ''%%<->%%'' | <-> | ''%%(r)%%'' | (r) |+| ''%%<->%%'' | <-> | ''%%>=%%'' | >= |
 | ''%%=>%%'' | => | ''%%...%%'' | ... | | ''%%=>%%'' | => | ''%%...%%'' | ... |
 | ''%%--%%'' | -- | ''%%---%%'' | --- | | ''%%--%%'' | -- | ''%%---%%'' | --- |
 | ''%%640x480%%'' | 640x480 | ''%%"quotes"%%'' | "quotes" | | ''%%640x480%%'' | 640x480 | ''%%"quotes"%%'' | "quotes" |
  
-The full list lives in `conf/entities.conf` and `conf/smileys.conf`. Straight quotes become curly ones automatically. Acronym expansion is switched off, so `ACL` and `API` are left alone.+The full list lives in `conf/entities.conf`, `conf/entities.local.conf` and `conf/smileys.conf`. `(c)` and `(r)` are left alone, since in technical text they are usually a list label or a permission. Straight quotes become curly ones automatically. Acronym expansion is switched off, so `ACL` and `API` are left alone.
  
 ## Escaping ## Escaping
Line 404: Line 406:
 For inline examples that contain math or wiki markup, combine the two: `''%%$x^2$%%''` renders as ''%%$x^2$%%''. The monospace wrapper keeps KaTeX out and the `%%` keeps the parser out. That idiom is used throughout this page. For inline examples that contain math or wiki markup, combine the two: `''%%$x^2$%%''` renders as ''%%$x^2$%%''. The monospace wrapper keeps KaTeX out and the `%%` keeps the parser out. That idiom is used throughout this page.
  
-Backslash escapes work for `` ` * _ { } [ ] ( ) > # + - . ! ``. That is also why `\(` and `\[` cannot be used as math delimiters.+A backslash escapes any ASCII punctuation character, for example `\*`, `\$` or `\|`. A double backslash followed by a space or a line break is still a line break.
  
 ## Control macros ## Control macros
Line 431: Line 433:
 ^ Looks like it should work ^ What actually happens ^ Use instead ^ ^ Looks like it should work ^ What actually happens ^ Use instead ^
 | ''%%- item%%'' as a numbered list | renders as a bullet | ''%%1. item%%'' | | ''%%- item%%'' as a numbered list | renders as a bullet | ''%%1. item%%'' |
-| ''%%\(x\)%%'', ''%%\[x\]%%'' | backslash is eaten, no math | ''%%$x$%%'', ''%%$$x$$%%'' | 
 | ''%%~~strike~~%%'' | printed literally | ''%%<del>strike</del>%%'' | | ''%%~~strike~~%%'' | printed literally | ''%%<del>strike</del>%%'' |
 | Markdown pipe tables | separator row shows as dashes | DokuWiki ''%%^%%'' / ''%%|%%'' tables | | Markdown pipe tables | separator row shows as dashes | DokuWiki ''%%^%%'' / ''%%|%%'' tables |
 | ''%%[text][ref]%%'' reference links | printed literally | inline links | | ''%%[text][ref]%%'' reference links | printed literally | inline links |
-| ''%%[email protected]%%'' | plain text | ''%%<[email protected]>%%'' | 
 | ''%%[[page|**bold**]]%%'' | asterisks printed literally | plain text, or math/image | | ''%%[[page|**bold**]]%%'' | asterisks printed literally | plain text, or math/image |
-| ''%%\\%%'' before a letter | printed literally | ''%%\\%%'' plus a space |+| ''%%\\%%'' before a letter | a single backslash | ''%%\\%%'' plus a space |
 | Markdown list right after a paragraph | may swallow what follows | leave a blank line, or use ''%%  *%%'' | | Markdown list right after a paragraph | may swallow what follows | leave a blank line, or use ''%%  *%%'' |
 | ''%%----%%'' right under a line of text | that line becomes a heading | leave a blank line above the rule | | ''%%----%%'' right under a line of text | that line becomes a heading | leave a blank line above the rule |
syntax.md · Last modified: by 0.0.0.0