GNU Source-highlight produces a document with syntax highlighting when given a source file.

Source-highlight reads source language specifications dynamically, thus it can be easily extended (without recompiling the sources) for handling new languages.

GNU Source-highlight also reads output format specifications dynamically, and thus it can be easily extended (without recompiling the sources) for handling new output formats. The syntax for these specifications is quite easy (take a look at the manual).

Since version 2.2, source-highlight can also generate cross references; in order to do this it relies on GNU Ctags.

These are the output formats already supported:

HTMLXHTMLLATEXTEXINFOANSI color escape sequences (you can use this feature with less)