2

This MWE

\documentclass[12pt]{article}%
\usepackage{amsmath}
\begin{document}

\begin{multline*}
(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}
\end{multline*}

\end{document}

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

3
  • 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
    Oct 16 '19 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
    Oct 16 '19 at 8:33
  • that's OK, I can post answer with the necessary CSS
    – michal.h21
    Oct 16 '19 at 8:34
4

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:

\Preamble{xhtml}
\Css{body{ max-width: 55em;}}
\begin{document}
\EndPreamble

The result:

enter image description here

1
  • One more feather in your hat....
    – MadyYuvi
    Oct 16 '19 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.