[Top][All Lists]

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

Re: [Groff] vpt request in diversions

From: Werner LEMBERG
Subject: Re: [Groff] vpt request in diversions
Date: Fri, 02 May 2003 19:19:30 +0200 (CEST)

> What is the reason I can't disable and then re-enable vertical
> position traps within a diversion?
> .da FOO
> \!.vpt 0
> <stuff that goes in the diversion>
> \!.vpt 1
> ..
> disables the traps (.vpt 0), but .vpt 1 is not turning them back
> on.

Please provide a small example.

> I'm working on the Table of Contents for the mom macro set.
> Processing each entry so that the entry itself, the leaders and the
> page number all end up on the same line requires setting each by
> itself and backing up on the page for the next bit (i.e entry=>go
> back a line=>leaders=>go back a line=>page number).  Naturally, the
> bottom entry on Table of Contents pages trips the page footer macro,
> meaning that I end up with the entry at the bottom of the page, but
> the leaders and page number are on the next.

As a workaround, process the table of contents in a separate
environment and don't emit `.br' after adding a partial new entry:

  .de add-toc
  .  ev toc
  .  da toc
  .  nop \\$1
  .  da
  .  ev
  .de end-toc-entry
  .  ev top
  .  da toc
  .  br
  .  da
  .  ev
  .add-toc <entry>
  .add-toc <leaders>
  .add-toc <page number>


reply via email to

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