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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Well like the title says I am asking if there is an alternative to the listings package. With more programming language definitions and the likes, and updated definitions for the current languages.

share|improve this question
up vote 8 down vote accepted

Try the minted package. It uses the external Pygments python syntax highlighter and is therefore quite powerful. You need to use the -shell-escape option to allow it to call the required external executables.

share|improve this answer
While I like minted (its output is also significantly nicer), it's worth noting that it does slow down compilation noticeably. – Antal Spector-Zabusky Feb 23 '11 at 9:32
@Antal: There should be, at least in theory, the possibility to cache the formatted output generated by Pygments. The author of the minted package should include that in some future version. However, the project web site states that the package is currently not really maintained. – Martin Scharrer Feb 23 '11 at 9:41
In t-vim (ConTeXt module), I cache the results by creating an md5 hash of each file, and calling the formatter only if the file has changed. So, subsequent runs are relatively fast. The functionality is actually part of the mtxrun (the lua script that runs ConTeXt), and t-vim only provides an interface to that. – Aditya Feb 23 '11 at 22:01

And there are GNU Source-highlight:
and hightlight:

They can export LaTeX code.

In ConTeXt, there is a t-vim module, which calls VIM to highlighting the program code.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.