From fa8d87a23a85a6ccb4dd716f4930fb7f55f809e8 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 08 Jan 2026 01:04:56 +0000
Subject: [PATCH] docs: link fixes and cleanup
---
quartz/plugins/transformers/latex.ts | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/quartz/plugins/transformers/latex.ts b/quartz/plugins/transformers/latex.ts
index 26913ba..a9f54f3 100644
--- a/quartz/plugins/transformers/latex.ts
+++ b/quartz/plugins/transformers/latex.ts
@@ -17,8 +17,10 @@
typstOptions: TypstOptions
}
+// mathjax macros
+export type Args = boolean | number | string | null
interface MacroType {
- [key: string]: string
+ [key: string]: string | Args[]
}
export const Latex: QuartzTransformerPlugin<Partial<Options>> = (opts) => {
@@ -37,11 +39,20 @@
case "typst": {
return [[rehypeTypst, opts?.typstOptions ?? {}]]
}
+ default:
case "mathjax": {
- return [[rehypeMathjax, { macros, ...(opts?.mathJaxOptions ?? {}) }]]
- }
- default: {
- return [[rehypeMathjax, { macros, ...(opts?.mathJaxOptions ?? {}) }]]
+ return [
+ [
+ rehypeMathjax,
+ {
+ ...(opts?.mathJaxOptions ?? {}),
+ tex: {
+ ...(opts?.mathJaxOptions?.tex ?? {}),
+ macros,
+ },
+ },
+ ],
+ ]
}
}
},
@@ -59,8 +70,6 @@
},
],
}
- default:
- return { css: [], js: [] }
}
},
}
--
Gitblit v1.10.0