groff
[Top][All Lists]
Advanced

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

Re: [Groff] .NH ms Macro Question


From: Larry Kollar
Subject: Re: [Groff] .NH ms Macro Question
Date: Sat, 28 Feb 2004 12:36:25 -0500

   I use the following macro in an ms document to make the font size of
a chapter title proportional to the chapter level.  As noted in the
comments below, as currently implemented it has the side effect of
changing the size of text in the page footer if the embedded call to .NH
triggers a page break.

   How can I detect that a page break is imminent, force the page break
and then change PS, VS and call .NH?

The easiest way is to add ".ne 4" or something similar to the beginning
of the macro. This creates a conditional page break -- if there are less
than four lines left before the footer (literally, before the next vertical trap), it forces a page break then begins executing the rest of the macro.

I use 4 lines because that's enough space for the heading, a blank line,
then two lines of the first paragraph past the heading.

Hope that helps!
--
Larry Kollar     k  o  l  l  a  r  @  a  l  l  t  e  l  .  n  e  t
Unix Text Processing: "UTP Revival"
http://home.alltel.net/kollar/utp/



reply via email to

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