====== Code, math & diagrams ====== ‹ [[wiki:syntax|Formatting Syntax]] ===== Code blocks ===== Indent a block by two spaces, or wrap it in ''%%%%'' or ''%%%%'' tags. A code block shows text exactly as typed, with a copy button. plain preformatted text ===== Syntax highlighting ===== Add a language name to colour the code (GeSHi, many languages). Add a file name to offer it as a download. class Hello { public static void main(String[] a){ System.out.println("Hi"); } } Use a dash (''-'') as the language for a downloadable file without highlighting: ''%%%%''. ===== Math (MakoWiki) ===== TeX formulas are rendered with a bundled copy of MathJax (no external requests). A code block with the language ''math'', ''tex'' or ''latex'' is a displayed formula, ''%%\( … \)%%'' is inline. Plain ''$'' stays text. a^2 + b^2 = c^2 Inline example: write ''%%\( E = mc^2 \)%%'' in a sentence. ===== Diagrams (Mermaid) ===== Mermaid diagrams use the ''%%%%'' tags (the fenced ''```mermaid'' form does **not** work here). Diagrams open in the zoom lightbox when clicked. flowchart LR A[Start] --> B{Check} --> C[Done] draw.io diagrams are also supported through the draw.io plugin (see [[doku>plugin:drawio]]). ===== Embedding a feed (RSS) ===== External RSS/ATOM feeds can be embedded. Parameters set the count, author, date and refresh period. {{rss>https://example.com/feed.rss 5 author date 1h}}