Skip to content

MathJaxEx

Unofficial

MathJax library interface for rendering LaTeX math expressions.

Import:

import type { MathJaxEx } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface MathJaxEx

Properties

PropertyTypeDescription
configunknownMathJax configuration object.
loaderunknownMathJax component loader.
optionsunknownMathJax runtime options.
versionstringMathJax library version string.

Methods

MethodReturnsDescription
chtmlStylesheet()HTMLStyleElementGet the CHTML stylesheet element for MathJax-rendered content.
getMetricsFor(node, display?)ExtendedMetricsGet font metrics for a given DOM node, used for scaling math output.
tex2chtml(math, options?)HTMLElementConvert a TeX string to a CHTML (HTML) element synchronously.
tex2chtmlPromise(math, options?)Promise<HTMLElement>Convert a TeX string to a CHTML (HTML) element asynchronously.
tex2mml(math, options?)stringConvert a TeX string to MathML markup synchronously.
tex2mmlPromise(math, options?)Promise<string>Convert a TeX string to MathML markup asynchronously.
texReset()voidReset the TeX input jax, clearing equation numbering and labels.
typeset(elements?)voidTypeset math expressions in the given elements synchronously.
typesetClear(elements?)voidClear typeset math from the given elements.
typesetPromise(elements?)Promise<void>Typeset math expressions in the given elements asynchronously.

Links to this page: