Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

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

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 \begin{equation} 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?

share|improve this question
    
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
1  
@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
add comment

1 Answer

up vote 2 down vote accepted

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

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

\begin{document}

\begin{equation}
  a = b
\end{equation}

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

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

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

\begin{equation}
  c = d
\end{equation}
\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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.