Support all render options in auto-render.

Closes #690.
This commit is contained in:
Alex Pearce
2017-02-10 20:07:50 +01:00
committed by Erik Demaine
parent 25dde7f841
commit 60b1969a01
2 changed files with 23 additions and 29 deletions

View File

@@ -55,7 +55,9 @@ function renderMathInElement(elem, options)
`elem` is an HTML DOM element. The function will recursively search for text
nodes inside this element and render the math in them.
`options` is an optional object argument with the following keys:
`options` is an optional object argument that can have the same keys as [the
object passed to `katex.render`](https://github.com/Khan/KaTeX/#rendering-options),
in addition to two auto-render-specific keys:
- `delimiters`: This is a list of delimiters to look for math. Each delimiter
has three properties:
@@ -78,3 +80,7 @@ nodes inside this element and render the math in them.
- `ignoredTags`: This is a list of DOM node types to ignore when recursing
through. The default value is
`["script", "noscript", "style", "textarea", "pre", "code"]`.
Note that the `displayMode` property of the options object is ignored, and is
instead taken from the `display` key of the corresponding entry in the
`delimiters` key.