# An equation tag which goes over two lines

I would like to make an 2-line equation tag, for a single equation. I am using the \tag command, and it works as long as I don't store a label for the equation. The moment I store a label, LaTeX barfs at me. In other words this code fails:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\label{mylabel} \tag{\parbox[c][3em][c]{4em}{1st tag \\ 2nd tag}} x = y^2$$
\end{document}


But this code works:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$%\label{mylabel} \tag{\parbox[c][3em][c]{4em}{1st tag \\ 2nd tag}} x = y^2$$
\end{document}


Any ideas?

-

The value for \label is written into the .aux file, thus you need \protect for the fragile \parbox:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\label{mylabel} \tag{\protect\parbox[c][3em][c]{4em}{1st tag \\ 2nd tag}} x = y^2$$
\end{document}


A tabular fixes at least the right white space:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\label{mylabel} \tag{\protect\begin{tabular}{@{}l@{}}1st tag \\ 2nd tag\protect\end{tabular}} x = y^2$$
\end{document}


But I would avoid two line tags, too many problems remain:

• Confusion for the reader: two tags for one equation.
• The parentheses are too small.
• Two line references would not look too well.

Therefore I would use one line, e.g.:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\label{mylabel} \tag{1st tag/2nd tag} x = y^2$$
\end{document}


-