When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
Simple inline $a = b + c$.
Block:
add ejs
themes/xxx/layout/_partial/mathjax.ejs
1 | <!-- MathJax配置,可通过单美元符号书写行内公式等 --> |
add judge
themes/free2mind/layout/_partial/footer.ejs
1 | <!-- 根据页面mathjax变量决定是否加载MathJax数学公式js --> |
Use NexT
clone https://github.com/theme-next/hexo-theme-next
1 | npm uninstall hexo-renderer-marked --save |
modify node_modules\kramed\lib\rules\inline.js
line: 111
2//escape: /^\\([\\`*{}\[\]()#$+\-.!_>])/,
escape: /^\\([`*\[\]()#$+\-.!_>])/,
line: 201
2//em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
em: /^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
open switch in theme config
switch theme in blog config
done
https://docs.mathjax.org/en/latest/start.html
http://www.mamicode.com/info-detail-2145077.html
Hexo 的 Next 主题中渲染 MathJax 数学公式
Nunjucks Error expected variable end解决办法