Ralph Corderoy writes: > > INSIDE manual pages, - for \(hy or \- for \(mi is a terrible idea > > already now because the three main implementations (including groff) > > don't do that in the quite important -Tutf8 device. > > This is because of the bodge to map `-' onto ASCII 45, by Debian > originally, was it? Rather than stand firm and map just `\-' and tell > complainants that the upstream man page needed fixing. > > > INSIDE manual pages (both -man and -mdoc), let's change - and \- to > > always map to U+002D HYPHEN-MINUS for all devices and let's tell > > people to simply use - for HYPHEN-MINUS and stop worrying. > > But PDFs then look awful.
This is a case where troff and the rest of the world simply moved in different directions. Nobody in 1973 anticipated that terminals would become typographically rich, able to display real dashes and apostrophes. Nobody anticipated that using typeset output as input to the terminal via copy & paste would become commonplace. Using \- as both a typographic minus sign and as the command-line flag character '-' is just not compatible with modern usage. A manual that uses \- for flags (certainly an extremely widespread and long-lived tradition), displayed in a nroff that converts \- to minus, will be unusable. It breaks copy/paste and displays differently than expected. This is not the only such case in troff. How many people realize that ~ becomes U+02DC, and to portably get a real tilde in a manual you *must* use \(ti? How many people neglect to escape ' and ` as \(aq and \(ga in their manuals, which is *required* if you don't really mean U+2019 and U+2018? And don't get me started on misuse of angle quotes... Avoiding \- is quite easy in mdoc: .Fl displays '-' in ASCII output format and a fixed-width font '-' in typeset output, which seems like a pretty reasonable compromise. Typical non-flag usages are rarer and sensibly covered by .Nd, \(en, or \(mi. But mdoc provides no help for ~, `, and '. Perhaps it would make sense to change mdoc: make macros that produce fixed-width text skip converting these characters. Is that a sensible idea? Probably needs a check against a large manpage corpus to see if it's feasible... -- Anthony J. Bentley
