# Compatibility between amsmath and exscale

Both the amsmath package and the exscale package define the delimiter macros \big, \Big, \bigg and \Bigg based on the internal macro \bBigg@. However, as the following minimal example reveals the amsmath and exscale versions of \bBigg@ have a different meaning:

\documentclass{article}

\usepackage{etoolbox}

\usepackage{lmodern}

\usepackage{amsmath}

\show\big
%% > \big=\long macro:
%% ->\bBigg@ \@ne .

\csshow{bBigg@}
%% > \bBigg@=macro:
%% #1#2->{\@mathmeasure \z@ {\nulldelimiterspace \z@ }{\left #2\vcenter to#1\big@size {}\right .}\box \z@ }.

\usepackage{exscale}

\show\big
%% > \big=macro:
%% ->\bBigg@ \@ne .

\csshow{bBigg@}
%% > \bBigg@=macro:
%% #1#2->{\hbox {$\left #2\vcenter to#1\big@size {}\right .\n@space$}}.

\begin{document}

\noindent
\Huge $$\big(\sum_{i=1}^{N}i\big)$$

\end{document}


Does this mean that I might get different results, depending on whether the amsmath package is loaded before or after the exscale package? Or are the two versions of \bBigg@ interchangeable so that the package loading order essentially doesn’t matter?

-
I'd say that you should use the amsmath definition, so load exscale before it. My impression is that the definition by exscale was inspired by that in amsmath but of course without \@mathmeasure that is important during work on alignments (and not only there). – egreg Nov 2 '12 at 10:02
@egreg: So, in essence, this means that the exscale package should probably define \bBigg@ only if the amsmath package has not been loaded yet. – mhp Nov 2 '12 at 10:33
Neither package seems to be aware of the other, at least no mention of each other in their source or documentation than I could grep. egreg has provided what's probably a suitable answer in his comment, though I can't say I understand the difference between the two definitions to know how different things might look or how things might work. You might like to contact the package maintainers for both to get their input, and ask to them "play nicely" together or document the interaction. – cyberSingularity Nov 8 '12 at 11:10

Three examples

## Without any package

\documentclass{article}
\usepackage{lmodern}
\begin{document}
$\sum_\sum$

\Huge$\sum_\sum$
\end{document}


## With exscale

\documentclass{article}
\usepackage{lmodern}
\usepackage{exscale}
\begin{document}
$\sum_\sum$

\Huge$\sum_\sum$
\end{document}


## With amsmath

\documentclass{article}
\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}
$\sum_\sum$

\Huge$\sum_\sum$
\end{document}


## With exscale and amsmath

\documentclass{article}
\usepackage{lmodern}
\usepackage{exscale,amsmath}
\begin{document}
$\sum_\sum$

\Huge$\sum_\sum$
\end{document}


## With amsmath and without lmodern

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\sum_\sum$

\Huge$\sum_\sum$
\end{document}


## Conclusions

The lmodern family has the extension symbol font in only one size, namely lmex10. With amsmath and the standard Computer Modern fonts, the "scaled" fonts cmex7 and cmex5 will be used, but of course this isn't possible if lmodern is loaded.

The definition of \bBigg@ given in exscale is obviously modelled on that by amsmath, but lacks its infrastructure, so it falls back to the standard LaTeX method.

If exscale is necessary because Latin Modern fonts are preferred, then exscale should be loaded before amsmath, so that the definition of \bBigg@ is eventually given by the latter.

-
Thanks! Moreover, it seems that the exscale package should also be loaded before the amsfonts package since both packages declare a font shape for the cmex family. – mhp Nov 13 '12 at 12:08