Converting Perl code & pod docs to postscript 
Author Message
 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/



Mon, 28 Oct 2002 03:00:00 GMT  
 Converting Perl code & pod docs to postscript

Quote:

> 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

And of course we wouldn't want to forget groff, also distributed
under the GPL, and which comes installed with most Linux
distributions.

  % pod2man my/module.pm | groff -man -Tps > my::module.ps

--
Jay Rogers



Fri, 01 Nov 2002 03:00:00 GMT  
 Converting Perl code & pod docs to postscript

Quote:


> > 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

> And of course we wouldn't want to forget groff, also distributed
> under the GPL, and which comes installed with most Linux
> distributions.

>   % pod2man my/module.pm | groff -man -Tps > my::module.ps

Of course, that's just for POD and not the Perl code.

--

rec.arts.int-fiction FAQ: http://www.*-*-*.com/
"So, is that superior artistry, or the easy way out?"
 --TenthStone on white canvases as art, on rec.arts.int-fiction



Fri, 01 Nov 2002 03:00:00 GMT  
 Converting Perl code & pod docs to postscript

: >
: > And of course we wouldn't want to forget groff, also distributed
: > under the GPL, and which comes installed with most Linux
: > distributions.
: >
: >   % pod2man my/module.pm | groff -man -Tps > my::module.ps

: Of course, that's just for POD and not the Perl code.

But 'grind' (with 'lgrind' variant - this one on CTAN), or 'a2ps', will
know what to do with at least some of Perl code.  Due to a famous Perl
parser I would expect every such program to fail flat on some inputs but
for most of "everyday" situations they should be fine.

  Michal



Sat, 02 Nov 2002 03:00:00 GMT  
 Converting Perl code & pod docs to postscript


: : >
: : > And of course we wouldn't want to forget groff, also distributed
: : > under the GPL, and which comes installed with most Linux
: : > distributions.
: : >
: : >   % pod2man my/module.pm | groff -man -Tps > my::module.ps

: : Of course, that's just for POD and not the Perl code.

: But 'grind' (with 'lgrind' variant - this one on CTAN), or 'a2ps', will
: know what to do with at least some of Perl code.  Due to a famous Perl
: parser I would expect every such program to fail flat on some inputs but
: for most of "everyday" situations they should be fine.

Perl also has a less well known facility, which I believe is called B.

It it used (among other things) to produce C source code out of Perl
source code.  It does this I understand by using Perl to compile the code
and then walking the parse tree.

The B module stuff includes examples that do things like display the call
tree structure of a Perl program.

A Perl code documentor might be another good use of the B facility.



Sat, 02 Nov 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. My fileManeger

2. CPUID instruction

3. Disk read error!? (Help?)

4. PostScript Perl Docs?

5. Non Postscript versions of the Perl Docs.

6. I need help making Perl 5 manual (.pod->.tex->Postscript)

7. I need help making Perl 5 manual (.pod->.tex->Postscript)

8. Sieve of Eratosthenes

9. Perl 5.004 pod docs in texinfo and info format

10. Tk-FBox - no pod / docs?

11. Any software convert html code into perl code??

12. Converting perl pod documentation to html

 

 
Powered by phpBB® Forum Software