I use jekyll to write post and show it in github-pages. My source file is writen with markdown.
How can I insert formula into the markdown file?
The easiest way to do this right now is to use the KaTeX auto-render extension.
Simply drop the following into your :
Note that this assumes the following delimiters appear in your HTML:
$$\LaTeX code$$ (for display)
\\[\LaTeX code\\] (also for display)
\\(\LaTeX code\\) (for inline)
Note, if using Jekyll, you will need to have the following in your _config.yml:
markdown: kramdown
kramdown:
math_engine: katex
WARNING: Do not use math_engine: mathjax. It will break this by automatically removing the LaTeX delimiters.