LaTeX is the most popular typesetting system for the natural sciences, its syntax has been established as a quasi-standard to format complex mathematical formulas for print and web layout.

Syntax

You can enable the render engine for LaTeX included in Perplex — called KaTeX — by setting the parameter latex to true: Either in the main configuration file for all pages or in the front-matter for specific pages.

Inline

Inline LaTeX needs to be surrounded by doubly escaped parenthesis \\( and \\) like \\(\frac{1}{5}\\) or single dollars $ like $E = mc^2$.

Block

LaTeX formulas need to be surrounded by doubly escaped square brackets \\[ and \\] or two dollar signs $$.

The following two formulas represent the reverse Fourier-transformation and an equation with infinite nested fractions, which I can’t comprehend. There are no line-breaks allowed.

\\[f(x) = \int_{-\infty}^\infty\hat f(\xi)\\, e^{2 \pi i \xi x}\\,d\xi\\]

$$\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }$$

Layout

Inline

Short expressions like \(\frac{1}{5}\) or formulas like $E = mc^2$ can be embedded in the text.

Block

Both examples are looking good, wether we can grasp their meaning or not:

\[f(x) = \int_{-\infty}^\infty\hat f(\xi)\, e^{2 \pi i \xi x}\,d\xi\]

$$\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }$$