4

I'm trying to emulate the following behaviour i.e. the $(r \in \mathcal N)$ at the end of the line.

enter image description here

I'd like to know how to do this in \[ \], equation and align environments. I'm using amsart.

EDIT: It is posible to do the dual for non amsart? put something in the begin of the line?

Thanks.

  • It's possible, but not good style, in my opinion. – egreg Apr 16 '16 at 22:25
  • Use the flalign environment, but I agree with @egreg. – Bernard Apr 16 '16 at 22:26
  • Considering that amsart puts the numbering to the left by default, I don't see the problem, could you elaborate a little why is bad style? – k76u4vkweek547v7 Apr 16 '16 at 22:31
  • The r\in\mathfrak{N} condition should go either before the display, or near the second part. It makes no sense to push it to the right margin. – egreg Apr 16 '16 at 22:36
2

It's a little bit hacky and overrides all the nice measuring mechanisms from amsmath, but it should be prety relialble in most of the cases. Note that the solution is sensible to the leqno and reqno options.

\documentclass[leqno]{amsart}

\makeatletter
\newenvironment{tagedequation}[1]{%
  \gdef\@tempa{#1}
  \refstepcounter{equation}
  (\iftagsleft@\theequation\else\(\@tempa\)\fi)\hfill\(
}{%
  \)\hfill(\iftagsleft@\(\@tempa\)\else\theequation\fi)
}
\makeatother

\begin{document}
\begin{tagedequation}{r\in\mathfrak{N}}
  \theta' = \gamma\theta,\quad r'=r
\end{tagedequation}
\end{document}

output_crop

1

This might be a start. I've shown two varieties depending on your desires for centering the content.

\documentclass{amsart}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{flalign}
\phantom{(r\in\mathfrak{N})}&&\theta' = \gamma\theta,
  \quad r'=r&&(r\in\mathfrak{N})
\end{flalign}
\begin{flalign}
&&\theta' = \gamma\theta,
  \quad r'=r&&(r\in\mathfrak{N})
\end{flalign}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.