to_math

Signature
x | to_math(options=?, optional=?)

LaTeX to MathML and/or HTML with KaTeX 0.16.22 and mhchem, as Go renders it (SHOULD; feature math). options: KaTeX’s output (mathml default, html, htmlAndMathml), displayMode, leqno, fleqn, errorColor, macros, minRuleThickness, throwOnError (default true), strict (error default, ignore, warn: warnings). An error (a formula KaTeX rejects, invalid options) fails the render; with optional=true it is a warning (id to_math) and the result none.

Arguments#

ArgumentTypeRequired
optionsmapno
optionalboolno

Details#

  • Kind: Filter, implemented by fugo.
  • Available in: every kind of template: layouts, partials, shortcodes and render hooks.
  • Output: safe HTML, not escaped.

    Type to search titles, headings and text.