# Altering fontsize in equations globally

I am trying to typeset all formulas in an article using \small font.

If I use \DeclareMathSizes{9}{8}{6}{4}, then the size of in-line math in regular text is also changed. However, I want to redefine the font size only for multi-line equations wrapped in an align environment.

I also tried to redefine the align command in the following way:

\let\oldalign=\align
\renewcommand{\align}{\small\oldalign}


This results in some text paragraphs after align environments now being typeset in \small font, although well outside the align environment. Sorry, I don't have a minimal example right now. It might have to do with the cls template I'm using (sig-alt-full).

I tried adding a \normalsize as a fix, without success:

\let\oldalign=\align
\renewcommand{\align}{\small\oldalign\normalsize}


I then proceeded to defining my own align environment, as follows:

\newenvironment{myalign}
{% begin code
\begin{small}
\begin{align}
}
{% end code
\end{align}
\end{small} }


This one fails because, according to LaTeX, \begin{small} is ended by \end{document}.

-
You could normally use \pretocmd\start@align with etoolbox to apply something at the start of an align, but does not work in this case as the \DeclareMathSizes needs to be part of the preamble, not something that gets executed a the start of the align environment. –  Peter Grill Nov 13 '12 at 8:59
presumably, since you want all formulas to be set in a smaller size, it's also okay to have the equation numbers in the same small size. but i thought it worth asking. (there's a workaround for amsmath to keep the equation numbers the same size as the normal text since it does make a difference if only some displayed formulas are made smaller. this may become a feature with the next overhaul of amsmath; it's on the list for consideration.) –  barbara beeton Nov 13 '12 at 14:51

I don't think it's really a good idea. However the following seems to work:

\documentclass{article}
\usepackage{amsmath,lipsum}
\newenvironment{myalign}{\par\nobreak\small\noindent\align}{\endalign}
\begin{document}
\lipsum*[2]
\begin{myalign}
a&=b\\
c&=d
\end{myalign}
\lipsum[2]

\renewenvironment{myalign}{\par\nobreak\tiny\noindent\align}{\endalign}

\lipsum*[2]
\begin{myalign}
a&=b\\
c&=d
\end{myalign}
\lipsum[2]

\end{document}


The redefinition is just to show more clearly that it works (small size is not so different from normal size).

If you want to use the original align and align* environments, then the following trick will do

\usepackage{etoolbox}
\preto\align{\par\nobreak\small\noindent}
\expandafter\preto\csname align*\endcsname{\par\nobreak\small\noindent}


Similar tricks can be used for the other alignment environments.

Full example:

\documentclass{article}
\usepackage{amsmath,lipsum}

\usepackage{etoolbox}
\preto\align{\par\nobreak\small\noindent}
\expandafter\preto\csname align*\endcsname{\par\nobreak\small\noindent}

\begin{document}
\lipsum*[2]
\begin{align}
a&=b\\
c&=d
\end{align}
\lipsum*[2]
\begin{align*}
a&=b\\
c&=d
\end{align*}
\lipsum[2]

\end{document}

-
Thanks, @egreg. Can I also redefine the original align environment? Then I can leave my document as is. The obvious approach (e.g. \renewenvironment{align}{\par\nobreak\small\noindent\align}{\endalign}) does not work. –  janschaf Nov 13 '12 at 10:47
Obviously, I can, by doing the following: \let\oldalign=\align followed by a \let\oldendalign=\endalign followed by a \renewenvironment{align}{\par\nobreak\scriptsize\noindent\oldalign}{\oldendalig‌​n}. However, this does not affect {align*} environments. Why not? –  janschaf Nov 13 '12 at 11:04
@janschaf I've added the change you desired –  egreg Nov 13 '12 at 11:29
No, actually that doesn't seem to work. No LaTeX error but also no change in font size in the resulting document (I replaced \small with \footnotesize). –  janschaf Nov 13 '12 at 12:02
@janschaf It works; you probably didn't put the code in the right place; I added a full example. –  egreg Nov 13 '12 at 12:20