[Top][All Lists]

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

Re: [groff] Regularize (sub)section cross references.

From: Ingo Schwarze
Subject: Re: [groff] Regularize (sub)section cross references.
Date: Mon, 17 Dec 2018 23:05:37 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

Hi Branden,

G. Branden Robinson wrote on Mon, Dec 17, 2018 at 04:01:11PM -0500:

> I think it would be better to extend groff to expose the underlying
> locale-aware C case-transformation functions, and _not_ try maintaining
> our own mappings.

Indeed.  I don't think maintaining our own mappings is viable.
It just won't work, there are too many characters in Unicode.
It was quite obvious that the .tr request you presented was only
meant to illustrate the basic idea, not to be an actual (sic :)

Unless i lack skill in searching documentation in info and PDF
format, neither groff nor Heirloom provide a facility to convert
strings to all caps.

Consequently, if we want to recommend sentence- or title-case section
titles in the source code, introducing such a facility will be
required first.  I'm not completely sure yet, but it would probably
have to be new macro rather than a new escape sequence.  Probably
a string modification macro akin to .substring and .chop, maybe to
be named

  .allcaps stringname

The more obvious names .toupper and .towupper are slightly misleading
because in C, they only convert single characters, not entire strings.
Besides, .toupper is not ideal because in C, it only operates on ASCII
characters while we need a facility to operate on Unicode codepoints,
and .towupper is not ideal because it sounds overly technical.


reply via email to

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