[Top][All Lists]

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

[Groff] .NH ms Macro Question

From: Andrew J. Piziali
Subject: [Groff] .NH ms Macro Question
Date: Sat, 28 Feb 2004 10:25:33 -0600 (CST)


   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?

   Thank you.

.de NHT
.if (\\$1 == 1) .ds chapterTitle \\$2\" Update chapter title on top level
'\"                                       sections.
.nr oPS \\n(PS\"                        Save current font size
.nr oVS \\n(VS\"                          and vertical spacing.
.if (\\$1 == 1) \{\"                    Use a section heading font size which
.  nr PS +3\"                             is proportional to the heading level.
.  nr VS +3\"                           [TBD: This implementation has the side
.\}\"                                     effect of increasing the font size of
.if (\\$1 == 2) \{\"                      the footer when the .NH macro triggers
.  nr PS +2\"                             a page break.  Figure out how to
.  nr VS +2\"                             manipulate the font size of the
.\}\"                                     section heading without messing with
.if (\\$1 == 3) \{\"                      the footer font size.]
.  nr PS +1                             
.  nr VS +1                               
.NH \\$1
.nr PS \\n[oPS]\"                       Restore paragraph font size
.nr VS \\n[oVS]\"                         and vertical spacing.

address@hidden                       ________------+------________
                                                       / \

reply via email to

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