# Right alignment of equation numbers in quotation

I use a quotation environment to make axioms or assumptions stand out from other text. But the equation numbers then end up at the right margin for the quotation environment, not the right margin of the text:

Question: How can I put the equation numbers from the quotation environment in the same place as the second equation number?

\documentclass{standalone}
\begin{document}
Inside quotation environment:
\begin{quotation}
Axiom name:
$$a = b.$$
\end{quotation}
Outside quotation environment:
$$c = d.$$
\end{document}
• Are you sure that an equation inside quotation is the right way to use it? – user31729 May 23 '16 at 7:24
• I suggest the usage of a theorem like environment rather to emphasize axioms etc. – user31729 May 23 '16 at 7:41
• This is the preferred way for the journal I am writing for. – Mark May 23 '16 at 7:49

## 2 Answers

You can use the same trick as amsart:

\documentclass{article}
\usepackage{amsmath}

\makeatletter % ams classes trick
\def\fullwidthdisplay{\displayindent\z@ \displaywidth\columnwidth}
\edef\@tempa{\noexpand\fullwidthdisplay\the\everydisplay}
\everydisplay\expandafter{\@tempa}
\makeatother

\begin{document}
Inside quotation environment:
\begin{quotation}
Axiom name:
$$a = b.$$
\end{quotation}
Outside quotation environment:
$$c = d.$$
\end{document}

The environment abstract is derived from quotation environment from egreg answer

\newenvironment{abstract}
{\small
\begin{center}
\bfseries \abstractname\vspace{-.5em}\vspace{0pt}
\end{center}
\quotation}
{\endquotation}

The definition of quotation environment from article.cls Martin Scharrer answer

\newenvironment{quotation}
{\list{}{\listparindent 1.5em%
\itemindent    \listparindent
\rightmargin   \leftmargin
\parsep        \z@ \@plus\p@}%
\item\relax}
{\endlist}

You can for example put your equation inside minipage and shift it to the left with \hspace{-\leftmargin}.

Code

\documentclass{article}
\begin{document}
Inside quotation environment:

\begin{quotation}
Axiom name:

\noindent\hspace{-\leftmargin}\begin{minipage}{\textwidth}
$$c = d.$$
\end{minipage}

\end{quotation}
Outside quotation environment:

$$c = d.$$

\end{document}

Output