Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于markdown的数学公式显示的疑问 #52

Closed
xudongliao opened this issue May 3, 2018 · 2 comments
Closed

关于markdown的数学公式显示的疑问 #52

xudongliao opened this issue May 3, 2018 · 2 comments
Labels
good first issue Good for newcomers

Comments

@xudongliao
Copy link

我使用您开发的Jane来构建GitHub io博客,但是网站对于markdown的数学公式的支持似乎有点问题.
对于单行公式可以支持,可以正常显示;但是对于行内公式,似乎无法正常解析,直接被处理成字符串了.
这是我的博客链接:https://stephenxudong.github.io/post/ch06/

@xianmin xianmin added the good first issue Good for newcomers label May 4, 2018
@xianmin
Copy link
Owner

xianmin commented May 4, 2018

我看了下 mathjax 的文档,行内公式需要添加额外的配置,有关额外的配置,我建议使用本主题提供的 custom head 特性。

  1. 创建文件 你的站点根目录/layouts/partials/custom_head.html
  2. 添加配置代码
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>

我测试了,这样就可以使用行内公式了,你可以试试。有关 MathJax 的更多配置,你可以查阅它们的文档。

@xudongliao
Copy link
Author

嗯,这样是可以解决啦,但是还是会出现有些单行公式没办法被识别,我去查查看MathJax文档,谢谢啦🙏

@xianmin xianmin closed this as completed May 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants