Does anyone know of a simple way to produce the PostScript corresponding to a syntax-highlighted version of a source file that can be piped directly to a PostScript printer?
As the wording of the question above probably suggests, I'm looking for something that I can run from the command line. I'm thinking of an interaction like:
% syntax_highlight <SOURCE_FILE> | lp
...with command-line switches as needed, etc.
The best I've found so far is a Unix utility called
highlight, but it has problems. The most serious of it is that it doesn't have an option to output PostScript directly. (Since
highlight does support LaTeX output, I tried to patch together a script that would automate the process of generating the PostScript file via *.tex => *.dvi => *.ps, but the visual appearance of the final result is awful, much worse than it is for the HTML file that
highlight generates for the same source code input.)