This MWE


(6 A t+2 B) e^{it}+i (3At^{2}+2Bt+C) e^{it}+i(3At^{2}+2Bt+C) e^{it}\\
-(  At^{3}+Bt^{2}+Ct) e^{it}+( At^{3}+Bt^{2}+Ct) e^{it}=t^{2}e^{it}


Gives the following output in HTML when compiled using make4ht foo1.tex "mathjax", The split equation drifts apart when resizing the window making it look bad on wide monitor or wide browser window.

Is it possible to make the split equation remain intact as the case when compiling math using images? Does this need some make4ht mathjax additional configuration?

enter image description here

enter image description here

Compare the output above to when compiling math with images (svg or png), where the multline equation do not drift apart as the window size changes

enter image description here

Using TL 2019

  • 2
    I am afraid that this issue is not related to tex4ht at all. MathJax decides about formatting. You can maybe set max-width using CSS to prevent too big resizing.
    – michal.h21
    Commented Oct 16, 2019 at 8:27
  • @michal.h21 Ok, thanks Michal. I did not know that is why I asked. Will delete my question in this case no problem.
    – Nasser
    Commented Oct 16, 2019 at 8:33
  • that's OK, I can post answer with the necessary CSS
    – michal.h21
    Commented Oct 16, 2019 at 8:34

1 Answer 1


The rendering is done by MathJax. It apparently aligns the first line to the left and the second to the right. When the page has a large viewport and thus too long lines, they can be placed far away. The fix for this is to set maximum line size. Which is a good idea anyway:

\Css{body{ max-width: 55em;}}

The result:

enter image description here

  • One more feather in your hat....
    – MadyYuvi
    Commented Oct 16, 2019 at 11:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .