All of lore.kernel.org
 help / color / mirror / Atom feed
From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
To: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
Cc: Jakub Wilk <jwilk@jwilk.net>,
	linux-man@vger.kernel.org, mtk.manpages@gmail.com
Subject: Re: [PATCH] posix.py: ffix: Correctly format URIs
Date: Sat, 23 Jan 2021 01:51:16 +1100	[thread overview]
Message-ID: <20210122145114.hc3vsw2gc4sjwkpt@localhost.localdomain> (raw)
In-Reply-To: <948982ef-a747-099a-78d5-096610ec0f57@gmail.com>

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

Hi Alex,

At 2021-01-22T11:50:02+0100, Alejandro Colomar (man-pages) wrote:
> On 1/22/21 11:07 AM, G. Branden Robinson wrote:
> > I don't think I've ever seen URLs bracketed «like this».
> > 
> > On the other hand, because \[Fo] and \[Fc] are in the ISO 8859
> > character sets, aren't they much more likely to be supported by the
> > Linux console driver?
> 
> For that same reason we could conclude that <> (less than, greater
> than) have even better support :)
> 
> I'd use either u2039/A, or plain <>.

The less and greater than signs are already used to bracket URLs using
the .UR and .UE requests on non-UTF-8 devices and non-groff formatters.

If funny characters (or the Unicode replacement character) are rendering
around the URLs in your terminal window, then there are a few
possibilities.

1.  Something is misconfigured; try a stock groff installation in an
    xterm.
2.  The font you're using in your terminal emulator lacks adequate glyph
    coverage; a look at groff_char(7) may help determine this.
3.  Your terminal emulator inadequately supports some aspect of UTF-8.

/usr/share/groff/1.22.4/tmac/an-ext.tmac:
    43  .\" groff has glyph entities for angle brackets.
    44  .ie \n(.g \{\
    45  .  ds la \(la\"
    46  .  ds ra \(ra\"
    47  .\}
    48  .el \{\
    49  .  ds la <\"
    50  .  ds ra >\"
    51  .  \" groff's man macros control hyphenation with this register.
    52  .  nr HY 1
    53  .\}

The above chunk of the groff man(7) extension macros has not been
changed in 14 years, and no changes to the above string definitions are
planned.  (Nor do I anticipate changes to the value of the HY register,
since it's present for non-groff formatters, but it's a completely
separate issue.)

$ grep -B 1 -Ew '(la|ra)' /usr/share/groff/1.22.4/font/dev{ascii,latin1}/*

/usr/share/groff/1.22.4/font/devascii/B-<       24      0       0074
/usr/share/groff/1.22.4/font/devascii/B:la      "
--
/usr/share/groff/1.22.4/font/devascii/B->       24      0       0076
/usr/share/groff/1.22.4/font/devascii/B:ra      "
--
/usr/share/groff/1.22.4/font/devascii/BI-<      24      0       0074
/usr/share/groff/1.22.4/font/devascii/BI:la     "
--
/usr/share/groff/1.22.4/font/devascii/BI->      24      0       0076
/usr/share/groff/1.22.4/font/devascii/BI:ra     "
--
/usr/share/groff/1.22.4/font/devascii/I-<       24      0       0074
/usr/share/groff/1.22.4/font/devascii/I:la      "
--
/usr/share/groff/1.22.4/font/devascii/I->       24      0       0076
/usr/share/groff/1.22.4/font/devascii/I:ra      "
--
/usr/share/groff/1.22.4/font/devascii/R-<       24      0       0074
/usr/share/groff/1.22.4/font/devascii/R:la      "
--
/usr/share/groff/1.22.4/font/devascii/R->       24      0       0076
/usr/share/groff/1.22.4/font/devascii/R:ra      "
--
/usr/share/groff/1.22.4/font/devlatin1/B-<      24      0       0074
/usr/share/groff/1.22.4/font/devlatin1/B:la     "
--
[...and so on...]

The \(la and \(ra special character escapes map to < and > respectively
for non-UTF-8 terminal devices in groff.

So, as it happens, do \(fo and \(fc.

Here's a simple reproducer you can feed to "nroff -man" or "groff -Tutf8
-man".

	.TH foo 1
	.UR bar
	.UE

Regards,
Branden

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

  reply	other threads:[~2021-01-22 14:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-09 19:58 [PATCH] posix.py: ffix: Correctly format URIs Alejandro Colomar
2021-01-09 21:07 ` Alejandro Colomar (man-pages)
2021-01-10  6:50   ` G. Branden Robinson
2021-01-10 14:35     ` Alejandro Colomar (man-pages)
2021-01-10 14:57       ` [PATCH v2] " Alejandro Colomar
2021-01-19 19:59         ` Ping: " Alejandro Colomar (man-pages)
2021-01-20  8:50         ` Michael Kerrisk (man-pages)
2021-01-20  8:55         ` Michael Kerrisk (man-pages)
2021-01-12 20:51       ` [PATCH] " Jakub Wilk
2021-01-14  7:11         ` G. Branden Robinson
2021-01-21 19:54         ` Alejandro Colomar (man-pages)
2021-01-21 20:14           ` Jakub Wilk
2021-01-21 20:19             ` Alejandro Colomar
2021-01-22  3:23             ` G. Branden Robinson
2021-01-22  9:35               ` Jakub Wilk
2021-01-22 10:07                 ` G. Branden Robinson
2021-01-22 10:50                   ` Alejandro Colomar (man-pages)
2021-01-22 14:51                     ` G. Branden Robinson [this message]
2021-01-22 17:27                       ` Alejandro Colomar (man-pages)
2021-01-09 22:09 ` Alejandro Colomar (man-pages)
2021-01-22 12:37 ` Ping: " Alejandro Colomar (man-pages)
2021-01-22 15:13   ` Michael Kerrisk (man-pages)
2021-01-22 18:19     ` Alejandro Colomar (man-pages)
2021-01-23  9:15       ` Michael Kerrisk (man-pages)

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=20210122145114.hc3vsw2gc4sjwkpt@localhost.localdomain \
    --to=g.branden.robinson@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=jwilk@jwilk.net \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.