Deutsch English Español Français Italiano Svenska

Markdown

Math

TeX math renders through a bundled MathJax, offline like everything else. The supported TeX commands cover what you would write in a paper.

Inline math

Wrap an expression in single dollar signs:

Mass–energy equivalence $E = mc^2$, Euler's identity
$e^{i\pi} + 1 = 0$, subscripts like $a_i + b_j = c_k$.

renders as: mass–energy equivalence \(E = mc^2\), Euler's identity \(e^{i\pi} + 1 = 0\), subscripts like \(a_i + b_j = c_k\).

Dollar amounts are safe. This sentence costs nothing: $5 plus $10 is $15 of plain text, because a math span must hug its dollar signs: a $ followed by a space never opens math.

Underscores inside math never become emphasis, while this right next to it still does.

Display math

Double dollar signs make a centered block:

$$\int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}$$

renders as:

The example as PeepMD renders it
PeepMD renders it like this in the GitHub style, the default.

The full TeX vocabulary is available, including matrices, Greek, and stacked fractions:

The example as PeepMD renders it
PeepMD renders it like this in the GitHub style, the default.

Note

A display block must open and close its $$ pair on the same line.

Code is never touched by the math pass: price = $total * 0.25 stays code.


Previous: Code and Diagrams · Contents · Next: CriticMarkup

Previous
Code and Diagrams