Repository navigation
|
MathML is cool. But the default output is both MathML and HTML. What's more, it requires a css to avoid showing the equation twice, and this can cause some trouble in RSS readers. Given that MathML now has broad browser support and offers superior accessibility, I would like to configure KaTeX to output only KaTeX supports both MathML and HTML. See |
Answered by
anntnzrb
Dec 8, 2025
Replies: 1 comment 1 reply
|
Configure import rehypeKatex from 'rehype-katex';
export default {
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
rehypePlugins: [
[rehypeKatex, {output: 'mathml'}],
],
},
blog: {
rehypePlugins: [
[rehypeKatex, {output: 'mathml'}],
],
},
},
],
],
};The plugin passes options directly to KaTeX. See https://katex.org/docs/options.html for all available options. |
1 reply
Answer selected by
li-zhenyu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Configure
rehype-katexwithoutput: 'mathml'in yourdocusaurus.config.js:The plugin passes options directly to KaTeX. See https://katex.org/docs/options.html for all available options.