Quartz uses Katex by default to typeset both inline and block math expressions at build time. MathJax and Typst are available with the Latex plugin’s renderEngine option (katex, mathjax or typst).
Syntax
Block Math
Block math can be rendered by delimiting math expression with $$.
$$
f(x) = \int_{-\infty}^\infty
f\hat(\xi),e^{2 \pi i \xi x}
\,d\xi
$$
Warn
Due to limitations in the underlying parsing library, block math in Quartz requires the
$$delimiters to be on newlines like above.
Inline Math
Similarly, inline math can be rendered by delimiting math expression with a single $. For example, $e^{i\pi} = -1$ produces
Escaping symbols
With ObsidianFlavoredMarkdown, dollar signs follow Obsidian’s rules: a $ followed by a space or a digit after the closing $ doesn’t start or end math, so prices like I have $1 and you have $2 stay text, as in Obsidian.
If a pair of $ would still be read as math where you don’t want it (for example $a and b$), escape the dollar sign as \$: \$a and b\$ produces $a and b$.
Using mhchem
If you are using the community Latex plugin, you can add mhchem support by forking the plugin repository and adding the following import to the top of src/index.ts (before all the other imports):
import "katex/contrib/mhchem"Customization
Latex parsing is a functionality of the Latex plugin. See the plugin page for customization options.