Generalminted | Caption and Numbering for Listings

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
laailalalaa
Posts: 35
Joined: Thu Oct 27, 2011 5:31 pm

minted | Caption and Numbering for Listings

Post by laailalalaa »

Follow up to this post http://latex-community.org/forum/viewto ... =5&t=20649.

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

\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}
Attachments
mintedex.png
mintedex.png (17 KiB) Viewed 16504 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

minted | Caption and Numbering for Listings

Post by localghost »

See Section 4 of the minted manual.


Thorsten
Post Reply