MathJax left align on render

爷,独闯天下 提交于 2019-12-11 12:52:41

问题


How do I left-align all MathJax equation "on-render". When you set displayAlign: "left", the equations would first be centered, then after 0.5s, they move to the left. So basically, it flashes to the left, which is visually unpleasant.

Is there a way to make it appear on the left on render? This is the code I have now.

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  config: ["MMLorHTML.js"],
  jax: ["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS","output/NativeMML", "output/CommonHTML"],
  extensions: ["tex2jax.js","mml2jax.js","asciimath2jax.js","MathMenu.js","MathZoom.js", "CHTML-preview.js"],
  TeX: {
    extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
  },
  displayAlign: "left"
});
</script>
<script src="//cdn.mathjax.org/mathjax/latest/MathJax.js"></script>

回答1:


The flash that you are seeing is due to the fast preview mode (chtml-preview.js), which uses the CommonHTML output introduced in v2.5. That mode is intentionally incomplete for better speed, which includes lack of alignment.

Disabling the fast preview is the straight forward way of resolving the problem.

(The CommonHTML output will become feature complete in the upcoming v2.6 release.)



来源:https://stackoverflow.com/questions/30691029/mathjax-left-align-on-render

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!