Re: [PATCH] posix.py: ffix: Correctly format URIs

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

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux