I want to add a caption and label on a Minted source code so I can reference it, similarly to what you can do to figures.
In Minted manual it says I can use the listing environment, which allows to use both caption and label, the problem is that listings creates a float and only allows to use one page. My source code is long and spans on two pages.
How can I add caption and label but still be able to use two pages?

Listing 1: MY_LABEL. Is there a way to change fromListing 1toSource Code 1? – Anthony Gaudino Jul 07 '15 at 15:16