6

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:

enter image description here

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:
\begin{equation}
a = b.
\end{equation}
\end{quotation}
Outside quotation environment:
\begin{equation}
c = d.
\end{equation}
\end{document}
Mark
  • 431

2 Answers2

3

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:
\begin{equation}
a = b.
\end{equation}
\end{quotation}
Outside quotation environment:
\begin{equation}
c = d.
\end{equation}
\end{document}

enter image description here

egreg
  • 1,121,712
2

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}
\begin{equation}
c = d.
\end{equation}
\end{minipage}

\end{quotation}
Outside quotation environment:

\begin{equation}
c = d.
\end{equation}

\end{document}

Output

enter image description here

Salim Bou
  • 17,021
  • 2
  • 31
  • 76