I'm using amsmath
and its \tag
command to tag equations. I remember having a situation where I liked having the tag on the left better than on the right. So I gave my class (which is report
btw) the leqno
options. Now, however, I find myself wanting to revert to reqno
. However, I fear actually removing leqno
will make the above mentioned situation look worse. I found that the solution in Switch between leqno and reqno options (of amsmath) in the same document does not work with equation
:
\documentclass{report}
\usepackage[leqno]{amsmath}
\makeatletter
\newcommand{\leqnomode}{\tagsleft@true}
\newcommand{\reqnomode}{\tagsleft@false}
\makeatother
\begin{document}
\begin{align}
f(x) &= ax^2 + bx + c \\
g(x) &= dx^2 + ex + f
\end{align}
\reqnomode
\begin{align}
f(x) &= ax^2 + bx + c \\
g(x) &= dx^2 + ex + f \tag{e}
\end{align}
\begin{equation}
a^2+b^2=c^2.\tag{1}
\end{equation}
\leqnomode
\begin{equation}
-\Delta\phi=4\pi k\rho.\tag{2}
\end{equation}
\end{document}
Output:
The first equation
should still be in \reqnomode
(alias \tagsleft@false
) from the second align, yet the tag is on the left. How do I solve the problem without using an align
or such which are for multiline display and would therefore be out of place on a single one-line equation?
Best Answer