For my project, I've interviewed some people and used parts of those interviews as quotes
in my project. Some quotes I would like to reference later on, just like how equations are referenced, with a number (1) right next to the equation.
My set up is
\documentclass[a4paper,11pt,oldfontcommands]{memoir}
\usepackage{pdfpages}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage{framed}
\usepackage{setspace}
\usepackage{caption}
\newenvironment{myquote}{\list{}{\leftmargin=1.0cm\rightmargin=1.0cm}\centering\small\itshape\item[]}{\endlist}
\usepackage{mathtools}
\usepackage[colorlinks=true]{hyperref}
\begin{document}
This is an example of what the subject might be.
\begin{myquote}
Oh really -stranger.
\end{myquote}
Some text in-between.
\begin{myquote}
yes really -me
\end{myquote}
As mentioned by me in quote No. 1, I responded to a stranger.
\end{document}
So if I'm writing:
\begin{myquote}
Example of a quote.
\end{quote}
I just get the quote, which is fine, but in some cases I also want a number to the right of it - for later references, like:
yes really -me (1)
Here is a picture of what I have:
And all I want is a number next to some of the quotes, just like it's possible to do with some equations.
I have tried to label it as an equation \label{eq:1}
but it didn't work, and I also tried with the other labels. I have also tried How to reference a point in a document with a counter and descriptive text?, but that only gives me an active reference, which is close, but not quite what I'm looking for. I also tried Quote environment with reference at the end right, but that too wasn't quite what I was looking for. I have also tried \usepackage{csquotes}
which for some reason doesn't work for me.
Solved:
Added this to the preamble:
\usepackage{environ}
\newcounter{quote}
\NewEnviron{myquotenumber}{\vspace{3ex}\par
\refstepcounter{quote}%
\hfill\parbox{\dimexpr \textwidth-2cm}%brug \parbox[b] for bunden [c] (standard) for center og [t] for top
{\centering\small\textit{\BODY}}
\hfill\llap{(\thequote)}\vspace{2ex}\par}
Now all quotes beginning with \begin{myquote}
won't be numbered and quotes with \begin{myquotenumber}\cite{marker}
has numbers and can be referenced with \ref{marker}
.