Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Wednesday October 28, 2009
05:20 PM

Pod::Parser::Groffmom to the CPAN

[ #39814 ]

Shortly you'll be able to get Pod::Parser::Groffmom from the CPAN. As always, the latest version is available from github.

I wanted to upload a new version of my Logic Programming in Perl article, but replacing presentations is currently disabled in Slideshare :( I've added syntax highlighting to it and I changed "Salvador FandiE<241>o" to "Salvador Fandiño", as one would expect. In other words, I now handle "E<$number>" escapes better.

I also changed "=for highlight $language" to "=begin highlight $language" after Matts pointed out that I was using the wrong POD command.

Now, I need to figure out the best way to support hyperlinks (mom might not do that) and how to embed literal mom sequences in the POD, in case someone wants fine-grained control. Of course, adding "table of contents" and "index" generation would also be nice. Oh, and copyright info on every header or footer. And numeric and roman lists. And ...

Update: The github version now allows you to create a table of contents. You merely need to include =head1 TOC anywhere in the document. Regrettably, due to limitations with MOM, the table of contents is the last page of the document. This is fine for printing (when you merely have to swap the TOC to the front (perhaps after the cover (=head1 COVER) page), but it's lousy for online. Perhaps some post processing of the PostScript file is in order.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • You can try to use technique that LaTeX uses: it writes information about sections and references to *.aux (auxilliary) file, so that table of contents might be at first page and you can refer to objects (equations, tables, figures, sections, etc.) which are later in the document.

    P.S. Do I understand correctly that mom is to groff like LaTeX is to TeX?
    • The mom docs specifically state that .TOC must be the last macro in the document. It says nothing about multi-pass parsing. And yeah, mom is a set of macros for groff. Very handy.