# Minted cross reference line

I used to use listings a lot but minted+pygmentize has outstanding output. However, there are a few features from listings that are hard to find in minted, like having the line numbers on the right.

Is there a way to cross reference lines in a minted environment as in listings?

-
minted uses fancyvrb, so the documentation of fancyvrb will help you.+ – Marco Daniel Mar 4 at 19:24
You can use texcl=true to allow LaTeX in comments, and then put a \label in a comment and \ref that. Unfortunately, Pygments doesn't allow LaTeX anywhere except for comments (though that feature has been requested). So Pygments is a bit more limited than listings in that respect. (You could always take the direct output of pygmentize and add \label's by hand, but that's probably not what you were looking for.) – G. Poore Mar 4 at 20:05
Ok, I added a bogus comment by hand and used the texcl feature. – green diod Mar 4 at 20:40