groff
[Top][All Lists]
Advanced

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

Re: [groff] hyphen, minus sign and hyphen-minus


From: Pali Rohár
Subject: Re: [groff] hyphen, minus sign and hyphen-minus
Date: Sun, 27 May 2018 23:52:44 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Sunday 27 May 2018 21:58:07 Ingo Schwarze wrote:
> > Happens for: man -Tps and man -Tdvi
> 
> Regarding -Tps, i don't know what you mean.

Ok, I would try to explain it a bit more...

> As far as i understand,
> at least the default font for -Tps does not even contain a
> hyphen-minus output glyph.

Now I looked deeply at man -Tps output and basically \- sequence is
written as character 0xAD (\255 in octet) into output postscript file.
Therefore it is SOFT HYPHEN (U+00AD), so it is incorrect for command
line switch.

Converting this postscript file to PDF (via ps2pdf) converts that SOFT
HYPHEN \255 to U+2212 code point which is mathematical minus sign.

Therefore man -Tps does not produce correct postscript file from manpage
which uses \- as switch parameter. And ps2pdf damage it even more.

> Regarding -Tdvi, i frankly don't know.  I never used it and right
> now, i do not remember hearing anybody ever talking about maintaining
> it, but i may easily have missed something about -Tdvi.

That is pity because I think that "man -Tdvi | dvipdfmx" gives better
output (for printing) as man -Tpdf.

I looked deeply at DVI output and basically \- is printed in DVI as
glyph with index 0 from font cmsy10. Looking at cmsy10.pfb Type1 font
file and there is "dup 0 /minus put" which means that this character is
mathematical minus with Unicode code point U+2212.

Converting output DVI file to PDF (via dvipdfmx) prove it, PDF viewers
see and copy+paste this character as mathematical minus.

So the result is that "preferred" way for writing command line switches
in manpage via \- sequence is broken for -Tps and -Tdvi.

Is somebody going to fix PS and DVI output to be "compatible" with
"preferred" way how to write hyphen-minus in manpages?

-- 
Pali Rohár
address@hidden

Attachment: signature.asc
Description: PGP signature


reply via email to

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