1ROFF(7) BSD Miscellaneous Information Manual ROFF(7)
2
4 roff — roff language reference for mandoc
5
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 tiny subset of roff requests and escapes. Only these requests
13 and escapes supported by mandoc(1) are documented in the present manual,
14 together with the basic language syntax shared by roff, mdoc(7), and
15 man(7). For complete roff manuals, consult the SEE ALSO section.
16
17 Input lines beginning with the control character ‘.’ are parsed for
18 requests and macros. Such lines are called “request lines” or “macro
19 lines”, respectively. Requests change the processing state and manipu‐
20 late the formatting; some macros also define the document structure and
21 produce formatted output. The single quote ("'") is accepted as an
22 alternative control character, treated by mandoc(1) just like ‘.’
23
24 Lines not beginning with control characters are called “text lines”.
25 They provide free-form text to be printed; the formatting of the text
26 depends on the respective processing context.
27
29 roff documents may contain only graphable 7-bit ASCII characters, the
30 space character, and, in certain circumstances, the tab character. The
31 backslash character ‘\’ indicates the start of an escape sequence, used
32 for example for Comments, Special Characters, Predefined Strings, and
33 user-defined strings defined using the ds request. For a listing of
34 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 Text Decoration
65 Terms may be text-decorated using the ‘\f’ escape followed by an indica‐
66 tor: B (bold), I (italic), R (regular), or P (revert to previous mode).
67 A numerical representation 3, 2, or 1 (bold, italic, and regular, respec‐
68 tively) may be used instead. The indicator or numerical representative
69 may be preceded by C (constant-width), which is ignored.
70
71 The two-character indicator ‘BI’ requests a font that is both bold and
72 italic. It may not be portable to old roff implementations.
73
74 Examples:
75 \fBbold\fR
76 Write in bold, then switch to regular font mode.
77 \fIitalic\fP
78 Write in italic, then return to previous font mode.
79 \f(BIbold italic\fP
80 Write in bold italic, then return to previous font mode.
81
82 Text decoration is not recommended for mdoc(7), which encourages semantic
83 annotation.
84
85 Predefined Strings
86 Predefined strings, like Special Characters, mark special output glyphs.
87 Predefined strings are escaped with the slash-asterisk, ‘\*’: single-
88 character ‘\*X’, two-character ‘\*(XX’, and N-character ‘\*[N]’.
89
90 Examples:
91 \*(Am Two-letter ampersand predefined string.
92 \*q One-letter double-quote predefined string.
93
94 Predefined strings are not recommended for use, as they differ across
95 implementations. Those supported by mandoc(1) are listed in
96 mandoc_char(7). Manuals using these predefined strings are almost cer‐
97 tainly not portable.
98
99 Whitespace
100 Whitespace consists of the space character. In text lines, whitespace is
101 preserved within a line. In request and macro lines, whitespace delimits
102 arguments and is discarded.
103
104 Unescaped trailing spaces are stripped from text line input unless in a
105 literal context. In general, trailing whitespace on any input line is
106 discouraged for reasons of portability. In the rare case that a blank
107 character is needed at the end of an input line, it may be forced by
108 ‘\ \&’.
109
110 Literal space characters can be produced in the output using escape
111 sequences. In macro lines, they can also be included in arguments using
112 quotation; see MACRO SYNTAX for details.
113
114 Blank text lines, which may include whitespace, are only permitted within
115 literal contexts. If the first character of a text line is a space, that
116 line is printed with a leading newline.
117
118 Scaling Widths
119 Many requests and macros support scaled widths for their arguments. The
120 syntax for a scaled width is ‘[+-]?[0-9]*.[0-9]*[:unit:]’, where a deci‐
121 mal must be preceded or followed by at least one digit. Negative num‐
122 bers, while accepted, are truncated to zero.
123
124 The following scaling units are accepted:
125
126 c centimetre
127 i inch
128 P pica (~1/6 inch)
129 p point (~1/72 inch)
130 f scale ‘u’ by 65536
131 v default vertical span
132 m width of rendered ‘m’ (em) character
133 n width of rendered ‘n’ (en) character
134 u default horizontal span for the terminal
135 M mini-em (~1/100 em)
136
137 Using anything other than ‘m’, ‘n’, or ‘v’ is necessarily non-portable
138 across output media. See COMPATIBILITY.
139
140 If a scaling unit is not provided, the numerical value is interpreted
141 under the default rules of ‘v’ for vertical spaces and ‘u’ for horizontal
142 ones.
143
144 Examples:
145 .Bl -tag -width 2i
146 two-inch tagged list indentation in mdoc(7)
147 .HP 2i
148 two-inch tagged list indentation in man(7)
149 .sp 2v
150 two vertical spaces
151
152 Sentence Spacing
153 Each sentence should terminate at the end of an input line. By doing
154 this, a formatter will be able to apply the proper amount of spacing
155 after the end of sentence (unescaped) period, exclamation mark, or ques‐
156 tion mark followed by zero or more non-sentence closing delimiters (‘)’,
157 ‘]’, ‘'’, ‘"’).
158
159 The proper spacing is also intelligently preserved if a sentence ends at
160 the boundary of a macro line.
161
162 Examples:
163 Do not end sentences mid-line like this. Instead,
164 end a sentence like this.
165 A macro would end like this:
166 .Xr mandoc 1 .
167
169 A request or macro line consists of:
170
171 1. the control character ‘.’ or ‘'’ at the beginning of the line,
172 2. optionally an arbitrary amount of whitespace,
173 3. the name of the request or the macro, which is one word of arbitrary
174 length, terminated by whitespace,
175 4. and zero or more arguments delimited by whitespace.
176
177 Thus, the following request lines are all equivalent:
178
179 .ig end
180 .ig end
181 . ig end
182
184 Macros are provided by the mdoc(7) and man(7) languages and can be
185 defined by the de request. When called, they follow the same syntax as
186 requests, except that macro arguments may optionally be quoted by enclos‐
187 ing them in double quote characters (‘"’). Quoted text, even if it con‐
188 tains whitespace or would cause a macro invocation when unquoted, is
189 always considered literal text. Inside quoted text, pairs of double
190 quote characters (‘""’) resolve to single double quote characters.
191
192 To be recognised as the beginning of a quoted argument, the opening quote
193 character must be preceded by a space character. A quoted argument
194 extends to the next double quote character that is not part of a pair, or
195 to the end of the input line, whichever comes earlier. Leaving out the
196 terminating double quote character at the end of the line is discouraged.
197 For clarity, if more arguments follow on the same input line, it is rec‐
198 ommended to follow the terminating double quote character by a space
199 character; in case the next character after the terminating double quote
200 character is anything else, it is regarded as the beginning of the next,
201 unquoted argument.
202
203 Both in quoted and unquoted arguments, pairs of backslashes (‘\\’)
204 resolve to single backslashes. In unquoted arguments, space characters
205 can alternatively be included by preceding them with a backslash (‘\ ’),
206 but quoting is usually better for clarity.
207
208 Examples:
209 .Fn strlen "const char *s"
210 Group arguments "const char *s" into one function argument.
211 If unspecified, "const", "char", and "*s" would be consid‐
212 ered separate arguments.
213 .Op "Fl a"
214 Consider "Fl a" as literal text instead of a flag macro.
215
217 The mandoc(1) roff parser recognises the following requests. For
218 requests marked as "ignored" or "unsupported", any arguments are ignored,
219 and the number of arguments is not checked.
220
221 ab [message]
222 Abort processing. Currently unsupported.
223
224 ad [b | c | l | n | r]
225 Set line adjustment mode for subsequent text. Currently ignored.
226
227 af registername format
228 Assign an output format to a number register. Currently ignored.
229
230 aln newname oldname
231 Create an alias for a number register. Currently unsupported.
232
233 als newname oldname
234 Create an alias for a request, string, macro, or diversion.
235
236 am macroname [endmacro]
237 Append to a macro definition. The syntax of this request is the
238 same as that of de.
239
240 am1 macroname [endmacro]
241 Append to a macro definition, switching roff compatibility mode
242 off during macro execution (groff extension). The syntax of this
243 request is the same as that of de1. Since mandoc(1) does not
244 implement roff compatibility mode at all, it handles this request
245 as an alias for am.
246
247 ami macrostring [endstring]
248 Append to a macro definition, specifying the macro name indi‐
249 rectly (groff extension). The syntax of this request is the same
250 as that of dei.
251
252 ami1 macrostring [endstring]
253 Append to a macro definition, specifying the macro name indi‐
254 rectly and switching roff compatibility mode off during macro
255 execution (groff extension). The syntax of this request is the
256 same as that of dei1. Since mandoc(1) does not implement roff
257 compatibility mode at all, it handles this request as an alias
258 for ami.
259
260 as stringname [string]
261 Append to a user-defined string. The syntax of this request is
262 the same as that of ds. If a user-defined string with the speci‐
263 fied name does not yet exist, it is set to the empty string
264 before appending.
265
266 as1 stringname [string]
267 Append to a user-defined string, switching roff compatibility
268 mode off during macro execution (groff extension). The syntax of
269 this request is the same as that of ds1. Since mandoc(1) does
270 not implement roff compatibility mode at all, it handles this
271 request as an alias for as.
272
273 asciify divname
274 Fully unformat a diversion. Currently unsupported.
275
276 backtrace
277 Print a backtrace of the input stack. This is a groff extension
278 and currently ignored.
279
280 bd font [curfont] [offset]
281 Artificially embolden by repeated printing with small shifts.
282 Currently ignored.
283
284 bleedat left top width height
285 Set the BleedBox page parameter for PDF generation. This is a
286 Heirloom extension and currently ignored.
287
288 blm macroname
289 Set a blank line trap. Currently unsupported.
290
291 box divname
292 Begin a diversion without including a partially filled line.
293 Currently unsupported.
294
295 boxa divname
296 Add to a diversion without including a partially filled line.
297 Currently unsupported.
298
299 bp [+|-]pagenumber
300 Begin a new page. Currently ignored.
301
302 BP source height width position offset flags label
303 Define a frame and place a picture in it. This is a Heirloom
304 extension and currently unsupported.
305
306 br Break the output line.
307
308 break Break out of a while loop. Currently unsupported.
309
310 breakchar char ...
311 Optional line break characters. This is a Heirloom extension and
312 currently ignored.
313
314 brnl N Break output line after the next N input lines. This is a Heir‐
315 loom extension and currently ignored.
316
317 brp Break and spread output line. Currently, this is implemented as
318 an alias for br.
319
320 brpnl N
321 Break and spread output line after the next N input lines. This
322 is a Heirloom extension and currently ignored.
323
324 c2 [char]
325 Change the no-break control character. Currently unsupported.
326
327 cc [char]
328 Change the control character. If char is not specified, the con‐
329 trol character is reset to ‘.’. Trailing characters are ignored.
330
331 ce [N] Center the next N input lines without filling. N defaults to 1.
332 An argument of 0 or less ends centering. Currently, high level
333 macros abort centering.
334
335 cf filename
336 Output the contents of a file. Ignored because insecure.
337
338 cflags flags char ...
339 Set character flags. This is a groff extension and currently
340 ignored.
341
342 ch macroname [dist]
343 Change a trap location. Currently ignored.
344
345 char glyphname [string]
346 Define a new glyph. Currently unsupported.
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 macro works in the same way as for
416 ig; namely, the call to ‘.endmacro’ first ends the definition,
417 and after that, it is also evaluated as a roff request or roff
418 macro, 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 blank characters.
442
443 Since macros and user-defined strings share a common string ta‐
444 ble, defining a macro macroname clobbers the user-defined string
445 macroname, and the definition can also be printed using the ‘\*’
446 string interpolation syntax described below ds, but this is
447 rarely useful because every macro definition contains at least
448 one explicit newline character.
449
450 In order to prevent endless recursion, both groff and mandoc(1)
451 limit the stack depth for expanding macros and strings to a
452 large, but finite number, and mandoc(1) also limits the length of
453 the expanded input line. Do not rely on the exact values of
454 these limits.
455
456 de1 macroname [endmacro]
457 Define a roff macro that will be executed with roff compatibility
458 mode switched off during macro execution. This is a groff exten‐
459 sion. Since mandoc(1) does not implement roff compatibility mode
460 at all, it handles this request as an alias for de.
461
462 defcolor newname scheme component ...
463 Define a color name. This is a groff extension and currently
464 ignored.
465
466 dei macrostring [endstring]
467 Define a roff macro, specifying the macro name indirectly (groff
468 extension). The syntax of this request is the same as that of
469 de. The effect is the same as:
470
471 .de \*[macrostring] [\*[endstring]]
472
473 dei1 macrostring [endstring]
474 Define a roff macro that will be executed with roff compatibility
475 mode switched off during macro execution, specifying the macro
476 name indirectly (groff extension). Since mandoc(1) does not
477 implement roff compatibility mode at all, it handles this request
478 as an alias for dei.
479
480 device string ...
481
482 devicem stringname
483 These two requests only make sense with the groff-specific inter‐
484 mediate output format and are unsupported.
485
486 di divname
487 Begin a diversion. Currently unsupported.
488
489 do command [argument ...]
490 Execute roff request or macro line with compatibility mode dis‐
491 abled. Currently unsupported.
492
493 ds stringname [["]string]
494 Define a user-defined string. The stringname and string argu‐
495 ments are space-separated. If the string begins with a double-
496 quote character, that character will not be part of the string.
497 All remaining characters on the input line form the string,
498 including whitespace and double-quote characters, even trailing
499 ones.
500
501 The string can be interpolated into subsequent text by using
502 \*[stringname] for a stringname of arbitrary length, or \*(NN or
503 \*N if the length of stringname is two or one characters, respec‐
504 tively. Interpolation can be prevented by escaping the leading
505 backslash; that is, an asterisk preceded by an even number of
506 backslashes does not trigger string interpolation.
507
508 Since user-defined strings and macros share a common string ta‐
509 ble, defining a string stringname clobbers the macro stringname,
510 and the stringname used for defining a string can also be invoked
511 as a macro, in which case the following input line will be
512 appended to the string, forming a new input line passed to the
513 roff parser. For example,
514
515 .ds badidea .S
516 .badidea
517 H SYNOPSIS
518
519 invokes the SH macro when used in a man(7) document. Such abuse
520 is of course strongly discouraged.
521
522 ds1 stringname [["]string]
523 Define a user-defined string that will be expanded with roff com‐
524 patibility mode switched off during string expansion. This is a
525 groff extension. Since mandoc(1) does not implement roff compat‐
526 ibility mode at all, it handles this request as an alias for ds.
527
528 dwh dist macroname
529 Set a location trap in the current diversion. This is a Heirloom
530 extension and currently unsupported.
531
532 dt [dist macroname]
533 Set a trap within a diversion. Currently unsupported.
534
535 ec [char]
536 Enable the escape mechanism and change the escape character. The
537 char argument defaults to the backslash (‘\’).
538
539 ecr Restore the escape character. Currently unsupported.
540
541 ecs Save the escape character. Currently unsupported.
542
543 el body
544 The “else” half of an if/else conditional. Pops a result off the
545 stack of conditional evaluations pushed by ie and uses it as its
546 conditional. If no stack entries are present (e.g., due to no
547 prior ie calls) then false is assumed. The syntax of this
548 request is similar to if except that the conditional is missing.
549
550 em macroname
551 Set a trap at the end of input. Currently unsupported.
552
553 EN End an equation block. See EQ.
554
555 eo Disable the escape mechanism completely.
556
557 EP End a picture started by BP. This is a Heirloom extension and
558 currently unsupported.
559
560 EQ Begin an equation block. See eqn(7) for a description of the
561 equation language.
562
563 errprint message
564 Print a string like an error message. This is a Heirloom exten‐
565 sion and currently ignored.
566
567 ev [envname]
568 Switch to another environment. Currently unsupported.
569
570 evc [envname]
571 Copy an environment into the current environment. Currently
572 unsupported.
573
574 ex Abort processing and exit. Currently unsupported.
575
576 fallback curfont font ...
577 Select the fallback sequence for a font. This is a Heirloom
578 extension and currently ignored.
579
580 fam [familyname]
581 Change the font family. This is a groff extension and currently
582 ignored.
583
584 fc [delimchar [padchar]]
585 Define a delimiting and a padding character for fields. Cur‐
586 rently unsupported.
587
588 fchar glyphname [string]
589 Define a fallback glyph. Currently unsupported.
590
591 fcolor colorname
592 Set the fill color for \D objects. This is a groff extension and
593 currently ignored.
594
595 fdeferlig font string ...
596 Defer ligature building. This is a Heirloom extension and cur‐
597 rently ignored.
598
599 feature +|-name
600 Enable or disable an OpenType feature. This is a Heirloom exten‐
601 sion and currently ignored.
602
603 fi Switch to fill mode. See man(7). Ignored in mdoc(7).
604
605 fkern font minkern
606 Control the use of kerning tables for a font. This is a Heirloom
607 extension and currently ignored.
608
609 fl Flush output. Currently ignored.
610
611 flig font string char ...
612 Define ligatures. This is a Heirloom extension and currently
613 ignored.
614
615 fp position font [filename]
616 Assign font position. Currently ignored.
617
618 fps mapname ...
619 Mount a font with a special character map. This is a Heirloom
620 extension and currently ignored.
621
622 fschar font glyphname [string]
623 Define a font-specific fallback glyph. This is a groff extension
624 and currently unsupported.
625
626 fspacewidth font [afmunits]
627 Set a font-specific width for the space character. This is a
628 Heirloom extension and currently ignored.
629
630 fspecial curfont [font ...]
631 Conditionally define a special font. This is a groff extension
632 and currently ignored.
633
634 ft [font]
635 Change the font. The following font arguments are supported:
636
637 B, BI, 3, 4
638 switches to bold font
639
640 I, 2 switches to underlined font
641
642 R, CW, 1
643 switches to normal font
644
645 P or no argument
646 switches back to the previous font
647
648 This request takes effect only locally and may be overridden by
649 macros and escape sequences.
650
651 ftr newname [oldname]
652 Translate font name. This is a groff extension and currently
653 ignored.
654
655 fzoom font [permille]
656 Zoom font size. Currently ignored.
657
658 gcolor [colorname]
659 Set glyph color. This is a groff extension and currently
660 ignored.
661
662 hc [char]
663 Set the hyphenation character. Currently ignored.
664
665 hcode char code ...
666 Set hyphenation codes of characters. Currently ignored.
667
668 hidechar font char ...
669 Hide characters in a font. This is a Heirloom extension and cur‐
670 rently ignored.
671
672 hla language
673 Set hyphenation language. This is a groff extension and cur‐
674 rently ignored.
675
676 hlm [number]
677 Set maximum number of consecutive hyphenated lines. Currently
678 ignored.
679
680 hpf filename
681 Load hyphenation pattern file. This is a groff extension and
682 currently ignored.
683
684 hpfa filename
685 Load hyphenation pattern file, appending to the current patterns.
686 This is a groff extension and currently ignored.
687
688 hpfcode code code ...
689 Define mapping values for character codes in hyphenation pat‐
690 terns. This is a groff extension and currently ignored.
691
692 hw word ...
693 Specify hyphenation points in words. Currently ignored.
694
695 hy [mode]
696 Set automatic hyphenation mode. Currently ignored.
697
698 hylang language
699 Set hyphenation language. This is a Heirloom extension and cur‐
700 rently ignored.
701
702 hylen nchar
703 Minimum word length for hyphenation. This is a Heirloom exten‐
704 sion and currently ignored.
705
706 hym [length]
707 Set hyphenation margin. This is a groff extension and currently
708 ignored.
709
710 hypp penalty ...
711 Define hyphenation penalties. This is a Heirloom extension and
712 currently ignored.
713
714 hys [length]
715 Set hyphenation space. This is a groff extension and currently
716 ignored.
717
718 ie condition body
719 The “if” half of an if/else conditional. The result of the con‐
720 ditional is pushed into a stack used by subsequent invocations of
721 el, which may be separated by any intervening input (or not exist
722 at all). Its syntax is equivalent to if.
723
724 if condition body
725 Begin a conditional. This request can also be written as fol‐
726 lows:
727
728 .if condition \{body
729 body ...\}
730
731 .if condition \{\
732 body ...
733 .\}
734
735 The condition is a boolean expression. Currently, mandoc(1) sup‐
736 ports the following subset of roff conditionals:
737
738 · If ‘!’ is prefixed to condition, it is logically inverted.
739
740 · If the first character of condition is ‘n’ (nroff mode) or
741 ‘o’ (odd page), it evaluates to true.
742
743 · If the first character of condition is ‘c’ (character
744 available), ‘e’ (even page), ‘t’ (troff mode), or ‘v’ (vroff
745 mode), it evaluates to false.
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 it 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 Switch to no-fill mode. See man(7). Ignored by mdoc(7).
971
972 nh Turn off automatic hyphenation mode. Currently ignored.
973
974 nhychar char ...
975 Define hyphenation-inhibiting characters. This is a Heirloom
976 extension and currently ignored.
977
978 nm [start [inc [space [indent]]]]
979 Print line numbers. Currently unsupported.
980
981 nn [number]
982 Temporarily turn off line numbering. Currently unsupported.
983
984 nop body
985 Execute the rest of the input line as a request or macro line.
986 Currently unsupported.
987
988 nr register [+|-]expression [stepsize]
989 Define or change a register. A register is an arbitrary string
990 value that defines some sort of state, which influences parsing
991 and/or formatting. For the syntax of expression, see Numerical
992 expressions below. If it is prefixed by a sign, the register
993 will be incremented or decremented instead of assigned to.
994
995 The stepsize is used by the \n+ auto-increment feature. It
996 remains unchanged when omitted while changing an existing regis‐
997 ter, and it defaults to 0 when defining a new register.
998
999 The following register is handled specially:
1000
1001 nS If set to a positive integer value, certain mdoc(7)
1002 macros will behave in the same way as in the SYNOPSIS
1003 section. If set to 0, these macros will behave in the
1004 same way as outside the SYNOPSIS section, even when
1005 called within the SYNOPSIS section itself. Note that
1006 starting a new mdoc(7) section with the Sh macro will
1007 reset this register.
1008
1009 nrf register [+|-]expression [increment]
1010 Define or change a floating-point register. This is a Heirloom
1011 extension and currently unsupported.
1012
1013 nroff Force nroff mode. This is a groff extension and currently
1014 ignored.
1015
1016 ns Turn on no-space mode. Currently ignored.
1017
1018 nx [filename]
1019 Abort processing of the current input file and process another
1020 one. Ignored because insecure.
1021
1022 open stream file
1023 Open a file for writing. Ignored because insecure.
1024
1025 opena stream file
1026 Open a file for appending. Ignored because insecure.
1027
1028 os Output saved vertical space. Currently ignored.
1029
1030 output string
1031 Output directly to intermediate output. Not supported.
1032
1033 padj [1 | 0]
1034 Globally control paragraph-at-once adjustment. This is a Heir‐
1035 loom extension and currently ignored.
1036
1037 papersize media
1038 Set the paper size. This is a Heirloom extension and currently
1039 ignored.
1040
1041 pc [char]
1042 Change the page number character. Currently ignored.
1043
1044 pev Print environments. This is a groff extension and currently
1045 ignored.
1046
1047 pi command
1048 Pipe output to a shell command. Ignored because insecure.
1049
1050 PI Low-level request used by BP. This is a Heirloom extension and
1051 currently unsupported.
1052
1053 pl [[+|-]height]
1054 Change page length. Currently ignored.
1055
1056 pm Print names and sizes of macros, strings, and diversions to stan‐
1057 dard error output. Currently ignored.
1058
1059 pn [+|-]number
1060 Change the page number of the next page. Currently ignored.
1061
1062 pnr Print all number registers on standard error output. Currently
1063 ignored.
1064
1065 po [[+|-]offset]
1066 Set a horizontal page offset. If no argument is specified, the
1067 page offset is reverted to its previous value. If a sign is
1068 specified, the new page offset is calculated relative to the cur‐
1069 rent one; otherwise, it is absolute. The argument follows the
1070 syntax of Scaling Widths and the default scaling unit is m.
1071
1072 ps [[+|-]size]
1073 Change point size. Currently ignored.
1074
1075 psbb filename
1076 Retrieve the bounding box of a PostScript file. Currently unsup‐
1077 ported.
1078
1079 pshape indent length ...
1080 Set a special shape for the current paragraph. This is a Heir‐
1081 loom extension and currently unsupported.
1082
1083 pso command
1084 Include output of a shell command. Ignored because insecure.
1085
1086 ptr Print the names and positions of all traps on standard error out‐
1087 put. This is a groff extension and currently ignored.
1088
1089 pvs [[+|-]height]
1090 Change post-vertical spacing. This is a groff extension and cur‐
1091 rently ignored.
1092
1093 rchar glyph ...
1094 Remove glyph definitions. Currently unsupported.
1095
1096 rd [prompt [argument ...]]
1097 Read from standard input. Currently ignored.
1098
1099 recursionlimit maxrec maxtail
1100 Set the maximum stack depth for recursive macros. This is a
1101 Heirloom extension and currently ignored.
1102
1103 return [twice]
1104 Exit a macro and return to the caller. Currently unsupported.
1105
1106 rfschar font glyph ...
1107 Remove font-specific fallback glyph definitions. Currently
1108 unsupported.
1109
1110 rhang font char ... afmunits
1111 Hang characters at right margin. This is a Heirloom extension
1112 and currently ignored.
1113
1114 rj [N] Justify the next N input lines to the right margin without fill‐
1115 ing. N defaults to 1. An argument of 0 or less ends right
1116 adjustment.
1117
1118 rm macroname
1119 Remove a request, macro or string.
1120
1121 rn oldname newname
1122 Rename a request, macro, diversion, or string. In mandoc(1),
1123 user-defined macros, mdoc(7) and man(7) macros, and user-defined
1124 strings can be renamed, but renaming of predefined strings and of
1125 roff requests is not supported, and diversions are not imple‐
1126 mented at all.
1127
1128 rnn oldname newname
1129 Rename a number register. Currently unsupported.
1130
1131 rr register
1132 Remove a register.
1133
1134 rs End no-space mode. Currently ignored.
1135
1136 rt [dist]
1137 Return to marked vertical position. Currently ignored.
1138
1139 schar glyph [string]
1140 Define global fallback glyph. This is a groff extension and cur‐
1141 rently unsupported.
1142
1143 sentchar char ...
1144 Define sentence-ending characters. This is a Heirloom extension
1145 and currently ignored.
1146
1147 shc [glyph]
1148 Change the soft hyphen character. Currently ignored.
1149
1150 shift [number]
1151 Shift macro arguments. Currently unsupported.
1152
1153 sizes size ...
1154 Define permissible point sizes. This is a groff extension and
1155 currently ignored.
1156
1157 so filename
1158 Include a source file. The file is read and its contents pro‐
1159 cessed as input in place of the so request line. To avoid inad‐
1160 vertent inclusion of unrelated files, mandoc(1) only accepts rel‐
1161 ative paths not containing the strings "../" and "/..".
1162
1163 This request requires man(1) to change to the right directory
1164 before calling mandoc(1), per convention to the root of the man‐
1165 ual tree. Typical usage looks like:
1166
1167 .so man3/Xcursor.3
1168
1169 As the whole concept is rather fragile, the use of so is discour‐
1170 aged. Use ln(1) instead.
1171
1172 sp [height]
1173 Break the output line and emit vertical space. The argument fol‐
1174 lows the syntax of Scaling Widths and defaults to one blank line
1175 (1v).
1176
1177 spacewidth [1 | 0]
1178 Set the space width from the font metrics file. This is a Heir‐
1179 loom extension and currently ignored.
1180
1181 special [font ...]
1182 Define a special font. This is a groff extension and currently
1183 ignored.
1184
1185 spreadwarn [width]
1186 Warn about wide spacing between words. Currently ignored.
1187
1188 ss wordspace [sentencespace]
1189 Set space character size. Currently ignored.
1190
1191 sty position style
1192 Associate style with a font position. This is a groff extension
1193 and currently ignored.
1194
1195 substring stringname startpos [endpos]
1196 Replace a user-defined string with a substring. Currently unsup‐
1197 ported.
1198
1199 sv [height]
1200 Save vertical space. Currently ignored.
1201
1202 sy command
1203 Execute shell command. Ignored because insecure.
1204
1205 T& Re-start a table layout, retaining the options of the prior table
1206 invocation. See TS.
1207
1208 ta [width ... [T width ...]]
1209 Set tab stops. Each width argument follows the syntax of Scaling
1210 Widths. If prefixed by a plus sign, it is relative to the previ‐
1211 ous tab stop. The arguments after the T marker are used repeat‐
1212 edly as often as needed; for each reuse, they are taken relative
1213 to the last previously established tab stop. When ta is called
1214 without arguments, all tab stops are cleared.
1215
1216 tc [glyph]
1217 Change tab repetition character. Currently unsupported.
1218
1219 TE End a table context. See TS.
1220
1221 ti [+|-]width
1222 Break the output line and indent the next output line by width.
1223 If a sign is specified, the temporary indentation is calculated
1224 relative to the current indentation; otherwise, it is absolute.
1225 The argument follows the syntax of Scaling Widths and the default
1226 scaling unit is m.
1227
1228 tkf font minps width1 maxps width2
1229 Enable track kerning for a font. Currently ignored.
1230
1231 tl 'left'center'right'
1232 Print a title line. Currently unsupported.
1233
1234 tm string
1235 Print to standard error output. Currently ignored.
1236
1237 tm1 string
1238 Print to standard error output, allowing leading blanks. This is
1239 a groff extension and currently ignored.
1240
1241 tmc string
1242 Print to standard error output without a trailing newline. This
1243 is a groff extension and currently ignored.
1244
1245 tr glyph glyph ...
1246 Output character translation. The first glyph in each pair is
1247 replaced by the second one. Character escapes can be used; for
1248 example,
1249
1250 tr \(xx\(yy
1251
1252 replaces all invocations of \(xx with \(yy.
1253
1254 track font minps width1 maxps width2
1255 Static letter space tracking. This is a Heirloom extension and
1256 currently ignored.
1257
1258 transchar char ...
1259 Define transparent characters for sentence-ending. This is a
1260 Heirloom extension and currently ignored.
1261
1262 trf filename
1263 Output the contents of a file, disallowing invalid characters.
1264 This is a groff extension and ignored because insecure.
1265
1266 trimat left top width height
1267 Set the TrimBox page parameter for PDF generation. This is a
1268 Heirloom extension and currently ignored.
1269
1270 trin glyph glyph ...
1271 Output character translation, ignored by asciify. Currently
1272 unsupported.
1273
1274 trnt glyph glyph ...
1275 Output character translation, ignored by \!. Currently unsup‐
1276 ported.
1277
1278 troff Force troff mode. This is a groff extension and currently
1279 ignored.
1280
1281 TS Begin a table, which formats input in aligned rows and columns.
1282 See tbl(7) for a description of the tbl language.
1283
1284 uf font
1285 Globally set the underline font. Currently ignored.
1286
1287 ul [N] Underline next N input lines. Currently ignored.
1288
1289 unformat divname
1290 Unformat spaces and tabs in a diversion. Currently unsupported.
1291
1292 unwatch macroname
1293 Disable notification for string or macro. This is a Heirloom
1294 extension and currently ignored.
1295
1296 unwatchn register
1297 Disable notification for register. This is a Heirloom extension
1298 and currently ignored.
1299
1300 vpt [1 | 0]
1301 Enable or disable vertical position traps. This is a groff
1302 extension and currently ignored.
1303
1304 vs [[+|-]height]
1305 Change vertical spacing. Currently ignored.
1306
1307 warn flags
1308 Set warning level. Currently ignored.
1309
1310 warnscale si
1311 Set the scaling indicator used in warnings. This is a groff
1312 extension and currently ignored.
1313
1314 watch macroname
1315 Notify on change of string or macro. This is a Heirloom exten‐
1316 sion and currently ignored.
1317
1318 watchlength maxlength
1319 On change, report the contents of macros and strings up to the
1320 specified length. This is a Heirloom extension and currently
1321 ignored.
1322
1323 watchn register
1324 Notify on change of register. This is a Heirloom extension and
1325 currently ignored.
1326
1327 wh dist [macroname]
1328 Set a page location trap. Currently unsupported.
1329
1330 while condition body
1331 Repeated execution while a condition is true. Currently unsup‐
1332 ported.
1333
1334 write ["]string
1335 Write to an open file. Ignored because insecure.
1336
1337 writec ["]string
1338 Write to an open file without appending a newline. Ignored
1339 because insecure.
1340
1341 writem macroname
1342 Write macro or string to an open file. Ignored because insecure.
1343
1344 xflag level
1345 Set the extension level. This is a Heirloom extension and cur‐
1346 rently ignored.
1347
1348 Numerical expressions
1349 The nr, if, and ie requests accept integer numerical expressions as argu‐
1350 ments. These are always evaluated using the C int type; integer overflow
1351 works the same way as in the C language. Numbers consist of an arbitrary
1352 number of digits ‘0’ to ‘9’ prefixed by an optional sign ‘+’ or ‘-’.
1353 Each number may be followed by one optional scaling unit described below
1354 Scaling Widths. The following equations hold:
1355
1356 1i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240
1357 254c = 100i = 24000u = 24000
1358 1f = 65536u = 65536
1359
1360 The following binary operators are implemented. Unless otherwise stated,
1361 they behave as in the C language:
1362
1363 + addition
1364 - subtraction
1365 * multiplication
1366 / division
1367 % remainder of division
1368 < less than
1369 > greater than
1370 == equal to
1371 = equal to, same effect as == (this differs from C)
1372 <= less than or equal to
1373 >= greater than or equal to
1374 <> not equal to (corresponds to C !=; this one is of limited portabil‐
1375 ity, it is supported by Heirloom roff, but not by groff)
1376 & logical and (corresponds to C &&)
1377 : logical or (corresponds to C ||)
1378 <? minimum (not available in C)
1379 >? maximum (not available in C)
1380
1381 There is no concept of precedence; evaluation proceeds from left to
1382 right, except when subexpressions are enclosed in parentheses. Inside
1383 parentheses, whitespace is ignored.
1384
1386 The mandoc(1) roff parser recognises the following escape sequences.
1387 Note that the roff language defines more escape sequences not implemented
1388 in mandoc(1). In mdoc(7) and man(7) documents, using escape sequences is
1389 discouraged except for those described in the LANGUAGE SYNTAX section
1390 above.
1391
1392 A backslash followed by any character not listed here simply prints that
1393 character itself.
1394
1395 \<newline>
1396 A backslash at the end of an input line can be used to continue the logi‐
1397 cal input line on the next physical input line, joining the text on both
1398 lines together as if it were on a single input line.
1399
1400 \<space>
1401 The escape sequence backslash-space (‘\ ’) is an unpaddable space-sized
1402 non-breaking space character; see Whitespace.
1403
1404 \"
1405 The rest of the input line is treated as Comments.
1406
1407 \%
1408 Hyphenation allowed at this point of the word; ignored by mandoc(1).
1409
1410 \&
1411 Non-printing zero-width character; see Whitespace.
1412
1413 \'
1414 Acute accent special character; use ‘\(aa’ instead.
1415
1416 \(cc
1417 Special Characters with two-letter names, see mandoc_char(7).
1418
1419 \*[name]
1420 Interpolate the string with the name; see Predefined Strings and ds. For
1421 short names, there are variants \*c and \*(cc.
1422
1423 \,
1424 Left italic correction (groff extension); ignored by mandoc(1).
1425
1426 \-
1427 Special character “mathematical minus sign”.
1428
1429 \/
1430 Right italic correction (groff extension); ignored by mandoc(1).
1431
1432 \[name]
1433 Special Characters with names of arbitrary length, see mandoc_char(7).
1434
1435 \^
1436 One-twelfth em half-narrow space character, effectively zero-width in
1437 mandoc(1).
1438
1439 \`
1440 Grave accent special character; use ‘\(ga’ instead.
1441
1442 \{
1443 Begin conditional input; see if.
1444
1445 \|
1446 One-sixth em narrow space character, effectively zero-width in mandoc(1).
1447
1448 \}
1449 End conditional input; see if.
1450
1451 \~
1452 Paddable non-breaking space character.
1453
1454 \0
1455 Digit width space character.
1456
1457 \A'string'
1458 Anchor definition; ignored by mandoc(1).
1459
1460 \B'string'
1461 Interpolate ‘1’ if string conforms to the syntax of Numerical expressions
1462 explained above and ‘0’ otherwise.
1463
1464 \b'string'
1465 Bracket building function; ignored by mandoc(1).
1466
1467 \C'name'
1468 Special Characters with names of arbitrary length.
1469
1470 \c
1471 When encountered at the end of an input text line, the next input text
1472 line is considered to continue that line, even if there are request or
1473 macro lines in between. No whitespace is inserted.
1474
1475 \D'string'
1476 Draw graphics function; ignored by mandoc(1).
1477
1478 \d
1479 Move down by half a line; ignored by mandoc(1).
1480
1481 \e
1482 Backslash special character.
1483
1484 \F[name]
1485 Switch font family (groff extension); ignored by mandoc(1). For short
1486 names, there are variants \Fc and \F(cc.
1487
1488 \f[name]
1489 Switch to the font name, see Text Decoration. For short names, there are
1490 variants \fc and \f(cc.
1491
1492 \g[name]
1493 Interpolate the format of a number register; ignored by mandoc(1). For
1494 short names, there are variants \gc and \g(cc.
1495
1496 \H'[+|-]number'
1497 Set the height of the current font; ignored by mandoc(1).
1498
1499 \h'[|]width'
1500 Horizontal motion. If the vertical bar is given, the motion is relative
1501 to the current indentation. Otherwise, it is relative to the current
1502 position. The default scaling unit is m.
1503
1504 \k[name]
1505 Mark horizontal input place in register; ignored by mandoc(1). For short
1506 names, there are variants \kc and \k(cc.
1507
1508 \L'number[c]'
1509 Vertical line drawing function; ignored by mandoc(1).
1510
1511 \l'width[c]'
1512 Draw a horizontal line of width using the glyph c.
1513
1514 \M[name]
1515 Set fill (background) color (groff extension); ignored by mandoc(1). For
1516 short names, there are variants \Mc and \M(cc.
1517
1518 \m[name]
1519 Set glyph drawing color (groff extension); ignored by mandoc(1). For
1520 short names, there are variants \mc and \m(cc.
1521
1522 \N'number'
1523 Character number on the current font.
1524
1525 \n[+|-][name]
1526 Interpolate the number register name. For short names, there are vari‐
1527 ants \nc and \n(cc. If the optional sign is specified, the register is
1528 first incremented or decremented by the stepsize that was specified in
1529 the relevant nr request, and the changed value is interpolated.
1530
1531 \o'string'
1532 Overstrike, writing all the characters contained in the string to the
1533 same output position. In terminal and HTML output modes, only the last
1534 one of the characters is visible.
1535
1536 \p
1537 Break the output line at the end of the current word.
1538
1539 \R'name [+|-]number'
1540 Set number register; ignored by mandoc(1).
1541
1542 \S'number'
1543 Slant output; ignored by mandoc(1).
1544
1545 \s'[+|-]number'
1546 Change point size; ignored by mandoc(1). Alternative forms \s[+|-]n,
1547 \s[+|-]'number', \s[[+|-]number], and \s[+|-][number] are also parsed and
1548 ignored.
1549
1550 \t
1551 Horizontal tab; ignored by mandoc(1).
1552
1553 \u
1554 Move up by half a line; ignored by mandoc(1).
1555
1556 \V[name]
1557 Interpolate an environment variable; ignored by mandoc(1). For short
1558 names, there are variants \Vc and \V(cc.
1559
1560 \v'number'
1561 Vertical motion; ignored by mandoc(1).
1562
1563 \w'string'
1564 Interpolate the width of the string. The mandoc(1) implementation
1565 assumes that after expansion of user-defined strings, the string only
1566 contains normal characters, no escape sequences, and that each character
1567 has a width of 24 basic units.
1568
1569 \X'string'
1570 Output string as device control function; ignored in nroff mode and by
1571 mandoc(1).
1572
1573 \x'number'
1574 Extra line space function; ignored by mandoc(1).
1575
1576 \Y[name]
1577 Output a string as a device control function; ignored in nroff mode and
1578 by mandoc(1). For short names, there are variants \Yc and \Y(cc.
1579
1580 \Z'string'
1581 Print string with zero width and height; ignored by mandoc(1).
1582
1583 \z
1584 Output the next character without advancing the cursor position.
1585
1587 The mandoc(1) implementation of the roff language is intentionally incom‐
1588 plete. Unimplemented features include:
1589
1590 - For security reasons, mandoc(1) never reads or writes external files
1591 except via so requests with safe relative paths.
1592 - There is no automatic hyphenation, no adjustment to the right margin,
1593 and no centering; the output is always set flush-left.
1594 - Support for setting tabulator positions and tabulator and leader
1595 characters is missing, and support for manually changing indentation
1596 is limited.
1597 - The ‘u’ scaling unit is the default terminal unit. In traditional
1598 troff systems, this unit changes depending on the output media.
1599 - Width measurements are implemented in a crude way and often yield
1600 wrong results. Explicit movement requests and escapes are ignored.
1601 - There is no concept of output pages, no support for floats, graphics
1602 drawing, and picture inclusion; terminal output is always continuous.
1603 - Requests regarding color, font families, and glyph manipulation are
1604 ignored. Font support is very limited. Kerning is not implemented,
1605 and no ligatures are produced.
1606 - The "'" macro control character does not suppress output line breaks.
1607 - Diversions are not implemented, and support for traps is very incom‐
1608 plete.
1609 - While recursion is supported, while loops are not.
1610
1611 The special semantics of the nS number register is an idiosyncracy of
1612 OpenBSD manuals and not supported by other mdoc(7) implementations.
1613
1615 mandoc(1), eqn(7), man(7), mandoc_char(7), mdoc(7), tbl(7)
1616
1617 Joseph F. Ossanna and Brian W. Kernighan, Troff User's Manual, AT&T Bell
1618 Laboratories, Computing Science Technical Report, 54,
1619 http://www.kohala.com/start/troff/cstr54.ps, 1976 and 1992.
1620
1621 Joseph F. Ossanna, Brian W. Kernighan, and Gunnar Ritter, Heirloom
1622 Documentation Tools Nroff/Troff User's Manual,
1623 http://heirloom.sourceforge.net/doctools/troff.pdf, September 17, 2007.
1624
1626 The RUNOFF typesetting system, whose input forms the basis for roff, was
1627 written in MAD and FAP for the CTSS operating system by Jerome E.
1628 Saltzer in 1964. Doug McIlroy rewrote it in BCPL in 1969, renaming it
1629 roff. Dennis M. Ritchie rewrote McIlroy's roff in PDP-11 assembly for
1630 Version 1 AT&T UNIX, Joseph F. Ossanna improved roff and renamed it nroff
1631 for Version 2 AT&T UNIX, then ported nroff to C as troff, which Brian W.
1632 Kernighan released with Version 7 AT&T UNIX. In 1989, James Clarke re-
1633 implemented troff in C++, naming it groff.
1634
1636 This roff reference was written by Kristaps Dzonsons <kristaps@bsd.lv>
1637 and Ingo Schwarze <schwarze@openbsd.org>.
1638
1639BSD June 20, 2019 BSD