更新时间:2023-12-05 13:12:16
根据文档,您应该首先这样安装KaTeX:
According to docs, you should first install KaTeX like this:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.js"></script>
,然后安装自动渲染扩展程序,大概是这样的:
and then install the Auto-render extension, presumably like this:
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/contrib/auto-render.min.js"></script>
并添加
<script>renderMathInElement(document.body);</script>
到body元素的末尾.在我所参考的页面上查看详细信息(看起来您将需要像这样设置分度符:
to the end of the body element. See details on the page I've referenced (looks like you will need to set delimeters like this:
<script>renderMathInElement(document.body,{delimiters:
[{left: "$", right: "$", display: false}]
});</script>