Numbering quotations

countersenvironmentsnumberingquotation

I want to create a new environment nquote based on displayquote (form csquotes package) that I can number, and display that number on the side so I can cite quotations in my document, like you can do with equations.

This is what I have so far:

\usepackage[csquotes]
\newcounter{nquotes}
\newenvironment{nquote}
    {
    \refstepcounter{nquotes}
    (\thenquotes)\space
    \begin{displayquote}
    }
    { 
    \end{displayquote}
    }

but the number appears at the begining of the line before the quotation. I want it at the side of the quotation.

Best Answer

I designed a solution with the help of @Ingmar who suggested to use \marginpar, but I used \marginnote (from marginnote package) instead:

\usepackage[csquotes]
\usepackage[marginnote]
\newcounter{nquotes}
\newenvironment{nquote}
    {
    \refstepcounter{nquotes}
    \begin{displayquote}
    \marginpar{(\thenquotes)}
    }
    { 
    \end{displayquote}
    }
Related Question