[Tex/LaTex] Text in quote style with caption

captionsquoting

I need to put a output of a program in a quote stile but i need to put a \caption tag like an image or a table.

I need to do something like:

text
other text

Output X: something

What i can do this?

Edit 1:

I have a multiline quote like this:

\begin{quote}
    {\bf Percorso del dataset:} Utile in caso di approccio \ac{MC} per individuare il dataset con le epoche random che ha portato allo score migliore;\\
    {\bf Numero totale di epoche:} Utile nel caso 3 per specificare qual'è il numero di epoche che portato allo score migliore; \\
    {\bf Istanti di transizione da un epoca all'altra:} Utile in caso di approccio \ac{MC} per caratterizzare la sequenza di epoche appresa che ha portato allo score migliore; \\
    {\bf Score globale:} Score dell'intera sequenza di strutture; \\
    {\bf Lista dei NaN:} Eventuale lista degli score con valore \ac{NaN};
\end{quote}

I need to put a label "Quote X: blablabla" at the bottom of the quote. I don't like the figure tag, because it isn't a figure.

Best Answer

One can create a new float type that I call floatquote with the float package. It's not used in the document body, as I can't imagine why one would make a quotation float. Instead, you have the captionof command from the caption package. In addition, I included a demonstration of the cleveref package (cross-references that detect the type of structure you're referencing, so you don't have to type its name). I also added the enumitem package to use a compact description environment which I find better suited to your case and babelto have correct hyphenation in italian. Not knowing what the \ac command is supposed to do, I decided quite arbitrarily it was "\relax".

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{float} 
\newfloat{floatquote}{tbp}{loq}
\floatname{floatquote}{Quote}
\usepackage{caption}
\captionsetup{font =small, format = hang}
\usepackage{cleveref}
\crefname{floatquote}{quote}{quotes}
\Crefname{floatquote}{Quote}{Quotes}

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[italian,  english]{babel}
\usepackage{float}
\newfloat{floatquote}{tbp}{loq}
\floatname{floatquote}{Quote}
\usepackage{caption}
\captionsetup{font =small, format = hang}
\usepackage{cleveref}
\crefname{floatquote}{quote}{quotes}
\Crefname{floatquote}{Quote}{Quotes}
\usepackage{enumitem}

\newcommand\ac{\relax}

\begin{document}
\noindent Some text preceding the quote environment.
\begin{quote}{\selectlanguage{italian}
\begin{description}[noitemsep = 0pt]%style = nextline,
      \item[Percorso del dataset:] Utile in caso di approccio \ac{MC} per individuare il dataset con le epoche random che ha portato allo score migliore;
    \item[Numero totale di epoche:] Utile nel caso 3 per specificare qual'è il numero di epoche che portato allo score migliore;
    \item[Istanti di transizione da un epoca all'altra:] Utile in caso di approccio \ac{MC} per caratterizzare la sequenza di epoche appresa che ha portato allo score migliore;
    \item[Score globale:] Score dell'intera sequenza di strutture;
    \item[Lista dei NaN:] Eventuale lista degli score con valore \ac{NaN};
\end{description}}
\captionof{floatquote}{Output of the Program}\label{quo1}
\end{quote}
In \cref {quo1} we find the output of the program.
\end{document} 

enter image description here

Related Question