1ROFF(7)              BSD Miscellaneous Information Manual              ROFF(7)
2

NAME

4     roff — roff language reference for mandoc
5

DESCRIPTION

7     The roff language is a general purpose text formatting language.  Since
8     traditional implementations of the mdoc(7) and man(7) manual formatting
9     languages are based on it, many real-world manuals use small numbers of
10     roff requests and escape sequences intermixed with their mdoc(7) or
11     man(7) code.  To properly format such manuals, the mandoc(1) utility sup‐
12     ports a subset of roff requests and escapes.  Even though this manual
13     page lists all roff requests and escape sequences, it only contains par‐
14     tial information about requests not supported by mandoc(1) and about lan‐
15     guage features that do not matter for manual pages.  For complete roff
16     manuals, consult the SEE ALSO section.
17
18     Input lines beginning with the control character ‘.’ are parsed for
19     requests and macros.  Such lines are called “request lines” or “macro
20     lines”, respectively.  Requests change the processing state and manipu‐
21     late the formatting; some macros also define the document structure and
22     produce formatted output.  The single quote ("'") is accepted as an
23     alternative control character, treated by mandoc(1) just like ‘.’
24
25     Lines not beginning with control characters are called “text lines”.
26     They provide free-form text to be printed; the formatting of the text
27     depends on the respective processing context.
28

LANGUAGE SYNTAX

