@quartz-community/latex 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +16 -19
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -5,38 +5,35 @@ Renders LaTeX math equations using KaTeX, MathJax, or Typst rendering engines.
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx quartz plugin add
|
|
8
|
+
npx quartz plugin add @quartz-community/latex
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
+
This plugin is already enabled in the default `quartz.config.yaml`:
|
|
14
|
+
|
|
13
15
|
```yaml title="quartz.config.yaml"
|
|
14
16
|
plugins:
|
|
15
|
-
- source:
|
|
17
|
+
- source: "@quartz-community/latex"
|
|
16
18
|
enabled: true
|
|
17
19
|
options:
|
|
18
20
|
renderEngine: katex
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```ts title="quartz.ts (override)"
|
|
24
|
-
import * as ExternalPlugin from "./.quartz/plugins";
|
|
25
|
-
|
|
26
|
-
ExternalPlugin.Latex({
|
|
27
|
-
renderEngine: "katex",
|
|
28
|
-
});
|
|
21
|
+
customMacros:
|
|
22
|
+
"\\R": "\\mathbb{R}"
|
|
23
|
+
order: 80
|
|
29
24
|
```
|
|
30
25
|
|
|
31
26
|
## Configuration
|
|
32
27
|
|
|
33
|
-
| Option | Type | Default | Description
|
|
34
|
-
| ---------------- | ---------------------------------- | ----------- |
|
|
35
|
-
| `renderEngine` | `"katex" \| "mathjax" \| "typst"` | `"katex"` | The
|
|
36
|
-
| `customMacros` | `Record<string, string \| Args[]>` | `{}` | Custom LaTeX
|
|
37
|
-
| `katexOptions` | `KatexOptions` | `undefined` | Options
|
|
38
|
-
| `mathJaxOptions` | `MathjaxOptions` | `undefined` | Options
|
|
39
|
-
| `typstOptions` | `TypstOptions` | `undefined` | Options
|
|
28
|
+
| Option | Type | Default | Description |
|
|
29
|
+
| ---------------- | ---------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| `renderEngine` | `"katex" \| "mathjax" \| "typst"` | `"katex"` | The engine to render equations with: [KaTeX](https://katex.org/), [MathJax](https://www.mathjax.org/) (SVG output) or [Typst](https://typst.app/). |
|
|
31
|
+
| `customMacros` | `Record<string, string \| Args[]>` | `{}` | Custom macros for all LaTeX blocks, e.g. `{"\\R": "\\mathbb{R}"}`. Used by KaTeX and MathJax; Typst ignores it. |
|
|
32
|
+
| `katexOptions` | `KatexOptions` | `undefined` | Options passed to KaTeX ([KaTeX docs](https://katex.org/docs/options)). |
|
|
33
|
+
| `mathJaxOptions` | `MathjaxOptions` | `undefined` | Options passed to MathJax ([MathJax docs](https://docs.mathjax.org/en/latest/options/)). |
|
|
34
|
+
| `typstOptions` | `TypstOptions` | `undefined` | Options passed to the Typst renderer. |
|
|
35
|
+
|
|
36
|
+
With KaTeX, the KaTeX stylesheet and its copy-tex script are loaded from jsDelivr.
|
|
40
37
|
|
|
41
38
|
## Documentation
|
|
42
39
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quartz-community/latex",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "LaTeX/KaTeX/MathJax/Typst math rendering plugin for Quartz",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -118,6 +118,9 @@
|
|
|
118
118
|
},
|
|
119
119
|
"typstOptions": {
|
|
120
120
|
"type": "object"
|
|
121
|
+
},
|
|
122
|
+
"customMacros": {
|
|
123
|
+
"type": "object"
|
|
121
124
|
}
|
|
122
125
|
}
|
|
123
126
|
},
|