@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.
Files changed (3) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +16 -19
  3. package/package.json +4 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 1.0.1
4
10
 
5
11
  ### Patch 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 github:quartz-community/latex
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: github:quartz-community/latex
17
+ - source: "@quartz-community/latex"
16
18
  enabled: true
17
19
  options:
18
20
  renderEngine: katex
19
- ```
20
-
21
- For advanced use cases, you can override in TypeScript:
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 rendering engine to use for LaTeX. |
36
- | `customMacros` | `Record<string, string \| Args[]>` | `{}` | Custom LaTeX macros. |
37
- | `katexOptions` | `KatexOptions` | `undefined` | Options for the KaTeX engine. |
38
- | `mathJaxOptions` | `MathjaxOptions` | `undefined` | Options for the MathJax engine. |
39
- | `typstOptions` | `TypstOptions` | `undefined` | Options for the Typst engine. |
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.1",
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
  },