# Prevent equation labeling to change sizes

Everytime i change equation font size using \footnotesize the label (for example (3.12)) on the right side also changes its size. Is tere a way to change equation font size but not its label font size? Or maybe even vice versa - to change label font size but not equation font size.

This is how i usually write down equations:

\begin{minipage}[t]{\textwidth}
\footnotesize
$$\label{eee013} \begin{split} f(x) = A e^{-\frac{(x-\textcolor{1}{\mu})^2}{2 \textcolor{1}{\sigma^2}}} \end{split}$$
\end{minipage}

-
the code that will be used for this when amsmath is overhauled is in the answer to Use of \small in the equation environment. for convenience, here's the code: \renewcommand{\maketag@@@}[1]{\hbox{\m@th\normalsize\normalfont#1}} (don't know whether this question should now be considered a duplicate.) –  barbara beeton Feb 27 '13 at 19:09

The \maketag@@@ macro, which is responsible for producing equation numbers in amsmath, is defined as follows:

\def\maketag@@@#1{\hbox{\m@th\normalfont#1}}


You can see that it sets \normalfont but doesn't alter the font size, so in your case the number is also in footnote size. To change the size of all equation numbers back to the document font size, add the following lines to your preamble, after \usepackage{amsmath}:

\makeatletter
\def\maketag@@@#1{\hbox{\m@th\normalfont\normalsize#1}}
\makeatother


You can also replace \normalsize with any other sizing command, of course.

Note: please add a minimal working example (MWE) next time you ask a question. In particular, you didn't mention that you were using the amsmath and color/xcolor packages, and that you defined a new color 1. This made your code harder to read.

## edit:

A drawback of this approach is that amsmath's \eqref macro also formats references using \maketag@@@. So if you don't want these references to be typeset in \normalsize, you could for example also redefine \eqref. To do this, use the following code fragment instead of the one given above:

\makeatletter
\def\my@tag@font{\normalsize}
\def\maketag@@@#1{\hbox{\m@th\normalfont\my@tag@font#1}}
\let\amsmath@eqref\eqref
\renewcommand\eqref[1]{{\let\my@tag@font\relax\amsmath@eqref{#1}}}
\makeatother


Then, everything you define as \my@tag@font will be used for equation numbers, but discarded for \eqref references.

-
There is one problem. This solution makes all the oher labels within text look smaller too. Can this be prevented? I want only a label lying next to equation to look smaller and not all the labels. –  71GA Feb 27 '13 at 11:55
@71GA see my recent edit –  benwilfut Feb 27 '13 at 12:52
Thank you this is a perfect solution! –  71GA Feb 27 '13 at 18:54

I assume you are using the amsmath-package. You can change the formatting and style of the equation numbers using

\makeatletter
\def\tagform@#1{\maketag@@@{\normalsize(#1)\@@italiccorr}}
\makeatother


Here I added \normalsize just before the opening brace. Here is a complete example:

\documentclass{article}
\usepackage{amsmath}
\usepackage{color}

\begin{document}

the small equation, with small equation number
\footnotesize
$$\label{eee013-a} \begin{split} f(x) = A e^{\cfrac{(x-\textcolor{red}{\mu})^2}{2 \textcolor{red}{\sigma^2}}} \end{split}$$
\normalsize

for comparison: a normal equation
$$\label{eee013-b} \begin{split} f(x) = A e^{\cfrac{(x-\textcolor{red}{\mu})^2}{2 \textcolor{red}{\sigma^2}}} \end{split}$$

%changing the equation number to 'normalsize'
\makeatletter
\def\tagform@#1{\maketag@@@{\normalsize(#1)\@@italiccorr}}
\makeatother

the small equation with 'normalsized' equation number
\footnotesize
$$\label{eee013-c} \begin{split} f(x) = A e^{\cfrac{(x-\textcolor{red}{\mu})^2}{2 \textcolor{red}{\sigma^2}}} \end{split}$$

\end{document}


-
Sorry, I have't seen the other two answeres when posting mine... Is there no alert that somebody else already posted something when composing my answere, or have I missed something? –  ralfix Feb 27 '13 at 11:14
You should have had an alert that there was another answer and an option to redisplay –  David Carlisle Feb 27 '13 at 11:25

Please always post complete documents showing all packages used. I had to make some guesses based on commands used in the fragment.

You can add \normalsize to the command used to set the equation number in AMS alignments.

\documentclass{article}
\usepackage{color,amsmath}
\definecolor{1}{rgb}{1,0,0}
\makeatletter
\def\maketag@@@#1{\hbox{\m@th\normalfont\normalsize#1}}
\makeatother

\begin{document}
\centering

\begin{minipage}[t]{\textwidth}
\footnotesize
$$\label{eee013} \begin{split} f(x) = A e^{-\frac{(x-\textcolor{1}{\mu})^2}{2 \textcolor{1}{\sigma^2}}} \end{split}$$
\end{minipage}

\begin{minipage}[t]{\textwidth}
$$\label{eee013x} \begin{split} f(x) = A e^{-\frac{(x-\textcolor{1}{\mu})^2}{2 \textcolor{1}{\sigma^2}}} \end{split}$$
\end{minipage}

\end{document}


Note putting equations in minipages defeats most of the above and below display space logic, it should only be needed in special cases.

-
Sorry, @David, didn't see that you'd beat me to the answer by two minutes ;) –  benwilfut Feb 27 '13 at 11:15
@benwilfut no harm done, your answer is identical even down to the complaint about lack of MWE:-) –  David Carlisle Feb 27 '13 at 11:26