How to scale or resize equation with \eqno in LaTeX
Found some time ago interesting solution here: Resize/Scale equation in Beamer
But, the method is applicable not only in Beamer.
First, put the following code in the preamble:
\newcommand\scalemath[2]{\scalebox{#1}{\mbox{\ensuremath{\displaystyle #2}}}}
Second, use it in the following way:
\[
\scalemath{0.7}{
...
}
\]
Also can be used for certain parts of equations, e.g.
\[
A_{\zeta_{1}} = \scalemath{0.8}{\begin{bmatrix}
...
...
\end{bmatrix}.
}
\]
The problem may arise if one wants to scale the whole {align} environment, then, e.g.
\[
\scalemath{0.8}{
\begin{aligned}
...
...
\end{aligned}
}
\]
So, \scalemath does not work well if all content inside align/aligned environment is put into one scalemath, thus one has to fiddle with various walk-around solutions, e.g., put \scalemath for each separate line or part of a line, or put whole aligned and similar environments inside \scalemath.
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
.