I've recently released the new version of GNU Source-highlight, http://www.gnu.org/software/src-highlite, which, given a source file, produces a document with syntax highlighting.
The main novelties are:
- I've added language definitions for Makefiles, m4 and CSS.
- In style files you can specify a color in double quotes meaning that that colro will be inserted in the output without any translation
- In style files you can specify the formatting options for more than one element on the same line, by separating the elements with commas, e.g.,
time, file darkblue b ;
- In the style file you can also specify the background color for each element (not all the output formats support background colors; e.g., XHTML and LaTeX with colors support it, but plain HTML does not).
todo black bg:cyan b;This formats todo elements in black with a cyan background
- The background color for the entire output document can be specified in the style file
- Furthermore, the main novelty, is that you can use a CSS file as a style file so that source-highlight will use its formatting specification to produce the output (independently from HTML); thus, instead of using
--style-file=mystyle.styleyou can use
--style-css-file=mystyle.cssSo that the same CSS file can be used either as a standard CSS file in a (X)HTML document, or as the style file for formatting in any format with source-highlight.
This is the entire file (~400k) with all these examples.
Lots and lots of colors! :-)