> > - At many places you put a hyphen ('-', yields '‐') where a > > hyphen-minus sign ('\-', yields '-') would be more > > appropriate. Especially in command-line options. The hyphens not > > only look strange in command-line options, they also don't work: > > Forgive me for poking my nose in here, but I wanted to ask about > that particular problem in order to make sure I have the DocBook > manpages stylesheet doing what it should. > > So, to be clear, is the following description correct? > > If you put a U+002D HYPHEN-MINUS character into the source for a > groff file, in certain environments (e.g., in a UTF-8 > environment), it will get output as a U+2010 HYPHEN character.
Yes. > And, by the way, if the above is correct, is there a documented > rationale for why groff outputs a U+2010 for it instead of a U+002D? > (Some Unicode recommendation?) This is to avoid ambiguity. From glyphuni.cpp: // `-' and `hy' denote a HYPHEN, usually a glyph with a smaller // width than the MINUS sign. Users who are viewing broken man // pages that assume that `-' denotes a U+002D character can either // fix the broken man pages or apply the workaround described in the // PROBLEMS file. and from the PROBLEMS page: * The UTF-8 output of grotty has strange characters for the minus, the hyphen, and the right quote. Why? The used Unicode characters (U+2212 for the minus sign and U+2010 for the hyphen) are the correct ones, but many programs can't search them properly. The same is true for the right quote (U+201D). To map those characters back to the ASCII characters, insert the following code snippet into the `troffrc' configuration file: .if '\*[.T]'utf8' \{\ . char \- \N'45' . char - \N'45' . char ' \N'39' .\} Werner