@quartz-community/latex 1.0.0 → 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 +12 -0
- package/README.md +16 -19
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 03a8b99: The manifest declares the `customMacros` option, so option checks and Quartz Syncer know it.
|
|
8
|
+
|
|
9
|
+
## 1.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 3e4162a: Releases are published from GitHub Actions with npm trusted publishing, so each version on npm now carries provenance linking it to the commit and workflow that built it. No changes to the package itself.
|
|
14
|
+
|
|
3
15
|
## 1.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
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",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"typecheck": "tsc --noEmit",
|
|
45
45
|
"check": "npm run typecheck && npm run lint && npm run format && npm run test",
|
|
46
46
|
"prepublishOnly": "npm run build",
|
|
47
|
-
"release": "npm run build && changeset publish"
|
|
47
|
+
"release": "npm run build && changeset publish",
|
|
48
|
+
"version-packages": "changeset version && npm install --package-lock-only --ignore-scripts --no-audit --no-fund"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
51
|
"@myriaddreamin/rehype-typst": "^0.5.0 || ^0.6.0 || ^0.7.0",
|
|
@@ -117,6 +118,9 @@
|
|
|
117
118
|
},
|
|
118
119
|
"typstOptions": {
|
|
119
120
|
"type": "object"
|
|
121
|
+
},
|
|
122
|
+
"customMacros": {
|
|
123
|
+
"type": "object"
|
|
120
124
|
}
|
|
121
125
|
}
|
|
122
126
|
},
|