Interface LatexFormatOptions

Options that influence LaTeX conversion with Editor.toLatex.

Hierarchy

Index

Properties

Optional dialect

dialect: "jax" | "latex" | "xelatex"

The dialect of LaTeX to target. Possible values:

  • "latex" to produce standard LaTeX code (for example, for use with LaTeX2e).
  • "xelatex" to produce XeLaTeX code.
  • "jax" to produce code for use with MathJax.

The default is "latex".

Optional display

display: "auto" | "block" | "inline"

A hint as to whether to prefer treating document lines as inline or block content. Possible values:

  • "auto" to decide how to format each line based on its content.
  • "block" to display each line on its own, similar to how a figure or diagram might be included between surrounding text.
  • "inline" to display the line as part of the surrounding text without setting it off in a separate paragraph. Some content may be formatted differently in order to minimize the effect on the line height. For example, large operators like sum may be somewhat smaller and their details may appear beside the operator rather than above and below it.

The default is "auto".

Optional preamble

preamble: boolean

If true, generates a complete document including a preamble. The preamble will include any packages required by the generated code. If relevant, the generated code will also be wrapped in a document environment. If false, only LaTeX code for the actual math content is generated; it is up to the caller to make sure any required packages or commands are defined. The default is true.

Optional scopeIsolation

scopeIsolation: boolean

When set to true and using the "jax" dialect, definitions in the generated code will not affect other LaTeX code on the page. This requires that your MathJax configuration include the begingroup.js extension:

TeX: {
  extensions: ["begingroup.js"]
}

The default is false. This has no effect if preamble is false.

Optional style

style: "traditional" | "micd"

A hint as to the desired overall style of the generated output. Possible values:

  • "traditional" to produce a typical LaTeX document.
  • "micd" to produce a document formatted to better match how the document appears in the editor.

The default is "micd". This may have no or limited effect depending on the dialect and whether preamble is false.

This API is still under development and is subject to change. Copyright © Math I Can Do Solutions Incorporated and/or its licensors.