groff
[Top][All Lists]
Advanced

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

Re: [tz] Doubts about a typo fix


From: Russ Allbery
Subject: Re: [tz] Doubts about a typo fix
Date: Fri, 25 Nov 2022 19:20:37 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Paul Eggert via tz <tz@iana.org> writes:

> Thanks for the info about groff. You're right, tzdb man pages are supposed
> to be portable to both groff and traditional troff. For the latter I test
> with /usr/bin/nroff and /usr/bin/troff on Solaris 10, which is the oldest
> troff I know that is still supported.

[...]

> "\f(CW-\fP" is used instead of plain "-" because when the output is PDF,
> it is more clearly visible to humans as a hyphen-minus instead of as a
> hyphen (U+2010 HYPHEN).

You have to be very careful with the combination of \f(CW and \fP on
Solaris 10 nroff, and I suspect the construct you are using has nascent
bugs.  \f(CW doesn't produce a font change on Solaris 2.6 with nroff, so
if you write something like:

    \fBsomething\fP \f(CW-\fP something else

you will discover that "something else" is in bold because the second \fP
reverts to the "previous" font, which nroff thinks is \fB becuase \f(CW
was ignored.  (Just tested now on a Solaris 10 host.)  Pod::Man has fairly
elaborate workarounds for this bug.

>> I also note that "CW" is an old, AT&T device-independent
>> troff-compatible font name.[3] groff's preferred name for this face is
>> "CR", because for the past couple of decades a monospace font (often
>> Courier) has generally been available in all four styles (roman,
>> oblique, bold, and bold-oblique).

> Thanks, I didn't know that was preferred. I installed the attached patch
> into the tzdb development repository

Just be warned that \f(CR is not a valid font name in all *roff
implementations, which is why Pod::Man uses \f(CW by default.  Not sure
how much you care.  (And, to be honest, not sure how much anyone should
care about any implementations other than groff and mandoc these days.)

-- 
Russ Allbery (eagle@eyrie.org)             <https://www.eyrie.org/~eagle/>



reply via email to

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