Add Documentation for using single-dollar symbol for the KaTex (#2269)

* Add Documentation for using single-dollar symbol for the Katex

* xfi Katex to KaTex

* Revision pass and move to delimiters bullet

* Fix indentation, remove blank line

Co-authored-by: Erik Demaine <edemaine@mit.edu>
Co-authored-by: Ron Kok <ronkok@comcast.net>
This commit is contained in:
Tsukamoto
2020-07-11 02:24:09 +09:00
committed by GitHub
parent 48dff183b5
commit 603e299c28

View File

@@ -70,8 +70,8 @@ nodes inside this element and render the math in them.
object passed to `katex.render`](https://github.com/KaTeX/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:
- `delimiters`: This is a list of delimiters to look for math, processed in
the same order as the list. Each delimiter has three properties:
- `left`: A string which starts the math expression (i.e. the left delimiter).
- `right`: A string which ends the math expression (i.e. the right delimiter).
@@ -88,6 +88,19 @@ in addition to two auto-render-specific keys:
]
```
If you want to add support for inline math via `$...$`, be sure to list it
*after* `$$`, as in the following. (Because rules are processed in order,
putting a `$` rule first would catch `$$` as an empty math expression.)
```js
[
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false},
{left: "\\(", right: "\\)", display: false},
{left: "\\[", right: "\\]", display: true}
]
```
- `ignoredTags`: This is a list of DOM node types to ignore when recursing
through. The default value is
`["script", "noscript", "style", "textarea", "pre", "code", "option"]`.