Sorenavo / Learning guideTry in the editor
Online editorMarkdown Advanced

02 / EXTENDED SYNTAX

Advanced Markdown

Explore the extended syntax supported by this site: Mermaid diagrams, KaTeX math, superscripts, subscripts and footnotes. Copy any example into the editor to try it.

Mermaid diagrams

Code blocks marked mermaid render as diagrams. Start with flowchart and a direction: LR for left to right or TD for top to bottom.

Write nodes as id[Display text] and connect them with -->. The identifier connects nodes; the text in brackets appears in the diagram.

Flowcharts

Flowcharts describe steps, decisions and outcomes. Braces create decision nodes; |Text| on a connection labels a branch.

markdown
```mermaid
flowchart TD
  Start([Start]) --> Write[Write content]
  Write --> Check{Checks passed?}
  Check -->|Yes| Publish[Publish document]
  Check -->|No| Revise[Revise content]
  Revise --> Check
  Publish --> End([End])
```

Result:

Yes No Start Write content Checks passed? Publish document Revise content End

Fishbone diagrams

Fishbone diagrams analyze possible causes of a problem. This site uses compatible flowchart syntax: a horizontal chain forms the backbone, causes connect to its joints, and the chain leads to the outcome.

markdown
```mermaid
flowchart LR
  Bone1(( )) --> Bone2(( )) --> Bone3(( )) --> Result[Inconsistent product quality]
  People[People: insufficient training] --> Bone1
  Material[Materials: batch variation] --> Bone1
  Method[Methods: unclear process] --> Bone2
  Machine[Equipment: poor maintenance] --> Bone2
  Measure[Measurement: inconsistent standards] --> Bone3
  Environment[Environment: temperature and humidity] --> Bone3
```

Result:

Inconsistent product quality People: insufficient training Materials: batch variation Methods: unclear process Equipment: poor maintenance Measurement: inconsistent standards Environment: temperature and humidity

Mind maps

Mind maps branch out from a central topic. Use double parentheses to emphasize the center, then connect topics and details in successive levels.

markdown
```mermaid
flowchart TD
  Root((Content plan))
  Root --> Goal[Goal]
  Root --> Audience[Audience]
  Root --> Structure[Structure]
  Goal --> Explain[Explain concepts]
  Goal --> Guide[Guide actions]
  Audience --> Beginner[Beginners]
  Audience --> Team[Team members]
  Structure --> Intro[Introduction]
  Structure --> Body[Body]
  Structure --> Summary[Summary]
```

Result:

Content plan Goal Audience Structure Explain concepts Guide actions Beginners Team members Introduction Body Summary

Superscripts

Wrap superscript text in ^ without spaces inside the delimiters.

markdown
30^th^ and x^2^

Result: 30th and x2.

Subscripts

Wrap subscript text in ~ without spaces inside the delimiters.

markdown
H~2~O and CO~2~

Result: H2O and CO2.

Math formulas

Math uses LaTeX syntax and renders directly on this site. Wrap inline formulas in $; use $$ for longer expressions displayed on their own line.

In math, ^ and _ denote superscripts and subscripts. Group multiple characters with braces, as in x^{10} or a_{n+1}. This differs from the ^superscript^ and ~subscript~ syntax used in ordinary text.

Inline math

Inline formulas fit within a sentence. Keep the delimiters and expression on the same line.

markdown
Mass–energy equivalence $E = mc^2$, the area of a circle $S = \pi r^2$, and a sequence term $a_{n+1}$.

Result: Mass–energy equivalence E=mc2E = mc^2, the area of a circle S=πr2S = \pi r^2, and a sequence term an+1a_{n+1}.

Display math

Display math works well for fractions, sums, integrals and derivations. Put each opening and closing $$ on its own line.

markdown
$$
\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$

Result:

b±b24ac2a \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Multiline equations

Use the aligned environment for multiple equations. & marks alignment points and \\ starts a new line.

markdown
$$
\begin{aligned}
(a+b)^2 &= a^2 + 2ab + b^2 \\
(a-b)^2 &= a^2 - 2ab + b^2
\end{aligned}
$$

Result:

(a+b)2=a2+2ab+b2(ab)2=a22ab+b2 \begin{aligned} (a+b)^2 &= a^2 + 2ab + b^2 \\ (a-b)^2 &= a^2 - 2ab + b^2 \end{aligned}

Common expressions

Goal Syntax Result
Fraction \frac{a}{b} ab\frac{a}{b}
Square root \sqrt{x} x\sqrt{x}
Sum \sum_{i=1}^{n} i i=1ni\sum_{i=1}^{n} i
Integral \int_0^1 x^2\,dx 01x2dx\int_0^1 x^2\,dx
Greek letters \alpha, \beta, \pi α,β,π\alpha, \beta, \pi

Escape a literal dollar sign as \$ so it is not treated as a math delimiter. Invalid formulas display an error in the preview, with an option to locate the source.

Footnotes

Add a footnote reference with [^name] and define it elsewhere using [^name]:. The name links the two parts and is not shown to readers.

markdown
This sentence needs an additional explanation.[^note]

[^note]: This is the footnote text.

Result below. Click the footnote number to jump to the bottom, then use the return symbol to go back.

This sentence needs an additional explanation.[1]


  1. This is the footnote text. ↩︎