groff
[Top][All Lists]
Advanced

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

Re: [Groff] ASCII Minus Sign in man Pages.


From: Ingo Schwarze
Subject: Re: [Groff] ASCII Minus Sign in man Pages.
Date: Tue, 25 Apr 2017 15:00:26 +0200
User-agent: Mutt/1.6.2 (2016-07-01)

Hi,

G. Branden Robinson wrote on Tue, Apr 25, 2017 at 07:26:32AM -0400:
> At 2017-04-25T12:47:25+0200, Carsten Kunze wrote:
>> Carsten Kunze wrote:
>>> Ingo Schwarze hat am 24. April 2017 um 16:39 geschrieben:

>>> Assuming this is considered the right direction, how would one
>>> best implement, in doc.tmac-u and an-old.tmac, - == \- == U+002D
>>> for all devices?

>> Isn't it already done for UTF-8 in the files you mentioned?
>> Both contain:
>> 
>> .if '\*[.T]'utf8' \{\
>> .  rchar \- - ' `
>> .
>> .  char \- \N'45'
>> .  char  - \N'45'
>> .  char  ' \N'39'
>> .  char  ` \N'96'
>> .\}

Yes, it is already done for UTF-8.
My question is: Which is a good way to do that consistently,
for *all* output devices?

>> Tests did show that groff's HTML output of manpages does not look good

I don't worry about groff HTML output at all.  By the basic design
of groff, it is unable to produce good HTML, so i basically just
ignore groff HTML output completely.  I fully agree with you that
i see no need to change it.  I'd even go one step further and say
there is no benefit to maintaining it at all.

But groff is very strong with respect to real typesetting output
modes, for example and in particular -Tps and -Tpdf.  I consider
it unfortunate that mdoc(7) and man(7) output of - and \- is
inconsistent between -Tutf8 and these other high quality output
modes.  Consistently producing U+002D in manual pages across -Tascii,
-Tutf8, and -Tpdf was also part of Ralph's original question.

> "hm" appears to be available in the namespace for short character
> escapes.  Would "\(hm)" be a good way to offer people U+002D for
> when they're absolutely sure they mean it?

I don't think that is a good idea.  It would be a step backwards
in terms of simplicity and usability.  In manual pages, you almost
always want U+002D, and both the simple and natural input "-" and
the traditional input "\-" already do that for -Tascii and -Tutf8,
the output modes that people use most for manual pages.

Telling people to use "\(hm" instead would make a simple thing more
complicated and less natural for manual page authors.  I don't think
that is acceptable.  It is OK to tell advanced authors who care
about the finer details of typesetting: "If, in exceptional cases,
you want this particular effect, you can use this escape sequence".
But for the simple stuff everybody needs all the time, simplicity
is paramount, and escape sequences should not enter the picture
unless absolutely unavoidable (like with \e).

> In any event, grohtml seems to be mapping all of -, \-, and \(hy to
> U+002D (see attachments), which doesn't seem ideal to me given the
> capabilities and character repetoire of most HTML renderers.

Right.  Given that HTML supports Unicode entities, HTML output
ought to produce the same characters as -Tutf8.  For example,
mandoc does that.  But again, i consider working on groff HTML
output a waste of time.  PostScript and PDF is what matters most.

Yours,
  Ingo



reply via email to

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