[texhax] \eqno and \begin{split}

Barbara Beeton bnb at ams.org
Tue Mar 2 15:37:44 CET 2010


garrett morris is looking for an alternate
form of equation number.  since he's using
{split}, presumably he is using amsmath.
here is a brief example file that will do
what he wants, but more simply.

i'd also like to note that this is documented
in the file amsldoc.pdf, available from ctan
and also in most tex distributions, provided
the documentation files have been installed.
						-- bb

			--------------------

\documentclass{article}
\usepackage{amsmath}
\usepackage{verbatim}

\newcommand{\eql}[1]{\eqno{\mathrm{(\textsc{#1})}}}
\newcommand{\eqlt}[1]{\tag{\textsc{#1}}}
\newcommand{\impl}{\Longrightarrow}

\begin{document}
alternate form of equation label:
\begin{equation*}
   A \vdash \pi \impl true(\pi, A) \eql{Soundness}
\end{equation*}

a more complicated display:
\begin{equation*} \begin{split}
  & ...  \\
  & ...
\end{split} \eqlt{Soundness}\label{eq:snd} \end{equation*}

\verb|\eqlt| should work equally well with a single-line display;
also \verb|\mathit| is better for ``true'':
\begin{equation*}
   A \vdash \pi \impl \mathit{true}(\pi, A) \eqlt{Soundness}
\end{equation*}
finally, a reference to the \eqref{eq:snd} display.

\vspace{1\baselineskip}
\verbatiminput{\jobname.tex}
\end{document}


More information about the texhax mailing list