mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
fix: render of katex (#390)
This commit is contained in:
parent
744785bd84
commit
33206c7857
11
index.html
11
index.html
@ -15,12 +15,6 @@
|
|||||||
rel="apple-touch-icon-precomposed"
|
rel="apple-touch-icon-precomposed"
|
||||||
href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png"
|
href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png"
|
||||||
/>
|
/>
|
||||||
<link
|
|
||||||
rel="stylesheet"
|
|
||||||
href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css"
|
|
||||||
integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
/>
|
|
||||||
<style>
|
<style>
|
||||||
.loading {
|
.loading {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -93,11 +87,12 @@
|
|||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
MathJax = {
|
MathJax = {
|
||||||
|
loader: { load: ['[tex]/ams'] },
|
||||||
|
tex: { packages: { '[+]': ['ams'] }, tags: 'ams' },
|
||||||
svg: { fontCache: 'none' },
|
svg: { fontCache: 'none' },
|
||||||
tex: { tags: 'ams' },
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
|
<script id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/wechatsync/article-syncjs@latest/dist/main.js"></script>
|
<script src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/wechatsync/article-syncjs@latest/dist/main.js"></script>
|
||||||
|
@ -16,9 +16,8 @@ function createRenderer(display) {
|
|||||||
if (display) {
|
if (display) {
|
||||||
return `<section style="text-align: center; overflow: auto;">${svg.outerHTML}</section>`
|
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>`
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user