aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc_char.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-09-02 15:38:35 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-09-02 15:38:35 +0000
commitceb333844fd9e76e1de9bcbdba748f57bc603591 (patch)
tree9b97c8598b7fe695f12f8266d60fd6d722304385 /mandoc_char.7
parent1b0bdf49f16badf24d9b0c44bb5228bcafde6fe4 (diff)
downloadmandoc-ceb333844fd9e76e1de9bcbdba748f57bc603591.tar.gz
mandoc-ceb333844fd9e76e1de9bcbdba748f57bc603591.tar.zst
mandoc-ceb333844fd9e76e1de9bcbdba748f57bc603591.zip
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)
Diffstat (limited to 'mandoc_char.7')
-rw-r--r--mandoc_char.714
1 files changed, 7 insertions, 7 deletions
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 <jmc@openbsd.org>
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -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