Skip to content

Commit

Permalink
fix: render of katex
Browse files Browse the repository at this point in the history
  • Loading branch information
YangFong committed Sep 7, 2024
1 parent 744785b commit 13f60a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
tex: { tags: 'ams' },
}
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<script type="module" src="/src/main.js"></script>
<script id="MathJax-script" defer src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<script type="module" defer src="/src/main.js"></script>
</body>
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/wechatsync/article-syncjs@latest/dist/main.js"></script>
</html>
5 changes: 2 additions & 3 deletions src/utils/MDKatex.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ function createRenderer(display) {
if (display) {
return `<section style="text-align: center; overflow: auto;">${svg.outerHTML}</section>`
}
else {
return `<span style="display: inline-block; vertical-align: middle; line-height: 1;">${svg.outerHTML}</span>`
}

return `<span style="vertical-align: middle; line-height: 1;">${svg.outerHTML}</span>`
}
}

Expand Down

0 comments on commit 13f60a9

Please sign in to comment.