Expand description
LaTeX conversion utilities for contract math notation.
Converts Unicode math notation found in YAML contracts into
LaTeX math mode suitable for rendering with KaTeX or full LaTeX.
Functions§
- latex_
escape - Escape special LaTeX characters in plain text.
- math_
to_ latex - Convert contract math notation to LaTeX math mode.
- replace_
func - Replace
func(...)with\cmd{...}handling nested parens. Applies recursively sosqrt(a + sqrt(b))becomes\sqrt{a + \sqrt{b}}. - replace_
unicode_ cmd - Replace a Unicode symbol with a LaTeX command, inserting a trailing
space when the next character is alphabetic (prevents
\foralli).