groff
[Top][All Lists]
Advanced

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

Re: [Groff] delayed


From: Werner LEMBERG
Subject: Re: [Groff] delayed
Date: Tue, 08 Jul 2003 19:43:36 +0200 (CEST)

> I was just wondering, about delaying the outputting of the header on
> the current page.
> 
> What I want to do is to output:
>
> .tl 'Section \\n[SecNo]'\\*[SecName]'\\n[%]'
> 
> where the the register SecNo and string SecName reflect the
> situation on the current page, that is, if a section begins on the
> current page then that section number and name should reflected at
> the top.
> 
> Currently, I am not able to reflect the fact that a new section has
> begun on the current page, the header still shows the values held
> from the previous page (except the page number which is correct).

I fear that this is not possible with any of the standard macro
packages available for groff.  TeX has a very sophisticated (and quite
complicated) mechanism -- \insert -- to make that work which must be
emulated by groff.

The easiest solution is to implement a two-pass system.  In the first
run, dummy header lines are written, and the sectioning commands emit
header strings to an auxiliary file which are then read in the second
pass to write the final header lines.


    Werner

reply via email to

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