Linux Manual Pages development
 help / color / mirror / Atom feed
From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: Time zone mailing list <tz@iana.org>,
	Paul Eggert <eggert@cs.ucla.edu>,
	linux-man <linux-man@vger.kernel.org>, groff <groff@gnu.org>
Subject: Re: Doubts about a typo fix
Date: Wed, 23 Nov 2022 15:40:19 -0600	[thread overview]
Message-ID: <20221123214019.6w2cv525fmr3akdr@illithid> (raw)
In-Reply-To: <842adff8-8d8c-b189-8e6c-34be111b8b19@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3387 bytes --]

Hi Alex,

I'm not Paul but I think I can address this item anyway.

At 2022-11-23T20:31:22+0100, Alejandro Colomar wrote:
> I don't undertstand the commit shown below.

> @@ -145,7 +145,7 @@ .SH OPTIONS
>  31-bit signed integers.
>  On platforms with GNU
>  .BR date ,
> -.q "zic \-r @$(date +%s)"
> +.q "zic \*-r @$(date +%s)"
>  omits data intended for past timestamps.
>  Although this option typically reduces the output file's size,
>  the size can increase due to the need to represent the timestamp range

> It breaks the '-' symbol,
> which now is a hyphen.  See the table mentioned yesterday:
[...]
> So, at least, it should be (but I believe the initial code was correct):
> 
> .q "zic \*\-r @$(date +%s)"
> 
> However, I wonder what that \* is intending to do there (I can see no
> difference in my screen with or without it).

Your second point addresses your first, because the zic(8) man page does
something old-fashioned: it defines a string for the minus sign.

On my system, the page has this in a sort of prologue.

    27  .ie \n(.g \{\
    28  .  ds : \:
    29  .  ds - \f(CW-\fP
    30  .\}
    31  .el \{\
    32  .  ds :
    33  .  ds - \-
    34  .\}

You see no diagnostic--I expect you have warnings turned on--because the
page has defined a string named `-`, and the *roff input `\*-`
interpolates a string named `-`.

Strictly, this string definition should be updated to use the font's
minus sign even if the formatter is groff (the `.g` register
interpolates a true value).

  .ie \n(.g \{\
  .  ds : \:
  .  ds - \f(CW\-\fP
  .\}

Most people won't see a difference because groff 1.22.4 (and earlier
releases going back to, I think, 2009) the man(7) macro package remaps
the hyphen to the minus sign on the 'utf8' output device.  This will be
changing in groff 1.23 to improve consistency with man page rendering on
typesetters.[1]  Workarounds are documented.[2]

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).

All of that said, I wouldn't switch to a monospace font just to render a
dash; not if groff is the formatter.

Paul is more of a battle-scarred veteran than I am, so there may be a
good reason to define this string on proprietary Unix systems--tzdata
has to be _really_ portable--but on any system using groff or Heirloom
Doctools troff, I can't think of one.[4]  mandoc maintainer Ingo
Schwarze and I both recommend against performing string definitions, or
interpolating strings, in man pages.

So I would see if it's feasible to get away with dropping the definition
and use of a `-` string altogether.  But if not, there's no _validity_
problem with what Paul has.

Regards,
Branden

[1] https://git.savannah.gnu.org/cgit/groff.git/tree/NEWS?id=23ffa46c8c951fec1d23dfe4b0dbbbe1299fa5d2#n193
[2] https://git.savannah.gnu.org/cgit/groff.git/tree/PROBLEMS?id=23ffa46c8c951fec1d23dfe4b0dbbbe1299fa5d2#n68
[3] https://github.com/n-t-roff/DWB3.3/tree/master/text/devnroff
[4] I don't know of anyone using neatroff to render man pages, but that
    may simply because I haven't seen them speak up about it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-11-23 21:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 19:31 Doubts about a typo fix Alejandro Colomar
2022-11-23 21:40 ` G. Branden Robinson [this message]
2022-11-26  2:18   ` Paul Eggert
2022-11-26  3:20     ` [tz] " Russ Allbery
2022-11-26  3:50       ` Paul Eggert
2022-11-26 20:44         ` G. Branden Robinson
2022-11-26  3:52     ` G. Branden Robinson
2022-11-26 12:33       ` Deri
2022-11-26 21:01       ` Paul Eggert
2022-11-26 21:56         ` G. Branden Robinson
2022-11-27  1:58           ` Deri
2022-11-27  2:32           ` Paul Eggert
2022-12-13 19:24             ` G. Branden Robinson
2022-12-25 22:07               ` Lennart Jablonka
2022-12-25 23:21                 ` G. Branden Robinson
2022-11-26 21:20       ` Steffen Nurpmeso
2022-11-26 22:07         ` G. Branden Robinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221123214019.6w2cv525fmr3akdr@illithid \
    --to=g.branden.robinson@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=groff@gnu.org \
    --cc=linux-man@vger.kernel.org \
    --cc=tz@iana.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox