# how to have \tag, \text and cases environment like things in eqnarray

I have this journal template that insists that I do not use amsmath in any way and forces me to use eqnarray. I am very used to amsmath and have things like cases environment, \tag, \text, etc. in my code. How to have those in eqnarray?

The template has its own class/style files... cant figure out how to add those here... but a search for "agu latex format" should give all easily...

• Good job finding a valid pretext for asking a question about eqnarray :) – Ryan Reich Jan 5 '14 at 19:43

Default LaTeX includes the \cases command from plain TeX which has the rather non-LaTeX syntax:

\cases{x  & if $x>0$\cr
-x & otherwise\cr}

\documentclass{article}

\begin{document}

\begin{eqnarray}
\label{eq:f}
f(x) &=& \cases{x,&if $$x>0$$\cr -x,&if $$x\le 0$$\cr}\\
\label{eq:g}
g(x) &=& \cases{\sin(x),&if $$-1<x<1$$\cr
\cos(1-x),&otherwise.\cr}
\end{eqnarray}

\end{document}

\text can be replaced by \mbox or \parbox, but you will have to take care of some sizing yourself.

It turns out that a replacement for \tag is provided by the class file agutex.cls (at least the Feb 9, 2008 version):

\documentclass{agutex}