From c2dcc63b5f0998f87e0aeb1a3a61291aded83639 Mon Sep 17 00:00:00 2001
From: Rahmat Ardiansyah <155553712+artsbymat@users.noreply.github.com>
Date: Thu, 08 Jan 2026 01:36:02 +0000
Subject: [PATCH] feat: add scroll padding for mobile screen (#2249)
---
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