diff --git a/src/lib/components/Markdown.css b/src/lib/components/Markdown.css index c93143a..8e15d81 100644 --- a/src/lib/components/Markdown.css +++ b/src/lib/components/Markdown.css @@ -161,13 +161,8 @@ width: 60%; } } - & .katex-html { - display: none; - } - & .katex-display { - & math { + & math[display="block"] { margin: 1rem; font-size: 1.5rem; - } } } \ No newline at end of file diff --git a/src/lib/components/Markdown.svelte b/src/lib/components/Markdown.svelte index ebad218..4428357 100644 --- a/src/lib/components/Markdown.svelte +++ b/src/lib/components/Markdown.svelte @@ -24,7 +24,7 @@ .use(remarkmath) // 数式 .use(remarkRehype, {allowDangerousHtml: true}) .use(rehypeslug) // headingにidを設定 - .use(rehypeKatex) // 数式 + .use(rehypeKatex, {output:'mathml'}) // 数式 .use(rehypeHighlight)// Syntax highlight .use(rehypeExternalLinks, {target:'_blank', rel:['noreferrer','noopener']})// 外部サイトを新規タブで開く .use(rehypeStringify, {allowDangerousHtml: true})