How can I add caption and numbering to all the source code listings I insert with the minted package?
\caption
and \label
seem to work only with listings. The following example fails (with the output below):
Code: Select all
Code, edit and compile here:
\begin{minted}[fontsize=\footnotesize,gobble=4]{latex}A painting synesthetically fragranced with vibrations of purple LINQ.\caption{Example of a listing.}\label{lst:example}\end{minted}