# “Beautifully” resize math align block (font and symbols)

I'm using \mathlarger from relsize package to get larger fonts in my beamer presentation (in some VERY special cases, not to all equations). But the symbols are not scaling correctly, I'm mostly worried about the integral symbol. For example:

\documentclass{beamer}
\usepackage{lmodern}
\usepackage{relsize}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\begin{frame}

\begin{align*}
\int_0^1 \frac{d}{dx} f(x) dx = f(1) - f(0)
\end{align*}

\begin{align*}
\mathlarger{\mathlarger{\int_0^1 \frac{d}{dx} f(x) dx = f(1) - f(0)}}
\end{align*}

\begin{landscape}
\begin{center}
\resizebox{7cm}{!}{$\int_0^1 \frac{d}{dx} f(x) dx = f(1) - f(0)$}
\end{center}
\end{landscape}
\end{frame}

\end{document}


As proof of concept

First: regular; second: \mathlarger; third: \resizebox

Just the regular has the nicely fit integral symbol

• Possible duplicate of How to make math font huge – Peter Grill Sep 26 '18 at 22:37
• no, isn't a dupicate, that solution also do not give beautiful symbols. I tried. And we are here for the beauty, otherwise we could just use word equation editor. – Lin Sep 26 '18 at 22:38
• I made a single frame from your example just to have a single picture; and here (click) is the result. No issue for me, as you see. – egreg Sep 26 '18 at 22:49
• Same remark as @egreg’s, plus \showoutput confirms that the smaller integral sign is taken from \OMX/cmex/m/n/10.95, while the second comes from \OMX/cmex/m/n/14.4. – GuM Sep 26 '18 at 23:06
• Are you perhaps doing \usepackage{lmodern} in your document? The example with \resizebox should have $\displaystyle...$ – egreg Sep 26 '18 at 23:13

This works as expected:

\documentclass{beamer}
\usepackage{lmodern}
\usepackage{relsize}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}

\DeclareFontFamily{OMX}{lmex}{}
\DeclareFontShape{OMX}{lmex}{m}{n}{%
<->lmex10%
}{}

\begin{document}

\begin{frame}

\begin{align*}
\int_0^1 \frac{d}{dx} f(x) dx = f(1) - f(0)
\end{align*}

\begin{align*}
\mathlarger{\mathlarger{\int_0^1 \frac{d}{dx} f(x) dx = f(1) - f(0)}}
\end{align*}

\end{frame}

\end{document}


The issue arises because the omxlmex.fd file, which tells TeX where to look to find the TFM file for the lmex family (the family that the lmodern package uses as a replacement for the cmex one — in other words, for the “large symbols) loads the cmex10.tfm file at a fixed size equal to the design size. Actually, the omxcmex.fd prescribe exactly the same behavior for the cmex family, but the amsfonts package (and also, albeit to a limited extent, the amsmath package) add a patch to correct this. The amsfonts (and amsmath) packages do not care about the lmex family, though: this is why one needs to introduce the corresponding patch by hand, when the lmodern package is used. This is exactly what the lines

\DeclareFontFamily{OMX}{lmex}{}
\DeclareFontShape{OMX}{lmex}{m}{n}{%
<->lmex10%
}{}


do.

• \usepackage{fixcmex} – egreg Sep 27 '18 at 8:24
• @egreg: Oh, nice! And, yes, I cannot recollect having ever noticed this package of yours—my apologies. But now I have a question: when the Latin Modern fonts are used, you revert the largesymbols font to OMX/cmex; I assume you do so to because there are no lmex7, lmex8, and lmex9 fonts available. The question is: why is this the case? Why nobody ever thought of designing smaller versions of the lmex10 font? – GuM Sep 27 '18 at 15:49
• Ask the developers of Latin Modern. The issue has been known for years. – egreg Sep 27 '18 at 16:57