Bug#537838: [checks/manpages] .ig EOC -> .EOC warned as missing macro
On Tue, Jul 21, 2009 at 11:48:52AM +0200, Steffen Moeller wrote:
> a fancy man page has this little section here (actually many of these
> sections and the package (torque) has many man pages, hence the bug is
> not minor) :
>
> ..if !\n(Pb .ig Ig
> ..ft 6
> ..IP "\&\s-1\\$1\s+1\f1"
> ..Ig
> ..if \n(Pb .ig Ig
> ..ft 2
> ..IP "\&\\$1\s+1\f1"
> ..Ig
> ...
>
> which means that the block may be skipped.
>
> lintian does not get it but warns about .Ig being an undefined macro -
> it is not. It is the end of the comment.
(Russ is right that this isn't a Lintian bug.)
This is how groff would interpret the commands above (assuming that the
extra leading "." on each line is a spurious artifact of SMTP
dot-stuffing) if \n(Pb is true:
.ft 6
.IP "\&\s-1\\$1\s+1\f1"
.Ig
.ig Ig
.ft 2
.IP "\&\\$1\s+1\f1"
.Ig
..
.Ig is clearly undefined at its first use. To make this work, you would
need to make sure that .Ig is defined to something up-front even in the
\n(Pb case.
Isn't this needlessly complicated, though? Why not just do this instead
rather than messing around with .ig? It'd be much clearer. This approach
is documented in the original troff reference manual so it should be
portable even to non-groff implementations, in case your upstream is
concerned about that.
.ie \n(Pb \{\
. ft 2
. IP "\&\\$1\s+1\f1"
.\}
.el \{\
. ft 6
. IP "\&\s-1\\$1\s+1\f1"
.\}
Cheers,
--
Colin Watson [cjwatson@debian.org]
Reply to: