groff
[Top][All Lists]
Advanced

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

Re: [Groff] \*[SN] question


From: Tadziu Hoffmann
Subject: Re: [Groff] \*[SN] question
Date: Wed, 14 Feb 2007 21:26:50 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

> > Also, had you called ".NHH n xxx" with n>0 first, everything
> > would have been okay.
>
> not quite: the interspersed `.SH' section would have got an
> erroneous section number (the last one) in the TOC.

You're right (see below).

> but `.rm SN' instead poses no problem, does it?

On the contrary, removing SN (or at least clearing it) prevents
unnumbered sections from getting the section number of the
preceding numbered section in the toc, like you said above.

(However, for the generation of the toc entry this could
also be fixed by querying "\\$1>0" instead of SN being empty,
as in deciding whether to use SH or NH in your macro.)


> another question: wouldn't it be wiser to emit a warning in
> s.tmac a la
> 
> "warning: register `SN' already defined. cannot use it for
> section number. use SN-(NO-)DOT directly or remove `SN'"

Hmm, this is a matter of debate, but I would say "not necessarily":
for example, assume you want section numbering according to
DIN 1421 (ISO 2145), i.e., without the trailing dot.
Then you could say (in principle - see note below)

  .ds SN-NO-DOT
  .als SN SN-NO-DOT

and you wouldn't want to be annoyed with a warning for
something you expressly requested.

Note: The above doesn't (yet) work, because NH explicitly
uses SN-DOT in the header.  However, I see no reason it
couldn't use SN.  Werner?






reply via email to

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