groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Larry Kollar's TOC usuability?


From: Jon Snader
Subject: Re: [Groff] Larry Kollar's TOC usuability?
Date: Mon, 2 Dec 2002 16:21:20 -0500
User-agent: Mutt/1.4i

On Sun, Dec 01, 2002 at 10:05:41PM +0100, Janez ?emva wrote:
> After seeing Larry's post and added 1+1 I have the following question:
> 
> is UTPTOC.tmac usuable by us mere mortals? I currently use a mechanism where 
> I output page numbers on standard error and then do some AWK magic on my 
> groff files? Ugly! Is UTPTOC any better?
> 

The TOC in UTP is set much as you describe.  The .chapter and .Ah
macros use .tm to output the appropriate info to stderr.  This
information is collected by an awk script which outputs the TOC as
troff source.  The make file does all this transparently, but it's
still basically what you do.

It's not too hard to collect the same information in a diversion
and then do whatever you want at the end of the document, but
unless you are a fan of uniform TOCs, you're still going to have
to do some sort of specialized marco stuff.  Personally, I like
the .tm/awk method better, but the choice doesn't have, after all, any
moral dimensions.

Jon Snader

reply via email to

[Prev in Thread] Current Thread [Next in Thread]