mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 11:48:41 +00:00
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:
@@ -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"]`.
|
||||
|
Reference in New Issue
Block a user