Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
minted uses fancyvrb, so the documentation of fancyvrb will help you.+ – Marco Daniel Mar 4 at 19:24
2  
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

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.