Math¶
Details¶
docutils supports LaTeX math syntax, but Typst does not support it natively. Then, translator uses the mitex package provides a way to include LaTeX math in Typst documents.
When documment uses math roles or directives, translator append code to import packages automatically.
#import expression are put on first of output.
Examples¶
Simple block¶
.. math::
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
#mitex(`
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
`)
Inline role¶
The area of a circle is :math:`A_\text{c} = (\pi/4) d^2`.
The area of a circle is #mi(`A_\text{c} = (\pi/4) d^2`).
References¶
Docutils:
Typst: