Print this page
9718 update mandoc to 1.14.4

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man5/mandoc_char.5
          +++ new/usr/src/man/man5/mandoc_char.5
   1      -.\"     $Id: mandoc_char.7,v 1.67 2017/06/14 20:57:07 schwarze Exp $
        1 +.\"     $Id: mandoc_char.7,v 1.72 2018/08/08 14:30:48 schwarze Exp $
   2    2  .\"
   3    3  .\" Copyright (c) 2003 Jason McIntyre <jmc@openbsd.org>
   4    4  .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
   5    5  .\" Copyright (c) 2011, 2013, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
   6    6  .\"
   7    7  .\" Permission to use, copy, modify, and distribute this software for any
   8    8  .\" purpose with or without fee is hereby granted, provided that the above
   9    9  .\" copyright notice and this permission notice appear in all copies.
  10   10  .\"
  11   11  .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  12   12  .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  13   13  .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  14   14  .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  15   15  .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  16   16  .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  17   17  .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  18   18  .\"
  19      -.Dd $Mdocdate: June 14 2017 $
       19 +.Dd $Mdocdate: August 8 2018 $
  20   20  .Dt MANDOC_CHAR 5
  21   21  .Os
  22   22  .Sh NAME
  23   23  .Nm mandoc_char
  24   24  .Nd mandoc special characters
  25   25  .Sh DESCRIPTION
  26   26  This page documents the
  27   27  .Xr mandoc_roff 5
  28   28  escape sequences accepted by
  29   29  .Xr mandoc 1
  30   30  to represent special characters in
  31   31  .Xr mdoc 5
  32   32  and
  33   33  .Xr man 5
  34   34  documents.
  35   35  .Pp
  36   36  The rendering depends on the
  37   37  .Xr mandoc 1
  38      -output mode; in ASCII output, most characters are completely
  39      -unintelligible.
  40      -For that reason, using any of the special characters documented here,
  41      -except those discussed in the
       38 +output mode; it can be inspected by calling
       39 +.Xr man 1
       40 +on the
       41 +.Nm
       42 +manual page with different
       43 +.Fl T
       44 +arguments.
       45 +In ASCII output, the rendering of some characters may be hard
       46 +to interpret for the reader.
       47 +Many are rendered as descriptive strings like
       48 +.Qq <integral> ,
       49 +.Qq <degree> ,
       50 +or
       51 +.Qq <Gamma> ,
       52 +which may look ugly, and many are replaced by similar ASCII characters.
       53 +In particular, accented characters are usually shown without the accent.
       54 +For that reason, try to avoid using any of the special characters
       55 +documented here except those discussed in the
  42   56  .Sx DESCRIPTION ,
  43      -is strongly discouraged; they are supported merely for backwards
  44      -compatibility with existing documents.
       57 +unless they are essential for explaining the subject matter at hand,
       58 +for example when documenting complicated mathematical functions.
  45   59  .Pp
  46   60  In particular, in English manual pages, do not use special-character
  47   61  escape sequences to represent national language characters in author
  48   62  names; instead, provide ASCII transcriptions of the names.
  49   63  .Ss Dashes and Hyphens
  50   64  In typography there are different types of dashes of various width:
  51      -the hyphen (-),
  52      -the minus sign (\(mi),
       65 +the hyphen (\(hy),
  53   66  the en-dash (\(en),
  54      -and the em-dash (\(em).
       67 +the em-dash (\(em),
       68 +and the mathematical minus sign (\(mi).
  55   69  .Pp
  56   70  Hyphens are used for adjectives;
  57   71  to separate the two parts of a compound word;
  58   72  or to separate a word across two successive lines of text.
  59   73  The hyphen does not need to be escaped:
  60   74  .Bd -unfilled -offset indent
  61   75  blue-eyed
  62   76  lorry-driver
  63   77  .Ed
  64   78  .Pp
       79 +The en-dash is used to separate the two elements of a range,
       80 +or can be used the same way as an em-dash.
       81 +It should be written as
       82 +.Sq \e(en :
       83 +.Bd -unfilled -offset indent
       84 +pp. 95\e(en97.
       85 +Go away \e(en or else!
       86 +.Ed
       87 +.Pp
       88 +The em-dash can be used to show an interruption
       89 +or can be used the same way as colons, semi-colons, or parentheses.
       90 +It should be written as
       91 +.Sq \e(em :
       92 +.Bd -unfilled -offset indent
       93 +Three things \e(em apples, oranges, and bananas.
       94 +This is not that \e(em rather, this is that.
       95 +.Ed
       96 +.Pp
       97 +In
       98 +.Xr mandoc_roff 5
       99 +documents, the minus sign is normally written as
      100 +.Sq \e- .
      101 +In manual pages, some style guides recommend to also use
      102 +.Sq \e-
      103 +if an ASCII 0x2d
      104 +.Dq hyphen-minus
      105 +output glyph that can be copied and pasted is desired in output modes
      106 +supporting it, for example in
      107 +.Fl T Cm utf8
      108 +and
      109 +.Fl T Cm html .
      110 +But currently, no practically relevant manual page formatter actually
      111 +requires that subtlety, so in manual pages just write plain
      112 +.Sq -
      113 +to represent hyphen, minus, and hyphen-minus.
      114 +.Pp
  65  115  If a word on a text input line contains a hyphen, a formatter may decide
  66  116  to insert an output line break after the hyphen if that helps filling
  67  117  the current output line, but the whole word would overflow the line.
  68  118  If it is important that the word is not broken across lines in this
  69  119  way, a zero-width space
  70  120  .Pq Sq \e&
  71  121  can be inserted before or after the hyphen.
  72  122  While
  73  123  .Xr mandoc 1
  74  124  never breaks the output line after hyphens adjacent to a zero-width
↓ open down ↓ 3 lines elided ↑ open up ↑
  78  128  break the line even in such cases.
  79  129  .Pp
  80  130  Some
  81  131  .Xr mandoc_roff 5
  82  132  implementations contains dictionaries allowing to break the line
  83  133  at syllable boundaries even inside words that contain no hyphens.
  84  134  Such automatic hyphenation is not supported by
  85  135  .Xr mandoc 1 ,
  86  136  which only breaks the line at whitespace, and inside words only
  87  137  after existing hyphens.
  88      -.Pp
  89      -The mathematical minus sign is used for negative numbers or subtraction.
  90      -It should be written as
  91      -.Sq \e(mi :
  92      -.Bd -unfilled -offset indent
  93      -a = 3 \e(mi 1;
  94      -b = \e(mi2;
  95      -.Ed
  96      -.Pp
  97      -The en-dash is used to separate the two elements of a range,
  98      -or can be used the same way as an em-dash.
  99      -It should be written as
 100      -.Sq \e(en :
 101      -.Bd -unfilled -offset indent
 102      -pp. 95\e(en97.
 103      -Go away \e(en or else!
 104      -.Ed
 105      -.Pp
 106      -The em-dash can be used to show an interruption
 107      -or can be used the same way as colons, semi-colons, or parentheses.
 108      -It should be written as
 109      -.Sq \e(em :
 110      -.Bd -unfilled -offset indent
 111      -Three things \e(em apples, oranges, and bananas.
 112      -This is not that \e(em rather, this is that.
 113      -.Ed
 114      -.Pp
 115      -Note:
 116      -hyphens, minus signs, and en-dashes look identical under normal ASCII output.
 117      -Other formats, such as PostScript, render them correctly,
 118      -with differing widths.
 119  138  .Ss Spaces
 120  139  To separate words in normal text, for indenting and alignment
 121  140  in literal context, and when none of the following special cases apply,
 122  141  just use the normal space character
 123  142  .Pq Sq \  .
 124  143  .Pp
 125  144  When filling text, output lines may be broken between words, i.e. at space
 126  145  characters.
 127  146  To prevent a line break between two particular words,
 128  147  use the unpaddable non-breaking space escape sequence
↓ open down ↓ 183 lines elided ↑ open up ↑
 312  331  .Pp
 313  332  Quotes:
 314  333  .Bl -column "Input" "Rendered" "Description" -offset indent -compact
 315  334  .It Em Input Ta Em Rendered Ta Em Description
 316  335  .It \e(Bq    Ta \(Bq        Ta right low double-quote
 317  336  .It \e(bq    Ta \(bq        Ta right low single-quote
 318  337  .It \e(lq    Ta \(lq        Ta left double-quote
 319  338  .It \e(rq    Ta \(rq        Ta right double-quote
 320  339  .It \e(oq    Ta \(oq        Ta left single-quote
 321  340  .It \e(cq    Ta \(cq        Ta right single-quote
 322      -.It \e(aq    Ta \(aq        Ta apostrophe quote (text)
 323      -.It \e(dq    Ta \(dq        Ta double quote (text)
      341 +.It \e(aq    Ta \(aq        Ta apostrophe quote (ASCII character)
      342 +.It \e(dq    Ta \(dq        Ta double quote (ASCII character)
 324  343  .It \e(Fo    Ta \(Fo        Ta left guillemet
 325  344  .It \e(Fc    Ta \(Fc        Ta right guillemet
 326  345  .It \e(fo    Ta \(fo        Ta left single guillemet
 327  346  .It \e(fc    Ta \(fc        Ta right single guillemet
 328  347  .El
 329  348  .Pp
 330  349  Brackets:
 331  350  .Bl -column "xxbracketrightbtx" Rendered Description -offset indent -compact
 332  351  .It Em Input Ta Em Rendered Ta Em Description
 333  352  .It \e(lB    Ta \(lB        Ta left bracket
 334  353  .It \e(rB    Ta \(rB        Ta right bracket
 335  354  .It \e(lC    Ta \(lC        Ta left brace
 336  355  .It \e(rC    Ta \(rC        Ta right brace
 337  356  .It \e(la    Ta \(la        Ta left angle
 338  357  .It \e(ra    Ta \(ra        Ta right angle
 339      -.It \e(bv    Ta \(bv        Ta brace extension
      358 +.It \e(bv    Ta \(bv        Ta brace extension (special font)
 340  359  .It \e[braceex] Ta \[braceex] Ta brace extension
 341  360  .It \e[bracketlefttp] Ta \[bracketlefttp] Ta top-left hooked bracket
 342  361  .It \e[bracketleftbt] Ta \[bracketleftbt] Ta bottom-left hooked bracket
 343  362  .It \e[bracketleftex] Ta \[bracketleftex] Ta left hooked bracket extension
 344  363  .It \e[bracketrighttp] Ta \[bracketrighttp] Ta top-right hooked bracket
 345  364  .It \e[bracketrightbt] Ta \[bracketrightbt] Ta bottom-right hooked bracket
 346  365  .It \e[bracketrightex] Ta \[bracketrightex] Ta right hooked bracket extension
 347  366  .It \e(lt    Ta \(lt        Ta top-left hooked brace
 348  367  .It \e[bracelefttp] Ta \[bracelefttp] Ta top-left hooked brace
 349  368  .It \e(lk    Ta \(lk        Ta mid-left hooked brace
↓ open down ↓ 32 lines elided ↑ open up ↑
 382  401  .It \e(dA    Ta \(dA        Ta down double-arrow
 383  402  .It \e(vA    Ta \(vA        Ta up-down double-arrow
 384  403  .It \e(an    Ta \(an        Ta horizontal arrow extension
 385  404  .El
 386  405  .Pp
 387  406  Logical:
 388  407  .Bl -column "Input" "Rendered" "Description" -offset indent -compact
 389  408  .It Em Input Ta Em Rendered Ta Em Description
 390  409  .It \e(AN    Ta \(AN        Ta logical and
 391  410  .It \e(OR    Ta \(OR        Ta logical or
 392      -.It \e(no    Ta \(no        Ta logical not
 393      -.It \e[tno]  Ta \[tno]      Ta logical not (text)
      411 +.It \e[tno]  Ta \[tno]      Ta logical not (text font)
      412 +.It \e(no    Ta \(no        Ta logical not (special font)
 394  413  .It \e(te    Ta \(te        Ta existential quantifier
 395  414  .It \e(fa    Ta \(fa        Ta universal quantifier
 396  415  .It \e(st    Ta \(st        Ta such that
 397  416  .It \e(tf    Ta \(tf        Ta therefore
 398  417  .It \e(3d    Ta \(3d        Ta therefore
 399  418  .It \e(or    Ta \(or        Ta bitwise or
 400  419  .El
 401  420  .Pp
 402  421  Mathematical:
 403  422  .Bl -column "xxcoproductxx" "Rendered" "Description" -offset indent -compact
 404  423  .It Em Input Ta Em Rendered Ta Em Description
 405      -.It \e(pl    Ta \(pl        Ta plus
 406      -.It \e(mi    Ta \(mi        Ta minus
 407      -.It \e-      Ta \-          Ta minus (text)
      424 +.It \e-      Ta \-          Ta minus (text font)
      425 +.It \e(mi    Ta \(mi        Ta minus (special font)
      426 +.It +        Ta +           Ta plus (text font)
      427 +.It \e(pl    Ta \(pl        Ta plus (special font)
 408  428  .It \e(-+    Ta \(-+        Ta minus-plus
 409      -.It \e(+-    Ta \(+-        Ta plus-minus
 410      -.It \e[t+-]  Ta \[t+-]      Ta plus-minus (text)
      429 +.It \e[t+-]  Ta \[t+-]      Ta plus-minus (text font)
      430 +.It \e(+-    Ta \(+-        Ta plus-minus (special font)
 411  431  .It \e(pc    Ta \(pc        Ta center-dot
 412      -.It \e(mu    Ta \(mu        Ta multiply
 413      -.It \e[tmu]  Ta \[tmu]      Ta multiply (text)
      432 +.It \e[tmu]  Ta \[tmu]      Ta multiply (text font)
      433 +.It \e(mu    Ta \(mu        Ta multiply (special font)
 414  434  .It \e(c*    Ta \(c*        Ta circle-multiply
 415  435  .It \e(c+    Ta \(c+        Ta circle-plus
 416      -.It \e(di    Ta \(di        Ta divide
 417      -.It \e[tdi]  Ta \[tdi]      Ta divide (text)
      436 +.It \e[tdi]  Ta \[tdi]      Ta divide (text font)
      437 +.It \e(di    Ta \(di        Ta divide (special font)
 418  438  .It \e(f/    Ta \(f/        Ta fraction
 419  439  .It \e(**    Ta \(**        Ta asterisk
 420  440  .It \e(<=    Ta \(<=        Ta less-than-equal
 421  441  .It \e(>=    Ta \(>=        Ta greater-than-equal
 422  442  .It \e(<<    Ta \(<<        Ta much less
 423  443  .It \e(>>    Ta \(>>        Ta much greater
 424  444  .It \e(eq    Ta \(eq        Ta equal
 425  445  .It \e(!=    Ta \(!=        Ta not equal
 426  446  .It \e(==    Ta \(==        Ta equivalent
 427  447  .It \e(ne    Ta \(ne        Ta not equivalent
↓ open down ↓ 76 lines elided ↑ open up ↑
 504  524  .It \e\(aq   Ta \'          Ta acute
 505  525  .It \e(ga    Ta \(ga        Ta grave
 506  526  .It \e\(ga   Ta \`          Ta grave
 507  527  .It \e(ab    Ta \(ab        Ta breve
 508  528  .It \e(ac    Ta \(ac        Ta cedilla
 509  529  .It \e(ad    Ta \(ad        Ta dieresis
 510  530  .It \e(ah    Ta \(ah        Ta caron
 511  531  .It \e(ao    Ta \(ao        Ta ring
 512  532  .It \e(a\(ti Ta \(a~        Ta tilde
 513  533  .It \e(ho    Ta \(ho        Ta ogonek
 514      -.It \e(ha    Ta \(ha        Ta hat (text)
 515      -.It \e(ti    Ta \(ti        Ta tilde (text)
      534 +.It \e(ha    Ta \(ha        Ta hat (ASCII character)
      535 +.It \e(ti    Ta \(ti        Ta tilde (ASCII character)
 516  536  .El
 517  537  .Pp
 518  538  Accented letters:
 519  539  .Bl -column "Input" "Rendered" "Description" -offset indent -compact
 520  540  .It Em Input Ta Em Rendered Ta Em Description
 521  541  .It \e(\(aqA Ta \('A        Ta acute A
 522  542  .It \e(\(aqE Ta \('E        Ta acute E
 523  543  .It \e(\(aqI Ta \('I        Ta acute I
 524  544  .It \e(\(aqO Ta \('O        Ta acute O
 525  545  .It \e(\(aqU Ta \('U        Ta acute U
↓ open down ↓ 283 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX