Optional ReadonlymathOptions describing how math is recognized in the source text.
These options are shared with the Markdown pre-processing step
(removeMath) so that hiding math from the Markdown parser and
typesetting it stay consistent. When omitted, the default options
are assumed, including a single $ delimiter for inline math.
Typeset a DOM element.
the DOM element to typeset. The typesetting may happen synchronously or asynchronously.
OptionalwithCreate a typesetter of the same kind, using the given parse options.
This allows extensions to adjust how math is recognized without hard-coding a specific implementation, so that the typesetter chosen by the user (e.g. KaTeX rather than MathJax) is respected:
const typesetter = rmRegistry.latexTypesetter;
const latexTypesetter =
typesetter?.withParseOptions?.({ dollarInlineMath: false }) ?? typesetter;
const renderer = rmRegistry
.clone({ latexTypesetter })
.createRenderer('text/markdown');
Implementing this method is optional; callers should fall back to the original typesetter when it is not available.
The parse options to apply. Options which are omitted
(or undefined) are inherited from this typesetter.
A new typesetter; this typesetter is left unchanged.
The interface for a LaTeX typesetter.