简体   繁体   中英

MathJax left align on render

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>

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.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM