TeX Math

Inline math goes between $` characters, and display math in fenced code blocks with the info string math:

$ comrak -e math-code
Let $`x`$ and $`y`$ be integers such that

```math
x=y + 2
```

In inline math, it behaves just like inline code:

$ comrak -e math-code
This is math:$`2000`$.

Note that math can contain embedded math:

$ comrak -e math-code
This is display math:

```math
\text{Hello $x^2$}
```
And this is inline math:
$`\text{Hello $x$ there!}`$

Dollar signs are not required to be escaped with backslashes. They may be required to render the math properly, but it’s not required for parsing:

$ comrak -e math-code
$`\text{$}`$

Everything inside the math construct is treated as math, and not given its normal CommonMark meaning:

$ comrak -e math-code
$`b<a>c`$

Double dollar signs are not supported:

$ comrak -e math-code
$$`1 + 2`$$