[BACK]Return to roff.7 CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/roff.7, Revision 1.90

1.90    ! schwarze    1: .\"    $Id: roff.7,v 1.89 2017/06/14 13:00:31 schwarze Exp $
1.1       kristaps    2: .\"
1.46      schwarze    3: .\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
1.80      schwarze    4: .\" Copyright (c) 2010,2011,2013-2015,2017 Ingo Schwarze <schwarze@openbsd.org>
1.1       kristaps    5: .\"
                      6: .\" Permission to use, copy, modify, and distribute this software for any
                      7: .\" purpose with or without fee is hereby granted, provided that the above
                      8: .\" copyright notice and this permission notice appear in all copies.
                      9: .\"
                     10: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     11: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     12: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     13: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     14: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     15: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     16: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     17: .\"
1.89      schwarze   18: .Dd $Mdocdate: June 14 2017 $
1.1       kristaps   19: .Dt ROFF 7
                     20: .Os
                     21: .Sh NAME
                     22: .Nm roff
1.17      schwarze   23: .Nd roff language reference for mandoc
1.1       kristaps   24: .Sh DESCRIPTION
                     25: The
                     26: .Nm roff
1.17      schwarze   27: language is a general purpose text formatting language.
1.33      schwarze   28: Since traditional implementations of the
1.17      schwarze   29: .Xr mdoc 7
                     30: and
                     31: .Xr man 7
1.33      schwarze   32: manual formatting languages are based on it,
                     33: many real-world manuals use small numbers of
1.17      schwarze   34: .Nm
1.46      schwarze   35: requests and escape sequences intermixed with their
1.33      schwarze   36: .Xr mdoc 7
                     37: or
                     38: .Xr man 7
                     39: code.
                     40: To properly format such manuals, the
1.1       kristaps   41: .Xr mandoc 1
1.33      schwarze   42: utility supports a tiny subset of
                     43: .Nm
1.46      schwarze   44: requests and escapes.
                     45: Only these requests and escapes supported by
1.33      schwarze   46: .Xr mandoc 1
                     47: are documented in the present manual,
                     48: together with the basic language syntax shared by
                     49: .Nm ,
                     50: .Xr mdoc 7 ,
                     51: and
                     52: .Xr man 7 .
                     53: For complete
                     54: .Nm
                     55: manuals, consult the
                     56: .Sx SEE ALSO
                     57: section.
1.1       kristaps   58: .Pp
1.33      schwarze   59: Input lines beginning with the control character
1.17      schwarze   60: .Sq \&.
1.33      schwarze   61: are parsed for requests and macros.
                     62: Such lines are called
                     63: .Dq request lines
