Gitblog) Set Mathjax
1. Markdown inline math
Generally, Github Markdown supprots inline math formulas, using $
keyword. And, using $$
, you can post display formulas
$x + 1 = 2$ \(x + 1 = 2\)
2. MD code problem and an alternative
However, when I write my blog, this code is not work. Differently from Github Markdown, a website launched by Github Page using Jekyll need more setting.
- Change the value of the markdown attribute in ‘_config.yml’ file.
kramdown
-
Include a new file in ‘_includes’ named ‘_mathjax_support.html’. And write the codes below.
Acutally, the setting above is done in the Jekyll theme I am using. I just do the stage below, and the problem is solved.
-
Include in the
<head>
of ‘_layouts/default.html’.the Jekyll theme I am using has ‘mathjax.html’ file in ‘_includes/extensions’. So, I change the path of the code above. I don’t need
page.use_math
attribute, so erase the first line.