groff
[Top][All Lists]
Advanced

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

Re: [Groff] pointsize changes in .NH ms-macro


From: Keith Marshall
Subject: Re: [Groff] pointsize changes in .NH ms-macro
Date: Mon, 6 Sep 2004 20:06:46 +0100

On Monday 06 September 2004 4:30 pm, joerg van den hoff wrote:
> dear groffers,
>
> groff 1.19/MacOS 10.3.5 (this is _not_ the obsolete groff version
> distributed by Apple):
>
> in the attached troff file there is a macro definition SHEAD which
> essentially calls .NH including a NH-level dependent pointsize increase
> which immediately is resetted after the .NH call.
> for the headings and the text body this works as expected, but there is
> a problem with the footers (and headers, probably - I did not test this):

Judging by the size of the page number in the page 2 header, it looks like 
headers *are* affected too.

> if a subsequent heading starts right at the top of a new page, the reset
> of the pointsize after the .NH call (which actually works for the text
> body) does not 'reach' text in the footer.
>
> in the attached example: the headers should be in 16 pt, the body and
> footer in 13 pt. but the footer on page one is in 16 pt, _if_ the next
> section starts on a new page. by uncommenting the .ig-block in lines
> 32-35 you get the desired result: all footers in 13 pt (because now the
> 2. section does not start at the top of the second page.
>
> it looks like the pointsize for the current footer is that which is in
> the PS register valid on the top of the *next* page (more precisely: the
> PS register itself behaves unexpectedly (at least for me)). did I miss
> something or is this a bug?

Not sure about it being a bug, but ...

.de SHEAD
.\"inputs: $1: NH-level, $2: title
.\"------
.br
.nr incps 4-\\$1
.if \\n[incps]<0 .nr incps 0  \"just in case ...
.nr PS \\n(PS+\\n[incps]
.nr VS \\n(VS+\\n[incps]
.ne \\n(VSp
.NH \\$1
\\$2
.nr PS \\n(PS-\\n[incps]
.nr VS \\n(VS-\\n[incps]
.\"
..

... would seem to give the effect you are looking for -- note the addition of 
the .br and .ne requests.

Best regards,
Keith.




reply via email to

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