# Number quote environment like an equation

I want to put an equation number to the right of a quote (the environment) as if it was an equation. I have looked at Equations with only text in them, How can I make LaTeX number my quotes and How do I label text with equation number. So far I have this MWE but it is not exactly what i'm looking for:

\documentclass{article}
\usepackage{blindtext}
\newcommand\IdeaOne[1]{%
$$\parbox{.85\textwidth}{#1}$$}
\makeatletter
\newenvironment{IdeaTwo}{%
\list{}{\rightmargin\leftmargin}%
\let\orig@item\item
\def\item{
\orig@item[]\refstepcounter{equation}
\def\item{\hfill(\theequation)\orig@item[]\refstepcounter{equation}}}}
{\hfill(\theequation)\endlist}
\makeatother
\begin{document}
\section{Normal text, quote and equation}
\blindtext\begin{quote}\blindtext\end{quote}$$E=mc^2$$
\section{IdeaOne}
\IdeaOne{\blindtext}
\section{IdeaTwo}
\begin{IdeaTwo}
\blindtext
\end{IdeaTwo}
\end{document}


The IdeaOne is pretty close but not exactly and I have to specify the size of the parbox manually. IdeaTwo gets the margins right but does not put the equation number like I want it. Does anyone know how to fix either of the two ideas?

I want to do this for a philosoohy text where some text is important and will be refered to like an equation in math text but the text is longer than one line (else I could use $$\text{...}$$. Maybe somebody has some idea for a different approach.

Assuming that these numbered quote environments are at the top level and not nested in other list environments, you can exploit the fact that, unless your equation numbers are too wide, they will fit in the available white space; in case they are wider for fitting, you should redefine quote in the first place.

\documentclass{article}
\usepackage{blindtext}

\newsavebox\ideabox
\newenvironment{idea}
{$$\begin{lrbox}{\ideabox} \begin{minipage}{\dimexpr\columnwidth-2\leftmargini} \setlength{\leftmargini}{0pt}% \begin{quote}} {\end{quote} \end{minipage} \end{lrbox}\makebox[0pt]{\usebox{\ideabox}}$$}

\begin{document}
\begin{quote}\blindtext\end{quote}$$E=mc^2$$

\begin{idea}
\blindtext
\end{idea}
\end{document}


The “equationed” quote is typeset in a zero width box, so the equation number will not force a shift to the left.

• Sadly I found a problem with this solution: Try \blindtext\begin{idea}\blindtext\end{idea}\blindtext to see that the vertical space around the idea is messed up (much smaler than with \blindtext\begin{quote}\blindtext\end{quote}\blindtext or \blindtext$$\parbox{\whatever}{\blindtext}$$\blindtext). – Lucas Oct 2 '14 at 10:57
• @lucas You shouldn't do \par before idea and \blindtext adds a final par. – egreg Oct 2 '14 at 10:59