> > 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?