Skip to content

MathJaxEx

Unofficial

MathJax library interface for rendering LaTeX math expressions.

Import:

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

Signature:

export interface MathJaxEx

Properties

Property Type Description
config unknown MathJax configuration object.
loader unknown MathJax component loader.
options unknown MathJax runtime options.
version string MathJax library version string.

Methods

Method Returns Description
chtmlStylesheet() HTMLStyleElement Get the CHTML stylesheet element for MathJax-rendered content.
getMetricsFor(node, display?) ExtendedMetrics Get font metrics for a given DOM node, used for scaling math output.
tex2chtml(math, options?) HTMLElement Convert 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?) string Convert a TeX string to MathML markup synchronously.
tex2mmlPromise(math, options?) Promise<string> Convert a TeX string to MathML markup asynchronously.
texReset() void Reset the TeX input jax, clearing equation numbering and labels.
typeset(elements?) void Typeset math expressions in the given elements synchronously.
typesetClear(elements?) void Clear typeset math from the given elements.
typesetPromise(elements?) Promise<void> Typeset math expressions in the given elements asynchronously.

Links to this page: