# How to scale or resize equation with \eqno in LaTeX

I want to scale or resize an equation because it goes over the margin. Take this example:

$$0<a_{1}\leq a(X,t)\leq a_{2}<+\infty, ~~~\forall X \in \Omega;~~~ \eqno(3)$$


In normal equation command I can resize it like this:

$$\resizebox{0.9\hsize}{!}{ 0<a_{1}\leq a(X,t)\leq a_{2}<+\infty, ~~~\forall X \in \Omega;~~~ \eqno(3) }$$


But when I try to do the same approach for the equation with \eqno it doesn't work, it says you cannot use \eqno in math mode, even if I put the \eqno outside the resizebox it says you can't use \eqno in horizontal mode.

Note that I have hundreds of equation already written in \eqno format not so it will be hard for me to convert them. Also, I want to use \eqno to customize the equation numbers.

Is there any solution for this?

-
Welcome to TeX.sx! –  Peter Jansson Jan 29 '13 at 7:51
Let me point out that before resorting to \resizebox, you should try all your best to make the equation fit without resizing it, for example by splitting it into two or more parts. –  Hendrik Vogt Jan 29 '13 at 9:36
@HendrikVogt I already use splitting but you know sometimes the equation is just slightly out of margin, doesn't worth a split. –  Hesham Saeed Jan 29 '13 at 10:47
@Hesham: I know this problem very well, but resizing is somewhat poor typesetting. I always stick to some very slight manual squeezing at appropriate places, with \mkern-1mu or so. –  Hendrik Vogt Jan 29 '13 at 11:23

## 1 Answer

Here are three different approaches to circumvent the usage of \eqno:

\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}

\begin{document}

$$a = b$$

This version will change the equation counter, and thus indfluence the
equation number for all subsequent equations:
\setcounter{equation}{10}
$$\label{eq1} \resizebox{0.5\hsize}{!}{% 0<a_{1}\leq a(X,t)\leq% a_{2}<+\infty, ~~~\forall X \in \Omega;~~~ % }%$$
Equation~(\ref{eq1}).

This version steps the equation counter, but we have to revert the
change again after the equation:
\renewcommand{\theequation}{A}
$$\label{eq2} \resizebox{0.5\hsize}{!}{% 0<a_{1}\leq a(X,t)\leq% a_{2}<+\infty, ~~~\forall X \in \Omega;~~~ % }%$$
\renewcommand{\theequation}{\arabic{equation}}
Equation~(\ref{eq2}).

This version does not step the equation counter:
$$\label{eq3} \resizebox{0.5\hsize}{!}{% 0<a_{1}\leq a(X,t)\leq% a_{2}<+\infty, ~~~\forall X \in \Omega;~~~ % }% \tag{Z}$$
Equation~(\ref{eq3}).

$$c = d$$
\end{document}


It depends what you want to achieve with \eqno: If you want to change all equation numbers from that point on, change the equation counter; ifyou want to change the label, but silently keep numbering the equations, use a temporary change of \theequation; if you really want just a custom tag, use \tag from amsmath.

-