NexT provides two render engines for displaying Math Equations.

If you choose to use this feature, you don't need to manually import any JS or CSS. You just need to turn on enable of math and define a render engine in theme config file for it.

### Settings

Don't forget to keep up double spaces indents!

• true → turn on Math Equations render.
• false → totally disable Math Equations render.

Only turning on enable of math cannot let you see the displayed equations correctly.
You need to install the corresponding Hexo Renderer to fully support the display of Math Equations.
The corresponding renderers per engine will be provided below.

This option is to control whether to render Math Equations every page.

• true → Equations will be processed on demand. It will only render those posts which have mathjax: true in their Front Matter.
• false → Equations will be processed on every page. Even if they not exists on one or another page.

Examples with true option

Both MathJax and KaTeX provide cdn config and use the jsDelivr as the default CDN.
The reason that jsDelivr is chosen is because it is fast everywhere, and jsDelivr has the valid ICP license issued by the Chinese government, it can be accessed in China pretty well.

And we also provide other optional CDNs, including the famous CDNJS and the Bootcss which has the quite high access speed in China.
For MathJax, we are currently using version 2.7.1.
For KaTeX, due to the problem described above, we are now using version 0.7.1.

If you want to try the other CDNs not included in the optional list, you must use the corresponding version.
Particularly, if you are a Chinese blogger or most of your visits come from China, please note that the CDNJS is blocked in some parts of China, don't use it as your CDN.

### Render Engines

For now, NexT provides two Render Engines: MathJax and KaTeX (default is MathJax).

Render Choosing

If you use MathJax to render Math Equations, you can choose one of renderers below:

• hexo-renderer-kramed
• hexo-renderer-pandoc

Installation

1. Need to uninstall the original renderer hexo-renderer-marked and install one of selected by you renderer:

2. In theme config file, turn on enable option of math and choose katex as render engine.

3. Run standard Hexo generate, deploy process or start the server:

The KaTeX engine is a much faster math render engine compared to MathJax. And it could survive without JavaScript.

But, for now KaTeX support less things than MathJax. Here is a list of TeX functions supported by KaTeX.

Render Choosing

If you use KaTeX to render Math Equations, you can choose one of renderers below:

• hexo-renderer-markdown-it-plus
• hexo-renderer-markdown-it

If you use hexo-renderer-markdown-it, you also need to add markdown-it-katex as its plugin: