wspr / breqn

Automatic line breaking in LaTeX equations
18 stars 2 forks source link

Support for breqn in tex4ht. #55

Open nasser1 opened 10 months ago

nasser1 commented 10 months ago

tex4ht in TL 2023 loads breqn package with no problem, but the resulting long equation do not break as it does in PDF.

Current maintainer of tex4ht Michal Hoftich is not able to find why and suggested I contact breqn package support.

I asked about this in tex4ht mailing list here

Is there someone who could help Michal figure out why breqn in tex4ht does not break long equation? The following in an example and the command used to compile it. It uses SVG for math images.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{breqn}

\begin{document}

\begin{dmath*}
 \phi = -\cos \left(x \right) {\mathrm e}^{-\frac{1}{y}}+ f(y)  
         + \cos \left(x \right) {\mathrm e}^{-\frac{1}{y}}+ f(y) 
         + \cos \left(x \right) {\mathrm e}^{-\frac{1}{y}}+ f(y) 
         + \cos \left(x \right) {\mathrm e}^{-\frac{1}{y}}+ f(y) 
        + \cos \left(x \right) {\mathrm e}^{-\frac{1}{y}}+ f(y) 
        + \cos \left(x \right) {\mathrm e}^{-\frac{1}{y}}+ f(y) 
\end{dmath*}

\end{document}

Compiled with this command

make4ht -ulm default -a debug foo.tex "htm,svg,nostyle"

Looking at the foo.htm file generated show the long equation did not break. Compared to lualatex foo.tex output

Is there someone who could look into why long equations do not break when used with tex4ht? Currently mathjax does not support breaking long equations either. So if breqn could be made to work with tex4ht, this will be very useful.

Thanks --Nasser