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}
  • 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
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

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

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.