[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] hyphen vs. minus sign
From: |
Bruno Haible |
Subject: |
Re: [Groff] hyphen vs. minus sign |
Date: |
Sat, 15 Sep 2007 02:27:45 +0200 |
User-agent: |
KMail/1.5.4 |
Werner,
> > Input:
> > \- -
> > MINUS SIGN HYPHEN
> >
> > Output with the current groff CVS:
> >
> > groff -Tutf8 U+2212 U+002D
> > MINUS SIGN HYPHEN-MINUS
>
> This is fixed now; it will again create HYPHEN instead of HYPHEN-MINUS
> (and this can be overridden on demand as documented). The solution
> was quite simple: For the UTF-8 device, I now say
>
> .char - \[hy]
Thanks, that works fine.
> As far as I can see, this is the only character in the range
> 0x00-0x7F which has to be handled specially, right?
The groff_char.7 documentation also lists the backquote u0040 and the
apostrophe u0027. Adding this to unicode.tmac fixes these:
.char ` \[oq]
.char ' \[cq]
> > groff -Thtml U+2212 U+002D
> > MINUS SIGN HYPHEN-MINUS
>
> This stays as-is.
OK for the hyphen: A U+002D in a proportional HTML font looks closely enough
like a hyphen.
But ` and ' in HTML are not OK: They yield ` and ', respectively, not
‘ and ’ as they should.
How to fix this? IIRC, in the C++ code, the font handling for the html and
utf8 devices is the same. Therefore I tried to add to html.tmac:
.mso unicode.tmac
and this fixes it!
One problem is still left: What is now the recommended way to write a
shell command line, in a way that is copy&pastable from at least the utf8
and html outputs?
- If I write "foo --help" in the utf8 output we get twice u2010.
- If I write "foo \-\-help" in the utf8 output we get twice u2212.
- If I write "foo \[u002D]\[u002D]help" then in the utf8 output
we get twice u002D, as desired, but in the html processing I get
"warning: can't find special character `u002D'". Hmm??
It took me already some effort to convince the Linux manpages maintainer
that \- should be used for copy&pastable commands in manpages. Do I have
to recommend him to use \[u002D] now instead?
Bruno
- Re: [Groff] gkurz, a short introduction for german users, Axel Kielhorn, 2007/09/08
- Re: [Groff] gkurz, a short introduction for german users, Tadziu Hoffmann, 2007/09/11
- Re: [Groff] gkurz, a short introduction for german users, Werner LEMBERG, 2007/09/11
- Re: [Groff] hyphen vs. minus sign, Bruno Haible, 2007/09/11
- Re: [Groff] hyphen vs. minus sign, Werner LEMBERG, 2007/09/13
- Re: [Groff] hyphen vs. minus sign, Werner LEMBERG, 2007/09/14
- Re: [Groff] hyphen vs. minus sign,
Bruno Haible <=
- Re: [Groff] hyphen vs. minus sign, Werner LEMBERG, 2007/09/15
- Re: [Groff] hyphen vs. minus sign, Bruno Haible, 2007/09/15
- Re: [Groff] hyphen vs. minus sign, Werner LEMBERG, 2007/09/17
- Re: [Groff] hyphen vs. minus sign, Gunnar Ritter, 2007/09/17
- Re: [Groff] hyphen vs. minus sign, brian m. carlson, 2007/09/17
- Re: [Groff] hyphen vs. minus sign, Werner LEMBERG, 2007/09/27
Re: [Groff] gkurz, a short introduction for german users, Axel Kielhorn, 2007/09/13
Re: [Groff] gkurz, a short introduction for german users, Werner LEMBERG, 2007/09/11