
Converting Perl code & pod docs to postscript
The lout typesetting language (similar to{*filter*}& nroff but higher
level==easier) has a new supplementary program (in version 3.21) which
can be used to convert perl code and pod documentation (including files
that have both) into lout which the lout typesetter can convert into
postscript, e.g.
% prg2lout -lperl -Smyperl -t4 mymodule.pm | lout -s > mymodule.ps
-l is the language, (if you say perl you also get pod; other options are
C/C++, Blue & Eiffel), -S is the setup file which I've overridden with
my colourful one here but you can use the default if you like B&W, -t is
the tab size; there are more options and the setup file can be
customised quite a bit.
You can have colour syntax highlighting of Perl (which is pretty good
even though Perl is notoriously difficult to parse) & pod as well as
controlling fonts, indents etc, by making your own setup file and
changing the settings to suit yourself. You can also include lout
commands in your perl comments to give finer typesetting control, e.g.
pagination, index marks etc.
BTW I've used lout quite a bit as a target format - extracting data
using perl & having perl programs write lout and using lout to give me
postscript.
lout can output pdf directly, but I'd recommend using ps2pdf.
Lout is distributed under the GPL and can be obtained from:
ftp://ftp.cs.usyd.edu.au/jeff/lout/lout-3.21.tar.gz
The website (which has occasional bad hair days) is:
http://www.*-*-*.com/ ~uwe/lout/
The mailing list is documented (and archived) on the web site; it is low
traffic, high quality & friendly - the excellent user guide probably
helps too.
_______________________________________________
Mark Summerfield http://www.*-*-*.com/