[Top][All Lists]
[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, 4 Oct 2004 10:59:01 +0100 |
Joerg van den Hoff wrote:
> is there a straightforward way to get the current section title _and_
> section number into the page header under all conditions?
> I have attached an example, showing what I have managed to get: always
> the correct (current) section title. what I do _not_ get is the correct
> section number if the new section starts at the top of a new page (in
> the example this happens on page 3).
>
> if someone cares to have a look, the logic is as follows:
>
> the macro SHEAD sets a string register \*(xx which is inserted by a
> modified PT macro in the page header (along with a horizontal line).
> (page 1 is intentionally treated different, i.e. no page header is
> created). moreover the value of \n[SN] is inserted in the page header.
> in additon, table of content entries are collected.
Hi Joerg,
You may have already noticed the GROWPS and PSINCR registers, which were
recently added to ms, in the CVS. These provide hooks into .NH, which
will let you achieve this -- the SHEAD macro we discussed previously can
effectively be reduced to
.nr GROWPS 4
.nr PSINCR 1p
.de SHEAD
. NH \\$1
. nop \&\\$2
..
Add to this, whatever you need to set up your page heading string, and
your TOC collection -- the point size adjustment will now be handled
directly within .NH, and you should get the new section number in the
page header, when a section heading appears at the top of a new page.
HTH.
Best regards,
Keith.
P.S. for another approach to adding some layout control to the ms
default TOC, have a look in spdf.tmac -- see the .XN macro -- in the
pdfmark.tmac package I posted last week.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Groff] pointsize changes in .NH ms-macro,
Keith MARSHALL <=