【示例】
参考:https://bbs.emath.ac.cn/thread-5246-1-1.html
参考:https://bbs.emath.ac.cn/forum.php?mod=viewthread&tid=5246
参考:http://kuing.orzweb.net/
参考:https://blog.csdn.net/kowayee/article/details/106521128
【方案】
参考:https://www.annhe.net/article-3393.html
参考:https://addon.dismall.com/plugins/zxsq_mathjax.html
参考:https://www.discuz.net/thread-3017759-2-1.html
参考:https://www.discuz.net/forum.php?mod=viewthread&tid=1916385
【方案】
参考:http://www.zyymat.com/mathjax-and-latex-math-formula.html
Discuz 安装 MathJax 很简单, 进管理后台, SEO设置, 然后选择”其他”, 把上文中的代码填进去即可:
参考:https://blog.hcl.moe/archives/796
利用MathJax的JS实时渲染公式,需要在当前使用的模板的header_common.htm中加入代码。可以实现直接以文本形式输入公式且无需添加Discuz!代码。缺点是手机版支持需要更改相应的手机模板(方案一直接为图片),并且论坛更新会很麻烦。
定位到/template/default(以当前模板为准)/common/下,找到header_common.htm并编辑。在其中加入如下代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 | <script type = "text/x-mathjax-config" > MathJax.Hub.Config({ extensions: [ "tex2jax.js" ], jax: [ "input/TeX" , "output/HTML-CSS" ], tex2jax: { inlineMath: [ [ "\\(" , "\\)" ] ], displayMath: [ [ "\\[" , "\\]" ] ], processEscapes: true }, "HTML-CSS" : { availableFonts: [ "TeX" ] } }); < /script > <script type = "text/javascript" src= "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" >< /script > |
就可以在帖子中转义 \[ \]
和 \( \)
之间的LaTex代码。