wspr / breqn

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

breqn does not work when using `\left(` and `\right)` in latest TL 2021 #52

Open nasser1 opened 2 years ago

nasser1 commented 2 years ago

reference and screen shot at

https://tex.stackexchange.com/questions/619478/different-output-from-same-tex-file-when-using-breqn-linux-with-latest-texlive

Basically, this MWE

\documentclass[12pt]{book}
\usepackage{amsmath} 
\usepackage{breqn}
\begin{document}

\begin{dgroup}
\begin{dmath}
 y_h(x) = \left(x\right)+ y
\end{dmath}
\end{dgroup}

\begin{dgroup}
\begin{dmath}
 y_h(x) =(x)+ y
\end{dmath}
\end{dgroup}

\end{document}

When compiled with lualatex from TL 2021 latest update gives wrong output for the first case. It works OK in TL 2020. Screen shots at above link.

FrankMittelbach commented 2 years ago

needs a couple of \noindent ... \@@par replaced by \RawNoIndent ... \RawParEnd i.e., where the paragraphs aren't really be meant as textual paragraphs but just (mis)using the Tex mechnism for effect. Not in all places though, i.e., where the content is real "text", e.g., "dsuspend" so needs some evaluation. We should be able to provide a cleaned up version soon.

nasser1 commented 2 years ago

I found another problem, but I do not know now if it is related to the above or not. On Latest 2021 TL, the following example

\documentclass[11pt]{book}          
\usepackage{amsmath}
\usepackage{breqn}

\begin{document}

Substituting the above back into the ode gives
\begin{dmath*}
2 x^{2} \left(x^{2}+x +1\right) \left(\sum_{n=0}^\infty \left(n +r \right) \left(n +r -1\right) a_{n} x^{n +r -2}\right)
   +x \left(11 x^{2}+11 x +9\right) \left(\sum_{n=0}^\infty \left(n +r \right) a_{n} x^{n +r -1}\right)
   +\left(7 x^{2}+10 x +6\right) \left(\sum_{n=0}^\infty a_{n} x^{n +r}\right) = 0       
\end{dmath*}

\end{document}

Produce bad layout. On TL 2020, it produces good layout. Screen shots added to the original reference post. Here it is again

https://tex.stackexchange.com/questions/619478/different-output-from-same-tex-file-when-using-breqn-linux-with-latest-texlive

Again, I do not know if this second example is related to the first and if fixing the first one will also fix the above,

davidcarlisle commented 2 years ago

@nasser1 thanks yes that's essentially the same issue if you use the version in the branch https://github.com/wspr/breqn/tree/gh52 then you get the expected layout with texlive 2021