Title: Theory / Unimportant / CS / Descriptive / Web / MathJax

Name: MathJax
Definition: an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers

Name: MathJax user interface
Definition: MathJax Menu
Definition2: various MathJax messages, such as syntax error messages from the TeX input processor.
Conjdef: Both

Name: MathJax accessibility extension
Definition: Several tools and features that enable universal rendering of mathematics on the web
Page: http://docs.mathjax.org/en/latest/basic/accessibility.html

Instruction: $$foo$$ or \[foo\]
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Context: MathJax
Returns: foo interpreted as displayed [latex]\LaTeX[/latex] mathematics

Instruction: \(foo\)
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Returns: foo interpreted as inline [latex]\LaTeX[/latex] mathematics

Instruction: <math display="block">
foo
</math>
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Language: HTML
Returns: foo interpreted as display mathml mathematics

Instruction: <math display="inline">foo</math>
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Returns: foo interpreted as inline MathML mathematics

Instruction: `foo`
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Language: MathJax
Returns: foo interpreted as AsciiMath math

Instruction: MathJax['tex']['inlineMath']
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Language: MathJax
Returns: List of pair of opening and closing delimiter of inline mathjax

Instruction: MathJax['tex']['package']
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Language: MathJax
Returns: List of [latex]\TeX[/latex] packages to load with MathJax

Instruction: MathJax.startup.defaultReady()
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Language: MathJax
Returns: The function called by default when all mathjax elements are loaded

Instruction: MathJax['startup']['ready']
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Language: MathJax
Returns: The function called when all mathjax elements are loaded.

Instruction: MathJax.startup.promise
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Language: MathJax
Returns: A promise that is resolved when the initial typesetting is complete

Instruction: MathJax['startup']['pageReady']
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Language: MathJax
Returns: Function called when the page is ready

Instruction: MathJax.startup.defaultPageReady()
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Language: MathJax
Returns: Default function called with the page is ready

Name: Component
Definition: A part of MathJax Code, to be downloaded at moste once, if required by setting
Page: http://docs.mathjax.org/en/latest/basic/mathematics.html
Context: MathJax

Name: Combined Component
Definition: A bundle of component with at least one input and one output component
Page: http://docs.mathjax.org/en/latest/web/components/combined.html
Context: MathJax

Name: Input Component
Definition: A component allowing to read math in a page
Page: http://docs.mathjax.org/en/latest/web/components/input.html
Context: MathJax

Name: output Component
Definition: A component allowing to display mathematic formula in some way
Page: http://docs.mathjax.org/en/latest/web/components/output.html
Context: MathJax

Name: Accessibility Component
Definition: A component allowing to support assistive technology
Page: http://docs.mathjax.org/en/latest/web/components/output.html
Context: MathJax

Instruction: typeset()
Page: http://docs.mathjax.org/en/latest/web/components/output.html
Effect: Typeset the whole page
Context: MathJax

Instruction: typesetPromise()
Page: http://docs.mathjax.org/en/latest/web/components/output.html
Effect: Start a process typesetting the whole page as a promise
Context: MathJax

Instruction: typeset/typesetPromise(elt)
Page: http://docs.mathjax.org/en/latest/web/components/output.html
Effect: Similar as typeset/typesetPromise, but restricted to element(s) of elt, or satsifying the elt selector
Context: MathJax

Question: How to deal with successive typesettings?
Answer: function typeset(code) {
  MathJax.startup.promise = MathJax.startup.promise
    .then(() => MathJax.typesetPromise(code()))
    .catch((err) => console.log('Typeset failed: ' + err.message));
  return MathJax.startup.promise;
}
Page: http://docs.mathjax.org/en/latest/web/typeset.html
Context: MathJax

Instruction: typesetClear(foo)
Page: http://docs.mathjax.org/en/latest/web/typeset.html
Effect: Let mathjax knows math from foo is removed
Context: MathJax

Instruction: getMathItemsWithin(foo)
Page: http://docs.mathjax.org/en/latest/web/typeset.html
Effect: Return all math items from foo
Context: MathJax
Returns: All math items from foo

Instruction: input2output(foo)
Page: http://docs.mathjax.org/en/latest/web/typeset.html
Context: MathJax
Returns: a DOM object encoding the math of foo in format output

Instruction: getMetricsFor(foo)
Page: http://docs.mathjax.org/en/latest/web/typeset.html
Context: MathJax
Returns: An item containing various metrics for node foo

Instruction: chtmlStylesheet()
Page: http://docs.mathjax.org/en/latest/web/typeset.html
Effect: Load style sheet required for all expressions typesetted up to now
Context: MathJax

Instruction: svgStylesheet()
Page: http://docs.mathjax.org/en/latest/web/typeset.html
Effect: Load style sheet required for all expressions typesetted up to now
Context: MathJax