使用vuepress制作静态网站,在config.js
中添加了markdown-it-katex
插件
markdown: {
extendMarkdown: md => {
md.use(require('markdown-it-katex'))
},
},
在.md
文件中,编写公式时,英文能正常显示,如果公式中有中文就不能正确渲染
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/github-markdown-css/2.2.1/github-markdown.css">
公式中,使用英文: $\text{hello}$
公式中,使用中文: $\text{你好}$
请问如何解决?