问题描述
在我建立的 Jekyll / Github Pages 站点中,一个 mathjax 方程在渲染时没有换行。然而,粘贴在在线 mathjax 生成器中的完全相同的方程代码呈现得很好,即使使用相同的 mathjax 配置和加载脚本。
我尝试了许多不同的配置和加载脚本,包括几个类似问题的解决方案like this one,但都无济于事。
我一直在修改我的 css 以完成我网站的样式,并且我开始认为这可能有一些事情要做(因为除了 css,the HTML and the JS scripts for mathjax are the same in the online rendering sites)。
我当前的 mathjax 配置和加载脚本:
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],tex2jax: {
inlineMath: [ ['$','$'],["\\(","\\)"] ],displayMath: [ ['$$','$$'],["\\[","\\]"] ],processEscapes: true
},"CommonHTML": { linebreaks: { automatic: true } }
});
</script>
<script src="//mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
等式:
\begin{aligned}
& \phi(x,y) = \phi \left(\sum_{i=1}^n x_ie_i,\sum_{j=1}^n y_je_j \right)
= \sum_{i=1}^n \sum_{j=1}^n x_i y_j \phi(e_i,e_j) = \\
& (x_1,\ldots,x_n) \left( \begin{array}{ccc}
\phi(e_1,e_1) & \cdots & \phi(e_1,e_n) \\
\vdots & \ddots & \vdots \\
\phi(e_n,e_1) & \cdots & \phi(e_n,e_n)
\end{array} \right)
\left( \begin{array}{c}
y_1 \\
\vdots \\
y_n
\end{array} \right)
\end{aligned}
这是它在我的网站中的呈现方式: Overflows the container
以下是它在 online tool 中的呈现方式: auto line wrapping done correctly
我的 CSS 和 Markdown 通过 jekyll/kramdown 生成页面。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)