Hi Alex,

At 2024-02-25T18:41:53+0100, Alejandro Colomar wrote:
> I'm linting the Linux man-pages in a different computer, where I only
> have groff-1.23.0 installed from the Debian package, and I'm getting
> more warnings than in my everyday computer (where I have both 1.23.0
> from Debian Sid, and groff from git HEAD built from source).
> 
> System with only groff-1.23.0 from Debian Sid repositories:
[...]
>       troff:man7/units.7:26: warning: special character 'mc' not defined
[...]
> System with both (the one built from source is in /usr/local/):
[...]
> No warnings in this latter system.  Why?

I suspect the problem is a matter of locale or selected output device.

[...later...]

I couldn't reproduce the problem until I did this:

$ groff -ww -t -Tascii -man ./man7/units.7 >/dev/null
troff:./man7/units.7:26: warning: special character 'mc' not defined

(normally I use nroff(1) at the command line)

...whereupon it reproduced for groff 1.22.4, 1.23.0, and Git HEAD.

This diagnostic is an expected outcome under these circumstances.

1.  The page uses a special character:

$ grep -wn mc man7/units.7
26:\[mc]      micro     10\[ha]\-6  = 0.000001

2.  This character has no assigned code point in ISO 646-1991
    (US-ASCII), a.k.a. ECMA-6.[1]

3.  GNU nroff(1) arranges to load substitutes for some widely used
    special characters.

nroff(1):
Files
     [...]/share/groff/1.23.0/tmac/tty-char.tmac
            defines fallback definitions of roff special characters.
            These definitions more poorly optically approximate typeset
            output than those of tty.tmac in favor of communicating
            semantic information.  nroff loads it automatically.

4.  ...including the micro sign.

$ grep -wn mc tmac/tty-char.tmac
242:.tty-char \[mc] <micro>
$ grep -A2 'de tty-char' tmac/tty-char.tmac
.de tty-char
.       if !c\\$1 .char \\$1 "\\$2
..

Does this help?

Regards,
Branden

[1] https://ecma-international.org/publications-and-standards/standards/ecma-6/

Attachment: signature.asc
Description: PGP signature

Reply via email to