VSCODE导出PDF的数学公式

1. 找到配置文件template.html

比如windows下的路径:

C:\Users\njhx02\.vscode\extensions\yzane.markdown-pdf-1.4.4\template

2. 增加以下配置,红色的两行

<!DOCTYPE html>
<html>
<head>
<title>{{{title}}}</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
{{{style}}}
{{{mermaid}}}
</head>
<body>
  <script>
    mermaid.initialize({
      startOnLoad: true,
      theme: document.body.classList.contains('vscode-dark') || document.body.classList.contains('vscode-high-contrast')
          ? 'dark'
          : 'default'
    });
  </script>
{{{content}}}
</body>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$', '$']]}, messageStyle: "none" });</script>
</html>

3. 即可。

上一篇:Pandas Series contains 判断


下一篇:jquery 找到文章中内容,替换并加链接