-
Are KaTeX macros supported by the recommended KaTeX pipeline? I couldn't get them to work, i.e. my markdown code which works fine in the VSCode preview (which also uses KaTeX) doesn't work with Docusaurus. But maybe that's an issue of the remark/rehype plugins? Just to make clear what I'm talking about, I have a section like this at the top of my markdown files $$
\def\cat{\mathsf{Cat}}
\def\hom{\mathsf{Hom}}
\def\id{\mathsf{id}}
\def\psh{\mathsf{PSh}}
\def\set{\mathsf{Set}}
\def\dot{\ *\ }
\def\op{\mathsf{op}}
\def\rr{\mathbb{R}}
\def\zz{\mathbb{Z}}
$$ and then I use those abbreviations throughout the document. Is this somehow possible with Docusaurus? Just to make clear, you can use macros inside a single math block just fine. But the global context between math blocks seems lacking. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Apparently global math context is not supported by rehypePlugins: [{plugin: rehypeKatex, options: {macros: {"\\RR": "\\mathbb{R}"}}], except that this doesn't work? |
Beta Was this translation helpful? Give feedback.
https://docusaurus.io/docs/markdown-features/plugins#configuring-plugins