wspr / breqn

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

Size of \big, \bigl and \bigr not correct #49

Open anderium opened 3 years ago

anderium commented 3 years ago

Before I start, I want to say that I am using Overleaf to create LaTeX documents and have no control over the version of packages being used.

It seems the size of \big, \bigl and \bigr is not matching up with what it should be without the breqn package. The following is the expected output and can be created with the code below it. expected-output-just-LaTeX

\documentclass[border=2mm]{standalone}
% Packages by standalone:
%   Only xkeyval for sure
% The following if available:
%   ifpdf, ifluatex, ifxetex, and shellesc
% Not sure about any other packages loaded by these
\begin{document}
$\begin{array}{cccc}
\left(test\right)     & (test)     & \bigl(test\bigr)     & \Bigl(test\Bigr)\\
\left(test^{2}\right) & (test^{2}) & \bigl(test^{2}\bigr) & \Bigl(test^{2}\Bigr)
\end{array}$
\end{document}

If we add the line \usepackage{breqn} the output changes the size of the parentheses of the third column: actual-output-with-breqn Notice how they now appear slightly smaller and seem to be the same size as the normal parentheses. But notice also how the size of the parentheses in the first column doesn't change, there is nothing wrong with the implementation of \left and \right.

I'm not sure why this should happen, as the sizes \big and its siblings should take on are being defined in the same way as the TeXbyTopic book describes in Section 21.2.4 on page 193. And probably in the plain.tex file too, as that where the documentation says it comes from. See the .dtx file.

While I don't have a reason this could be happening I do have a fix for this problem, applying the following code after loading the breqn package should change the behaviour to match again.

\makeatletter
  \def\big{\bBigg@{1.25}}
\makeatother

This seems to make even less sense, because you're defining the value used by \bBigg@ to be smaller than it was before, however, the result after applying this patch is as follows: output-with-breqn-and-fix

As you can see this is now again the correct size as expected. My guess for an actual fix would be that changing the value 8.5 in the redefinition of \big on line 5773 to 10 should do the trick.