# acmart aligns tags with column edge, not page edge

I'm typesetting some equations using the align* environment, and I'd like to use the \tag{} command to give them textual labels at the end.

However, when I do this with the new acmart template, it insists on putting the tags in the middle of the line, and if necessary, on a new line, regardless of how much space there is.

\documentclass[sigplan,10pt,review,anonymous]{acmart}

\begin{document}
\title{Title}

\maketitle

\begin{figure*}
\begin{align*}
X & = & Y \tag{good}\\
X & = & Y \tag{good}
\end{align*}
\end{figure*}

\begin{figure*}
\begin{align*}
XXXXXXXXXXXXXXXXXXXXXXXx & = & YYYYYYYYYYYYYYYYYYYYYYY \tag{bad}\\
XXXXXXXXXXXXXXXXXXXXXXXx & = & YYYYYYYYYYYYYYYYYYYYYYY \tag{bad}
\end{align*}
\end{figure*}

\end{document}


This renders as follows:

What's bizarre is, the problem goes away if I use the one-column ACM format. So I think it must be related to how acmart is doing columns. It also doesn't happen in a normal two-column article, so it's probably (unfortunately) ACM specific.

Does anyone know what might be causing this, and how I can align my tags with the page edge, not column edge?

• Aside: You're abusing the syntax of the align environment: It should be X &= Y \tag{good}, not X & = & Y \tag{good}. – Mico Jan 18 '18 at 1:43

Set the align inside a minipage where you can specify the line width:

\documentclass[sigplan,10pt,review,anonymous]{acmart}

\usepackage{lipsum}

\begin{document}

\title{Title}
\maketitle

\sloppy\lipsum[1-4]

\begin{figure*}
\begin{align*}
X &= Y \tag{good1} \\
X &= Y \tag{good2}
\end{align*}
\end{figure*}

\begin{figure*}
\begin{minipage}{\textwidth}
\begin{align*}
XXXXXXXXXXXXXXXXXXXXXXX &= YYYYYYYYYYYYYYYYYYYYYYY \tag{good3} \\
YYYYYYYYYYYYYYYYYYYYYYY &= XXXXXXXXXXXXXXXXXXXXXXX \tag{good4}
\end{align*}
\end{minipage}
\end{figure*}

\lipsum[5-15]

\end{document}