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.

  1. Change the value of the markdown attribute in ‘_config.yml’ file. kramdown
  2. 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.

  3. 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.



Refers


benlansdell.github.io “MathJax, Jekyll and github pages”