[Top][All Lists]
[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: |
Tue, 13 Feb 2007 17:12:28 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
> > > question: can someone explain to me what actually is going
> > > on? somehow something seems to go wrong with the `.als SN
> > > SN-DOT' or I unintentionally mask the correct definition
> > > of \*[SN] or whatever. I don't get it why the `.NH' calls
> > > work, but \*[SN] no longer contains the correct
> > > information if I insert the `.SH' option in the macro
> > > definition. why have I explicitely `.rm SN' first??
> > >
> > > any ideas would be appreciated :-)
I think the groff info file provides the answer:
Unlike many other programming languages, undefined
identifiers are silently ignored or expanded to nothing.
When `gtroff' finds an undefined identifier, it emits a
warning, doing the following:
* If the identifier is a string, macro, or diversion,
`gtroff' defines it as empty.
The new s.tmac says:
.if !dSN .als SN SN-DOT
Also, NH uses/defines SN, but SH does not.
So, here's what happens:
1. You invoke SH. No problem so far.
2. You reference SN, *thereby defining it*.
3. You invoke NH, which sees that SN is already defined
and therefore *does not* alias it to SN-DOT.
Number 3 explains why ".rm SN" fixes the problem.
Also, had you called ".NHH n xxx" with n>0 first, everything
would have been okay.
Quickfix:
1. Use SN-DOT or SN-NO-DOT (your preference) instead of SN
in your macro between XS and XE.
or
2. At the top of your document, do
.ds SN-DOT
.als SN SN-DOT
(alternatively, use SN-NO-DOT instead of SN-DOT).
- [Groff] \*SN] question, Joerg van den Hoff, 2007/02/12
- RE: [Groff] \*SN] question, Ted Harding, 2007/02/12
- Re: [Groff] \*SN] question, Joerg van den Hoff, 2007/02/13
- Re: [Groff] \*[SN] question,
Tadziu Hoffmann <=
- Message not available
- Re: [Groff] \*[SN] question, Tadziu Hoffmann, 2007/02/14
- Re: [Groff] \*[SN] question, joerg van den hoff, 2007/02/15
- Re: [Groff] \*[SN] question, Keith MARSHALL, 2007/02/15
- Re: [Groff] \*[SN] question, joerg van den hoff, 2007/02/15
- Re: [Groff] \*[SN] question, Tadziu Hoffmann, 2007/02/16
- Re: [Groff] \*[SN] question, Werner LEMBERG, 2007/02/16