• Home
  • About
    • 黑脸包公 photo

      黑脸包公

      书山有路勤为径,学海无涯苦作舟.

    • Learn More
    • Github
  • Posts
    • All Posts
    • All Tags
  • Projects

例子

10 Aug 2015

Reading time ~1 minute

MathJax 是在HTML网页中包含基于Tex/LaTex/MathML的数学的简单方法. 要启动和运行,需要在Github页面的标题中包含mathjax脚本。, a然后写一些数学。对于LaTex,您需要知道两个分隔符,一个用于块或显示的数学。 \[ ... \], 另一个用于排列数学 \( ... \).

用法

要启用mathjax支持,请确保kramdown是您的降价风格选择,并且mathjax在您的 _config.yml 目录.

markdown: kramdown
mathjax: true
Here is an example MathJax inline rendering \\( 1/x^{2} \\), and here is a block rendering: 
\\[ \frac{1}{n^{2}} \\]

Here is an example MathJax inline rendering \( 1/x^{2} \), and here is a block rendering: \[ \frac{1}{n^{2}} \]

唯一要注意的是使用markdown时反斜杠的转义,因此分隔符变成 \\[ ... \\] and \\( ... \\) 分别用于排列数学和数学平方.



markdownmathjaxexampletestjekyll Share Tweet +1