!latex

Maths inside a sentence: LaTeX between single dollar signs, typeset with KaTeX.

!latexMicronode
On this page

#Examples

The area of the disc is $\pi r^2$.
Since $f'(x) = 2x$, the tangent at $x = 3$ has slope $6$.

#Notes

  • equation is the same notation on a line of its own.
  • $$…$$ is not display maths: each $$ is an empty $…$, and what sits between them prints as plain text.
  • A backslash before a dollar sign prints it: It costs \$5. A lone dollar sign with no partner also prints as itself, but two on one line pair and open maths.
  • Where the maths between two dollar signs reads as words, the compiler warns (prose/words-in-maths) with '5 and' is set as maths: two '$' signs on one line open a maths span. Write a dollar sign as \$.
  • A {{…}} in the body is spliced while the document compiles, so $y = {{2 * 3}}$ sets y = 6 and a @let value works. A value read from the canvas, such as {{#k.value}}, is refused: the plain-text body of latex is decided while the document compiles and cannot take a value waiting on #k.value.
  • In the narrative, inline maths does not break across lines, and the punctuation touching it stays on its line.

#Writing guidance

  • Prose & headings — What the narrative carries that the picture cannot, headings a reader can navigate by, and maths as LaTeX.

Last updated