=================================================================== RCS file: /cvs/mandoc/mandoc_char.7,v retrieving revision 1.62 retrieving revision 1.64 diff -u -p -r1.62 -r1.64 --- mandoc/mandoc_char.7 2015/03/30 16:06:14 1.62 +++ mandoc/mandoc_char.7 2017/02/05 21:41:21 1.64 @@ -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.64 2017/02/05 21:41:21 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: February 5 2017 $ .Dt MANDOC_CHAR 7 .Os .Sh NAME @@ -49,7 +49,7 @@ names; instead, provide ASCII transcriptions of the na .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 @@ -62,12 +62,36 @@ blue-eyed lorry-driver .Ed .Pp +If a word on a text input line contains a hyphen, a formatter may decide +to insert an output line break after the hyphen if that helps filling +the current output line, but the whole word would overflow the line. +If it is important that the word is not broken across lines in this +way, a zero-width space +.Pq Sq \e& +can be inserted before or after the hyphen. +While +.Xr mandoc 1 +never breaks the output line after hyphens adjacent to a zero-width +space, after any of the other dash- or hyphen-like characters +represented by escape sequences, or after hyphens inside words in +macro arguments, other software may not respect these rules and may +break the line even in such cases. +.Pp +Some +.Xr roff 7 +implementations contains dictionaries allowing to break the line +at syllable boundaries even inside words that contain no hyphens. +Such automatic hyphenation is not supported by +.Xr mandoc 1 , +which only breaks the line at whitespace, and inside words only +after existing hyphens. +.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 +744,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