From ceb333844fd9e76e1de9bcbdba748f57bc603591 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 2 Sep 2015 15:38:35 +0000 Subject: Recommend an unambiguous escape for minus signs instead of \-. Historically, \- was used in troff for three cases: flags/pathnames, en dashes, and minus signs. mandoc_char(7) currently recommends it for minus signs, recommends \(en for en dashes, and doesn't mention flags/pathnames. In the old days, nroff rendered \- as ASCII '-', and troff rendered it as en dash/minus (which were visually indistinguishable). In Unicode, en dashes and minus signs are semantically distinct and encoded differently (U+2013 for en dash, U+2212 for minus), and often rendered differently too. Meanwhile ASCII '-' has been renamed "hyphen-minus" and fonts typically render it closest to a hyphen, not a minus. There is very little consistency across roff implementations and output formats for what Unicode character \- corresponds to. So at least for minus signs, change the recommendation to the unambiguous \(mi escape. from bentley@, ok jmc@ (after reams of discussion) --- mandoc_char.7 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mandoc_char.7') diff --git a/mandoc_char.7 b/mandoc_char.7 index 474fba20..d272080f 100644 --- a/mandoc_char.7 +++ b/mandoc_char.7 @@ -1,4 +1,4 @@ -.\" $Id: mandoc_char.7,v 1.62 2015/03/30 16:06:14 schwarze Exp $ +.\" $Id: mandoc_char.7,v 1.63 2015/09/02 15:38:35 schwarze Exp $ .\" .\" Copyright (c) 2003 Jason McIntyre .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons @@ -16,7 +16,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 30 2015 $ +.Dd $Mdocdate: September 2 2015 $ .Dt MANDOC_CHAR 7 .Os .Sh NAME @@ -49,7 +49,7 @@ names; instead, provide ASCII transcriptions of the names. .Ss Dashes and Hyphens In typography there are different types of dashes of various width: the hyphen (-), -the minus sign (\-), +the minus sign (\(mi), the en-dash (\(en), and the em-dash (\(em). .Pp @@ -64,10 +64,10 @@ lorry-driver .Pp The mathematical minus sign is used for negative numbers or subtraction. It should be written as -.Sq \e- : +.Sq \e(mi : .Bd -unfilled -offset indent -a = 3 \e- 1; -b = \e-2; +a = 3 \e(mi 1; +b = \e(mi2; .Ed .Pp The en-dash is used to separate the two elements of a range, @@ -720,7 +720,7 @@ In .Fl T Ns Cm ascii , the \e(ss, \e(nm, \e(nb, \e(nc, \e(ib, \e(ip, \e(pp, \e[sum], \e[product], -\e[coproduct], \e(gr, \e(\-h, and \e(a. special characters render +\e[coproduct], \e(gr, \e(-h, and \e(a. special characters render differently between mandoc and groff. .It In -- cgit v1.2.3-56-ge451