groff
[Top][All Lists]
Advanced

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

Re: [Groff] delayed


From: Mohammad Razwan
Subject: Re: [Groff] delayed
Date: Wed, 09 Jul 2003 22:20:14 +0100

>
>You probably won't like it, but I'll tell you how I do this.  I got the
>method from Rich Stevens who used it in all his books.  First modify
>your chapter and section macros to output (via .tm) lines of the sort
>    CH: 3 Another Boring Chapter 79
>where the fields are tab delimited and this is an entry for chapter 3
>entitled ``Another Boring Chapter'' that starts on page 79.
>
>Then postprocess this with a (say) awk script to produce a file that
>has lines like:
>
>        .ds O1Hdr79 Another Boring Chapter
>        .ds O2Hdr79 Chapter 3
>        .ds E1Hdr80 Section 3.1
>        .ds E2Hdr80 A Boring Section in a Boring Chapter
>
>This file gets included at the beginning of your troff source.
>
>Finally, for your PT macro you have calls to .tl that look something
>like this:
>
>.if e .tl @\s9\fB\\n%\fP\h'2m'\\*[E1Hdr\\n%]\s0@@\s9\\*[E2Hdr\\n%]\s0@
>.if o .tl @\s9\\*[O1Hdr\\n%]\s0@@\s9\\*[O2Hdr\\n%]\h'2m'\fB\\n~\fP\s0@
>
>The tricky part, as others have said, is what you do in the awk script.
>The nice thing is, you can enforce any policy you like (first section
>on page goes into header; last section on page goes into header).
>
>Obviously we're talking about a multipass process here, but I do it all
>with makefile magic, and it's pretty much transparent.
>
>jcs

Thanks. I've just spent four hrs trying what was suggested before, and well it 
didnt work or I couldnt get it to work. Thanks for your solution...comes from 
the horses mouth so-to-speak. I had actually seen what I'm trying to do in the 
late Rich Stevens books, so I new it could be done with groff.

Thanks Again!


___________________________________________________ 
Which footballer won 88 caps for Northern Ireland and went on to manage 
Macclesfield Town? 
Find out at postmaster.co.uk

http://www.postmaster.co.uk/cgi-bin/meme/quiz.pl?id=238

reply via email to

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