mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-11-10 11:51:36 +08:00
docs: Update README for katexRenderOptions
This commit is contained in:
parent
46345f2c56
commit
8a9e20eb45
19
README.md
19
README.md
@ -115,7 +115,8 @@ InlineEditor.defaultConfig = {
|
|||||||
forceOutputType: false, // forces output to use outputType
|
forceOutputType: false, // forces output to use outputType
|
||||||
enablePreview: true, // Enable preview view
|
enablePreview: true, // Enable preview view
|
||||||
previewClassName: [], // Class names to add to previews
|
previewClassName: [], // Class names to add to previews
|
||||||
popupClassName: [] // Class names to add to math popup balloon
|
popupClassName: [], // Class names to add to math popup balloon
|
||||||
|
katexRenderOptions: {} // KaTeX only options for katex.render(ToString)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -135,6 +136,22 @@ InlineEditor.defaultConfig = {
|
|||||||
|
|
||||||
[<img src="https://katex.org/img/katex-logo-black.svg" width="130" alt="KaTeX">](https://katex.org/)
|
[<img src="https://katex.org/img/katex-logo-black.svg" width="130" alt="KaTeX">](https://katex.org/)
|
||||||
|
|
||||||
|
- `katexRenderOptions` - pass [options](https://katex.org/docs/options.html).
|
||||||
|
|
||||||
|
```js
|
||||||
|
InlineEditor.defaultConfig = {
|
||||||
|
// ...
|
||||||
|
math: {
|
||||||
|
engine: 'katex'
|
||||||
|
katexRenderOptions: {
|
||||||
|
macros: {
|
||||||
|
"\\neq": "\\mathrel{\\char`≠}",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
**Custom typesetting**
|
**Custom typesetting**
|
||||||
|
|
||||||
Custom typesetting is possible to implement with engine config. For example, custom typesetting feature can be used when use back end rendering.
|
Custom typesetting is possible to implement with engine config. For example, custom typesetting feature can be used when use back end rendering.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user