1.1       kristaps   64: or
1.33      schwarze   65: .Dq macro lines ,
                     66: respectively.
                     67: Requests change the processing state and manipulate the formatting;
                     68: some macros also define the document structure and produce formatted
                     69: output.
                     70: The single quote
                     71: .Pq Qq \(aq
                     72: is accepted as an alternative control character,
                     73: treated by
                     74: .Xr mandoc 1
                     75: just like
                     76: .Ql \&.
                     77: .Pp
                     78: Lines not beginning with control characters are called
                     79: .Dq text lines .
                     80: They provide free-form text to be printed; the formatting of the text
                     81: depends on the respective processing context.
1.1       kristaps   82: .Sh LANGUAGE SYNTAX
                     83: .Nm
                     84: documents may contain only graphable 7-bit ASCII characters, the space
1.17      schwarze   85: character, and, in certain circumstances, the tab character.
1.38      kristaps   86: The backslash character
1.33      schwarze   87: .Sq \e
1.46      schwarze   88: indicates the start of an escape sequence, used for example for
1.33      schwarze   89: .Sx Comments ,
                     90: .Sx Special Characters ,
                     91: .Sx Predefined Strings ,
                     92: and
                     93: user-defined strings defined using the
                     94: .Sx ds
                     95: request.
1.46      schwarze   96: For a listing of escape sequences, consult the
                     97: .Sx ESCAPE SEQUENCE REFERENCE
                     98: below.
1.33      schwarze   99: .Ss Comments
                    100: Text following an escaped double-quote
                    101: .Sq \e\(dq ,
                    102: whether in a request, macro, or text line, is ignored to the end of the line.
                    103: A request line beginning with a control character and comment escape
                    104: .Sq \&.\e\(dq
                    105: is also ignored.
                    106: Furthermore, request lines with only a control character and optional
                    107: trailing whitespace are stripped from input.
                    108: .Pp
                    109: Examples:
                    110: .Bd -literal -offset indent -compact
                    111: \&.\e\(dq This is a comment line.
                    112: \&.\e\(dq The next line is ignored:
                    113: \&.
                    114: \&.Sh EXAMPLES \e\(dq This is a comment, too.
                    115: \&example text \e\(dq And so is this.
                    116: .Ed
                    117: .Ss Special Characters
                    118: Special characters are used to encode special glyphs and are rendered
                    119: differently across output media.
                    120: They may occur in request, macro, and text lines.
                    121: Sequences begin with the escape character
                    122: .Sq \e
                    123: followed by either an open-parenthesis
                    124: .Sq \&(
                    125: for two-character sequences; an open-bracket
                    126: .Sq \&[
                    127: for n-character sequences (terminated at a close-bracket
                    128: .Sq \&] ) ;
                    129: or a single one character sequence.
                    130: .Pp
                    131: Examples:
                    132: .Bl -tag -width Ds -offset indent -compact
                    133: .It Li \e(em
                    134: Two-letter em dash escape.
                    135: .It Li \ee
                    136: One-letter backslash escape.
                    137: .El
                    138: .Pp
                    139: See
1.17      schwarze  140: .Xr mandoc_char 7
1.33      schwarze  141: for a complete list.
                    142: .Ss Text Decoration
                    143: Terms may be text-decorated using the
                    144: .Sq \ef
                    145: escape followed by an indicator: B (bold), I (italic), R (regular), or P
                    146: (revert to previous mode).
                    147: A numerical representation 3, 2, or 1 (bold, italic, and regular,
                    148: respectively) may be used instead.
1.34      kristaps  149: The indicator or numerical representative may be preceded by C
                    150: (constant-width), which is ignored.
1.33      schwarze  151: .Pp
1.42      schwarze  152: The two-character indicator
                    153: .Sq BI
                    154: requests a font that is both bold and italic.
                    155: It may not be portable to old roff implementations.
                    156: .Pp
1.33      schwarze  157: Examples:
                    158: .Bl -tag -width Ds -offset indent -compact
                    159: .It Li \efBbold\efR
1.42      schwarze  160: Write in \fBbold\fP, then switch to regular font mode.
1.33      schwarze  161: .It Li \efIitalic\efP
1.42      schwarze  162: Write in \fIitalic\fP, then return to previous font mode.
                    163: .It Li \ef(BIbold italic\efP
                    164: Write in \f(BIbold italic\fP, then return to previous font mode.
1.33      schwarze  165: .El
                    166: .Pp
                    167: Text decoration is
                    168: .Em not
                    169: recommended for
                    170: .Xr mdoc 7 ,
                    171: which encourages semantic annotation.
                    172: .Ss Predefined Strings
                    173: Predefined strings, like
                    174: .Sx Special Characters ,
                    175: mark special output glyphs.
                    176: Predefined strings are escaped with the slash-asterisk,
                    177: .Sq \e* :
                    178: single-character
                    179: .Sq \e*X ,
                    180: two-character
                    181: .Sq \e*(XX ,
                    182: and N-character
                    183: .Sq \e*[N] .
                    184: .Pp
                    185: Examples:
                    186: .Bl -tag -width Ds -offset indent -compact
                    187: .It Li \e*(Am
                    188: Two-letter ampersand predefined string.
                    189: .It Li \e*q
                    190: One-letter double-quote predefined string.
                    191: .El
                    192: .Pp
                    193: Predefined strings are not recommended for use,
                    194: as they differ across implementations.
                    195: Those supported by
                    196: .Xr mandoc 1
                    197: are listed in
                    198: .Xr mandoc_char 7 .
                    199: Manuals using these predefined strings are almost certainly not portable.
                    200: .Ss Whitespace
                    201: Whitespace consists of the space character.
                    202: In text lines, whitespace is preserved within a line.
                    203: In request and macro lines, whitespace delimits arguments and is discarded.
                    204: .Pp
                    205: Unescaped trailing spaces are stripped from text line input unless in a
                    206: literal context.
                    207: In general, trailing whitespace on any input line is discouraged for
                    208: reasons of portability.
                    209: In the rare case that a blank character is needed at the end of an
                    210: input line, it may be forced by
                    211: .Sq \e\ \e& .
                    212: .Pp
                    213: Literal space characters can be produced in the output
                    214: using escape sequences.
                    215: In macro lines, they can also be included in arguments using quotation; see
                    216: .Sx MACRO SYNTAX
                    217: for details.
                    218: .Pp
                    219: Blank text lines, which may include whitespace, are only permitted
                    220: within literal contexts.
                    221: If the first character of a text line is a space, that line is printed
                    222: with a leading newline.
                    223: .Ss Scaling Widths
                    224: Many requests and macros support scaled widths for their arguments.
                    225: The syntax for a scaled width is
                    226: .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
                    227: where a decimal must be preceded or followed by at least one digit.
                    228: Negative numbers, while accepted, are truncated to zero.
                    229: .Pp
                    230: The following scaling units are accepted:
                    231: .Pp
                    232: .Bl -tag -width Ds -offset indent -compact
                    233: .It c
                    234: centimetre
                    235: .It i
                    236: inch
                    237: .It P
                    238: pica (~1/6 inch)
                    239: .It p
                    240: point (~1/72 inch)
                    241: .It f
1.56      kristaps  242: scale
1.33      schwarze  243: .Sq u
1.56      kristaps  244: by 65536
1.33      schwarze  245: .It v
                    246: default vertical span
                    247: .It m
                    248: width of rendered
                    249: .Sq m
                    250: .Pq em
                    251: character
                    252: .It n
                    253: width of rendered
                    254: .Sq n
                    255: .Pq en
                    256: character
                    257: .It u
1.56      kristaps  258: default horizontal span for the terminal
1.33      schwarze  259: .It M
                    260: mini-em (~1/100 em)
                    261: .El
                    262: .Pp
                    263: Using anything other than
                    264: .Sq m ,
                    265: .Sq n ,
                    266: or
                    267: .Sq v
                    268: is necessarily non-portable across output media.
                    269: See
                    270: .Sx COMPATIBILITY .
                    271: .Pp
                    272: If a scaling unit is not provided, the numerical value is interpreted
                    273: under the default rules of
                    274: .Sq v
                    275: for vertical spaces and
                    276: .Sq u
                    277: for horizontal ones.
                    278: .Pp
                    279: Examples:
                    280: .Bl -tag -width ".Bl -tag -width 2i" -offset indent -compact
                    281: .It Li \&.Bl -tag -width 2i
                    282: two-inch tagged list indentation in
                    283: .Xr mdoc 7
                    284: .It Li \&.HP 2i
                    285: two-inch tagged list indentation in
                    286: .Xr man 7
                    287: .It Li \&.sp 2v
                    288: two vertical spaces
                    289: .El
                    290: .Ss Sentence Spacing
                    291: Each sentence should terminate at the end of an input line.
                    292: By doing this, a formatter will be able to apply the proper amount of
                    293: spacing after the end of sentence (unescaped) period, exclamation mark,
                    294: or question mark followed by zero or more non-sentence closing
                    295: delimiters
                    296: .Po
                    297: .Sq \&) ,
                    298: .Sq \&] ,
                    299: .Sq \&' ,
                    300: .Sq \&"
                    301: .Pc .
                    302: .Pp
                    303: The proper spacing is also intelligently preserved if a sentence ends at
                    304: the boundary of a macro line.
                    305: .Pp
                    306: Examples:
                    307: .Bd -literal -offset indent -compact
                    308: Do not end sentences mid-line like this.  Instead,
                    309: end a sentence like this.
                    310: A macro would end like this:
                    311: \&.Xr mandoc 1 \&.
                    312: .Ed
1.17      schwarze  313: .Sh REQUEST SYNTAX
                    314: A request or macro line consists of:
                    315: .Pp
                    316: .Bl -enum -compact
                    317: .It
                    318: the control character
                    319: .Sq \&.
1.1       kristaps  320: or
1.17      schwarze  321: .Sq \(aq
                    322: at the beginning of the line,
                    323: .It
                    324: optionally an arbitrary amount of whitespace,
                    325: .It
                    326: the name of the request or the macro, which is one word of arbitrary
                    327: length, terminated by whitespace,
                    328: .It
                    329: and zero or more arguments delimited by whitespace.
                    330: .El
                    331: .Pp
                    332: Thus, the following request lines are all equivalent:
1.1       kristaps  333: .Bd -literal -offset indent
1.17      schwarze  334: \&.ig end
                    335: \&.ig    end
                    336: \&.   ig end
1.1       kristaps  337: .Ed
1.24      schwarze  338: .Sh MACRO SYNTAX
1.33      schwarze  339: Macros are provided by the
                    340: .Xr mdoc 7
                    341: and
                    342: .Xr man 7
                    343: languages and can be defined by the
1.24      schwarze  344: .Sx \&de
                    345: request.
                    346: When called, they follow the same syntax as requests, except that
                    347: macro arguments may optionally be quoted by enclosing them
                    348: in double quote characters
                    349: .Pq Sq \(dq .
1.33      schwarze  350: Quoted text, even if it contains whitespace or would cause
                    351: a macro invocation when unquoted, is always considered literal text.
                    352: Inside quoted text, pairs of double quote characters
                    353: .Pq Sq Qq
                    354: resolve to single double quote characters.
                    355: .Pp
1.32      kristaps  356: To be recognised as the beginning of a quoted argument, the opening
1.24      schwarze  357: quote character must be preceded by a space character.
                    358: A quoted argument extends to the next double quote character that is not
                    359: part of a pair, or to the end of the input line, whichever comes earlier.
                    360: Leaving out the terminating double quote character at the end of the line
                    361: is discouraged.
                    362: For clarity, if more arguments follow on the same input line,
                    363: it is recommended to follow the terminating double quote character
                    364: by a space character; in case the next character after the terminating
                    365: double quote character is anything else, it is regarded as the beginning
                    366: of the next, unquoted argument.
                    367: .Pp
                    368: Both in quoted and unquoted arguments, pairs of backslashes
                    369: .Pq Sq \e\e
                    370: resolve to single backslashes.
                    371: In unquoted arguments, space characters can alternatively be included
                    372: by preceding them with a backslash
                    373: .Pq Sq \e\~ ,
                    374: but quoting is usually better for clarity.
1.33      schwarze  375: .Pp
                    376: Examples:
                    377: .Bl -tag -width Ds -offset indent -compact
                    378: .It Li .Fn strlen \(dqconst char *s\(dq
                    379: Group arguments
                    380: .Qq const char *s
                    381: into one function argument.
                    382: If unspecified,
                    383: .Qq const ,
                    384: .Qq char ,
                    385: and
                    386: .Qq *s
                    387: would be considered separate arguments.
                    388: .It Li .Op \(dqFl a\(dq
                    389: Consider
                    390: .Qq \&Fl a
                    391: as literal text instead of a flag macro.
                    392: .El
1.15      kristaps  393: .Sh REQUEST REFERENCE
1.17      schwarze  394: The
1.15      kristaps  395: .Xr mandoc 1
                    396: .Nm
1.32      kristaps  397: parser recognises the following requests.
1.63      schwarze  398: For requests marked as "ignored" or "unsupported", any arguments are
                    399: ignored, and the number of arguments is not checked.
1.79      schwarze  400: .Bl -tag -width Ds
                    401: .It Ic \&ab Op Ar message
1.63      schwarze  402: Abort processing.
                    403: Currently unsupported.
1.79      schwarze  404: .It Ic \&ad Op Cm b | c | l | n | r
                    405: Set line adjustment mode for subsequent text.
1.63      schwarze  406: Currently ignored.
1.79      schwarze  407: .It Ic \&af Ar registername format
1.63      schwarze  408: Assign an output format to a number register.
                    409: Currently ignored.
1.79      schwarze  410: .It Ic \&aln Ar newname oldname
1.63      schwarze  411: Create an alias for a number register.
                    412: Currently unsupported.
1.79      schwarze  413: .It Ic \&als Ar newname oldname
1.63      schwarze  414: Create an alias for a request, string, macro, or diversion.
                    415: Currently unsupported.
1.79      schwarze  416: .It Ic \&am Ar macroname Op Ar endmacro
1.15      kristaps  417: Append to a macro definition.
                    418: The syntax of this request is the same as that of
1.79      schwarze  419: .Ic \&de .
                    420: .It Ic \&am1 Ar macroname Op Ar endmacro
1.15      kristaps  421: Append to a macro definition, switching roff compatibility mode off
1.63      schwarze  422: during macro execution (groff extension).
1.15      kristaps  423: The syntax of this request is the same as that of
1.79      schwarze  424: .Ic \&de1 .
1.55      schwarze  425: Since
                    426: .Xr mandoc 1
                    427: does not implement
                    428: .Nm
                    429: compatibility mode at all, it handles this request as an alias for
1.79      schwarze  430: .Ic \&am .
                    431: .It Ic \&ami Ar macrostring Op Ar endstring
1.63      schwarze  432: Append to a macro definition, specifying the macro name indirectly
                    433: (groff extension).
                    434: The syntax of this request is the same as that of
1.79      schwarze  435: .Ic \&dei .
                    436: .It Ic \&ami1 Ar macrostring Op Ar endstring
1.63      schwarze  437: Append to a macro definition, specifying the macro name indirectly
                    438: and switching roff compatibility mode off during macro execution
                    439: (groff extension).
                    440: The syntax of this request is the same as that of
1.79      schwarze  441: .Ic \&dei1 .
1.63      schwarze  442: Since
                    443: .Xr mandoc 1
                    444: does not implement
                    445: .Nm
                    446: compatibility mode at all, it handles this request as an alias for
1.79      schwarze  447: .Ic \&ami .
                    448: .It Ic \&as Ar stringname Op Ar string
1.47      schwarze  449: Append to a user-defined string.
                    450: The syntax of this request is the same as that of
                    451: .Sx \&ds .
                    452: If a user-defined string with the specified name does not yet exist,
                    453: it is set to the empty string before appending.
1.79      schwarze  454: .It Ic \&as1 Ar stringname Op Ar string
1.63      schwarze  455: Append to a user-defined string, switching roff compatibility mode off
                    456: during macro execution (groff extension).
                    457: The syntax of this request is the same as that of
1.79      schwarze  458: .Ic \&ds1 .
1.63      schwarze  459: Since
                    460: .Xr mandoc 1
                    461: does not implement
                    462: .Nm
                    463: compatibility mode at all, it handles this request as an alias for
1.79      schwarze  464: .Ic \&as .
                    465: .It Ic \&asciify Ar divname
1.63      schwarze  466: Fully unformat a diversion.
                    467: Currently unsupported.
1.79      schwarze  468: .It Ic \&backtrace
1.63      schwarze  469: Print a backtrace of the input stack.
                    470: This is a groff extension and currently ignored.
1.79      schwarze  471: .It Ic \&bd Ar font Oo Ar curfont Oc Op Ar offset
1.63      schwarze  472: Artificially embolden by repeated printing with small shifts.
                    473: Currently ignored.
1.79      schwarze  474: .It Ic \&bleedat Ar left top width height
1.63      schwarze  475: Set the BleedBox page parameter for PDF generation.
                    476: This is a Heirloom extension and currently ignored.
1.79      schwarze  477: .It Ic \&blm Ar macroname
1.63      schwarze  478: Set a blank line trap.
                    479: Currently unsupported.
1.79      schwarze  480: .It Ic \&box Ar divname
1.63      schwarze  481: Begin a diversion without including a partially filled line.
                    482: Currently unsupported.
1.79      schwarze  483: .It Ic \&boxa Ar divname
1.63      schwarze  484: Add to a diversion without including a partially filled line.
                    485: Currently unsupported.
1.79      schwarze  486: .It Ic \&bp Oo Cm + Ns | Ns Cm - Oc Ns Ar pagenumber
                    487: Begin a new page.
1.63      schwarze  488: Currently ignored.
1.79      schwarze  489: .It Ic \&BP Ar source height width position offset flags label
1.63      schwarze  490: Define a frame and place a picture in it.
                    491: This is a Heirloom extension and currently unsupported.
1.79      schwarze  492: .It Ic \&br
1.63      schwarze  493: Break the output line.
1.79      schwarze  494: .It Ic \&break
1.63      schwarze  495: Break out of a
1.79      schwarze  496: .Ic \&while
1.63      schwarze  497: loop.
                    498: Currently unsupported.
1.79      schwarze  499: .It Ic \&breakchar Ar char ...
1.63      schwarze  500: Optional line break characters.
                    501: This is a Heirloom extension and currently ignored.
1.79      schwarze  502: .It Ic \&brnl Ar N
                    503: Break output line after the next
                    504: .Ar N
                    505: input lines.
1.63      schwarze  506: This is a Heirloom extension and currently ignored.
1.79      schwarze  507: .It Ic \&brp
1.63      schwarze  508: Break and spread output line.
                    509: Currently, this is implemented as an alias for
1.79      schwarze  510: .Ic \&br .
                    511: .It Ic \&brpnl Ar N
                    512: Break and spread output line after the next
                    513: .Ar N
                    514: input lines.
1.63      schwarze  515: This is a Heirloom extension and currently ignored.
1.79      schwarze  516: .It Ic \&c2 Op Ar char
1.63      schwarze  517: Change the no-break control character.
                    518: Currently unsupported.
1.79      schwarze  519: .It Ic \&cc Op Ar char
1.63      schwarze  520: Change the control character.
1.39      kristaps  521: If
1.79      schwarze  522: .Ar char
1.39      kristaps  523: is not specified, the control character is reset to
                    524: .Sq \&. .
                    525: Trailing characters are ignored.
1.79      schwarze  526: .It Ic \&ce Op Ar N
                    527: Center the next
                    528: .Ar N
                    529: input lines without filling.
1.85      schwarze  530: .Ar N
                    531: defaults to 1.
                    532: An argument of 0 or less ends centering.
1.86      schwarze  533: Currently, high level macros abort centering.
1.79      schwarze  534: .It Ic \&cf Ar filename
1.63      schwarze  535: Output the contents of a file.
                    536: Ignored because insecure.
1.79      schwarze  537: .It Ic \&cflags Ar flags char ...
1.63      schwarze  538: Set character flags.
                    539: This is a groff extension and currently ignored.
1.79      schwarze  540: .It Ic \&ch Ar macroname Op Ar dist
1.63      schwarze  541: Change a trap location.
                    542: Currently ignored.
1.79      schwarze  543: .It Ic \&char Ar glyphname Op Ar string
1.63      schwarze  544: Define a new glyph.
                    545: Currently unsupported.
1.79      schwarze  546: .It Ic \&chop Ar stringname
1.63      schwarze  547: Remove the last character from a macro, string, or diversion.
                    548: Currently unsupported.
1.79      schwarze  549: .It Ic \&class Ar classname char ...
1.63      schwarze  550: Define a character class.
                    551: This is a groff extension and currently ignored.
1.79      schwarze  552: .It Ic \&close Ar streamname
1.63      schwarze  553: Close an open file.
                    554: Ignored because insecure.
1.79      schwarze  555: .It Ic \&CL Ar color text
1.63      schwarze  556: Print text in color.
                    557: This is a Heirloom extension and currently unsupported.
1.79      schwarze  558: .It Ic \&color Op Cm 1 | 0
1.63      schwarze  559: Activate or deactivate colors.
                    560: This is a groff extension and currently ignored.
1.79      schwarze  561: .It Ic \&composite Ar from to
1.63      schwarze  562: Define a name component for composite glyph names.
                    563: This is a groff extension and currently unsupported.
1.79      schwarze  564: .It Ic \&continue
1.63      schwarze  565: Immediately start the next iteration of a
1.79      schwarze  566: .Ic \&while
1.63      schwarze  567: loop.
                    568: Currently unsupported.
1.79      schwarze  569: .It Ic \&cp Op Cm 1 | 0
1.63      schwarze  570: Switch
                    571: .Nm
                    572: compatibility mode on or off.
                    573: Currently ignored.
1.79      schwarze  574: .It Ic \&cropat Ar left top width height
1.63      schwarze  575: Set the CropBox page parameter for PDF generation.
                    576: This is a Heirloom extension and currently ignored.
1.79      schwarze  577: .It Ic \&cs Ar font Op Ar width Op Ar emsize
1.63      schwarze  578: Constant character spacing mode.
                    579: Currently ignored.
1.79      schwarze  580: .It Ic \&cu Op Ar N
                    581: Underline next
                    582: .Ar N
                    583: input lines including whitespace.
1.63      schwarze  584: Currently ignored.
1.79      schwarze  585: .It Ic \&da Ar divname
1.63      schwarze  586: Append to a diversion.
                    587: Currently unsupported.
1.79      schwarze  588: .It Ic \&dch Ar macroname Op Ar dist
1.63      schwarze  589: Change a trap location in the current diversion.
                    590: This is a Heirloom extension and currently unsupported.
1.79      schwarze  591: .It Ic \&de Ar macroname Op Ar endmacro
1.17      schwarze  592: Define a
1.15      kristaps  593: .Nm
                    594: macro.
                    595: Its syntax can be either
                    596: .Bd -literal -offset indent
1.79      schwarze  597: .Pf . Ic \&de Ar macroname
                    598: .Ar definition
1.15      kristaps  599: \&..
                    600: .Ed
                    601: .Pp
                    602: or
                    603: .Bd -literal -offset indent
1.79      schwarze  604: .Pf . Ic \&de Ar macroname Ar endmacro
                    605: .Ar definition
                    606: .Pf . Ar endmacro
1.15      kristaps  607: .Ed
                    608: .Pp
                    609: Both forms define or redefine the macro
1.79      schwarze  610: .Ar macroname
1.15      kristaps  611: to represent the
1.79      schwarze  612: .Ar definition ,
1.15      kristaps  613: which may consist of one or more input lines, including the newline
                    614: characters terminating each line, optionally containing calls to
                    615: .Nm
                    616: requests,
                    617: .Nm
                    618: macros or high-level macros like
                    619: .Xr man 7
                    620: or
                    621: .Xr mdoc 7
                    622: macros, whichever applies to the document in question.
                    623: .Pp
                    624: Specifying a custom
1.79      schwarze  625: .Ar endmacro
1.15      kristaps  626: macro works in the same way as for
1.79      schwarze  627: .Ic \&ig ;
1.15      kristaps  628: namely, the call to
1.79      schwarze  629: .Sq Pf . Ar endmacro
1.15      kristaps  630: first ends the
1.79      schwarze  631: .Ar definition ,
1.15      kristaps  632: and after that, it is also evaluated as a
                    633: .Nm
                    634: request or
                    635: .Nm
                    636: macro, but not as a high-level macro.
                    637: .Pp
1.17      schwarze  638: The macro can be invoked later using the syntax
1.15      kristaps  639: .Pp
1.79      schwarze  640: .D1 Pf . Ar macroname Op Ar argument Op Ar argument ...
1.15      kristaps  641: .Pp
1.24      schwarze  642: Regarding argument parsing, see
                    643: .Sx MACRO SYNTAX
                    644: above.
1.15      kristaps  645: .Pp
1.17      schwarze  646: The line invoking the macro will be replaced
1.15      kristaps  647: in the input stream by the
1.79      schwarze  648: .Ar definition ,
1.15      kristaps  649: replacing all occurrences of
                    650: .No \e\e$ Ns Ar N ,
1.17      schwarze  651: where
1.15      kristaps  652: .Ar N
                    653: is a digit, by the
                    654: .Ar N Ns th Ar argument .
                    655: For example,
                    656: .Bd -literal -offset indent
                    657: \&.de ZN
                    658: \efI\e^\e\e$1\e^\efP\e\e$2
                    659: \&..
                    660: \&.ZN XtFree .
                    661: .Ed
                    662: .Pp
                    663: produces
                    664: .Pp
                    665: .D1 \efI\e^XtFree\e^\efP.
                    666: .Pp
                    667: in the input stream, and thus in the output: \fI\^XtFree\^\fP.
1.73      schwarze  668: Each occurrence of \e\e$* is replaced with all the arguments,
                    669: joined together with single blank characters.
1.15      kristaps  670: .Pp
1.17      schwarze  671: Since macros and user-defined strings share a common string table,
1.15      kristaps  672: defining a macro
1.79      schwarze  673: .Ar macroname
1.15      kristaps  674: clobbers the user-defined string
1.79      schwarze  675: .Ar macroname ,
1.15      kristaps  676: and the
1.79      schwarze  677: .Ar definition
1.15      kristaps  678: can also be printed using the
                    679: .Sq \e*
                    680: string interpolation syntax described below
1.79      schwarze  681: .Ic ds ,
1.15      kristaps  682: but this is rarely useful because every macro definition contains at least
                    683: one explicit newline character.
1.16      schwarze  684: .Pp
                    685: In order to prevent endless recursion, both groff and
                    686: .Xr mandoc 1
                    687: limit the stack depth for expanding macros and strings
1.61      schwarze  688: to a large, but finite number, and
                    689: .Xr mandoc 1
                    690: also limits the length of the expanded input line.
                    691: Do not rely on the exact values of these limits.
1.79      schwarze  692: .It Ic \&de1 Ar macroname Op Ar endmacro
1.63      schwarze  693: Define a
                    694: .Nm
                    695: macro that will be executed with
                    696: .Nm
                    697: compatibility mode switched off during macro execution.
                    698: This is a groff extension.
                    699: Since
                    700: .Xr mandoc 1
                    701: does not implement
                    702: .Nm
                    703: compatibility mode at all, it handles this request as an alias for
1.79      schwarze  704: .Ic \&de .
                    705: .It Ic \&defcolor Ar newname scheme component ...
1.63      schwarze  706: Define a color name.
                    707: This is a groff extension and currently ignored.
1.79      schwarze  708: .It Ic \&dei Ar macrostring Op Ar endstring
1.17      schwarze  709: Define a
1.15      kristaps  710: .Nm
1.63      schwarze  711: macro, specifying the macro name indirectly (groff extension).
1.17      schwarze  712: The syntax of this request is the same as that of
1.79      schwarze  713: .Ic \&de .
                    714: The effect is the same as:
1.55      schwarze  715: .Pp
1.79      schwarze  716: .D1 Pf . Cm \&de No \e* Ns Bo Ar macrostring Bc Op \e* Ns Bq Ar endstring
                    717: .It Ic \&dei1 Ar macrostring Op Ar endstring
1.17      schwarze  718: Define a
1.15      kristaps  719: .Nm
                    720: macro that will be executed with
                    721: .Nm
1.63      schwarze  722: compatibility mode switched off during macro execution,
                    723: specifying the macro name indirectly (groff extension).
1.15      kristaps  724: Since
                    725: .Xr mandoc 1
                    726: does not implement
                    727: .Nm
1.17      schwarze  728: compatibility mode at all, it handles this request as an alias for
1.79      schwarze  729: .Ic \&dei .
                    730: .It Ic \&device Ar string ...
                    731: .It Ic \&devicem Ar stringname
                    732: These two requests only make sense with the groff-specific intermediate
                    733: output format and are unsupported.
                    734: .It Ic \&di Ar divname
1.63      schwarze  735: Begin a diversion.
                    736: Currently unsupported.
1.79      schwarze  737: .It Ic \&do Ar command Op Ar argument ...
1.63      schwarze  738: Execute
                    739: .Nm
                    740: request or macro line with compatibility mode disabled.
                    741: Currently unsupported.
1.79      schwarze  742: .It Ic \&ds Ar stringname Op Oo \(dq Oc Ns Ar string
1.15      kristaps  743: Define a user-defined string.
1.13      kristaps  744: The
1.79      schwarze  745: .Ar stringname
1.13      kristaps  746: and
1.15      kristaps  747: .Ar string
                    748: arguments are space-separated.
                    749: If the
                    750: .Ar string
                    751: begins with a double-quote character, that character will not be part
                    752: of the string.
                    753: All remaining characters on the input line form the
                    754: .Ar string ,
                    755: including whitespace and double-quote characters, even trailing ones.
                    756: .Pp
1.13      kristaps  757: The
1.15      kristaps  758: .Ar string
                    759: can be interpolated into subsequent text by using
1.79      schwarze  760: .No \e* Ns Bq Ar stringname
1.15      kristaps  761: for a
1.79      schwarze  762: .Ar stringname
1.15      kristaps  763: of arbitrary length, or \e*(NN or \e*N if the length of
1.79      schwarze  764: .Ar stringname
1.15      kristaps  765: is two or one characters, respectively.
1.17      schwarze  766: Interpolation can be prevented by escaping the leading backslash;
                    767: that is, an asterisk preceded by an even number of backslashes
                    768: does not trigger string interpolation.
1.15      kristaps  769: .Pp
                    770: Since user-defined strings and macros share a common string table,
                    771: defining a string
1.79      schwarze  772: .Ar stringname
1.17      schwarze  773: clobbers the macro
1.79      schwarze  774: .Ar stringname ,
1.15      kristaps  775: and the
1.79      schwarze  776: .Ar stringname
1.15      kristaps  777: used for defining a string can also be invoked as a macro,
                    778: in which case the following input line will be appended to the
                    779: .Ar string ,
                    780: forming a new input line passed to the
                    781: .Nm
                    782: parser.
                    783: For example,
                    784: .Bd -literal -offset indent
                    785: \&.ds badidea .S
                    786: \&.badidea
                    787: H SYNOPSIS
                    788: .Ed
                    789: .Pp
                    790: invokes the
1.79      schwarze  791: .Ic SH
1.15      kristaps  792: macro when used in a
                    793: .Xr man 7
                    794: document.
                    795: Such abuse is of course strongly discouraged.
1.79      schwarze  796: .It Ic \&ds1 Ar stringname Op Oo \(dq Oc Ns Ar string
1.63      schwarze  797: Define a user-defined string that will be expanded with
                    798: .Nm
                    799: compatibility mode switched off during string expansion.
                    800: This is a groff extension.
                    801: Since
                    802: .Xr mandoc 1
                    803: does not implement
                    804: .Nm
                    805: compatibility mode at all, it handles this request as an alias for
1.79      schwarze  806: .Ic \&ds .
                    807: .It Ic \&dwh Ar dist macroname
1.63      schwarze  808: Set a location trap in the current diversion.
                    809: This is a Heirloom extension and currently unsupported.
1.79      schwarze  810: .It Ic \&dt Op Ar dist macroname
1.63      schwarze  811: Set a trap within a diversion.
                    812: Currently unsupported.
1.79      schwarze  813: .It Ic \&ec Op Ar char
1.83      schwarze  814: Enable the escape mechanism and change the escape character.
                    815: The
                    816: .Ar char
                    817: argument defaults to the backslash
                    818: .Pq Sq \e .
1.79      schwarze  819: .It Ic \&ecr
1.63      schwarze  820: Restore the escape character.
                    821: Currently unsupported.
1.79      schwarze  822: .It Ic \&ecs
1.63      schwarze  823: Save the escape character.
                    824: Currently unsupported.
1.79      schwarze  825: .It Ic \&el Ar body
1.5       kristaps  826: The
1.79      schwarze  827: .Dq else
1.5       kristaps  828: half of an if/else conditional.
                    829: Pops a result off the stack of conditional evaluations pushed by
1.79      schwarze  830: .Ic \&ie
1.5       kristaps  831: and uses it as its conditional.
                    832: If no stack entries are present (e.g., due to no prior
1.79      schwarze  833: .Ic \&ie
1.5       kristaps  834: calls)
                    835: then false is assumed.
1.17      schwarze  836: The syntax of this request is similar to
1.79      schwarze  837: .Ic \&if
1.5       kristaps  838: except that the conditional is missing.
1.79      schwarze  839: .It Ic \&em Ar macroname
1.63      schwarze  840: Set a trap at the end of input.
                    841: Currently unsupported.
1.79      schwarze  842: .It Ic \&EN
1.27      kristaps  843: End an equation block.
                    844: See
1.79      schwarze  845: .Ic \&EQ .
                    846: .It Ic \&eo
1.63      schwarze  847: Disable the escape mechanism completely.
1.79      schwarze  848: .It Ic \&EP
1.63      schwarze  849: End a picture started by
1.79      schwarze  850: .Ic \&BP .
1.63      schwarze  851: This is a Heirloom extension and currently unsupported.
1.79      schwarze  852: .It Ic \&EQ
1.27      kristaps  853: Begin an equation block.
                    854: See
                    855: .Xr eqn 7
                    856: for a description of the equation language.
1.79      schwarze  857: .It Ic \&errprint Ar message
1.63      schwarze  858: Print a string like an error message.
                    859: This is a Heirloom extension and currently ignored.
1.79      schwarze  860: .It Ic \&ev Op Ar envname
1.63      schwarze  861: Switch to another environment.
                    862: Currently unsupported.
1.79      schwarze  863: .It Ic \&evc Op Ar envname
1.63      schwarze  864: Copy an environment into the current environment.
                    865: Currently unsupported.
1.79      schwarze  866: .It Ic \&ex
1.63      schwarze  867: Abort processing and exit.
                    868: Currently unsupported.
1.79      schwarze  869: .It Ic \&fallback Ar curfont font ...
1.63      schwarze  870: Select the fallback sequence for a font.
                    871: This is a Heirloom extension and currently ignored.
1.79      schwarze  872: .It Ic \&fam Op Ar familyname
1.43      schwarze  873: Change the font family.
1.79      schwarze  874: This is a groff extension and currently ignored.
                    875: .It Ic \&fc Op Ar delimchar Op Ar padchar
1.63      schwarze  876: Define a delimiting and a padding character for fields.
                    877: Currently unsupported.
1.79      schwarze  878: .It Ic \&fchar Ar glyphname Op Ar string
1.63      schwarze  879: Define a fallback glyph.
                    880: Currently unsupported.
1.79      schwarze  881: .It Ic \&fcolor Ar colorname
1.63      schwarze  882: Set the fill color for \eD objects.
                    883: This is a groff extension and currently ignored.
1.79      schwarze  884: .It Ic \&fdeferlig Ar font string ...
1.63      schwarze  885: Defer ligature building.
                    886: This is a Heirloom extension and currently ignored.
1.79      schwarze  887: .It Ic \&feature Cm + Ns | Ns Cm - Ns Ar name
1.63      schwarze  888: Enable or disable an OpenType feature.
                    889: This is a Heirloom extension and currently ignored.
1.79      schwarze  890: .It Ic \&fi
1.63      schwarze  891: Switch to fill mode.
                    892: See
                    893: .Xr man 7 .
                    894: Ignored in
                    895: .Xr mdoc 7 .
1.79      schwarze  896: .It Ic \&fkern Ar font minkern
1.63      schwarze  897: Control the use of kerning tables for a font.
                    898: This is a Heirloom extension and currently ignored.
1.79      schwarze  899: .It Ic \&fl
1.63      schwarze  900: Flush output.
                    901: Currently ignored.
1.79      schwarze  902: .It Ic \&flig Ar font string char ...
1.63      schwarze  903: Define ligatures.
                    904: This is a Heirloom extension and currently ignored.
1.79      schwarze  905: .It Ic \&fp Ar position font Op Ar filename
1.63      schwarze  906: Assign font position.
                    907: Currently ignored.
1.79      schwarze  908: .It Ic \&fps Ar mapname ...
1.63      schwarze  909: Mount a font with a special character map.
                    910: This is a Heirloom extension and currently ignored.
1.79      schwarze  911: .It Ic \&fschar Ar font glyphname Op Ar string
1.63      schwarze  912: Define a font-specific fallback glyph.
                    913: This is a groff extension and currently unsupported.
1.79      schwarze  914: .It Ic \&fspacewidth Ar font Op Ar afmunits
1.63      schwarze  915: Set a font-specific width for the space character.
                    916: This is a Heirloom extension and currently ignored.
1.79      schwarze  917: .It Ic \&fspecial Ar curfont Op Ar font ...
1.63      schwarze  918: Conditionally define a special font.
                    919: This is a groff extension and currently ignored.
1.79      schwarze  920: .It Ic \&ft Op Ar font
1.49      schwarze  921: Change the font.
                    922: The following
                    923: .Ar font
                    924: arguments are supported:
                    925: .Bl -tag -width 4n -offset indent
                    926: .It Cm B , BI , 3 , 4
                    927: switches to
                    928: .Sy bold
                    929: font
                    930: .It Cm I , 2
                    931: switches to
                    932: .Em underlined
                    933: font
                    934: .It Cm R , CW , 1
                    935: switches to normal font
                    936: .It Cm P No "or no argument"
                    937: switches back to the previous font
                    938: .El
                    939: .Pp
1.77      schwarze  940: This request takes effect only locally and may be overridden
                    941: by macros and escape sequences.
1.79      schwarze  942: .It Ic \&ftr Ar newname Op Ar oldname
1.63      schwarze  943: Translate font name.
                    944: This is a groff extension and currently ignored.
1.79      schwarze  945: .It Ic \&fzoom Ar font Op Ar permille
1.63      schwarze  946: Zoom font size.
                    947: Currently ignored.
1.79      schwarze  948: .It Ic \&gcolor Op Ar colorname
1.63      schwarze  949: Set glyph color.
                    950: This is a groff extension and currently ignored.
1.79      schwarze  951: .It Ic \&hc Op Ar char
1.63      schwarze  952: Set the hyphenation character.
                    953: Currently ignored.
1.79      schwarze  954: .It Ic \&hcode Ar char code ...
1.63      schwarze  955: Set hyphenation codes of characters.
                    956: Currently ignored.
1.79      schwarze  957: .It Ic \&hidechar Ar font char ...
1.63      schwarze  958: Hide characters in a font.
                    959: This is a Heirloom extension and currently ignored.
1.79      schwarze  960: .It Ic \&hla Ar language
1.63      schwarze  961: Set hyphenation language.
                    962: This is a groff extension and currently ignored.
1.79      schwarze  963: .It Ic \&hlm Op Ar number
1.63      schwarze  964: Set maximum number of consecutive hyphenated lines.
                    965: Currently ignored.
1.79      schwarze  966: .It Ic \&hpf Ar filename
1.63      schwarze  967: Load hyphenation pattern file.
                    968: This is a groff extension and currently ignored.
1.79      schwarze  969: .It Ic \&hpfa Ar filename
1.63      schwarze  970: Load hyphenation pattern file, appending to the current patterns.
                    971: This is a groff extension and currently ignored.
1.79      schwarze  972: .It Ic \&hpfcode Ar code code ...
1.63      schwarze  973: Define mapping values for character codes in hyphenation patterns.
                    974: This is a groff extension and currently ignored.
1.79      schwarze  975: .It Ic \&hw Ar word ...
1.44      schwarze  976: Specify hyphenation points in words.
1.63      schwarze  977: Currently ignored.
1.79      schwarze  978: .It Ic \&hy Op Ar mode
1.15      kristaps  979: Set automatic hyphenation mode.
1.63      schwarze  980: Currently ignored.
1.79      schwarze  981: .It Ic \&hylang Ar language
1.63      schwarze  982: Set hyphenation language.
                    983: This is a Heirloom extension and currently ignored.
1.79      schwarze  984: .It Ic \&hylen Ar nchar
1.63      schwarze  985: Minimum word length for hyphenation.
                    986: This is a Heirloom extension and currently ignored.
1.79      schwarze  987: .It Ic \&hym Op Ar length
1.63      schwarze  988: Set hyphenation margin.
                    989: This is a groff extension and currently ignored.
1.79      schwarze  990: .It Ic \&hypp Ar penalty ...
1.63      schwarze  991: Define hyphenation penalties.
                    992: This is a Heirloom extension and currently ignored.
1.79      schwarze  993: .It Ic \&hys Op Ar length
1.63      schwarze  994: Set hyphenation space.
                    995: This is a groff extension and currently ignored.
1.79      schwarze  996: .It Ic \&ie Ar condition body
1.5       kristaps  997: The
1.79      schwarze  998: .Dq if
1.5       kristaps  999: half of an if/else conditional.
                   1000: The result of the conditional is pushed into a stack used by subsequent
                   1001: invocations of
1.79      schwarze 1002: .Ic \&el ,
1.5       kristaps 1003: which may be separated by any intervening input (or not exist at all).
                   1004: Its syntax is equivalent to
1.79      schwarze 1005: .Ic \&if .
                   1006: .It Ic \&if Ar condition body
                   1007: Begin a conditional.
                   1008: This request can also be written as follows:
                   1009: .Bd -unfilled -offset indent
                   1010: .Pf . Ic \&if Ar condition No \e{ Ns Ar body
                   1011: .Ar body ... Ns \e}
1.48      schwarze 1012: .Ed
1.79      schwarze 1013: .Bd -unfilled -offset indent
                   1014: .Pf . Ic \&if Ar condition No \e{\e
                   1015: .Ar body ...
                   1016: .Pf . No \e}
1.48      schwarze 1017: .Ed
                   1018: .Pp
1.79      schwarze 1019: The
                   1020: .Ar condition
                   1021: is a boolean expression.
1.48      schwarze 1022: Currently,
                   1023: .Xr mandoc 1
                   1024: supports the following subset of roff conditionals:
                   1025: .Bl -bullet
                   1026: .It
                   1027: If
                   1028: .Sq \&!
1.79      schwarze 1029: is prefixed to
                   1030: .Ar condition ,
                   1031: it is logically inverted.
1.48      schwarze 1032: .It
1.79      schwarze 1033: If the first character of
                   1034: .Ar condition
                   1035: is
1.48      schwarze 1036: .Sq n
                   1037: .Pq nroff mode
                   1038: or
                   1039: .Sq o
                   1040: .Pq odd page ,
1.79      schwarze 1041: it evaluates to true.
1.48      schwarze 1042: .It
1.79      schwarze 1043: If the first character of
                   1044: .Ar condition
                   1045: is
1.48      schwarze 1046: .Sq c
                   1047: .Pq character available ,
                   1048: .Sq e
                   1049: .Pq even page ,
                   1050: .Sq t
                   1051: .Pq troff mode ,
1.59      schwarze 1052: or
                   1053: .Sq v
                   1054: .Pq vroff mode ,
1.79      schwarze 1055: it evaluates to false.
1.90    ! schwarze 1056: .It
        !          1057: If the first character of
        !          1058: .Ar condition
        !          1059: is
        !          1060: .Sq d ,
        !          1061: it evaluates to true if the rest of
        !          1062: .Ar condition
        !          1063: is the name of an existing user defined macro or string;
        !          1064: otherwise, it evaluates to false.
1.72      schwarze 1065: .It
1.79      schwarze 1066: If the first character of
                   1067: .Ar condition
                   1068: is
1.72      schwarze 1069: .Sq r ,
1.79      schwarze 1070: it evaluates to true if the rest of
                   1071: .Ar condition
                   1072: is the name of an existing number register;
                   1073: otherwise, it evaluates to false.
1.48      schwarze 1074: .It
1.79      schwarze 1075: If the
                   1076: .Ar condition
                   1077: starts with a parenthesis or with an optionally signed
1.53      schwarze 1078: integer number, it is evaluated according to the rules of
                   1079: .Sx Numerical expressions
                   1080: explained below.
1.57      schwarze 1081: It evaluates to true if the result is positive,
1.53      schwarze 1082: or to false if the result is zero or negative.
1.48      schwarze 1083: .It
1.79      schwarze 1084: Otherwise, the first character of
                   1085: .Ar condition
                   1086: is regarded as a delimiter and it evaluates to true if the string
                   1087: extending from its first to its second occurrence is equal to the
                   1088: string extending from its second to its third occurrence.
1.48      schwarze 1089: .It
1.79      schwarze 1090: If
                   1091: .Ar condition
                   1092: cannot be parsed, it evaluates to false.
1.48      schwarze 1093: .El
                   1094: .Pp
1.3       kristaps 1095: If a conditional is false, its children are not processed, but are
                   1096: syntactically interpreted to preserve the integrity of the input
                   1097: document.
                   1098: Thus,
                   1099: .Pp
1.17      schwarze 1100: .D1 \&.if t .ig
1.3       kristaps 1101: .Pp
                   1102: will discard the
                   1103: .Sq \&.ig ,
                   1104: which may lead to interesting results, but
                   1105: .Pp
1.17      schwarze 1106: .D1 \&.if t .if t \e{\e
1.3       kristaps 1107: .Pp
                   1108: will continue to syntactically interpret to the block close of the final
                   1109: conditional.
                   1110: Sub-conditionals, in this case, obviously inherit the truth value of
                   1111: the parent.
1.1       kristaps 1112: .Pp
1.79      schwarze 1113: If the
                   1114: .Ar body
                   1115: section is begun by an escaped brace
1.1       kristaps 1116: .Sq \e{ ,
1.48      schwarze 1117: scope continues until the end of the input line containing the
                   1118: matching closing-brace escape sequence
                   1119: .Sq \e} .
1.79      schwarze 1120: If the
                   1121: .Ar body
                   1122: is not enclosed in braces, scope continues until the end of the line.
                   1123: If the
                   1124: .Ar condition
                   1125: is followed by a
                   1126: .Ar body
                   1127: on the same line, whether after a brace or not, then requests and macros
1.1       kristaps 1128: .Em must
                   1129: begin with a control character.
                   1130: It is generally more intuitive, in this case, to write
1.79      schwarze 1131: .Bd -unfilled -offset indent
                   1132: .Pf . Ic \&if Ar condition No \e{\e
                   1133: .Pf . Ar request
                   1134: .Pf . No \e}
1.1       kristaps 1135: .Ed
                   1136: .Pp
1.17      schwarze 1137: than having the request or macro follow as
1.1       kristaps 1138: .Pp
1.79      schwarze 1139: .D1 Pf . Ic \&if Ar condition Pf \e{. Ar request
1.1       kristaps 1140: .Pp
                   1141: The scope of a conditional is always parsed, but only executed if the
                   1142: conditional evaluates to true.
                   1143: .Pp
1.29      kristaps 1144: Note that the
1.1       kristaps 1145: .Sq \e}
1.29      kristaps 1146: is converted into a zero-width escape sequence if not passed as a
                   1147: standalone macro
                   1148: .Sq \&.\e} .
                   1149: For example,
                   1150: .Pp
                   1151: .D1 \&.Fl a \e} b
                   1152: .Pp
                   1153: will result in
1.8       kristaps 1154: .Sq \e}
1.29      kristaps 1155: being considered an argument of the
                   1156: .Sq \&Fl
                   1157: macro.
1.79      schwarze 1158: .It Ic \&ig Op Ar endmacro
1.2       kristaps 1159: Ignore input.
1.15      kristaps 1160: Its syntax can be either
                   1161: .Bd -literal -offset indent
                   1162: .Pf . Cm \&ig
                   1163: .Ar ignored text
1.2       kristaps 1164: \&..
                   1165: .Ed
1.15      kristaps 1166: .Pp
                   1167: or
                   1168: .Bd -literal -offset indent
1.79      schwarze 1169: .Pf . Cm \&ig Ar endmacro
1.15      kristaps 1170: .Ar ignored text
1.79      schwarze 1171: .Pf . Ar endmacro
1.2       kristaps 1172: .Ed
                   1173: .Pp
                   1174: In the first case, input is ignored until a
                   1175: .Sq \&..
1.17      schwarze 1176: request is encountered on its own line.
1.15      kristaps 1177: In the second case, input is ignored until the specified
1.79      schwarze 1178: .Sq Pf . Ar endmacro
                   1179: is encountered.
1.15      kristaps 1180: Do not use the escape character
1.2       kristaps 1181: .Sq \e
1.15      kristaps 1182: anywhere in the definition of
1.79      schwarze 1183: .Ar endmacro ;
1.15      kristaps 1184: it would cause very strange behaviour.
                   1185: .Pp
                   1186: When the
1.79      schwarze 1187: .Ar endmacro
                   1188: is a roff request or a roff macro, like in
1.2       kristaps 1189: .Pp
                   1190: .D1 \&.ig if
                   1191: .Pp
                   1192: the subsequent invocation of
1.79      schwarze 1193: .Ic \&if
1.15      kristaps 1194: will first terminate the
                   1195: .Ar ignored text ,
                   1196: then be invoked as usual.
                   1197: Otherwise, it only terminates the
                   1198: .Ar ignored text ,
                   1199: and arguments following it or the
                   1200: .Sq \&..
1.17      schwarze 1201: request are discarded.
1.79      schwarze 1202: .It Ic \&in Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1.63      schwarze 1203: Change indentation.
                   1204: See
                   1205: .Xr man 7 .
                   1206: Ignored in
                   1207: .Xr mdoc 7 .
1.79      schwarze 1208: .It Ic \&index Ar register stringname substring
1.63      schwarze 1209: Find a substring in a string.
                   1210: This is a Heirloom extension and currently unsupported.
1.79      schwarze 1211: .It Ic \&it Ar expression macro
1.63      schwarze 1212: Set an input line trap.
                   1213: The named
                   1214: .Ar macro
1.70      schwarze 1215: will be invoked after processing the number of input text lines
                   1216: specified by the numerical
                   1217: .Ar expression .
                   1218: While evaluating the
                   1219: .Ar expression ,
                   1220: the unit suffixes described below
                   1221: .Sx Scaling Widths
                   1222: are ignored.
1.79      schwarze 1223: .It Ic \&it Ar expression macro
1.63      schwarze 1224: Set an input line trap, not counting lines ending with \ec.
                   1225: Currently unsupported.
1.79      schwarze 1226: .It Ic \&IX Ar class keystring
1.63      schwarze 1227: To support the generation of a table of contents,
                   1228: .Xr pod2man 1
                   1229: emits this user-defined macro, usually without defining it.
                   1230: To avoid reporting large numbers of spurious errors,
                   1231: .Xr mandoc 1
                   1232: ignores it.
1.79      schwarze 1233: .It Ic \&kern Op Cm 1 | 0
1.63      schwarze 1234: Switch kerning on or off.
                   1235: Currently ignored.
1.79      schwarze 1236: .It Ic \&kernafter Ar font char ... afmunits ...
1.63      schwarze 1237: Increase kerning after some characters.
                   1238: This is a Heirloom extension and currently ignored.
1.79      schwarze 1239: .It Ic \&kernbefore Ar font char ... afmunits ...
1.63      schwarze 1240: Increase kerning before some characters.
                   1241: This is a Heirloom extension and currently ignored.
1.79      schwarze 1242: .It Ic \&kernpair Ar font char ... font char ... afmunits
1.63      schwarze 1243: Add a kerning pair to the kerning table.
                   1244: This is a Heirloom extension and currently ignored.
1.79      schwarze 1245: .It Ic \&lc Op Ar glyph
1.63      schwarze 1246: Define a leader repetition character.
                   1247: Currently unsupported.
1.79      schwarze 1248: .It Ic \&lc_ctype Ar localename
1.63      schwarze 1249: Set the
                   1250: .Dv LC_CTYPE
                   1251: locale.
                   1252: This is a Heirloom extension and currently unsupported.
1.79      schwarze 1253: .It Ic \&lds Ar macroname string
1.63      schwarze 1254: Define a local string.
                   1255: This is a Heirloom extension and currently unsupported.
1.79      schwarze 1256: .It Ic \&length Ar register string
                   1257: Count the number of input characters in a string.
1.63      schwarze 1258: Currently unsupported.
1.79      schwarze 1259: .It Ic \&letadj Ar lspmin lshmin letss lspmax lshmax
1.63      schwarze 1260: Dynamic letter spacing and reshaping.
                   1261: This is a Heirloom extension and currently ignored.
1.79      schwarze 1262: .It Ic \&lf Ar lineno Op Ar filename
1.63      schwarze 1263: Change the line number for error messages.
                   1264: Ignored because insecure.
1.79      schwarze 1265: .It Ic \&lg Op Cm 1 | 0
1.63      schwarze 1266: Switch the ligature mechanism on or off.
                   1267: Currently ignored.
1.79      schwarze 1268: .It Ic \&lhang Ar font char ... afmunits
1.63      schwarze 1269: Hang characters at left margin.
                   1270: This is a Heirloom extension and currently ignored.
1.79      schwarze 1271: .It Ic \&linetabs Op Cm 1 | 0
1.63      schwarze 1272: Enable or disable line-tabs mode.
                   1273: This is a groff extension and currently unsupported.
1.79      schwarze 1274: .It Ic \&ll Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1.50      schwarze 1275: Change the output line length.
                   1276: If the
                   1277: .Ar width
                   1278: argument is omitted, the line length is reset to its previous value.
                   1279: The default setting for terminal output is 78n.
1.51      schwarze 1280: If a sign is given, the line length is added to or subtracted from;
                   1281: otherwise, it is set to the provided value.
1.50      schwarze 1282: Using this request in new manuals is discouraged for several reasons,
                   1283: among others because it overrides the
                   1284: .Xr mandoc 1
                   1285: .Fl O Cm width
                   1286: command line option.
1.79      schwarze 1287: .It Ic \&lnr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1.63      schwarze 1288: Set local number register.
                   1289: This is a Heirloom extension and currently unsupported.
1.79      schwarze 1290: .It Ic \&lnrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1.63      schwarze 1291: Set local floating-point register.
                   1292: This is a Heirloom extension and currently unsupported.
1.79      schwarze 1293: .It Ic \&lpfx Ar string
1.63      schwarze 1294: Set a line prefix.
                   1295: This is a Heirloom extension and currently unsupported.
1.79      schwarze 1296: .It Ic \&ls Op Ar factor
1.63      schwarze 1297: Set line spacing.
                   1298: It takes one integer argument specifying the vertical distance of
                   1299: subsequent output text lines measured in v units.
                   1300: Currently ignored.
1.79      schwarze 1301: .It Ic \&lsm Ar macroname
1.63      schwarze 1302: Set a leading spaces trap.
                   1303: This is a groff extension and currently unsupported.
1.79      schwarze 1304: .It Ic \&lt Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1.63      schwarze 1305: Set title line length.
                   1306: Currently ignored.
1.79      schwarze 1307: .It Ic \&mc Ar glyph Op Ar dist
1.63      schwarze 1308: Print margin character in the right margin.
1.84      schwarze 1309: The
                   1310: .Ar dist
                   1311: is currently ignored; instead, 1n is used.
1.79      schwarze 1312: .It Ic \&mediasize Ar media
1.63      schwarze 1313: Set the device media size.
                   1314: This is a Heirloom extension and currently ignored.
1.79      schwarze 1315: .It Ic \&minss Ar width
1.63      schwarze 1316: Set minimum word space.
                   1317: This is a Heirloom extension and currently ignored.
1.79      schwarze 1318: .It Ic \&mk Op Ar register
1.63      schwarze 1319: Mark vertical position.
                   1320: Currently ignored.
1.79      schwarze 1321: .It Ic \&mso Ar filename
                   1322: Load a macro file using the search path.
1.63      schwarze 1323: Ignored because insecure.
1.79      schwarze 1324: .It Ic \&na
1.63      schwarze 1325: Disable adjusting without changing the adjustment mode.
                   1326: Currently ignored.
1.79      schwarze 1327: .It Ic \&ne Op Ar height
1.15      kristaps 1328: Declare the need for the specified minimum vertical space
                   1329: before the next trap or the bottom of the page.
1.63      schwarze 1330: Currently ignored.
1.79      schwarze 1331: .It Ic \&nf
1.63      schwarze 1332: Switch to no-fill mode.
                   1333: See
                   1334: .Xr man 7 .
                   1335: Ignored by
1.64      schwarze 1336: .Xr mdoc 7 .
1.79      schwarze 1337: .It Ic \&nh
1.15      kristaps 1338: Turn off automatic hyphenation mode.
1.63      schwarze 1339: Currently ignored.
1.79      schwarze 1340: .It Ic \&nhychar Ar char ...
1.63      schwarze 1341: Define hyphenation-inhibiting characters.
                   1342: This is a Heirloom extension and currently ignored.
1.79      schwarze 1343: .It Ic \&nm Op Ar start Op Ar inc Op Ar space Op Ar indent
1.63      schwarze 1344: Print line numbers.
                   1345: Currently unsupported.
1.79      schwarze 1346: .It Ic \&nn Op Ar number
1.63      schwarze 1347: Temporarily turn off line numbering.
                   1348: Currently unsupported.
1.79      schwarze 1349: .It Ic \&nop Ar body
1.75      schwarze 1350: Execute the rest of the input line as a request or macro line.
1.63      schwarze 1351: Currently unsupported.
1.79      schwarze 1352: .It Ic \&nr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression
1.45      schwarze 1353: Define or change a register.
1.10      kristaps 1354: A register is an arbitrary string value that defines some sort of state,
                   1355: which influences parsing and/or formatting.
1.53      schwarze 1356: For the syntax of
                   1357: .Ar expression ,
                   1358: see
                   1359: .Sx Numerical expressions
                   1360: below.
1.46      schwarze 1361: If it is prefixed by a sign, the register will be
1.45      schwarze 1362: incremented or decremented instead of assigned to.
                   1363: .Pp
1.79      schwarze 1364: The following
                   1365: .Ar register
1.45      schwarze 1366: is handled specially:
1.10      kristaps 1367: .Bl -tag -width Ds
                   1368: .It Cm nS
                   1369: If set to a positive integer value, certain
                   1370: .Xr mdoc 7
1.17      schwarze 1371: macros will behave in the same way as in the
1.10      kristaps 1372: .Em SYNOPSIS
1.11      kristaps 1373: section.
1.17      schwarze 1374: If set to 0, these macros will behave in the same way as outside the
                   1375: .Em SYNOPSIS
                   1376: section, even when called within the
1.10      kristaps 1377: .Em SYNOPSIS
1.17      schwarze 1378: section itself.
                   1379: Note that starting a new
1.11      kristaps 1380: .Xr mdoc 7
1.17      schwarze 1381: section with the
1.79      schwarze 1382: .Ic \&Sh
1.17      schwarze 1383: macro will reset this register.
1.10      kristaps 1384: .El
1.79      schwarze 1385: .It Xo
                   1386: .Ic \&nrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression
                   1387: .Op Ar increment
                   1388: .Xc
1.63      schwarze 1389: Define or change a floating-point register.
                   1390: This is a Heirloom extension and currently unsupported.
1.79      schwarze 1391: .It Ic \&nroff
1.63      schwarze 1392: Force nroff mode.
                   1393: This is a groff extension and currently ignored.
1.79      schwarze 1394: .It Ic \&ns
1.26      schwarze 1395: Turn on no-space mode.
1.63      schwarze 1396: Currently ignored.
1.79      schwarze 1397: .It Ic \&nx Op Ar filename
1.63      schwarze 1398: Abort processing of the current input file and process another one.
                   1399: Ignored because insecure.
1.79      schwarze 1400: .It Ic \&open Ar stream file
1.63      schwarze 1401: Open a file for writing.
                   1402: Ignored because insecure.
1.79      schwarze 1403: .It Ic \&opena Ar stream file
1.63      schwarze 1404: Open a file for appending.
                   1405: Ignored because insecure.
1.79      schwarze 1406: .It Ic \&os
1.63      schwarze 1407: Output saved vertical space.
                   1408: Currently ignored.
1.79      schwarze 1409: .It Ic \&output Ar string
1.63      schwarze 1410: Output directly to intermediate output.
                   1411: Not supported.
1.79      schwarze 1412: .It Ic \&padj Op Cm 1 | 0
1.63      schwarze 1413: Globally control paragraph-at-once adjustment.
                   1414: This is a Heirloom extension and currently ignored.
1.79      schwarze 1415: .It Ic \&papersize Ar media
1.63      schwarze 1416: Set the paper size.
                   1417: This is a Heirloom extension and currently ignored.
1.79      schwarze 1418: .It Ic \&pc Op Ar char
1.63      schwarze 1419: Change the page number character.
                   1420: Currently ignored.
1.79      schwarze 1421: .It Ic \&pev
1.63      schwarze 1422: Print environments.
                   1423: This is a groff extension and currently ignored.
1.79      schwarze 1424: .It Ic \&pi Ar command
1.63      schwarze 1425: Pipe output to a shell command.
                   1426: Ignored because insecure.
1.79      schwarze 1427: .It Ic \&PI
1.63      schwarze 1428: Low-level request used by
1.79      schwarze 1429: .Ic \&BP .
1.63      schwarze 1430: This is a Heirloom extension and currently unsupported.
1.79      schwarze 1431: .It Ic \&pl Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1.58      schwarze 1432: Change page length.
1.63      schwarze 1433: Currently ignored.
1.79      schwarze 1434: .It Ic \&pm
                   1435: Print names and sizes of macros, strings, and diversions
                   1436: to standard error output.
1.63      schwarze 1437: Currently ignored.
1.79      schwarze 1438: .It Ic \&pn Oo Cm + Ns | Ns Cm - Oc Ns Ar number
                   1439: Change the page number of the next page.
1.63      schwarze 1440: Currently ignored.
1.79      schwarze 1441: .It Ic \&pnr
                   1442: Print all number registers on standard error output.
1.63      schwarze 1443: Currently ignored.
1.79      schwarze 1444: .It Ic \&po Op Oo Cm + Ns | Ns Cm - Oc Ns Ar offset
1.63      schwarze 1445: Set horizontal page offset.
                   1446: Currently ignored.
1.79      schwarze 1447: .It Ic \&ps Op Oo Cm + Ns | Ns Cm - Oc Ns size
1.26      schwarze 1448: Change point size.
1.63      schwarze 1449: Currently ignored.
1.79      schwarze 1450: .It Ic \&psbb Ar filename
1.63      schwarze 1451: Retrieve the bounding box of a PostScript file.
                   1452: Currently unsupported.
1.79      schwarze 1453: .It Ic \&pshape Ar indent length ...
1.63      schwarze 1454: Set a special shape for the current paragraph.
1.68      schwarze 1455: This is a Heirloom extension and currently unsupported.
1.79      schwarze 1456: .It Ic \&pso Ar command
1.63      schwarze 1457: Include output of a shell command.
                   1458: Ignored because insecure.
1.79      schwarze 1459: .It Ic \&ptr
                   1460: Print the names and positions of all traps on standard error output.
1.63      schwarze 1461: This is a groff extension and currently ignored.
1.79      schwarze 1462: .It Ic \&pvs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1.63      schwarze 1463: Change post-vertical spacing.
                   1464: This is a groff extension and currently ignored.
1.79      schwarze 1465: .It Ic \&rchar Ar glyph ...
1.63      schwarze 1466: Remove glyph definitions.
                   1467: Currently unsupported.
1.79      schwarze 1468: .It Ic \&rd Op Ar prompt Op Ar agument ...
1.63      schwarze 1469: Read from standard input.
                   1470: Currently ignored.
1.79      schwarze 1471: .It Ic \&recursionlimit Ar maxrec maxtail
1.63      schwarze 1472: Set the maximum stack depth for recursive macros.
                   1473: This is a Heirloom extension and currently ignored.
1.79      schwarze 1474: .It Ic \&return Op Ar twice
1.63      schwarze 1475: Exit a macro and return to the caller.
                   1476: Currently unsupported.
1.79      schwarze 1477: .It Ic \&rfschar Ar font glyph ...
1.63      schwarze 1478: Remove font-specific fallback glyph definitions.
                   1479: Currently unsupported.
1.79      schwarze 1480: .It Ic \&rhang Ar font char ... afmunits
1.63      schwarze 1481: Hang characters at right margin.
                   1482: This is a Heirloom extension and currently ignored.
1.79      schwarze 1483: .It Ic \&rj Op Ar N
                   1484: Justify the next
                   1485: .Ar N
                   1486: input lines to the right margin without filling.
1.89      schwarze 1487: .Ar N
                   1488: defaults to 1.
                   1489: An argument of 0 or less ends right adjustment.
1.79      schwarze 1490: .It Ic \&rm Ar macroname
1.52      schwarze 1491: Remove a request, macro or string.
1.79      schwarze 1492: .It Ic \&rn Ar oldname newname
1.63      schwarze 1493: Rename a request, macro, diversion, or string.
1.86      schwarze 1494: In
                   1495: .Xr mandoc 1 ,
                   1496: user-defined macros,
                   1497: .Xr mdoc 7
                   1498: and
                   1499: .Xr man 7
                   1500: macros, and user-defined strings can be renamed, but renaming of
                   1501: predefined strings and of
                   1502: .Nm
                   1503: requests is not supported, and diversions are not implemented at all.
1.79      schwarze 1504: .It Ic \&rnn Ar oldname newname
1.63      schwarze 1505: Rename a number register.
                   1506: Currently unsupported.
1.79      schwarze 1507: .It Ic \&rr Ar register
1.52      schwarze 1508: Remove a register.
1.79      schwarze 1509: .It Ic \&rs
1.63      schwarze 1510: End no-space mode.
                   1511: Currently ignored.
1.79      schwarze 1512: .It Ic \&rt Op Ar dist
1.63      schwarze 1513: Return to marked vertical position.
                   1514: Currently ignored.
1.79      schwarze 1515: .It Ic \&schar Ar glyph Op Ar string
1.63      schwarze 1516: Define global fallback glyph.
                   1517: This is a groff extension and currently unsupported.
1.79      schwarze 1518: .It Ic \&sentchar Ar char ...
1.63      schwarze 1519: Define sentence-ending characters.
                   1520: This is a Heirloom extension and currently ignored.
1.79      schwarze 1521: .It Ic \&shc Op Ar glyph
1.63      schwarze 1522: Change the soft hyphen character.
                   1523: Currently ignored.
1.79      schwarze 1524: .It Ic \&shift Op Ar number
1.63      schwarze 1525: Shift macro arguments.
                   1526: Currently unsupported.
1.79      schwarze 1527: .It Ic \&sizes Ar size ...
1.63      schwarze 1528: Define permissible point sizes.
                   1529: This is a groff extension and currently ignored.
1.79      schwarze 1530: .It Ic \&so Ar filename
1.15      kristaps 1531: Include a source file.
1.79      schwarze 1532: The file is read and its contents processed as input in place of the
                   1533: .Ic \&so
1.15      kristaps 1534: request line.
1.28      kristaps 1535: To avoid inadvertent inclusion of unrelated files,
1.15      kristaps 1536: .Xr mandoc 1
                   1537: only accepts relative paths not containing the strings
                   1538: .Qq ../
                   1539: and
                   1540: .Qq /.. .
1.37      schwarze 1541: .Pp
                   1542: This request requires
                   1543: .Xr man 1
                   1544: to change to the right directory before calling
                   1545: .Xr mandoc 1 ,
                   1546: per convention to the root of the manual tree.
                   1547: Typical usage looks like:
                   1548: .Pp
                   1549: .Dl \&.so man3/Xcursor.3
                   1550: .Pp
                   1551: As the whole concept is rather fragile, the use of
1.79      schwarze 1552: .Ic \&so
1.37      schwarze 1553: is discouraged.
                   1554: Use
                   1555: .Xr ln 1
                   1556: instead.
1.79      schwarze 1557: .It Ic \&sp Op Ar height
1.78      schwarze 1558: Break the output line and emit vertical space.
                   1559: The argument follows the syntax of
                   1560: .Sx Scaling Widths
                   1561: and defaults to one blank line
                   1562: .Pq Li 1v .
1.79      schwarze 1563: .It Ic \&spacewidth Op Cm 1 | 0
1.63      schwarze 1564: Set the space width from the font metrics file.
                   1565: This is a Heirloom extension and currently ignored.
1.79      schwarze 1566: .It Ic \&special Op Ar font ...
1.63      schwarze 1567: Define a special font.
                   1568: This is a groff extension and currently ignored.
1.79      schwarze 1569: .It Ic \&spreadwarn Op Ar width
1.63      schwarze 1570: Warn about wide spacing between words.
                   1571: Currently ignored.
1.79      schwarze 1572: .It Ic \&ss Ar wordspace Op Ar sentencespace
1.63      schwarze 1573: Set space character size.
                   1574: Currently ignored.
1.79      schwarze 1575: .It Ic \&sty Ar position style
1.63      schwarze 1576: Associate style with a font position.
                   1577: This is a groff extension and currently ignored.
1.79      schwarze 1578: .It Ic \&substring Ar stringname startpos Op Ar endpos
1.63      schwarze 1579: Replace a user-defined string with a substring.
                   1580: Currently unsupported.
1.79      schwarze 1581: .It Ic \&sv Op Ar height
1.63      schwarze 1582: Save vertical space.
                   1583: Currently ignored.
1.79      schwarze 1584: .It Ic \&sy Ar command
1.63      schwarze 1585: Execute shell command.
                   1586: Ignored because insecure.
1.79      schwarze 1587: .It Ic \&T&
1.63      schwarze 1588: Re-start a table layout, retaining the options of the prior table
                   1589: invocation.
                   1590: See
                   1591: .Sx \&TS .
1.79      schwarze 1592: .It Ic \&ta Op Ar width ... Op Cm T Ar width ...
1.26      schwarze 1593: Set tab stops.
1.79      schwarze 1594: Each
                   1595: .Ar width
                   1596: argument follows the syntax of
                   1597: .Sx Scaling Widths .
                   1598: If prefixed by a plus sign, it is relative to the previous tab stop.
                   1599: The arguments after the
                   1600: .Cm T
                   1601: marker are used repeatedly as often as needed; for each reuse,
                   1602: they are taken relative to the last previously established tab stop.
                   1603: When
                   1604: .Ic \&ta
                   1605: is called without arguments, all tab stops are cleared.
                   1606: .It Ic \&tc Op Ar glyph
1.75      schwarze 1607: Change tab repetition character.
1.63      schwarze 1608: Currently unsupported.
1.79      schwarze 1609: .It Ic \&TE
1.63      schwarze 1610: End a table context.
                   1611: See
                   1612: .Sx \&TS .
1.80      schwarze 1613: .It Ic \&ti Oo Cm + Ns | Ns Cm - Oc Ns Ar width
                   1614: Break the output line and indent the next output line by
                   1615: .Ar width .
                   1616: If a sign is specified, the temporary indentation is calculated
                   1617: relative to the current indentation; otherwise, it is absolute.
                   1618: The argument follows the syntax of
                   1619: .Sx Scaling Widths
                   1620: and the default scaling unit is
                   1621: .Cm m .
1.79      schwarze 1622: .It Ic \&tkf Ar font minps width1 maxps width2
1.63      schwarze 1623: Enable track kerning for a font.
                   1624: Currently ignored.
1.79      schwarze 1625: .It Ic \&tl No \& Ap Ar left Ap Ar center Ap Ar right Ap
1.63      schwarze 1626: Print a title line.
                   1627: Currently unsupported.
1.79      schwarze 1628: .It Ic \&tm Ar string
1.63      schwarze 1629: Print to standard error output.
                   1630: Currently ignored.
1.79      schwarze 1631: .It Ic \&tm1 Ar string
1.63      schwarze 1632: Print to standard error output, allowing leading blanks.
                   1633: This is a groff extension and currently ignored.
1.79      schwarze 1634: .It Ic \&tmc Ar string
1.63      schwarze 1635: Print to standard error output without a trailing newline.
                   1636: This is a groff extension and currently ignored.
1.79      schwarze 1637: .It Ic \&tr Ar glyph glyph ...
1.6       schwarze 1638: Output character translation.
1.79      schwarze 1639: The first glyph in each pair is replaced by the second one.
                   1640: Character escapes can be used; for example,
1.30      kristaps 1641: .Pp
                   1642: .Dl tr \e(xx\e(yy
                   1643: .Pp
                   1644: replaces all invocations of \e(xx with \e(yy.
1.79      schwarze 1645: .It Ic \&track Ar font minps width1 maxps width2
1.63      schwarze 1646: Static letter space tracking.
                   1647: This is a Heirloom extension and currently ignored.
1.79      schwarze 1648: .It Ic \&transchar Ar char ...
1.63      schwarze 1649: Define transparent characters for sentence-ending.
                   1650: This is a Heirloom extension and currently ignored.
1.79      schwarze 1651: .It Ic \&trf Ar filename
1.63      schwarze 1652: Output the contents of a file, disallowing invalid characters.
                   1653: This is a groff extension and ignored because insecure.
1.79      schwarze 1654: .It Ic \&trimat Ar left top width height
1.63      schwarze 1655: Set the TrimBox page parameter for PDF generation.
                   1656: This is a Heirloom extension and currently ignored.
1.79      schwarze 1657: .It Ic \&trin Ar glyph glyph ...
1.63      schwarze 1658: Output character translation, ignored by
1.79      schwarze 1659: .Ic \&asciify .
1.63      schwarze 1660: Currently unsupported.
1.79      schwarze 1661: .It Ic \&trnt Ar glyph glyph ...
1.63      schwarze 1662: Output character translation, ignored by \e!.
                   1663: Currently unsupported.
1.79      schwarze 1664: .It Ic \&troff
1.63      schwarze 1665: Force troff mode.
                   1666: This is a groff extension and currently ignored.
1.79      schwarze 1667: .It Ic \&TS
1.20      kristaps 1668: Begin a table, which formats input in aligned rows and columns.
1.23      kristaps 1669: See
                   1670: .Xr tbl 7
                   1671: for a description of the tbl language.
1.79      schwarze 1672: .It Ic \&uf Ar font
1.63      schwarze 1673: Globally set the underline font.
                   1674: Currently ignored.
1.79      schwarze 1675: .It Ic \&ul Op Ar N
                   1676: Underline next
                   1677: .Ar N
                   1678: input lines.
1.63      schwarze 1679: Currently ignored.
1.79      schwarze 1680: .It Ic \&unformat Ar divname
1.63      schwarze 1681: Unformat spaces and tabs in a diversion.
                   1682: Currently unsupported.
1.79      schwarze 1683: .It Ic \&unwatch Ar macroname
1.63      schwarze 1684: Disable notification for string or macro.
                   1685: This is a Heirloom extension and currently ignored.
1.79      schwarze 1686: .It Ic \&unwatchn Ar register
1.63      schwarze 1687: Disable notification for register.
                   1688: This is a Heirloom extension and currently ignored.
1.79      schwarze 1689: .It Ic \&vpt Op Cm 1 | 0
1.63      schwarze 1690: Enable or disable vertical position traps.
                   1691: This is a groff extension and currently ignored.
1.79      schwarze 1692: .It Ic \&vs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1.63      schwarze 1693: Change vertical spacing.
                   1694: Currently ignored.
1.79      schwarze 1695: .It Ic \&warn Ar flags
1.63      schwarze 1696: Set warning level.
                   1697: Currently ignored.
1.79      schwarze 1698: .It Ic \&warnscale Ar si
1.63      schwarze 1699: Set the scaling indicator used in warnings.
                   1700: This is a groff extension and currently ignored.
1.79      schwarze 1701: .It Ic \&watch Ar macroname
1.63      schwarze 1702: Notify on change of string or macro.
                   1703: This is a Heirloom extension and currently ignored.
1.79      schwarze 1704: .It Ic \&watchlength Ar maxlength
1.63      schwarze 1705: On change, report the contents of macros and strings
1.75      schwarze 1706: up to the specified length.
1.63      schwarze 1707: This is a Heirloom extension and currently ignored.
1.79      schwarze 1708: .It Ic \&watchn Ar register
1.63      schwarze 1709: Notify on change of register.
                   1710: This is a Heirloom extension and currently ignored.
1.79      schwarze 1711: .It Ic \&wh Ar dist Op Ar macroname
1.63      schwarze 1712: Set a page location trap.
                   1713: Currently unsupported.
1.79      schwarze 1714: .It Ic \&while Ar condition body
1.63      schwarze 1715: Repeated execution while a condition is true.
                   1716: Currently unsupported.
1.79      schwarze 1717: .It Ic \&write Oo \(dq Oc Ns Ar string
1.63      schwarze 1718: Write to an open file.
                   1719: Ignored because insecure.
1.79      schwarze 1720: .It Ic \&writec Oo \(dq Oc Ns Ar string
1.63      schwarze 1721: Write to an open file without appending a newline.
                   1722: Ignored because insecure.
1.79      schwarze 1723: .It Ic \&writem Ar macroname
1.63      schwarze 1724: Write macro or string to an open file.
                   1725: Ignored because insecure.
1.79      schwarze 1726: .It Ic \&xflag Ar level
1.63      schwarze 1727: Set the extension level.
                   1728: This is a Heirloom extension and currently ignored.
1.79      schwarze 1729: .El
1.53      schwarze 1730: .Ss Numerical expressions
                   1731: The
                   1732: .Sx \&nr ,
                   1733: .Sx \&if ,
                   1734: and
                   1735: .Sx \&ie
                   1736: requests accept integer numerical expressions as arguments.
                   1737: These are always evaluated using the C
                   1738: .Vt int
                   1739: type; integer overflow works the same way as in the C language.
                   1740: Numbers consist of an arbitrary number of digits
                   1741: .Sq 0
                   1742: to
                   1743: .Sq 9
                   1744: prefixed by an optional sign
                   1745: .Sq +
                   1746: or
                   1747: .Sq - .
1.67      schwarze 1748: Each number may be followed by one optional scaling unit described below
                   1749: .Sx Scaling Widths .
                   1750: The following equations hold:
                   1751: .Bd -literal -offset indent
                   1752: 1i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240
1.68      schwarze 1753: 254c = 100i = 24000u = 24000
1.67      schwarze 1754: 1f = 65536u = 65536
                   1755: .Ed
1.53      schwarze 1756: .Pp
                   1757: The following binary operators are implemented.
                   1758: Unless otherwise stated, they behave as in the C language:
                   1759: .Pp
                   1760: .Bl -tag -width 2n -compact
                   1761: .It Ic +
                   1762: addition
                   1763: .It Ic -
                   1764: subtraction
                   1765: .It Ic *
                   1766: multiplication
                   1767: .It Ic /
                   1768: division
                   1769: .It Ic %
                   1770: remainder of division
                   1771: .It Ic <
                   1772: less than
                   1773: .It Ic >
                   1774: greater than
                   1775: .It Ic ==
                   1776: equal to
                   1777: .It Ic =
                   1778: equal to, same effect as
                   1779: .Ic ==
                   1780: (this differs from C)
                   1781: .It Ic <=
                   1782: less than or equal to
                   1783: .It Ic >=
                   1784: greater than or equal to
                   1785: .It Ic <>
                   1786: not equal to (corresponds to C
                   1787: .Ic != ;
                   1788: this one is of limited portability, it is supported by Heirloom roff,
                   1789: but not by groff)
                   1790: .It Ic &
                   1791: logical and (corresponds to C
                   1792: .Ic && )
                   1793: .It Ic \&:
                   1794: logical or (corresponds to C
1.87      schwarze 1795: .Ic || )
1.53      schwarze 1796: .It Ic <?
                   1797: minimum (not available in C)
                   1798: .It Ic >?
                   1799: maximum (not available in C)
                   1800: .El
                   1801: .Pp
1.75      schwarze 1802: There is no concept of precedence; evaluation proceeds from left to right,
1.76      schwarze 1803: except when subexpressions are enclosed in parentheses.
1.53      schwarze 1804: Inside parentheses, whitespace is ignored.
1.46      schwarze 1805: .Sh ESCAPE SEQUENCE REFERENCE
                   1806: The
                   1807: .Xr mandoc 1
                   1808: .Nm
                   1809: parser recognises the following escape sequences.
                   1810: Note that the
                   1811: .Nm
                   1812: language defines more escape sequences not implemented in
                   1813: .Xr mandoc 1 .
                   1814: In
                   1815: .Xr mdoc 7
                   1816: and
                   1817: .Xr man 7
                   1818: documents, using escape sequences is discouraged except for those
                   1819: described in the
                   1820: .Sx LANGUAGE SYNTAX
                   1821: section above.
                   1822: .Pp
                   1823: A backslash followed by any character not listed here
                   1824: simply prints that character itself.
                   1825: .Ss \e<newline>
                   1826: A backslash at the end of an input line can be used to continue the
                   1827: logical input line on the next physical input line, joining the text
                   1828: on both lines together as if it were on a single input line.
                   1829: .Ss \e<space>
                   1830: The escape sequence backslash-space
                   1831: .Pq Sq \e\ \&
                   1832: is an unpaddable space-sized non-breaking space character; see
                   1833: .Sx Whitespace .
                   1834: .Ss \e\(dq
                   1835: The rest of the input line is treated as
                   1836: .Sx Comments .
                   1837: .Ss \e%
                   1838: Hyphenation allowed at this point of the word; ignored by
                   1839: .Xr mandoc 1 .
                   1840: .Ss \e&
                   1841: Non-printing zero-width character; see
                   1842: .Sx Whitespace .
                   1843: .Ss \e\(aq
                   1844: Acute accent special character; use
                   1845: .Sq \e(aa
                   1846: instead.
                   1847: .Ss \e( Ns Ar cc
                   1848: .Sx Special Characters
                   1849: with two-letter names, see
                   1850: .Xr mandoc_char 7 .
                   1851: .Ss \e*[ Ns Ar name ]
                   1852: Interpolate the string with the
                   1853: .Ar name ;
                   1854: see
                   1855: .Sx Predefined Strings
                   1856: and
                   1857: .Sx ds .
                   1858: For short names, there are variants
                   1859: .No \e* Ns Ar c
                   1860: and
                   1861: .No \e*( Ns Ar cc .
1.74      schwarze 1862: .Ss \e,
                   1863: Left italic correction (groff extension); ignored by
                   1864: .Xr mandoc 1 .
1.46      schwarze 1865: .Ss \e-
                   1866: Special character
                   1867: .Dq mathematical minus sign .
1.74      schwarze 1868: .Ss \e/
                   1869: Right italic correction (groff extension); ignored by
                   1870: .Xr mandoc 1 .
1.46      schwarze 1871: .Ss \e[ Ns Ar name ]
                   1872: .Sx Special Characters
                   1873: with names of arbitrary length, see
                   1874: .Xr mandoc_char 7 .
                   1875: .Ss \e^
                   1876: One-twelfth em half-narrow space character, effectively zero-width in
                   1877: .Xr mandoc 1 .
                   1878: .Ss \e`
                   1879: Grave accent special character; use
                   1880: .Sq \e(ga
                   1881: instead.
                   1882: .Ss \e{
                   1883: Begin conditional input; see
                   1884: .Sx if .
                   1885: .Ss \e\(ba
                   1886: One-sixth em narrow space character, effectively zero-width in
                   1887: .Xr mandoc 1 .
                   1888: .Ss \e}
                   1889: End conditional input; see
                   1890: .Sx if .
                   1891: .Ss \e~
                   1892: Paddable non-breaking space character.
                   1893: .Ss \e0
                   1894: Digit width space character.
                   1895: .Ss \eA\(aq Ns Ar string Ns \(aq
                   1896: Anchor definition; ignored by
                   1897: .Xr mandoc 1 .
                   1898: .Ss \eB\(aq Ns Ar string Ns \(aq
1.54      schwarze 1899: Interpolate
                   1900: .Sq 1
                   1901: if
1.46      schwarze 1902: .Ar string
1.54      schwarze 1903: conforms to the syntax of
                   1904: .Sx Numerical expressions
                   1905: explained above and
                   1906: .Sq 0
                   1907: otherwise.
1.46      schwarze 1908: .Ss \eb\(aq Ns Ar string Ns \(aq
                   1909: Bracket building function; ignored by
                   1910: .Xr mandoc 1 .
                   1911: .Ss \eC\(aq Ns Ar name Ns \(aq
                   1912: .Sx Special Characters
                   1913: with names of arbitrary length.
                   1914: .Ss \ec
1.60      schwarze 1915: When encountered at the end of an input text line,
                   1916: the next input text line is considered to continue that line,
                   1917: even if there are request or macro lines in between.
                   1918: No whitespace is inserted.
1.46      schwarze 1919: .Ss \eD\(aq Ns Ar string Ns \(aq
                   1920: Draw graphics function; ignored by
                   1921: .Xr mandoc 1 .
                   1922: .Ss \ed
                   1923: Move down by half a line; ignored by
                   1924: .Xr mandoc 1 .
                   1925: .Ss \ee
                   1926: Backslash special character.
                   1927: .Ss \eF[ Ns Ar name ]
                   1928: Switch font family (groff extension); ignored by
                   1929: .Xr mandoc 1 .
                   1930: For short names, there are variants
                   1931: .No \eF Ns Ar c
                   1932: and
                   1933: .No \eF( Ns Ar cc .
                   1934: .Ss \ef[ Ns Ar name ]
                   1935: Switch to the font
                   1936: .Ar name ,
                   1937: see
                   1938: .Sx Text Decoration .
                   1939: For short names, there are variants
                   1940: .No \ef Ns Ar c
                   1941: and
                   1942: .No \ef( Ns Ar cc .
                   1943: .Ss \eg[ Ns Ar name ]
                   1944: Interpolate the format of a number register; ignored by
                   1945: .Xr mandoc 1 .
                   1946: For short names, there are variants
                   1947: .No \eg Ns Ar c
                   1948: and
                   1949: .No \eg( Ns Ar cc .
                   1950: .Ss \eH\(aq Ns Oo +|- Oc Ns Ar number Ns \(aq
                   1951: Set the height of the current font; ignored by
                   1952: .Xr mandoc 1 .
1.81      schwarze 1953: .Ss \eh\(aq Ns Ar width Ns \(aq
                   1954: Horizontal motion relative to the current position.
                   1955: The default scaling unit is
                   1956: .Cm m .
1.46      schwarze 1957: .Ss \ek[ Ns Ar name ]
                   1958: Mark horizontal input place in register; ignored by
                   1959: .Xr mandoc 1 .
                   1960: For short names, there are variants
                   1961: .No \ek Ns Ar c
                   1962: and
                   1963: .No \ek( Ns Ar cc .
                   1964: .Ss \eL\(aq Ns Ar number Ns Oo Ar c Oc Ns \(aq
                   1965: Vertical line drawing function; ignored by
                   1966: .Xr mandoc 1 .
1.82      schwarze 1967: .Ss \el\(aq Ns Ar width Ns Oo Ar c Oc Ns \(aq
                   1968: Draw a horizontal line of
                   1969: .Ar width
                   1970: using the glyph
                   1971: .Ar c .
1.46      schwarze 1972: .Ss \eM[ Ns Ar name ]
                   1973: Set fill (background) color (groff extension); ignored by
                   1974: .Xr mandoc 1 .
                   1975: For short names, there are variants
                   1976: .No \eM Ns Ar c
                   1977: and
                   1978: .No \eM( Ns Ar cc .
                   1979: .Ss \em[ Ns Ar name ]
                   1980: Set glyph drawing color (groff extension); ignored by
                   1981: .Xr mandoc 1 .
                   1982: For short names, there are variants
                   1983: .No \em Ns Ar c
                   1984: and
                   1985: .No \em( Ns Ar cc .
                   1986: .Ss \eN\(aq Ns Ar number Ns \(aq
                   1987: Character
                   1988: .Ar number
                   1989: on the current font.
                   1990: .Ss \en[ Ns Ar name ]
                   1991: Interpolate the number register
                   1992: .Ar name .
                   1993: For short names, there are variants
                   1994: .No \en Ns Ar c
                   1995: and
                   1996: .No \en( Ns Ar cc .
                   1997: .Ss \eo\(aq Ns Ar string Ns \(aq
1.66      schwarze 1998: Overstrike, writing all the characters contained in the
1.65      schwarze 1999: .Ar string
                   2000: to the same output position.
                   2001: In terminal and HTML output modes,
                   2002: only the last one of the characters is visible.
1.88      schwarze 2003: .Ss \ep
                   2004: Break the output line at the end of the current word.
1.46      schwarze 2005: .Ss \eR\(aq Ns Ar name Oo +|- Oc Ns Ar number Ns \(aq
                   2006: Set number register; ignored by
                   2007: .Xr mandoc 1 .
                   2008: .Ss \eS\(aq Ns Ar number Ns \(aq
                   2009: Slant output; ignored by
                   2010: .Xr mandoc 1 .
                   2011: .Ss \es\(aq Ns Oo +|- Oc Ns Ar number Ns \(aq
                   2012: Change point size; ignored by
                   2013: .Xr mandoc 1 .
                   2014: Alternative forms
                   2015: .No \es Ns Oo +|- Oc Ns Ar n ,
                   2016: .No \es Ns Oo +|- Oc Ns \(aq Ns Ar number Ns \(aq ,
                   2017: .No \es Ns [ Oo +|- Oc Ns Ar number ] ,
                   2018: and
                   2019: .No \es Ns Oo +|- Oc Ns [ Ar number Ns ]
                   2020: are also parsed and ignored.
                   2021: .Ss \et
                   2022: Horizontal tab; ignored by
                   2023: .Xr mandoc 1 .
                   2024: .Ss \eu
                   2025: Move up by half a line; ignored by
                   2026: .Xr mandoc 1 .
                   2027: .Ss \eV[ Ns Ar name ]
                   2028: Interpolate an environment variable; ignored by
                   2029: .Xr mandoc 1 .
                   2030: For short names, there are variants
                   2031: .No \eV Ns Ar c
                   2032: and
                   2033: .No \eV( Ns Ar cc .
                   2034: .Ss \ev\(aq Ns Ar number Ns \(aq
                   2035: Vertical motion; ignored by
                   2036: .Xr mandoc 1 .
                   2037: .Ss \ew\(aq Ns Ar string Ns \(aq
                   2038: Interpolate the width of the
1.54      schwarze 2039: .Ar string .
                   2040: The
                   2041: .Xr mandoc 1
                   2042: implementation assumes that after expansion of user-defined strings, the
                   2043: .Ar string
                   2044: only contains normal characters, no escape sequences, and that each
                   2045: character has a width of 24 basic units.
1.46      schwarze 2046: .Ss \eX\(aq Ns Ar string Ns \(aq
                   2047: Output
                   2048: .Ar string
                   2049: as device control function; ignored in nroff mode and by
                   2050: .Xr mandoc 1 .
                   2051: .Ss \ex\(aq Ns Ar number Ns \(aq
                   2052: Extra line space function; ignored by
                   2053: .Xr mandoc 1 .
                   2054: .Ss \eY[ Ns Ar name ]
                   2055: Output a string as a device control function; ignored in nroff mode and by
                   2056: .Xr mandoc 1 .
                   2057: For short names, there are variants
                   2058: .No \eY Ns Ar c
                   2059: and
                   2060: .No \eY( Ns Ar cc .
                   2061: .Ss \eZ\(aq Ns Ar string Ns \(aq
                   2062: Print
                   2063: .Ar string
                   2064: with zero width and height; ignored by
                   2065: .Xr mandoc 1 .
                   2066: .Ss \ez
1.71      schwarze 2067: Output the next character without advancing the cursor position.
1.2       kristaps 2068: .Sh COMPATIBILITY
1.69      schwarze 2069: The
                   2070: .Xr mandoc 1
                   2071: implementation of the
1.17      schwarze 2072: .Nm
1.69      schwarze 2073: language is intentionally incomplete.
                   2074: Unimplemented features include:
1.2       kristaps 2075: .Pp
                   2076: .Bl -dash -compact
1.56      kristaps 2077: .It
1.69      schwarze 2078: For security reasons,
                   2079: .Xr mandoc 1
                   2080: never reads or writes external files except via
                   2081: .Sx \&so
                   2082: requests with safe relative paths.
                   2083: .It
                   2084: There is no automatic hyphenation, no adjustment to the right margin,
                   2085: and no centering; the output is always set flush-left.
                   2086: .It
                   2087: Support for setting tabulator positions
                   2088: and tabulator and leader characters is missing,
                   2089: and support for manually changing indentation is limited.
                   2090: .It
1.56      kristaps 2091: The
                   2092: .Sq u
                   2093: scaling unit is the default terminal unit.
1.69      schwarze 2094: In traditional troff systems, this unit changes depending on the
1.56      kristaps 2095: output media.
1.10      kristaps 2096: .It
1.69      schwarze 2097: Width measurements are implemented in a crude way
                   2098: and often yield wrong results.
                   2099: Explicit movement requests and escapes are ignored.
                   2100: .It
                   2101: There is no concept of output pages, no support for floats,
                   2102: graphics drawing, and picture inclusion;
                   2103: terminal output is always continuous.
                   2104: .It
                   2105: Requests regarding color, font families, and glyph manipulation
                   2106: are ignored.
                   2107: Font support is very limited.
                   2108: Kerning is not implemented, and no ligatures are produced.
1.27      kristaps 2109: .It
1.10      kristaps 2110: The
1.69      schwarze 2111: .Qq \(aq
                   2112: macro control character does not suppress output line breaks.
1.2       kristaps 2113: .It
1.69      schwarze 2114: Diversions are not implemented,
                   2115: and support for traps is very incomplete.
1.4       kristaps 2116: .It
1.69      schwarze 2117: While recursion is supported,
                   2118: .Sx \&while
                   2119: loops are not.
1.2       kristaps 2120: .El
1.69      schwarze 2121: .Pp
                   2122: The special semantics of the
                   2123: .Cm nS
                   2124: number register is an idiosyncracy of
                   2125: .Ox
                   2126: manuals and not supported by other
                   2127: .Xr mdoc 7
                   2128: implementations.
1.17      schwarze 2129: .Sh SEE ALSO
                   2130: .Xr mandoc 1 ,
1.27      kristaps 2131: .Xr eqn 7 ,
1.17      schwarze 2132: .Xr man 7 ,
                   2133: .Xr mandoc_char 7 ,
1.23      kristaps 2134: .Xr mdoc 7 ,
                   2135: .Xr tbl 7
1.17      schwarze 2136: .Rs
                   2137: .%A Joseph F. Ossanna
                   2138: .%A Brian W. Kernighan
                   2139: .%I AT&T Bell Laboratories
                   2140: .%T Troff User's Manual
                   2141: .%R Computing Science Technical Report
                   2142: .%N 54
                   2143: .%C Murray Hill, New Jersey
                   2144: .%D 1976 and 1992
                   2145: .%U http://www.kohala.com/start/troff/cstr54.ps
                   2146: .Re
                   2147: .Rs
                   2148: .%A Joseph F. Ossanna
                   2149: .%A Brian W. Kernighan
                   2150: .%A Gunnar Ritter
                   2151: .%T Heirloom Documentation Tools Nroff/Troff User's Manual
                   2152: .%D September 17, 2007
                   2153: .%U http://heirloom.sourceforge.net/doctools/troff.pdf
                   2154: .Re
                   2155: .Sh HISTORY
1.35      kristaps 2156: The RUNOFF typesetting system, whose input forms the basis for
1.17      schwarze 2157: .Nm ,
1.35      kristaps 2158: was written in MAD and FAP for the CTSS operating system by Jerome E.
                   2159: Saltzer in 1964.
                   2160: Doug McIlroy rewrote it in BCPL in 1969, renaming it
                   2161: .Nm .
                   2162: Dennis M. Ritchie rewrote McIlroy's
1.36      schwarze 2163: .Nm
                   2164: in PDP-11 assembly for
1.35      kristaps 2165: .At v1 ,
                   2166: Joseph F. Ossanna improved roff and renamed it nroff
                   2167: for
                   2168: .At v2 ,
                   2169: then ported nroff to C as troff, which Brian W. Kernighan released with
                   2170: .At v7 .
                   2171: In 1989, James Clarke re-implemented troff in C++, naming it groff.
1.1       kristaps 2172: .Sh AUTHORS
1.15      kristaps 2173: .An -nosplit
1.31      kristaps 2174: This
1.1       kristaps 2175: .Nm
                   2176: reference was written by
1.41      schwarze 2177: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
1.15      kristaps 2178: and
1.41      schwarze 2179: .An Ingo Schwarze Aq Mt schwarze@openbsd.org .

CVSweb