add: katexをmathmlにした

This commit is contained in:
moris 2024-12-15 22:41:18 +09:00
parent 1790fc9836
commit a98e7cf9a2
2 changed files with 2 additions and 7 deletions

View File

@ -161,13 +161,8 @@
width: 60%; width: 60%;
} }
} }
& .katex-html { & math[display="block"] {
display: none;
}
& .katex-display {
& math {
margin: 1rem; margin: 1rem;
font-size: 1.5rem; font-size: 1.5rem;
}
} }
} }

View File

@ -24,7 +24,7 @@
.use(remarkmath) // 数式 .use(remarkmath) // 数式
.use(remarkRehype, {allowDangerousHtml: true}) .use(remarkRehype, {allowDangerousHtml: true})
.use(rehypeslug) // headingにidを設定 .use(rehypeslug) // headingにidを設定
.use(rehypeKatex) // 数式 .use(rehypeKatex, {output:'mathml'}) // 数式
.use(rehypeHighlight)// Syntax highlight .use(rehypeHighlight)// Syntax highlight
.use(rehypeExternalLinks, {target:'_blank', rel:['noreferrer','noopener']})// 外部サイトを新規タブで開く .use(rehypeExternalLinks, {target:'_blank', rel:['noreferrer','noopener']})// 外部サイトを新規タブで開く
.use(rehypeStringify, {allowDangerousHtml: true}) .use(rehypeStringify, {allowDangerousHtml: true})