The HTMLElement node class
The Text node class
The Document class
The DOM adaptor to use for input and output
The document being processed (e.g., DOM document, or Markdown string)
An array of input jax to run on the document
The kind of MathDocument (e.g., "HTML")
The list of MathItems found in this page
The MmlFactory to be used for input jax and error processing
The options for the document
The output jax to use for the document
This object tracks what operations have been performed, so that (when asynchronous operations are used), the ones that have already been completed won't be performed again.
The list of actions to take during a render() or convert() call
Return a promise that resolves when all of the action promises have been resolved
The id of the action to add
The RenderAction to take
Reset the processed values and clear the MathList (so that new math can be processed in the document).
The math document instance
Clear the typeset MathItems that are within the given container from the document's MathList. (E.g., when the content of the container has been updated and you want to remove the associated MathItems)
The container DOM elements whose math items are to be removed
The removed MathItems
Clear the action promises
Calls the input jax to process the MathItems in the MathList
The math document instance
Convert a math string to the document's output format
The math string to convert
Optional
options: OptionListThe options for the conversion (e.g., format, ex, em, etc.)
The MmlNode or N node for the converted content
Convert a math string to the document's output format
The math string to convert
Optional
options: OptionListThe options for the conversion (e.g., format, ex, em, etc.)
A promise that resolves when the conversion is complete
Indicate that the MathDocument is no longer needed.
Locates the math in the document and constructs the MathList for the document.
Optional
options: OptionListThe options for locating the math
The math document instance
Gets the metric information for the MathItems
The math document instance
Removes the typeset math from the document
Optional
restore: booleanTrue if the original math should be put back into the document as well
The math document instance
The id of the action to remove
Perform the renderActions on the document with retry handling
A promise that resolves when the render is complete
Rerender the MathItems on the page
Optional
start: numberThe state to start rerendering at
The math document instance
Rerender the MathItems on the page
Optional
start: numberThe state to start rerendering at
A promise that resolves when the rerender is complete
Clear the processed values so that the document can be reprocessed
Optional
options: ResetListThe things to be reset
The math document instance
Save a promise in the action romises list
Set the state of the document (allowing you to roll back the state to a previous one, if needed).
The new state of the document
Optional
restore: booleanTrue if the original math should be put back into the document during the rollback
The math document instance
Calls the output jax to process the compiled math in the MathList
The math document instance
Updates the document to include the typeset math
The math document instance
Perform an action when previous actions are complete. (Used to chain promise-based typeset and conversion actions.)
The MathDocument interface
The MathDocument is created by MathJax.Document() and holds the document, the math found in it, and so on. The methods of the MathDocument all return the MathDocument itself, so you can chain the method calls. E.g.,
const html = MathJax.Document('...'); html.findMath() .compile() .getMetrics() .typeset() .updateDocument();
The MathDocument is the main interface for page authors to interact with MathJax.