Hi, Jason McIntyre <j...@kerhand.co.uk> writes:
> On Tue, Jul 16, 2013 at 12:36:32AM +0200, Jérémie Courrèges-Anglas wrote: >> >> >> >> Fl may seem wrong because we're talking about an argument, but I don't >> >> think a bare `-' (a hyphen) would be better. We're talking about an >> >> ascii minus sign here; mandoc_char(7) says a minus sign can be obtained >> >> with \- . >> >> >> > >> > it's not a minus sign. it's a literal "-". >> >> I was thinking encoding-wise: you're typing an ascii minus sign, at the >> cli. If you have a man/mdoc formatter that distinguishes hyphens and >> minus signs, it could produce different output for those, and you would >> not be able to copy-paste examples. Maybe mandoc doesn't, but groff >> can (some distros even disabled this behavior). >> > > i'm not sure i follow. the differing widths of "-" will only happen if > you add mark up. I'm not saying we should add markup, but that some occurences of "-" should be converted to "\-". They do not have the same meaning. > i'm arguing to remove it. That would be a step backwards, I think. > a literal "-", with no mark up, can be copied/pasted no matter what the > output format. well, i say this without actually having tried it. Nope, and that's the whole point: you'd have to try it with mandoc, several versions of groff (possibly with local patches), heirloom troff, using different input *and* output formats *and* different locales. > but if > you can;t, something is not right. Well, I think I understand that one that may prefer a hyphen or an em-dash to be represented differently from a minus sign. Be it on tty, or an ps or an html document. > if you add markup (you suggested "\-"), I suggested using \- because that's the sequence documented as producing a minus sign. See mdoc_char(7), groff_char(7). > then the width will vary for > output formats such as postscript. that might stop you being able to > paste (though again i've never tried). ... \- is afaik treated correctly in all the cases I described above, except for a very small number of groff versions, when in an UTF-8 locale or using ps/pdf (there you can get an unicode minus sign). This case was quickly fixed. You can see lots of reports about all these problems on the WWW. Now if you think \- is wrong for a command-line flag, a litteral "-" argument, or inside a command name, tell this to Ingo, since that's what is produced by a Fl inside mandoc. ;) > jmc > -- Jérémie Courrèges-Anglas PGP Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494