30     roff documents may contain only graphable 7-bit ASCII characters, the
31     space character, and, in certain circumstances, the tab character.  The
32     backslash character ‘\’ indicates the start of an escape sequence, used
33     for example for Comments and Special Characters.  For a complete listing
34     of escape sequences, consult the ESCAPE SEQUENCE REFERENCE below.
35
36   Comments
37     Text following an escaped double-quote ‘\"’, whether in a request, macro,
38     or text line, is ignored to the end of the line.  A request line begin‐
39     ning with a control character and comment escape ‘.\"’ is also ignored.
40     Furthermore, request lines with only a control character and optional
41     trailing whitespace are stripped from input.
42
43     Examples:
44           .\" This is a comment line.
45           .\" The next line is ignored:
46           .
47           .Sh EXAMPLES \" This is a comment, too.
48           example text \" And so is this.
49
50   Special Characters
51     Special characters are used to encode special glyphs and are rendered
52     differently across output media.  They may occur in request, macro, and
53     text lines.  Sequences begin with the escape character ‘\’ followed by
54     either an open-parenthesis ‘(’ for two-character sequences; an open-
55     bracket ‘[’ for n-character sequences (terminated at a close-bracket
56     ‘]’); or a single one character sequence.
57
58     Examples:
59           \(em    Two-letter em dash escape.
60           \e      One-letter backslash escape.
61
62     See mandoc_char(7) for a complete list.
63
64   Font Selection
65     In mdoc(7) and man(7) documents, fonts are usually selected with macros.
66     The \f escape sequence and the ft request can be used to manually change
67     the font, but this is not recommended in mdoc(7) documents.  Such manual
68     font changes are overridden by many subsequent macros.
69
70     The following fonts are supported:
71
72           B   Bold font.
73           BI  A font that is both bold and italic.
74           CB  Bold constant width font.  Same as B in terminal output.
75           CI  Italic constant width font.  Same as I in terminal output.
76           CR  Regular constant width font.  Same as R in terminal output.
77           CW  An alias for CR.
78           I   Italic font.
79           P   Return to the previous font.  If a macro caused a font change
80               since the last \f eascape sequence or ft request, this returns
81               to the font before the last font change in the macro rather
82               than to the font before the last manual font change.
83           R   Roman font.  This is the default font.
84           1   An alias for R.
85           2   An alias for I.
86           3   An alias for B.
87           4   An alias for BI.
88
89     Examples:
90           \fBbold\fR
91                   Write in bold, then switch to regular font mode.
92           \fIitalic\fP
93                   Write in italic, then return to previous font mode.
94           \f(BIbold italic\fP
95                   Write in bold italic, then return to previous font mode.
96
97   Whitespace
98     Whitespace consists of the space character.  In text lines, whitespace is
99     preserved within a line.  In request and macro lines, whitespace delimits
100     arguments and is discarded.
101
102     Unescaped trailing spaces are stripped from text line input unless in a
103     literal context.  In general, trailing whitespace on any input line is
104     discouraged for reasons of portability.  In the rare case that a space
105     character is needed at the end of an input line, it may be forced by
106     ‘\ \&’.
107
108     Literal space characters can be produced in the output using escape
109     sequences.  In macro lines, they can also be included in arguments using
110     quotation; see MACRO SYNTAX for details.
111
112     Blank text lines, which may include whitespace, are only permitted within
113     literal contexts.  If the first character of a text line is a space, that
114     line is printed with a leading newline.
115
116   Scaling Widths
117     Many requests and macros support scaled widths for their arguments.  The
118     syntax for a scaled width is ‘[+-]?[0-9]*.[0-9]*[:unit:]’, where a deci‐
119     mal must be preceded or followed by at least one digit.
120
121     The following scaling units are accepted:
122
123           c       centimetre
124           i       inch
125           P       pica (1/6 inch)
126           p       point (1/72 inch)
127           f       scale ‘u’ by 65536
128           v       default vertical span
129           m       width of rendered ‘m’ (em) character
130           n       width of rendered ‘n’ (en) character
131           u       default horizontal span for the terminal
132           M       mini-em (1/100 em)
133
134     Using anything other than ‘m’, ‘n’, or ‘v’ is necessarily non-portable
135     across output media.  See COMPATIBILITY.
136
137     If a scaling unit is not provided, the numerical value is interpreted
138     under the default rules of ‘v’ for vertical spaces and ‘u’ for horizontal
139     ones.
140
141     Examples:
142           .Bl -tag -width 2i
143             two-inch tagged list indentation in mdoc(7)
144           .HP 2i
145             two-inch tagged list indentation in man(7)
146           .sp 2v
147             two vertical spaces
148
149   Sentence Spacing
150     Each sentence should terminate at the end of an input line.  By doing
151     this, a formatter will be able to apply the proper amount of spacing
152     after the end of sentence (unescaped) period, exclamation mark, or ques‐
153     tion mark followed by zero or more non-sentence closing delimiters (‘)’,
154     ‘]’, ‘'’, ‘"’).
155
156     The proper spacing is also intelligently preserved if a sentence ends at
157     the boundary of a macro line.
158
159     Examples:
160           Do not end sentences mid-line like this.  Instead,
161           end a sentence like this.
162           A macro would end like this:
163           .Xr mandoc 1 .
164

REQUEST SYNTAX

166     A request or macro line consists of:
167
168     1.   the control character ‘.’ or ‘'’ at the beginning of the line,
169     2.   optionally an arbitrary amount of whitespace,
170     3.   the name of the request or the macro, which is one word of arbitrary
171          length, terminated by whitespace,
172     4.   and zero or more arguments delimited by whitespace.
173
174     Thus, the following request lines are all equivalent:
175
176           .ig end
177           .ig    end
178           .   ig end
179

MACRO SYNTAX

181     Macros are provided by the mdoc(7) and man(7) languages and can be
182     defined by the de request.  When called, they follow the same syntax as
183     requests, except that macro arguments may optionally be quoted by enclos‐
184     ing them in double quote characters (‘"’).  Quoted text, even if it con‐
185     tains whitespace or would cause a macro invocation when unquoted, is
186     always considered literal text.  Inside quoted text, pairs of double
187     quote characters (‘""’) resolve to single double quote characters.
188
189     To be recognised as the beginning of a quoted argument, the opening quote
190     character must be preceded by a space character.  A quoted argument
191     extends to the next double quote character that is not part of a pair, or
192     to the end of the input line, whichever comes earlier.  Leaving out the
193     terminating double quote character at the end of the line is discouraged.
194     For clarity, if more arguments follow on the same input line, it is rec‐
195     ommended to follow the terminating double quote character by a space
196     character; in case the next character after the terminating double quote
197     character is anything else, it is regarded as the beginning of the next,
198     unquoted argument.
199
200     Both in quoted and unquoted arguments, pairs of backslashes (‘\\’)
201     resolve to single backslashes.  In unquoted arguments, space characters
202     can alternatively be included by preceding them with a backslash (‘\ ’),
203     but quoting is usually better for clarity.
204
205     Examples:
206           .Fn strlen "const char *s"
207                   Group arguments "const char *s" into one function argument.
208                   If unspecified, "const", "char", and "*s" would be consid‐
209                   ered separate arguments.
210           .Op "Fl a"
211                   Consider "Fl a" as literal text instead of a flag macro.
212

REQUEST REFERENCE

214     The mandoc(1) roff parser recognises the following requests.  For
215     requests marked as "ignored" or "unsupported", any arguments are ignored,
216     and the number of arguments is not checked.
217
218     ab [message]
219             Abort processing.  Currently unsupported.
220
221     ad [b | c | l | n | r]
222             Set line adjustment mode for subsequent text.  Currently ignored.
223
224     af registername format
225             Assign an output format to a number register.  Currently ignored.
226
227     aln newname oldname
228             Create an alias for a number register.  Currently unsupported.
229
230     als newname oldname
231             Create an alias for a request, string, macro, or diversion.
232
233     am macroname [endmacro]
234             Append to a macro definition.  The syntax of this request is the
235             same as that of de.
236
237     am1 macroname [endmacro]
238             Append to a macro definition, switching roff compatibility mode
239             off during macro execution (groff extension).  The syntax of this
240             request is the same as that of de1.  Since mandoc(1) does not
241             implement roff compatibility mode at all, it handles this request
242             as an alias for am.
243
244     ami macrostring [endstring]
245             Append to a macro definition, specifying the macro name indi‐
246             rectly (groff extension).  The syntax of this request is the same
247             as that of dei.
248
249     ami1 macrostring [endstring]
250             Append to a macro definition, specifying the macro name indi‐
251             rectly and switching roff compatibility mode off during macro
252             execution (groff extension).  The syntax of this request is the
253             same as that of dei1.  Since mandoc(1) does not implement roff
254             compatibility mode at all, it handles this request as an alias
255             for ami.
256
257     as stringname [string]
258             Append to a user-defined string.  The syntax of this request is
259             the same as that of ds.  If a user-defined string with the speci‐
260             fied name does not yet exist, it is set to the empty string
261             before appending.
262
263     as1 stringname [string]
264             Append to a user-defined string, switching roff compatibility
265             mode off during macro execution (groff extension).  The syntax of
266             this request is the same as that of ds1.  Since mandoc(1) does
267             not implement roff compatibility mode at all, it handles this
268             request as an alias for as.
269
270     asciify divname
271             Fully unformat a diversion.  Currently unsupported.
272
273     backtrace
274             Print a backtrace of the input stack.  This is a groff extension
275             and currently ignored.
276
277     bd font [curfont] [offset]
278             Artificially embolden by repeated printing with small shifts.
279             Currently ignored.
280
281     bleedat left top width height
282             Set the BleedBox page parameter for PDF generation.  This is a
283             Heirloom extension and currently ignored.
284
285     blm macroname
286             Set a blank line trap.  Currently unsupported.
287
288     box divname
289             Begin a diversion without including a partially filled line.
290             Currently unsupported.
291
292     boxa divname
293             Add to a diversion without including a partially filled line.
294             Currently unsupported.
295
296     bp [+|-]pagenumber
297             Begin a new page.  Currently ignored.
298
299     BP source height width position offset flags label
300             Define a frame and place a picture in it.  This is a Heirloom
301             extension and currently unsupported.
302
303     br      Break the output line.
304
305     break   Break out of a while loop.  Currently unsupported.
306
307     breakchar char ...
308             Optional line break characters.  This is a Heirloom extension and
309             currently ignored.
310
311     brnl N  Break output line after the next N input lines.  This is a Heir‐
312             loom extension and currently ignored.
313
314     brp     Break and spread output line.  Currently, this is implemented as
315             an alias for br.
316
317     brpnl N
318             Break and spread output line after the next N input lines.  This
319             is a Heirloom extension and currently ignored.
320
321     c2 [char]
322             Change the no-break control character.  Currently unsupported.
323
324     cc [char]
325             Change the control character.  If char is not specified, the con‐
326             trol character is reset to ‘.’.  Trailing characters are ignored.
327
328     ce [N]  Center the next N input lines without filling.  N defaults to 1.
329             An argument of 0 or less ends centering.  Currently, high level
330             macros abort centering.
331
332     cf filename
333             Output the contents of a file.  Ignored because insecure.
334
335     cflags flags char ...
336             Set character flags.  This is a groff extension and currently
337             ignored.
338
339     ch macroname [dist]
340             Change a trap location.  Currently ignored.
341
342     char glyph [string]
343             Define or redefine the ASCII character or character escape
344             sequence glyph to be rendered as string, which can be empty.
345             Only partially supported in mandoc(1); may interact incorrectly
346             with tr.
347
348     chop stringname
349             Remove the last character from a macro, string, or diversion.
350             Currently unsupported.
351
352     class classname char ...
353             Define a character class.  This is a groff extension and cur‐
354             rently ignored.
355
356     close streamname
357             Close an open file.  Ignored because insecure.
358
359     CL color text
360             Print text in color.  This is a Heirloom extension and currently
361             unsupported.
362
363     color [1 | 0]
364             Activate or deactivate colors.  This is a groff extension and
365             currently ignored.
366
367     composite from to
368             Define a name component for composite glyph names.  This is a
369             groff extension and currently unsupported.
370
371     continue
372             Immediately start the next iteration of a while loop.  Currently
373             unsupported.
374
375     cp [1 | 0]
376             Switch roff compatibility mode on or off.  Currently ignored.
377
378     cropat left top width height
379             Set the CropBox page parameter for PDF generation.  This is a
380             Heirloom extension and currently ignored.
381
382     cs font [width [emsize]]
383             Constant character spacing mode.  Currently ignored.
384
385     cu [N]  Underline next N input lines including whitespace.  Currently
386             ignored.
387
388     da divname
389             Append to a diversion.  Currently unsupported.
390
391     dch macroname [dist]
392             Change a trap location in the current diversion.  This is a Heir‐
393             loom extension and currently unsupported.
394
395     de macroname [endmacro]
396             Define a roff macro.  Its syntax can be either
397
398                   .de macroname
399                   definition
400                   ..
401
402             or
403
404                   .de macroname endmacro
405                   definition
406                   .endmacro
407
408             Both forms define or redefine the macro macroname to represent
409             the definition, which may consist of one or more input lines,
410             including the newline characters terminating each line, option‐
411             ally containing calls to roff requests, roff macros or high-level
412             macros like man(7) or mdoc(7) macros, whichever applies to the
413             document in question.
414
415             Specifying a custom endmacro works in the same way as for ig;
416             namely, the call to ‘.endmacro’ first ends the definition, and
417             after that, it is also evaluated as a roff request or roff macro,
418             but not as a high-level macro.
419
420             The macro can be invoked later using the syntax
421
422                   .macroname [argument [argument ...]]
423
424             Regarding argument parsing, see MACRO SYNTAX above.
425
426             The line invoking the macro will be replaced in the input stream
427             by the definition, replacing all occurrences of \\$N, where N is
428             a digit, by the Nth argument.  For example,
429
430                   .de ZN
431                   \fI\^\\$1\^\fP\\$2
432                   ..
433                   .ZN XtFree .
434
435             produces
436
437                   \fI\^XtFree\^\fP.
438
439             in the input stream, and thus in the output: XtFree.  Each occur‐
440             rence of \\$* is replaced with all the arguments, joined together
441             with single space characters.  The variant \\$@ is similar,
442             except that each argument is individually quoted.
443
444             Since macros and user-defined strings share a common string ta‐
445             ble, defining a macro macroname clobbers the user-defined string
446             macroname, and the definition can also be printed using the ‘\*’
447             string interpolation syntax described below ds, but this is
448             rarely useful because every macro definition contains at least
449             one explicit newline character.
450
451             In order to prevent endless recursion, both groff and mandoc(1)
452             limit the stack depth for expanding macros and strings to a
453             large, but finite number, and mandoc(1) also limits the length of
454             the expanded input line.  Do not rely on the exact values of
455             these limits.
456
457     de1 macroname [endmacro]
458             Define a roff macro that will be executed with roff compatibility
459             mode switched off during macro execution.  This is a groff exten‐
460             sion.  Since mandoc(1) does not implement roff compatibility mode
461             at all, it handles this request as an alias for de.
462
463     defcolor newname scheme component ...
464             Define a color name.  This is a groff extension and currently
465             ignored.
466
467     dei macrostring [endstring]
468             Define a roff macro, specifying the macro name indirectly (groff
469             extension).  The syntax of this request is the same as that of
470             de.  The effect is the same as:
471
472                   .de \*[macrostring] [\*[endstring]]
473
474     dei1 macrostring [endstring]
475             Define a roff macro that will be executed with roff compatibility
476             mode switched off during macro execution, specifying the macro
477             name indirectly (groff extension).  Since mandoc(1) does not
478             implement roff compatibility mode at all, it handles this request
479             as an alias for dei.
480
481     device string ...
482
483     devicem stringname
484             These two requests only make sense with the groff-specific inter‐
485             mediate output format and are unsupported.
486
487     di divname
488             Begin a diversion.  Currently unsupported.
489
490     do command [argument ...]
491             Execute roff request or macro line with compatibility mode dis‐
492             abled.  Currently unsupported.
493
494     ds stringname [["]string]
495             Define a user-defined string.  The stringname and string argu‐
496             ments are space-separated.  If the string begins with a double-
497             quote character, that character will not be part of the string.
498             All remaining characters on the input line form the string,
499             including whitespace and double-quote characters, even trailing
500             ones.
501
502             The string can be interpolated into subsequent text by using
503             \*[stringname] for a stringname of arbitrary length, or \*(NN or
504             \*N if the length of stringname is two or one characters, respec‐
505             tively.  Interpolation can be prevented by escaping the leading
506             backslash; that is, an asterisk preceded by an even number of
507             backslashes does not trigger string interpolation.
508
509             Since user-defined strings and macros share a common string ta‐
510             ble, defining a string stringname clobbers the macro stringname,
511             and the stringname used for defining a string can also be invoked
512             as a macro, in which case the following input line will be
513             appended to the string, forming a new input line passed to the
514             roff parser.  For example,
515
516                   .ds badidea .S
517                   .badidea
518                   H SYNOPSIS
519
520             invokes the SH macro when used in a man(7) document.  Such abuse
521             is of course strongly discouraged.
522
523     ds1 stringname [["]string]
524             Define a user-defined string that will be expanded with roff com‐
525             patibility mode switched off during string expansion.  This is a
526             groff extension.  Since mandoc(1) does not implement roff compat‐
527             ibility mode at all, it handles this request as an alias for ds.
528
529     dwh dist macroname
530             Set a location trap in the current diversion.  This is a Heirloom
531             extension and currently unsupported.
532
533     dt [dist macroname]
534             Set a trap within a diversion.  Currently unsupported.
535
536     ec [char]
537             Enable the escape mechanism and change the escape character.  The
538             char argument defaults to the backslash (‘\’).
539
540     ecr     Restore the escape character.  Currently unsupported.
541
542     ecs     Save the escape character.  Currently unsupported.
543
544     el body
545             The “else” half of an if/else conditional.  Pops a result off the
546             stack of conditional evaluations pushed by ie and uses it as its
547             conditional.  If no stack entries are present (e.g., due to no
548             prior ie calls) then false is assumed.  The syntax of this
549             request is similar to if except that the conditional is missing.
550
551     em macroname
552             Set a trap at the end of input.  Currently unsupported.
553
554     EN      End an equation block.  See EQ.
555
556     eo      Disable the escape mechanism completely.
557
558     EP      End a picture started by BP.  This is a Heirloom extension and
559             currently unsupported.
560
561     EQ      Begin an equation block.  See eqn(7) for a description of the
562             equation language.
563
564     errprint message
565             Print a string like an error message.  This is a Heirloom exten‐
566             sion and currently ignored.
567
568     ev [envname]
569             Switch to another environment.  Currently unsupported.
570
571     evc [envname]
572             Copy an environment into the current environment.  Currently
573             unsupported.
574
575     ex      Abort processing and exit.  Currently unsupported.
576
577     fallback curfont font ...
578             Select the fallback sequence for a font.  This is a Heirloom
579             extension and currently ignored.
580
581     fam [familyname]
582             Change the font family.  This is a groff extension and currently
583             ignored.
584
585     fc [delimchar [padchar]]
586             Define a delimiting and a padding character for fields.  Cur‐
587             rently unsupported.
588
589     fchar glyphname [string]
590             Define a fallback glyph.  Currently unsupported.
591
592     fcolor colorname
593             Set the fill color for \D objects.  This is a groff extension and
594             currently ignored.
595
596     fdeferlig font string ...
597             Defer ligature building.  This is a Heirloom extension and cur‐
598             rently ignored.
599
600     feature +|-name
601             Enable or disable an OpenType feature.  This is a Heirloom exten‐
602             sion and currently ignored.
603
604     fi      Break the output line and switch to fill mode, which is active by
605             default but can be ended with the nf request.  In fill mode,
606             input from subsequent input lines is added to the same output
607             line until the next word no longer fits, at which point the out‐
608             put line is broken.  This request is implied by the mdoc(7) Sh
609             macro and by the man(7) SH, SS, and EE macros.
610
611     fkern font minkern
612             Control the use of kerning tables for a font.  This is a Heirloom
613             extension and currently ignored.
614
615     fl      Flush output.  Currently ignored.
616
617     flig font string char ...
618             Define ligatures.  This is a Heirloom extension and currently
619             ignored.
620
621     fp position font [filename]
622             Assign font position.  Currently ignored.
623
624     fps mapname ...
625             Mount a font with a special character map.  This is a Heirloom
626             extension and currently ignored.
627
628     fschar font glyphname [string]
629             Define a font-specific fallback glyph.  This is a groff extension
630             and currently unsupported.
631
632     fspacewidth font [afmunits]
633             Set a font-specific width for the space character.  This is a
634             Heirloom extension and currently ignored.
635
636     fspecial curfont [font ...]
637             Conditionally define a special font.  This is a groff extension
638             and currently ignored.
639
640     ft [font]
641             Change the font; see Font Selection.  The font argument defaults
642             to P.
643
644     ftr newname [oldname]
645             Translate font name.  This is a groff extension and currently
646             ignored.
647
648     fzoom font [permille]
649             Zoom font size.  Currently ignored.
650
651     gcolor [colorname]
652             Set glyph color.  This is a groff extension and currently
653             ignored.
654
655     hc [char]
656             Set the hyphenation character.  Currently ignored.
657
658     hcode char code ...
659             Set hyphenation codes of characters.  Currently ignored.
660
661     hidechar font char ...
662             Hide characters in a font.  This is a Heirloom extension and cur‐
663             rently ignored.
664
665     hla language
666             Set hyphenation language.  This is a groff extension and cur‐
667             rently ignored.
668
669     hlm [number]
670             Set maximum number of consecutive hyphenated lines.  Currently
671             ignored.
672
673     hpf filename
674             Load hyphenation pattern file.  This is a groff extension and
675             currently ignored.
676
677     hpfa filename
678             Load hyphenation pattern file, appending to the current patterns.
679             This is a groff extension and currently ignored.
680
681     hpfcode code code ...
682             Define mapping values for character codes in hyphenation pat‐
683             terns.  This is a groff extension and currently ignored.
684
685     hw word ...
686             Specify hyphenation points in words.  Currently ignored.
687
688     hy [mode]
689             Set automatic hyphenation mode.  Currently ignored.
690
691     hylang language
692             Set hyphenation language.  This is a Heirloom extension and cur‐
693             rently ignored.
694
695     hylen nchar
696             Minimum word length for hyphenation.  This is a Heirloom exten‐
697             sion and currently ignored.
698
699     hym [length]
700             Set hyphenation margin.  This is a groff extension and currently
701             ignored.
702
703     hypp penalty ...
704             Define hyphenation penalties.  This is a Heirloom extension and
705             currently ignored.
706
707     hys [length]
708             Set hyphenation space.  This is a groff extension and currently
709             ignored.
710
711     ie condition body
712             The “if” half of an if/else conditional.  The result of the con‐
713             ditional is pushed into a stack used by subsequent invocations of
714             el, which may be separated by any intervening input (or not exist
715             at all).  Its syntax is equivalent to if.
716
717     if condition body
718             Begin a conditional.  This request can also be written as fol‐
719             lows:
720
721                   .if condition \{body
722                   body ...\}
723
724                   .if condition \{\
725                   body ...
726                   .\}
727
728             The condition is a boolean expression.  Currently, mandoc(1) sup‐
729             ports the following subset of roff conditionals:
730
731             ·   If ‘!’ is prefixed to condition, it is logically inverted.
732
733             ·   If the first character of condition is ‘n’ (nroff mode) or
734                 ‘o’ (odd page), it evaluates to true, and the body starts
735                 with the next character.
736
737             ·   If the first character of condition is ‘e’ (even page), ‘t’
738                 (troff mode), or ‘v’ (vroff mode), it evaluates to false, and
739                 the body starts with the next character.
740
741             ·   If the first character of condition is ‘c’ (character
742                 available), it evaluates to true if the following character
743                 is an ASCII character or a valid character escape sequence,
744                 or to false otherwise.  The body starts with the character
745                 following that next character.
746
747             ·   If the first character of condition is ‘d’, it evaluates to
748                 true if the rest of condition is the name of an existing user
749                 defined macro or string; otherwise, it evaluates to false.
750
751             ·   If the first character of condition is ‘r’, it evaluates to
752                 true if the rest of condition is the name of an existing num‐
753                 ber register; otherwise, it evaluates to false.
754
755             ·   If the condition starts with a parenthesis or with an option‐
756                 ally signed integer number, it is evaluated according to the
757                 rules of Numerical expressions explained below.  It evaluates
758                 to true if the result is positive, or to false if the result
759                 is zero or negative.
760
761             ·   Otherwise, the first character of condition is regarded as a
762                 delimiter and it evaluates to true if the string extending
763                 from its first to its second occurrence is equal to the
764                 string extending from its second to its third occurrence.
765
766             ·   If condition cannot be parsed, it evaluates to false.
767
768             If a conditional is false, its children are not processed, but
769             are syntactically interpreted to preserve the integrity of the
770             input document.  Thus,
771
772                   .if t .ig
773
774             will discard the ‘.ig’, which may lead to interesting results,
775             but
776
777                   .if t .if t \{\
778
779             will continue to syntactically interpret to the block close of
780             the final conditional.  Sub-conditionals, in this case, obviously
781             inherit the truth value of the parent.
782
783             If the body section is begun by an escaped brace ‘\{’, scope con‐
784             tinues until the end of the input line containing the matching
785             closing-brace escape sequence ‘\}’.  If the body is not enclosed
786             in braces, scope continues until the end of the line.  If the
787             condition is followed by a body on the same line, whether after a
788             brace or not, then requests and macros must begin with a control
789             character.  It is generally more intuitive, in this case, to
790             write
791
792                   .if condition \{\
793                   .request
794                   .\}
795
796             than having the request or macro follow as
797
798                   .if condition \{.request
799
800             The scope of a conditional is always parsed, but only executed if
801             the conditional evaluates to true.
802
803             Note that the ‘\}’ is converted into a zero-width escape sequence
804             if not passed as a standalone macro ‘.\}’.  For example,
805
806                   .Fl a \} b
807
808             will result in ‘\}’ being considered an argument of the ‘Fl’
809             macro.
810
811     ig [endmacro]
812             Ignore input.  Its syntax can be either
813
814                   .ig
815                   ignored text
816                   ..
817
818             or
819
820                   .ig endmacro
821                   ignored text
822                   .endmacro
823
824             In the first case, input is ignored until a ‘..’ request is
825             encountered on its own line.  In the second case, input is
826             ignored until the specified ‘.endmacro’ is encountered.  Do not
827             use the escape character ‘\’ anywhere in the definition of
828             endmacro; it would cause very strange behaviour.
829
830             When the endmacro is a roff request or a roff macro, like in
831
832                   .ig if
833
834             the subsequent invocation of if will first terminate the ignored
835             text, then be invoked as usual.  Otherwise, it only terminates
836             the ignored text, and arguments following it or the ‘..’ request
837             are discarded.
838
839     in [[+|-]width]
840             Change indentation.  See man(7).  Ignored in mdoc(7).
841
842     index register stringname substring
843             Find a substring in a string.  This is a Heirloom extension and
844             currently unsupported.
845
846     it expression macro
847             Set an input line trap.  The named macro will be invoked after
848             processing the number of input text lines specified by the numer‐
849             ical expression.  While evaluating the expression, the unit suf‐
850             fixes described below Scaling Widths are ignored.
851
852     itc expression macro
853             Set an input line trap, not counting lines ending with \c.  Cur‐
854             rently unsupported.
855
856     IX class keystring
857             To support the generation of a table of contents, pod2man(1)
858             emits this user-defined macro, usually without defining it.  To
859             avoid reporting large numbers of spurious errors, mandoc(1)
860             ignores it.
861
862     kern [1 | 0]
863             Switch kerning on or off.  Currently ignored.
864
865     kernafter font char ... afmunits ...
866             Increase kerning after some characters.  This is a Heirloom
867             extension and currently ignored.
868
869     kernbefore font char ... afmunits ...
870             Increase kerning before some characters.  This is a Heirloom
871             extension and currently ignored.
872
873     kernpair font char ... font char ... afmunits
874             Add a kerning pair to the kerning table.  This is a Heirloom
875             extension and currently ignored.
876
877     lc [glyph]
878             Define a leader repetition character.  Currently unsupported.
879
880     lc_ctype localename
881             Set the LC_CTYPE locale.  This is a Heirloom extension and cur‐
882             rently unsupported.
883
884     lds macroname string
885             Define a local string.  This is a Heirloom extension and cur‐
886             rently unsupported.
887
888     length register string
889             Count the number of input characters in a string.  Currently
890             unsupported.
891
892     letadj lspmin lshmin letss lspmax lshmax
893             Dynamic letter spacing and reshaping.  This is a Heirloom exten‐
894             sion and currently ignored.
895
896     lf lineno [filename]
897             Change the line number for error messages.  Ignored because inse‐
898             cure.
899
900     lg [1 | 0]
901             Switch the ligature mechanism on or off.  Currently ignored.
902
903     lhang font char ... afmunits
904             Hang characters at left margin.  This is a Heirloom extension and
905             currently ignored.
906
907     linetabs [1 | 0]
908             Enable or disable line-tabs mode.  This is a groff extension and
909             currently unsupported.
910
911     ll [[+|-]width]
912             Change the output line length.  If the width argument is omitted,
913             the line length is reset to its previous value.  The default set‐
914             ting for terminal output is 78n.  If a sign is given, the line
915             length is added to or subtracted from; otherwise, it is set to
916             the provided value.  Using this request in new manuals is dis‐
917             couraged for several reasons, among others because it overrides
918             the mandoc(1) -O width command line option.
919
920     lnr register [+|-]value [increment]
921             Set local number register.  This is a Heirloom extension and cur‐
922             rently unsupported.
923
924     lnrf register [+|-]value [increment]
925             Set local floating-point register.  This is a Heirloom extension
926             and currently unsupported.
927
928     lpfx string
929             Set a line prefix.  This is a Heirloom extension and currently
930             unsupported.
931
932     ls [factor]
933             Set line spacing.  It takes one integer argument specifying the
934             vertical distance of subsequent output text lines measured in v
935             units.  Currently ignored.
936
937     lsm macroname
938             Set a leading spaces trap.  This is a groff extension and cur‐
939             rently unsupported.
940
941     lt [[+|-]width]
942             Set title line length.  Currently ignored.
943
944     mc glyph [dist]
945             Print margin character in the right margin.  The dist is cur‐
946             rently ignored; instead, 1n is used.
947
948     mediasize media
949             Set the device media size.  This is a Heirloom extension and cur‐
950             rently ignored.
951
952     minss width
953             Set minimum word space.  This is a Heirloom extension and cur‐
954             rently ignored.
955
956     mk [register]
957             Mark vertical position.  Currently ignored.
958
959     mso filename
960             Load a macro file using the search path.  Ignored because inse‐
961             cure.
962
963     na      Disable adjusting without changing the adjustment mode.  Cur‐
964             rently ignored.
965
966     ne [height]
967             Declare the need for the specified minimum vertical space before
968             the next trap or the bottom of the page.  Currently ignored.
969
970     nf      Break the output line and switch to no-fill mode.  Subsequent
971             input lines are kept together on the same output line even when
972             exceeding the right margin, and line breaks in subsequent input
973             cause output line breaks.  This request is implied by the mdoc(7)
974             Bd -unfilled and Bd -literal macros and by the man(7) EX macro.
975             The fi request switches back to the default fill mode.
976
977     nh      Turn off automatic hyphenation mode.  Currently ignored.
978
979     nhychar char ...
980             Define hyphenation-inhibiting characters.  This is a Heirloom
981             extension and currently ignored.
982
983     nm [start [inc [space [indent]]]]
984             Print line numbers.  Currently unsupported.
985
986     nn [number]
987             Temporarily turn off line numbering.  Currently unsupported.
988
989     nop body
990             Execute the rest of the input line as a request, macro, or text
991             line, skipping the nop request and any space characters immedi‐
992             ately following it.  This is mostly used to indent text lines
993             inside macro definitions.
994
995     nr register [+|-]expression [stepsize]
996             Define or change a register.  A register is an arbitrary string
997             value that defines some sort of state, which influences parsing
998             and/or formatting.  For the syntax of expression, see Numerical
999             expressions below.  If it is prefixed by a sign, the register
1000             will be incremented or decremented instead of assigned to.
1001
1002             The stepsize is used by the \n+ auto-increment feature.  It
1003             remains unchanged when omitted while changing an existing regis‐
1004             ter, and it defaults to 0 when defining a new register.
1005
1006             The following register is handled specially:
1007
1008             nS      If set to a positive integer value, certain mdoc(7)
1009                     macros will behave in the same way as in the SYNOPSIS
1010                     section.  If set to 0, these macros will behave in the
1011                     same way as outside the SYNOPSIS section, even when
1012                     called within the SYNOPSIS section itself.  Note that
1013                     starting a new mdoc(7) section with the Sh macro will
1014                     reset this register.
1015
1016     nrf register [+|-]expression [increment]
1017             Define or change a floating-point register.  This is a Heirloom
1018             extension and currently unsupported.
1019
1020     nroff   Force nroff mode.  This is a groff extension and currently
1021             ignored.
1022
1023     ns      Turn on no-space mode.  Currently ignored.
1024
1025     nx [filename]
1026             Abort processing of the current input file and process another
1027             one.  Ignored because insecure.
1028
1029     open stream file
1030             Open a file for writing.  Ignored because insecure.
1031
1032     opena stream file
1033             Open a file for appending.  Ignored because insecure.
1034
1035     os      Output saved vertical space.  Currently ignored.
1036
1037     output string
1038             Output directly to intermediate output.  Not supported.
1039
1040     padj [1 | 0]
1041             Globally control paragraph-at-once adjustment.  This is a Heir‐
1042             loom extension and currently ignored.
1043
1044     papersize media
1045             Set the paper size.  This is a Heirloom extension and currently
1046             ignored.
1047
1048     pc [char]
1049             Change the page number character.  Currently ignored.
1050
1051     pev     Print environments.  This is a groff extension and currently
1052             ignored.
1053
1054     pi command
1055             Pipe output to a shell command.  Ignored because insecure.
1056
1057     PI      Low-level request used by BP.  This is a Heirloom extension and
1058             currently unsupported.
1059
1060     pl [[+|-]height]
1061             Change page length.  Currently ignored.
1062
1063     pm      Print names and sizes of macros, strings, and diversions to stan‐
1064             dard error output.  Currently ignored.
1065
1066     pn [+|-]number
1067             Change the page number of the next page.  Currently ignored.
1068
1069     pnr     Print all number registers on standard error output.  Currently
1070             ignored.
1071
1072     po [[+|-]offset]
1073             Set a horizontal page offset.  If no argument is specified, the
1074             page offset is reverted to its previous value.  If a sign is
1075             specified, the new page offset is calculated relative to the cur‐
1076             rent one; otherwise, it is absolute.  The argument follows the
1077             syntax of Scaling Widths and the default scaling unit is m.
1078
1079     ps [[+|-]size]
1080             Change point size.  Currently ignored.
1081
1082     psbb filename
1083             Retrieve the bounding box of a PostScript file.  Currently unsup‐
1084             ported.
1085
1086     pshape indent length ...
1087             Set a special shape for the current paragraph.  This is a Heir‐
1088             loom extension and currently unsupported.
1089
1090     pso command
1091             Include output of a shell command.  Ignored because insecure.
1092
1093     ptr     Print the names and positions of all traps on standard error out‐
1094             put.  This is a groff extension and currently ignored.
1095
1096     pvs [[+|-]height]
1097             Change post-vertical spacing.  This is a groff extension and cur‐
1098             rently ignored.
1099
1100     rchar glyph ...
1101             Remove glyph definitions.  Currently unsupported.
1102
1103     rd [prompt [argument ...]]
1104             Read from standard input.  Currently ignored.
1105
1106     recursionlimit maxrec maxtail
1107             Set the maximum stack depth for recursive macros.  This is a
1108             Heirloom extension and currently ignored.
1109
1110     return [twice]
1111             Exit the presently executed macro and return to the caller.  The
1112             argument is currently ignored.
1113
1114     rfschar font glyph ...
1115             Remove font-specific fallback glyph definitions.  Currently
1116             unsupported.
1117
1118     rhang font char ... afmunits
1119             Hang characters at right margin.  This is a Heirloom extension
1120             and currently ignored.
1121
1122     rj [N]  Justify the next N input lines to the right margin without fill‐
1123             ing.  N defaults to 1.  An argument of 0 or less ends right
1124             adjustment.
1125
1126     rm macroname
1127             Remove a request, macro or string.
1128
1129     rn oldname newname
1130             Rename a request, macro, diversion, or string.  In mandoc(1),
1131             user-defined macros, mdoc(7) and man(7) macros, and user-defined
1132             strings can be renamed, but renaming of predefined strings and of
1133             roff requests is not supported, and diversions are not imple‐
1134             mented at all.
1135
1136     rnn oldname newname
1137             Rename a number register.  Currently unsupported.
1138
1139     rr register
1140             Remove a register.
1141
1142     rs      End no-space mode.  Currently ignored.
1143
1144     rt [dist]
1145             Return to marked vertical position.  Currently ignored.
1146
1147     schar glyph [string]
1148             Define global fallback glyph.  This is a groff extension and cur‐
1149             rently unsupported.
1150
1151     sentchar char ...
1152             Define sentence-ending characters.  This is a Heirloom extension
1153             and currently ignored.
1154
1155     shc [glyph]
1156             Change the soft hyphen character.  Currently ignored.
1157
1158     shift [number]
1159             Shift macro arguments number times, by default once: \\$i becomes
1160             what \\$i+number was.  Also decrement \n(.$ by number.
1161
1162     sizes size ...
1163             Define permissible point sizes.  This is a groff extension and
1164             currently ignored.
1165
1166     so filename
1167             Include a source file.  The file is read and its contents pro‐
1168             cessed as input in place of the so request line.  To avoid inad‐
1169             vertent inclusion of unrelated files, mandoc(1) only accepts rel‐
1170             ative paths not containing the strings "../" and "/..".
1171
1172             This request requires man(1) to change to the right directory
1173             before calling mandoc(1), per convention to the root of the man‐
1174             ual tree.  Typical usage looks like:
1175
1176                   .so man3/Xcursor.3
1177
1178             As the whole concept is rather fragile, the use of so is discour‐
1179             aged.  Use ln(1) instead.
1180
1181     sp [height]
1182             Break the output line and emit vertical space.  The argument fol‐
1183             lows the syntax of Scaling Widths and defaults to one blank line
1184             (1v).
1185
1186     spacewidth [1 | 0]
1187             Set the space width from the font metrics file.  This is a Heir‐
1188             loom extension and currently ignored.
1189
1190     special [font ...]
1191             Define a special font.  This is a groff extension and currently
1192             ignored.
1193
1194     spreadwarn [width]
1195             Warn about wide spacing between words.  Currently ignored.
1196
1197     ss wordspace [sentencespace]
1198             Set space character size.  Currently ignored.
1199
1200     sty position style
1201             Associate style with a font position.  This is a groff extension
1202             and currently ignored.
1203
1204     substring stringname startpos [endpos]
1205             Replace a user-defined string with a substring.  Currently unsup‐
1206             ported.
1207
1208     sv [height]
1209             Save vertical space.  Currently ignored.
1210
1211     sy command
1212             Execute shell command.  Ignored because insecure.
1213
1214     T&      Re-start a table layout, retaining the options of the prior table
1215             invocation.  See TS.
1216
1217     ta [width ... [T width ...]]
1218             Set tab stops.  Each width argument follows the syntax of Scaling
1219             Widths.  If prefixed by a plus sign, it is relative to the previ‐
1220             ous tab stop.  The arguments after the T marker are used repeat‐
1221             edly as often as needed; for each reuse, they are taken relative
1222             to the last previously established tab stop.  When ta is called
1223             without arguments, all tab stops are cleared.
1224
1225     tc [glyph]
1226             Change tab repetition character.  Currently unsupported.
1227
1228     TE      End a table context.  See TS.
1229
1230     ti [+|-]width
1231             Break the output line and indent the next output line by width.
1232             If a sign is specified, the temporary indentation is calculated
1233             relative to the current indentation; otherwise, it is absolute.
1234             The argument follows the syntax of Scaling Widths and the default
1235             scaling unit is m.
1236
1237     tkf font minps width1 maxps width2
1238             Enable track kerning for a font.  Currently ignored.
1239
1240     tl 'left'center'right'
1241             Print a title line.  Currently unsupported.
1242
1243     tm string
1244             Print to standard error output.  Currently ignored.
1245
1246     tm1 string
1247             Print to standard error output, allowing leading blanks.  This is
1248             a groff extension and currently ignored.
1249
1250     tmc string
1251             Print to standard error output without a trailing newline.  This
1252             is a groff extension and currently ignored.
1253
1254     tr glyph glyph ...
1255             Output character translation.  The first glyph in each pair is
1256             replaced by the second one.  Character escapes can be used; for
1257             example,
1258
1259                   tr \(xx\(yy
1260
1261             replaces all invocations of \(xx with \(yy.
1262
1263     track font minps width1 maxps width2
1264             Static letter space tracking.  This is a Heirloom extension and
1265             currently ignored.
1266
1267     transchar char ...
1268             Define transparent characters for sentence-ending.  This is a
1269             Heirloom extension and currently ignored.
1270
1271     trf filename
1272             Output the contents of a file, disallowing invalid characters.
1273             This is a groff extension and ignored because insecure.
1274
1275     trimat left top width height
1276             Set the TrimBox page parameter for PDF generation.  This is a
1277             Heirloom extension and currently ignored.
1278
1279     trin glyph glyph ...
1280             Output character translation, ignored by asciify.  Currently
1281             unsupported.
1282
1283     trnt glyph glyph ...
1284             Output character translation, ignored by \!.  Currently unsup‐
1285             ported.
1286
1287     troff   Force troff mode.  This is a groff extension and currently
1288             ignored.
1289
1290     TS      Begin a table, which formats input in aligned rows and columns.
1291             See tbl(7) for a description of the tbl language.
1292
1293     uf font
1294             Globally set the underline font.  Currently ignored.
1295
1296     ul [N]  Underline next N input lines.  Currently ignored.
1297
1298     unformat divname
1299             Unformat spaces and tabs in a diversion.  Currently unsupported.
1300
1301     unwatch macroname
1302             Disable notification for string or macro.  This is a Heirloom
1303             extension and currently ignored.
1304
1305     unwatchn register
1306             Disable notification for register.  This is a Heirloom extension
1307             and currently ignored.
1308
1309     vpt [1 | 0]
1310             Enable or disable vertical position traps.  This is a groff
1311             extension and currently ignored.
1312
1313     vs [[+|-]height]
1314             Change vertical spacing.  Currently ignored.
1315
1316     warn flags
1317             Set warning level.  Currently ignored.
1318
1319     warnscale si
1320             Set the scaling indicator used in warnings.  This is a groff
1321             extension and currently ignored.
1322
1323     watch macroname
1324             Notify on change of string or macro.  This is a Heirloom exten‐
1325             sion and currently ignored.
1326
1327     watchlength maxlength
1328             On change, report the contents of macros and strings up to the
1329             specified length.  This is a Heirloom extension and currently
1330             ignored.
1331
1332     watchn register
1333             Notify on change of register.  This is a Heirloom extension and
1334             currently ignored.
1335
1336     wh dist [macroname]
1337             Set a page location trap.  Currently unsupported.
1338
1339     while condition body
1340             Repeated execution while a condition is true, with syntax similar
1341             to if.  Currently implemented with two restrictions: cannot nest,
1342             and each loop must start and end in the same scope.
1343
1344     write ["]string
1345             Write to an open file.  Ignored because insecure.
1346
1347     writec ["]string
1348             Write to an open file without appending a newline.  Ignored
1349             because insecure.
1350
1351     writem macroname
1352             Write macro or string to an open file.  Ignored because insecure.
1353
1354     xflag level
1355             Set the extension level.  This is a Heirloom extension and cur‐
1356             rently ignored.
1357
1358   Numerical expressions
1359     The nr, if, and ie requests accept integer numerical expressions as argu‐
1360     ments.  These are always evaluated using the C int type; integer overflow
1361     works the same way as in the C language.  Numbers consist of an arbitrary
1362     number of digits ‘0’ to ‘9’ prefixed by an optional sign ‘+’ or ‘-’.
1363     Each number may be followed by one optional scaling unit described below
1364     Scaling Widths.  The following equations hold:
1365
1366           1i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240
1367           254c = 100i = 24000u = 24000
1368           1f = 65536u = 65536
1369
1370     The following binary operators are implemented.  Unless otherwise stated,
1371     they behave as in the C language:
1372
1373     +   addition
1374     -   subtraction
1375     *   multiplication
1376     /   division
1377     %   remainder of division
1378     <   less than
1379     >   greater than
1380     ==  equal to
1381     =   equal to, same effect as == (this differs from C)
1382     <=  less than or equal to
1383     >=  greater than or equal to
1384     <>  not equal to (corresponds to C !=; this one is of limited portabil‐
1385         ity, it is supported by Heirloom roff, but not by groff)
1386     &   logical and (corresponds to C &&)
1387     :   logical or (corresponds to C ||)
1388     <?  minimum (not available in C)
1389     >?  maximum (not available in C)
1390
1391     There is no concept of precedence; evaluation proceeds from left to
1392     right, except when subexpressions are enclosed in parentheses.  Inside
1393     parentheses, whitespace is ignored.
1394

ESCAPE SEQUENCE REFERENCE

1396     The mandoc(1) roff parser recognises the following escape sequences.  In
1397     mdoc(7) and man(7) documents, using escape sequences is discouraged
1398     except for those described in the LANGUAGE SYNTAX section above.
1399
1400     A backslash followed by any character not listed here simply prints that
1401     character itself.
1402
1403     \<newline>
1404             A backslash at the end of an input line can be used to continue
1405             the logical input line on the next physical input line, joining
1406             the text on both lines together as if it were on a single input
1407             line.
1408
1409     \<space>
1410             The escape sequence backslash-space (‘\ ’) is an unpaddable
1411             space-sized non-breaking space character; see Whitespace and
1412             mandoc_char(7).
1413
1414     \!      Embed text up to and including the end of the input line into the
1415             current diversion or into intermediate output without interpret‐
1416             ing requests, macros, and escapes.  Currently unsupported.
1417
1418     \"      The rest of the input line is treated as Comments.
1419
1420     \#      Line continuation with comment.  Discard the rest of the physical
1421             input line and continue the logical input line on the next physi‐
1422             cal input line, joining the text on both lines together as if it
1423             were on a single input line.  This is a groff extension.
1424
1425     \$arg   Macro argument expansion, see de.
1426
1427     \%      Hyphenation allowed at this point of the word; ignored by
1428             mandoc(1).
1429
1430     \&      Non-printing zero-width character, often used for various kinds
1431             of escaping; see Whitespace, mandoc_char(7), and the “MACRO
1432             SYNTAX” and “Delimiters” sections in mdoc(7).
1433
1434     \'      Acute accent special character; use \(aa instead.
1435
1436     \(cc    Special Characters with two-letter names, see mandoc_char(7).
1437
1438     \)      Zero-width space transparent to end-of-sentence detection;
1439             ignored by mandoc(1).
1440
1441     \*[name]
1442             Interpolate the string with the name.  For short names, there are
1443             variants \*c and \*(cc.
1444
1445             One string is predefined on the roff language level: \*(.T
1446             expands to the name of the output device, for example ascii,
1447             utf8, ps, pdf, html, or markdown.
1448
1449             Macro sets traditionally predefine additional strings which are
1450             not portable and differ across implementations.  Those supported
1451             by mandoc(1) are listed in mandoc_char(7).
1452
1453             Strings can be defined, changed, and deleted with the ds, as, and
1454             rm requests.
1455
1456     \,      Left italic correction (groff extension); ignored by mandoc(1).
1457
1458     \-      Special character “mathematical minus sign”; see mandoc_char(7)
1459             for details.
1460
1461     \/      Right italic correction (groff extension); ignored by mandoc(1).
1462
1463     \:      Breaking the line is allowed at this point of the word without
1464             inserting a hyphen.
1465
1466     \?      Embed the text up to the next \? into the current diversion with‐
1467             out interpreting requests, macros, and escapes.  This is a groff
1468             extension and currently unsupported.
1469
1470     \[name]
1471             Special Characters with names of arbitrary length, see
1472             mandoc_char(7).
1473
1474     \^      One-twelfth em half-narrow space character, effectively zero-
1475             width in mandoc(1).
1476
1477     \_      Underline special character; use \(ul instead.
1478
1479     \`      Grave accent special character; use \(ga instead.
1480
1481     \{      Begin conditional input; see if.
1482
1483     \|      One-sixth em narrow space character, effectively zero-width in
1484             mandoc(1).
1485
1486     \}      End conditional input; see if.
1487
1488     \~      Paddable non-breaking space character.
1489
1490     \0      Digit width space character.
1491
1492     \A'string'
1493             Anchor definition; ignored by mandoc(1).
1494
1495     \a      Leader character; ignored by mandoc(1).
1496
1497     \B'string'
1498             Interpolate ‘1’ if string conforms to the syntax of Numerical
1499             expressions explained above or ‘0’ otherwise.
1500
1501     \b'string'
1502             Bracket building function; ignored by mandoc(1).
1503
1504     \C'name'
1505             Special Characters with names of arbitrary length.
1506
1507     \c      When encountered at the end of an input text line, the next input
1508             text line is considered to continue that line, even if there are
1509             request or macro lines in between.  No whitespace is inserted.
1510
1511     \D'string'
1512             Draw graphics function; ignored by mandoc(1).
1513
1514     \d      Move down by half a line; ignored by mandoc(1).
1515
1516     \E      Escape character intended to not be interpreted in copy mode.  In
1517             mandoc(1), it currently does the same as \ itself.
1518
1519     \e      Backslash special character.
1520
1521     \F[name]
1522             Switch font family (groff extension); ignored by mandoc(1).  For
1523             short names, there are variants \Fc and \F(cc.
1524
1525     \f[name]
1526             Switch to the font name, see Font Selection.  For short names,
1527             there are variants \fc and \f(cc.  An empty name \f[] defaults to
1528             \fP.
1529
1530     \g[name]
1531             Interpolate the format of a number register; ignored by
1532             mandoc(1).  For short names, there are variants \gc and \g(cc.
1533
1534     \H'[+|-]number'
1535             Set the height of the current font; ignored by mandoc(1).
1536
1537     \h'[|]width'
1538             Horizontal motion.  If the vertical bar is given, the motion is
1539             relative to the current indentation.  Otherwise, it is relative
1540             to the current position.  The default scaling unit is m.
1541
1542     \k[name]
1543             Mark horizontal input place in register; ignored by mandoc(1).
1544             For short names, there are variants \kc and \k(cc.
1545
1546     \L'number[c]'
1547             Vertical line drawing function; ignored by mandoc(1).
1548
1549     \l'width[c]'
1550             Draw a horizontal line of width using the glyph c.
1551
1552     \M[name]
1553             Set fill (background) color (groff extension); ignored by
1554             mandoc(1).  For short names, there are variants \Mc and \M(cc.
1555
1556     \m[name]
1557             Set glyph drawing color (groff extension); ignored by mandoc(1).
1558             For short names, there are variants \mc and \m(cc.
1559
1560     \N'number'
1561             Character number on the current font.
1562
1563     \n[+|-][name]
1564             Interpolate the number register name.  For short names, there are
1565             variants \nc and \n(cc.  If the optional sign is specified, the
1566             register is first incremented or decremented by the stepsize that
1567             was specified in the relevant nr request, and the changed value
1568             is interpolated.
1569
1570     \Odigit, \O[5arguments]
1571             Suppress output.  This is a groff extension and currently unsup‐
1572             ported.  With an argument of 1, 2, 3, or 4, it is ignored.
1573
1574     \o'string'
1575             Overstrike, writing all the characters contained in the string to
1576             the same output position.  In terminal and HTML output modes,
1577             only the last one of the characters is visible.
1578
1579     \p      Break the output line at the end of the current word.
1580
1581     \R'name [+|-]number'
1582             Set number register; ignored by mandoc(1).
1583
1584     \r      Move up by one line; ignored by mandoc(1).
1585
1586     \S'number'
1587             Slant output; ignored by mandoc(1).
1588
1589     \s'[+|-]number'
1590             Change point size; ignored by mandoc(1).  Alternative forms
1591             \s[+|-]n, \s[+|-]'number', \s[[+|-]number], and \s[+|-][number]
1592             are also parsed and ignored.
1593
1594     \t      Horizontal tab; ignored by mandoc(1).
1595
1596     \u      Move up by half a line; ignored by mandoc(1).
1597
1598     \V[name]
1599             Interpolate an environment variable; ignored by mandoc(1).  For
1600             short names, there are variants \Vc and \V(cc.
1601
1602     \v'number'
1603             Vertical motion; ignored by mandoc(1).
1604
1605     \w'string'
1606             Interpolate the width of the string.  The mandoc(1) implementa‐
1607             tion assumes that after expansion of user-defined strings, the
1608             string only contains normal characters, no escape sequences, and
1609             that each character has a width of 24 basic units.
1610
1611     \X'string'
1612             Output string as device control function; ignored in nroff mode
1613             and by mandoc(1).
1614
1615     \x'number'
1616             Extra line space function; ignored by mandoc(1).
1617
1618     \Y[name]
1619             Output a string as a device control function; ignored in nroff
1620             mode and by mandoc(1).  For short names, there are variants \Yc
1621             and \Y(cc.
1622
1623     \Z'string'
1624             Print string with zero width and height; ignored by mandoc(1).
1625
1626     \z      Output the next character without advancing the cursor position.
1627

COMPATIBILITY

1629     The mandoc(1) implementation of the roff language is incomplete.  Major
1630     unimplemented features include:
1631
1632     -   For security reasons, mandoc(1) never reads or writes external files
1633         except via so requests with safe relative paths.
1634     -   There is no automatic hyphenation, no adjustment to the right margin,
1635         and very limited support for centering; the output is always set
1636         flush-left.
1637     -   Support for setting tabulator and leader characters is missing, and
1638         support for manually changing indentation is limited.
1639     -   The ‘u’ scaling unit is the default terminal unit.  In traditional
1640         troff systems, this unit changes depending on the output media.
1641     -   Width measurements are implemented in a crude way and often yield
1642         wrong results.  Support for explicit movement requests and escapes is
1643         limited.
1644     -   There is no concept of output pages, no support for floats, graphics
1645         drawing, and picture inclusion; terminal output is always continuous.
1646     -   Requests regarding color, font families, font sizes, and glyph manip‐
1647         ulation are ignored.  Font support is very limited.  Kerning is not
1648         implemented, and no ligatures are produced.
1649     -   The "'" macro control character does not suppress output line breaks.
1650     -   Diversions and environments are not implemented, and support for
1651         traps is very incomplete.
1652     -   Use of macros is not supported inside tbl(7) code.
1653
1654     The special semantics of the nS number register is an idiosyncracy of
1655     OpenBSD manuals and not supported by other mdoc(7) implementations.
1656

SEE ALSO

1658     mandoc(1), eqn(7), man(7), mandoc_char(7), mdoc(7), tbl(7)
1659
1660     Joseph F. Ossanna and Brian W. Kernighan, Troff User's Manual, AT&T Bell
1661     Laboratories, Computing Science Technical Report, 54,
1662     http://www.kohala.com/start/troff/cstr54.ps, 1976 and 1992.
1663
1664     Joseph F. Ossanna, Brian W. Kernighan, and Gunnar Ritter, Heirloom
1665     Documentation Tools Nroff/Troff User's Manual,
1666     http://heirloom.sourceforge.net/doctools/troff.pdf, September 17, 2007.
1667

HISTORY

1669     The RUNOFF typesetting system, whose input forms the basis for roff, was
1670     written in MAD and FAP for the CTSS operating system by Jerome E.
1671     Saltzer in 1964.  Doug McIlroy rewrote it in BCPL in 1969, renaming it
1672     roff.  Dennis M. Ritchie rewrote McIlroy's roff in PDP-11 assembly for
1673     Version 1 AT&T UNIX, Joseph F. Ossanna improved roff and renamed it nroff
1674     for Version 2 AT&T UNIX, then ported nroff to C as troff, which Brian W.
1675     Kernighan released with Version 7 AT&T UNIX.  In 1989, James Clarke re-
1676     implemented troff in C++, naming it groff.
1677

AUTHORS

1679     This roff reference was written by Kristaps Dzonsons <kristaps@bsd.lv>
1680     and Ingo Schwarze <schwarze@openbsd.org>.
1681
1682BSD                              May 10, 2020                              BSD
Impressum