File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
quartz/plugins/transformers Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ interface Options {
1717 typstOptions : TypstOptions
1818}
1919
20+ // mathjax macros
21+ export type Args = boolean | number | string | null
2022interface MacroType {
21- [ key : string ] : string
23+ [ key : string ] : string | Args [ ]
2224}
2325
2426export const Latex : QuartzTransformerPlugin < Partial < Options > > = ( opts ) => {
@@ -37,11 +39,20 @@ export const Latex: QuartzTransformerPlugin<Partial<Options>> = (opts) => {
3739 case "typst" : {
3840 return [ [ rehypeTypst , opts ?. typstOptions ?? { } ] ]
3941 }
42+ default :
4043 case "mathjax" : {
41- return [ [ rehypeMathjax , { macros, ...( opts ?. mathJaxOptions ?? { } ) } ] ]
42- }
43- default : {
44- return [ [ rehypeMathjax , { macros, ...( opts ?. mathJaxOptions ?? { } ) } ] ]
44+ return [
45+ [
46+ rehypeMathjax ,
47+ {
48+ ...( opts ?. mathJaxOptions ?? { } ) ,
49+ tex : {
50+ ...( opts ?. mathJaxOptions ?. tex ?? { } ) ,
51+ macros,
52+ } ,
53+ } ,
54+ ] ,
55+ ]
4556 }
4657 }
4758 } ,
You can’t perform that action at this time.
0 commit comments