1 .\" $Id: roff.7,v 1.120 2022/05/31 20:23:05 schwarze Exp $
3 .\" Copyright (c) 2010-2019, 2022 Ingo Schwarze <schwarze@openbsd.org>
4 .\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 .Dd $Mdocdate: May 31 2022 $
23 .Nd roff language reference for mandoc
27 language is a general purpose text formatting language.
28 Since traditional implementations of the
32 manual formatting languages are based on it,
33 many real-world manuals use small numbers of
35 requests and escape sequences intermixed with their
40 To properly format such manuals, the
42 utility supports a subset of
45 Even though this manual page lists all
47 requests and escape sequences, it only contains partial information
48 about requests not supported by
50 and about language features that do not matter for manual pages.
57 Input lines beginning with the control character
59 are parsed for requests and macros.
65 Requests change the processing state and manipulate the formatting;
66 some macros also define the document structure and produce formatted
70 is accepted as an alternative control character,
76 Lines not beginning with control characters are called
78 They provide free-form text to be printed; the formatting of the text
79 depends on the respective processing context.
82 documents may contain only graphable 7-bit ASCII characters, the space
83 character, and, in certain circumstances, the tab character.
84 The backslash character
86 indicates the start of an escape sequence, used for example for
89 .Sx Special Characters .
90 For a complete listing of escape sequences, consult the
91 .Sx ESCAPE SEQUENCE REFERENCE
94 Text following an escaped double-quote
96 whether in a request, macro, or text line, is ignored to the end of the line.
97 A request line beginning with a control character and comment escape
100 Furthermore, request lines with only a control character and optional
101 trailing whitespace are stripped from input.
104 .Bd -literal -offset indent -compact
105 \&.\e\(dq This is a comment line.
106 \&.\e\(dq The next line is ignored:
108 \&.Sh EXAMPLES \e\(dq This is a comment, too.
109 \&example text \e\(dq And so is this.
111 .Ss Special Characters
112 Special characters are used to encode special glyphs and are rendered
113 differently across output media.
114 They may occur in request, macro, and text lines.
115 Sequences begin with the escape character
117 followed by either an open-parenthesis
119 for two-character sequences; an open-bracket
121 for n-character sequences (terminated at a close-bracket
123 or a single one character sequence.
126 .Bl -tag -width Ds -offset indent -compact
128 Two-letter em dash escape.
130 One-letter backslash escape.
141 documents, fonts are usually selected with macros.
144 escape sequence and the
146 request can be used to manually change the font,
147 but this is not recommended in
150 Such manual font changes are overridden by many subsequent macros.
152 The following fonts are supported:
154 .Bl -tag -width CW -offset indent -compact
158 A font that is both bold and italic.
160 Bold constant width font.
165 Italic constant width font.
170 Regular constant width font.
180 Return to the previous font.
181 If a macro caused a font change since the last
185 request, this returns to the font before the last font change in
186 the macro rather than to the font before the last manual font change.
189 This is the default font.
205 .Bl -tag -width Ds -offset indent -compact
207 Write in \fBbold\fP, then switch to regular font mode.
208 .It Li \efIitalic\efP
209 Write in \fIitalic\fP, then return to previous font mode.
210 .It Li \ef(BIbold italic\efP
211 Write in \f(BIbold italic\fP, then return to previous font mode.
214 Whitespace consists of the space character.
215 In text lines, whitespace is preserved within a line.
216 In request and macro lines, whitespace delimits arguments and is discarded.
218 Unescaped trailing spaces are stripped from text line input unless in a
220 In general, trailing whitespace on any input line is discouraged for
221 reasons of portability.
222 In the rare case that a space character is needed at the end of an
223 input line, it may be forced by
226 Literal space characters can be produced in the output
227 using escape sequences.
228 In macro lines, they can also be included in arguments using quotation; see
232 Blank text lines, which may include whitespace, are only permitted
233 within literal contexts.
234 If the first character of a text line is a space, that line is printed
235 with a leading newline.
237 Many requests and macros support scaled widths for their arguments.
238 The syntax for a scaled width is
239 .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
240 where a decimal must be preceded or followed by at least one digit.
242 The following scaling units are accepted:
244 .Bl -tag -width Ds -offset indent -compact
258 default vertical span
270 default horizontal span for the terminal
275 Using anything other than
280 is necessarily non-portable across output media.
284 If a scaling unit is not provided, the numerical value is interpreted
285 under the default rules of
287 for vertical spaces and
292 .Bl -tag -width ".Bl -tag -width 2i" -offset indent -compact
293 .It Li \&.Bl -tag -width 2i
294 two-inch tagged list indentation in
297 two-inch tagged list indentation in
303 Each sentence should terminate at the end of an input line.
304 By doing this, a formatter will be able to apply the proper amount of
305 spacing after the end of sentence (unescaped) period, exclamation mark,
306 or question mark followed by zero or more non-sentence closing
315 The proper spacing is also intelligently preserved if a sentence ends at
316 the boundary of a macro line.
318 If an input line happens to end with a period, exclamation or question
319 mark that isn't the end of a sentence, append a zero-width space
323 .Bd -literal -offset indent -compact
324 Do not end sentences mid-line like this. Instead,
325 end a sentence like this.
326 A macro would end like this:
328 An abbreviation at the end of an input line needs escaping, e.g.\e&
332 A request or macro line consists of:
336 the control character
340 at the beginning of the line,
342 optionally an arbitrary amount of whitespace,
344 the name of the request or the macro, which is one word of arbitrary
345 length, terminated by whitespace,
347 and zero or more arguments delimited by whitespace.
350 Thus, the following request lines are all equivalent:
351 .Bd -literal -offset indent
357 Macros are provided by the
361 languages and can be defined by the
364 When called, they follow the same syntax as requests, except that
365 macro arguments may optionally be quoted by enclosing them
366 in double quote characters
368 Quoted text, even if it contains whitespace or would cause
369 a macro invocation when unquoted, is always considered literal text.
370 Inside quoted text, pairs of double quote characters
372 resolve to single double quote characters.
374 To be recognised as the beginning of a quoted argument, the opening
375 quote character must be preceded by a space character.
376 A quoted argument extends to the next double quote character that is not
377 part of a pair, or to the end of the input line, whichever comes earlier.
378 Leaving out the terminating double quote character at the end of the line
380 For clarity, if more arguments follow on the same input line,
381 it is recommended to follow the terminating double quote character
382 by a space character; in case the next character after the terminating
383 double quote character is anything else, it is regarded as the beginning
384 of the next, unquoted argument.
386 Both in quoted and unquoted arguments, pairs of backslashes
388 resolve to single backslashes.
389 In unquoted arguments, space characters can alternatively be included
390 by preceding them with a backslash
392 but quoting is usually better for clarity.
395 .Bl -tag -width Ds -offset indent -compact
396 .It Li .Fn strlen \(dqconst char *s\(dq
399 into one function argument.
405 would be considered separate arguments.
406 .It Li .Op \(dqFl a\(dq
409 as literal text instead of a flag macro.
411 .Sh REQUEST REFERENCE
415 parser recognises the following requests.
416 For requests marked as "ignored" or "unsupported", any arguments are
417 ignored, and the number of arguments is not checked.
419 .It Ic \&ab Op Ar message
421 Currently unsupported.
422 .It Ic \&ad Op Cm b | c | l | n | r
423 Set line adjustment mode for subsequent text.
425 .It Ic \&af Ar registername format
426 Assign an output format to a number register.
428 .It Ic \&aln Ar newname oldname
429 Create an alias for a number register.
430 Currently unsupported.
431 .It Ic \&als Ar newname oldname
432 Create an alias for a request, string, macro, or diversion.
433 .It Ic \&am Ar macroname Op Ar endmacro
434 Append to a macro definition.
435 The syntax of this request is the same as that of
437 .It Ic \&am1 Ar macroname Op Ar endmacro
438 Append to a macro definition, switching roff compatibility mode off
439 during macro execution (groff extension).
440 The syntax of this request is the same as that of
446 compatibility mode at all, it handles this request as an alias for
448 .It Ic \&ami Ar macrostring Op Ar endstring
449 Append to a macro definition, specifying the macro name indirectly
451 The syntax of this request is the same as that of
453 .It Ic \&ami1 Ar macrostring Op Ar endstring
454 Append to a macro definition, specifying the macro name indirectly
455 and switching roff compatibility mode off during macro execution
457 The syntax of this request is the same as that of
463 compatibility mode at all, it handles this request as an alias for
465 .It Ic \&as Ar stringname Op Ar string
466 Append to a user-defined string.
467 The syntax of this request is the same as that of
469 If a user-defined string with the specified name does not yet exist,
470 it is set to the empty string before appending.
471 .It Ic \&as1 Ar stringname Op Ar string
472 Append to a user-defined string, switching roff compatibility mode off
473 during macro execution (groff extension).
474 The syntax of this request is the same as that of
480 compatibility mode at all, it handles this request as an alias for
482 .It Ic \&asciify Ar divname
483 Fully unformat a diversion.
484 Currently unsupported.
486 Print a backtrace of the input stack.
487 This is a groff extension and currently ignored.
488 .It Ic \&bd Ar font Oo Ar curfont Oc Op Ar offset
489 Artificially embolden by repeated printing with small shifts.
491 .It Ic \&bleedat Ar left top width height
492 Set the BleedBox page parameter for PDF generation.
493 This is a Heirloom extension and currently ignored.
494 .It Ic \&blm Ar macroname
495 Set a blank line trap.
496 Currently unsupported.
497 .It Ic \&box Ar divname
498 Begin a diversion without including a partially filled line.
499 Currently unsupported.
500 .It Ic \&boxa Ar divname
501 Add to a diversion without including a partially filled line.
502 Currently unsupported.
503 .It Ic \&bp Oo Cm + Ns | Ns Cm - Oc Ns Ar pagenumber
506 .It Ic \&BP Ar source height width position offset flags label
507 Define a frame and place a picture in it.
508 This is a Heirloom extension and currently unsupported.
510 Break the output line.
512 Break out of the innermost
515 .It Ic \&breakchar Ar char ...
516 Optional line break characters.
517 This is a Heirloom extension and currently ignored.
519 Break output line after the next
522 This is a Heirloom extension and currently ignored.
524 Break and spread output line.
525 Currently, this is implemented as an alias for
528 Break and spread output line after the next
531 This is a Heirloom extension and currently ignored.
532 .It Ic \&c2 Op Ar char
533 Change the no-break control character.
534 Currently unsupported.
535 .It Ic \&cc Op Ar char
536 Change the control character.
539 is not specified, the control character is reset to
541 Trailing characters are ignored.
545 input lines without filling.
548 An argument of 0 or less ends centering.
549 Currently, high level macros abort centering.
550 .It Ic \&cf Ar filename
551 Output the contents of a file.
552 Ignored because insecure.
553 .It Ic \&cflags Ar flags char ...
555 This is a groff extension and currently ignored.
556 .It Ic \&ch Ar macroname Op Ar dist
557 Change a trap location.
559 .It Ic \&char Ar glyph Op Ar string
560 Define or redefine the ASCII character or character escape sequence
565 Only partially supported in
567 may interact incorrectly with
569 .It Ic \&chop Ar stringname
570 Remove the last character from a macro, string, or diversion.
571 Currently unsupported.
572 .It Ic \&class Ar classname char ...
573 Define a character class.
574 This is a groff extension and currently ignored.
575 .It Ic \&close Ar streamname
577 Ignored because insecure.
578 .It Ic \&CL Ar color text
580 This is a Heirloom extension and currently unsupported.
581 .It Ic \&color Op Cm 1 | 0
582 Activate or deactivate colors.
583 This is a groff extension and currently ignored.
584 .It Ic \&composite Ar from to
585 Define a name component for composite glyph names.
586 This is a groff extension and currently unsupported.
588 Immediately start the next iteration of a
591 Currently unsupported.
592 .It Ic \&cp Op Cm 1 | 0
595 compatibility mode on or off.
597 .It Ic \&cropat Ar left top width height
598 Set the CropBox page parameter for PDF generation.
599 This is a Heirloom extension and currently ignored.
600 .It Ic \&cs Ar font Op Ar width Op Ar emsize
601 Constant character spacing mode.
606 input lines including whitespace.
608 .It Ic \&da Ar divname
609 Append to a diversion.
610 Currently unsupported.
611 .It Ic \&dch Ar macroname Op Ar dist
612 Change a trap location in the current diversion.
613 This is a Heirloom extension and currently unsupported.
614 .It Ic \&de Ar macroname Op Ar endmacro
618 Its syntax can be either
619 .Bd -literal -offset indent
620 .Pf . Ic \&de Ar macroname
626 .Bd -literal -offset indent
627 .Pf . Ic \&de Ar macroname endmacro
632 Both forms define or redefine the macro
636 which may consist of one or more input lines, including the newline
637 characters terminating each line, optionally containing calls to
641 macros or high-level macros like
645 macros, whichever applies to the document in question.
649 works in the same way as for
655 and after that, it is also evaluated as a
659 macro, but not as a high-level macro.
661 The macro can be invoked later using the syntax
663 .D1 Pf . Ar macroname Op Ar argument Op Ar argument ...
665 Regarding argument parsing, see
669 The line invoking the macro will be replaced
670 in the input stream by the
672 replacing all occurrences of
677 .Ar N Ns th Ar argument .
679 .Bd -literal -offset indent
681 \efI\e^\e\e$1\e^\efP\e\e$2
688 .D1 \efI\e^XtFree\e^\efP.
690 in the input stream, and thus in the output: \fI\^XtFree\^\fP.
691 Each occurrence of \e\e$* is replaced with all the arguments,
692 joined together with single space characters.
693 The variant \e\e$@ is similar, except that each argument is
696 Since macros and user-defined strings share a common string table,
699 clobbers the user-defined string
703 can also be printed using the
705 string interpolation syntax described below
707 but this is rarely useful because every macro definition contains at least
708 one explicit newline character.
710 In order to prevent endless recursion, both groff and
712 limit the stack depth for expanding macros and strings
713 to a large, but finite number, and
715 also limits the length of the expanded input line.
716 Do not rely on the exact values of these limits.
717 .It Ic \&de1 Ar macroname Op Ar endmacro
720 macro that will be executed with
722 compatibility mode switched off during macro execution.
723 This is a groff extension.
728 compatibility mode at all, it handles this request as an alias for
730 .It Ic \&defcolor Ar newname scheme component ...
732 This is a groff extension and currently ignored.
733 .It Ic \&dei Ar macrostring Op Ar endstring
736 macro, specifying the macro name indirectly (groff extension).
737 The syntax of this request is the same as that of
739 The effect is the same as:
741 .D1 Pf . Cm \&de No \e* Ns Bo Ar macrostring Bc Op \e* Ns Bq Ar endstring
742 .It Ic \&dei1 Ar macrostring Op Ar endstring
745 macro that will be executed with
747 compatibility mode switched off during macro execution,
748 specifying the macro name indirectly (groff extension).
753 compatibility mode at all, it handles this request as an alias for
755 .It Ic \&device Ar string ...
756 .It Ic \&devicem Ar stringname
757 These two requests only make sense with the groff-specific intermediate
758 output format and are unsupported.
759 .It Ic \&di Ar divname
761 Currently unsupported.
762 .It Ic \&do Ar command Op Ar argument ...
765 request or macro line with compatibility mode disabled.
766 Currently unsupported.
767 .It Ic \&ds Ar stringname Op Oo \(dq Oc Ns Ar string
768 Define a user-defined string.
773 arguments are space-separated.
776 begins with a double-quote character, that character will not be part
778 All remaining characters on the input line form the
780 including whitespace and double-quote characters, even trailing ones.
784 can be interpolated into subsequent text by using
785 .No \e* Ns Bq Ar stringname
788 of arbitrary length, or \e*(NN or \e*N if the length of
790 is two or one characters, respectively.
791 Interpolation can be prevented by escaping the leading backslash;
792 that is, an asterisk preceded by an even number of backslashes
793 does not trigger string interpolation.
795 Since user-defined strings and macros share a common string table,
802 used for defining a string can also be invoked as a macro,
803 in which case the following input line will be appended to the
805 forming a new input line passed to the
809 .Bd -literal -offset indent
820 Such abuse is of course strongly discouraged.
821 .It Ic \&ds1 Ar stringname Op Oo \(dq Oc Ns Ar string
822 Define a user-defined string that will be expanded with
824 compatibility mode switched off during string expansion.
825 This is a groff extension.
830 compatibility mode at all, it handles this request as an alias for
832 .It Ic \&dwh Ar dist macroname
833 Set a location trap in the current diversion.
834 This is a Heirloom extension and currently unsupported.
835 .It Ic \&dt Op Ar dist macroname
836 Set a trap within a diversion.
837 Currently unsupported.
838 .It Ic \&ec Op Ar char
839 Enable the escape mechanism and change the escape character.
842 argument defaults to the backslash
845 Restore the escape character.
846 Currently unsupported.
848 Save the escape character.
849 Currently unsupported.
853 half of an if/else conditional.
854 Pops a result off the stack of conditional evaluations pushed by
856 and uses it as its conditional.
857 If no stack entries are present (e.g., due to no prior
860 then false is assumed.
861 The syntax of this request is similar to
863 except that the conditional is missing.
864 .It Ic \&em Ar macroname
865 Set a trap at the end of input.
866 Currently unsupported.
868 End an equation block.
872 Disable the escape mechanism completely.
874 End a picture started by
876 This is a Heirloom extension and currently unsupported.
878 Begin an equation block.
881 for a description of the equation language.
882 .It Ic \&errprint Ar message
883 Print a string like an error message.
884 This is a Heirloom extension and currently ignored.
885 .It Ic \&ev Op Ar envname
886 Switch to another environment.
887 Currently unsupported.
888 .It Ic \&evc Op Ar envname
889 Copy an environment into the current environment.
890 Currently unsupported.
892 Abort processing and exit.
893 Currently unsupported.
894 .It Ic \&fallback Ar curfont font ...
895 Select the fallback sequence for a font.
896 This is a Heirloom extension and currently ignored.
897 .It Ic \&fam Op Ar familyname
898 Change the font family.
899 This is a groff extension and currently ignored.
900 .It Ic \&fc Op Ar delimchar Op Ar padchar
901 Define a delimiting and a padding character for fields.
902 Currently unsupported.
903 .It Ic \&fchar Ar glyphname Op Ar string
904 Define a fallback glyph.
905 Currently unsupported.
906 .It Ic \&fcolor Ar colorname
907 Set the fill color for \eD objects.
908 This is a groff extension and currently ignored.
909 .It Ic \&fdeferlig Ar font string ...
910 Defer ligature building.
911 This is a Heirloom extension and currently ignored.
912 .It Ic \&feature Cm + Ns | Ns Cm - Ns Ar name
913 Enable or disable an OpenType feature.
914 This is a Heirloom extension and currently ignored.
916 Break the output line and switch to fill mode,
917 which is active by default but can be ended with the
920 In fill mode, input from subsequent input lines is added to
921 the same output line until the next word no longer fits,
922 at which point the output line is broken.
923 This request is implied by the
933 .It Ic \&fkern Ar font minkern
934 Control the use of kerning tables for a font.
935 This is a Heirloom extension and currently ignored.
939 .It Ic \&flig Ar font string char ...
941 This is a Heirloom extension and currently ignored.
942 .It Ic \&fp Ar position font Op Ar filename
943 Assign font position.
945 .It Ic \&fps Ar mapname ...
946 Mount a font with a special character map.
947 This is a Heirloom extension and currently ignored.
948 .It Ic \&fschar Ar font glyphname Op Ar string
949 Define a font-specific fallback glyph.
950 This is a groff extension and currently unsupported.
951 .It Ic \&fspacewidth Ar font Op Ar afmunits
952 Set a font-specific width for the space character.
953 This is a Heirloom extension and currently ignored.
954 .It Ic \&fspecial Ar curfont Op Ar font ...
955 Conditionally define a special font.
956 This is a groff extension and currently ignored.
957 .It Ic \&ft Op Ar font
964 .It Ic \&ftr Ar newname Op Ar oldname
966 This is a groff extension and currently ignored.
967 .It Ic \&fzoom Ar font Op Ar permille
970 .It Ic \&gcolor Op Ar colorname
972 This is a groff extension and currently ignored.
973 .It Ic \&hc Op Ar char
974 Set the hyphenation character.
976 .It Ic \&hcode Ar char code ...
977 Set hyphenation codes of characters.
979 .It Ic \&hidechar Ar font char ...
980 Hide characters in a font.
981 This is a Heirloom extension and currently ignored.
982 .It Ic \&hla Ar language
983 Set hyphenation language.
984 This is a groff extension and currently ignored.
985 .It Ic \&hlm Op Ar number
986 Set maximum number of consecutive hyphenated lines.
988 .It Ic \&hpf Ar filename
989 Load hyphenation pattern file.
990 This is a groff extension and currently ignored.
991 .It Ic \&hpfa Ar filename
992 Load hyphenation pattern file, appending to the current patterns.
993 This is a groff extension and currently ignored.
994 .It Ic \&hpfcode Ar code code ...
995 Define mapping values for character codes in hyphenation patterns.
996 This is a groff extension and currently ignored.
997 .It Ic \&hw Ar word ...
998 Specify hyphenation points in words.
1000 .It Ic \&hy Op Ar mode
1001 Set automatic hyphenation mode.
1003 .It Ic \&hylang Ar language
1004 Set hyphenation language.
1005 This is a Heirloom extension and currently ignored.
1006 .It Ic \&hylen Ar nchar
1007 Minimum word length for hyphenation.
1008 This is a Heirloom extension and currently ignored.
1009 .It Ic \&hym Op Ar length
1010 Set hyphenation margin.
1011 This is a groff extension and currently ignored.
1012 .It Ic \&hypp Ar penalty ...
1013 Define hyphenation penalties.
1014 This is a Heirloom extension and currently ignored.
1015 .It Ic \&hys Op Ar length
1016 Set hyphenation space.
1017 This is a groff extension and currently ignored.
1018 .It Ic \&ie Ar condition body
1021 half of an if/else conditional.
1022 The result of the conditional is pushed into a stack used by subsequent
1025 which may be separated by any intervening input (or not exist at all).
1026 Its syntax is equivalent to
1028 .It Ic \&if Ar condition body
1029 Begin a conditional.
1030 This request can also be written as follows:
1031 .Bd -unfilled -offset indent
1032 .Pf . Ic \&if Ar condition No \e{ Ns Ar body
1035 .Bd -unfilled -offset indent
1036 .Pf . Ic \&if Ar condition No \e{\e
1043 is a boolean expression.
1046 supports the following subset of roff conditionals:
1053 it is logically inverted.
1055 If the first character of
1063 it evaluates to true, and the
1065 starts with the next character.
1067 If the first character of
1077 it evaluates to false, and the
1079 starts with the next character.
1081 If the first character of
1085 .Pq character available ,
1086 it evaluates to true if the following character is an ASCII character
1087 or a valid character escape sequence, or to false otherwise.
1090 starts with the character following that next character.
1092 If the first character of
1096 it evaluates to true if the rest of
1098 is the name of an existing user defined macro or string;
1099 otherwise, it evaluates to false.
1101 If the first character of
1105 it evaluates to true if the rest of
1107 is the name of an existing number register;
1108 otherwise, it evaluates to false.
1112 starts with a parenthesis or with an optionally signed
1113 integer number, it is evaluated according to the rules of
1114 .Sx Numerical expressions
1116 It evaluates to true if the result is positive,
1117 or to false if the result is zero or negative.
1119 Otherwise, the first character of
1121 is regarded as a delimiter and it evaluates to true if the string
1122 extending from its first to its second occurrence is equal to the
1123 string extending from its second to its third occurrence.
1127 cannot be parsed, it evaluates to false.
1130 If a conditional is false, its children are not processed, but are
1131 syntactically interpreted to preserve the integrity of the input
1139 which may lead to interesting results, but
1141 .D1 \&.if t .if t \e{\e
1143 will continue to syntactically interpret to the block close of the final
1145 Sub-conditionals, in this case, obviously inherit the truth value of
1150 section is begun by an escaped brace
1152 scope continues until the end of the input line containing the
1153 matching closing-brace escape sequence
1157 is not enclosed in braces, scope continues until the end of the line.
1162 on the same line, whether after a brace or not, then requests and macros
1164 begin with a control character.
1165 It is generally more intuitive, in this case, to write
1166 .Bd -unfilled -offset indent
1167 .Pf . Ic \&if Ar condition No \e{\e
1172 than having the request or macro follow as
1174 .D1 Pf . Ic \&if Ar condition Pf \e{. Ar request
1176 The scope of a conditional is always parsed, but only executed if the
1177 conditional evaluates to true.
1181 is converted into a zero-width escape sequence if not passed as a
1190 being considered an argument of the
1193 .It Ic \&ig Op Ar endmacro
1195 Its syntax can be either
1196 .Bd -literal -offset indent
1203 .Bd -literal -offset indent
1204 .Pf . Cm \&ig Ar endmacro
1209 In the first case, input is ignored until a
1211 request is encountered on its own line.
1212 In the second case, input is ignored until the specified
1213 .Sq Pf . Ar endmacro
1215 Do not use the escape character
1217 anywhere in the definition of
1219 it would cause very strange behaviour.
1223 is a roff request or a roff macro, like in
1227 the subsequent invocation of
1229 will first terminate the
1231 then be invoked as usual.
1232 Otherwise, it only terminates the
1234 and arguments following it or the
1236 request are discarded.
1237 .It Ic \&in Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1243 .It Ic \&index Ar register stringname substring
1244 Find a substring in a string.
1245 This is a Heirloom extension and currently unsupported.
1246 .It Ic \&it Ar expression macro
1247 Set an input line trap.
1250 will be invoked after processing the number of input text lines
1251 specified by the numerical
1253 While evaluating the
1255 the unit suffixes described below
1258 .It Ic \&itc Ar expression macro
1259 Set an input line trap, not counting lines ending with \ec.
1260 Currently unsupported.
1261 .It Ic \&IX Ar class keystring
1262 To support the generation of a table of contents,
1264 emits this user-defined macro, usually without defining it.
1265 To avoid reporting large numbers of spurious errors,
1268 .It Ic \&kern Op Cm 1 | 0
1269 Switch kerning on or off.
1271 .It Ic \&kernafter Ar font char ... afmunits ...
1272 Increase kerning after some characters.
1273 This is a Heirloom extension and currently ignored.
1274 .It Ic \&kernbefore Ar font char ... afmunits ...
1275 Increase kerning before some characters.
1276 This is a Heirloom extension and currently ignored.
1277 .It Ic \&kernpair Ar font char ... font char ... afmunits
1278 Add a kerning pair to the kerning table.
1279 This is a Heirloom extension and currently ignored.
1280 .It Ic \&lc Op Ar glyph
1281 Define a leader repetition character.
1282 Currently unsupported.
1283 .It Ic \&lc_ctype Ar localename
1287 This is a Heirloom extension and currently unsupported.
1288 .It Ic \&lds Ar macroname string
1289 Define a local string.
1290 This is a Heirloom extension and currently unsupported.
1291 .It Ic \&length Ar register string
1292 Count the number of input characters in a string.
1293 Currently unsupported.
1294 .It Ic \&letadj Ar lspmin lshmin letss lspmax lshmax
1295 Dynamic letter spacing and reshaping.
1296 This is a Heirloom extension and currently ignored.
1297 .It Ic \&lf Ar lineno Op Ar filename
1298 Change the line number for error messages.
1299 Ignored because insecure.
1300 .It Ic \&lg Op Cm 1 | 0
1301 Switch the ligature mechanism on or off.
1303 .It Ic \&lhang Ar font char ... afmunits
1304 Hang characters at left margin.
1305 This is a Heirloom extension and currently ignored.
1306 .It Ic \&linetabs Op Cm 1 | 0
1307 Enable or disable line-tabs mode.
1308 This is a groff extension and currently unsupported.
1309 .It Ic \&ll Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1310 Change the output line length.
1313 argument is omitted, the line length is reset to its previous value.
1314 The default setting for terminal output is 78n.
1315 If a sign is given, the line length is added to or subtracted from;
1316 otherwise, it is set to the provided value.
1317 Using this request in new manuals is discouraged for several reasons,
1318 among others because it overrides the
1321 command line option.
1322 .It Ic \&lnr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1323 Set local number register.
1324 This is a Heirloom extension and currently unsupported.
1325 .It Ic \&lnrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1326 Set local floating-point register.
1327 This is a Heirloom extension and currently unsupported.
1328 .It Ic \&lpfx Ar string
1330 This is a Heirloom extension and currently unsupported.
1331 .It Ic \&ls Op Ar factor
1333 It takes one integer argument specifying the vertical distance of
1334 subsequent output text lines measured in v units.
1336 .It Ic \&lsm Ar macroname
1337 Set a leading spaces trap.
1338 This is a groff extension and currently unsupported.
1339 .It Ic \< Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1340 Set title line length.
1342 .It Ic \&mc Ar glyph Op Ar dist
1343 Print margin character in the right margin.
1346 is currently ignored; instead, 1n is used.
1347 .It Ic \&mediasize Ar media
1348 Set the device media size.
1349 This is a Heirloom extension and currently ignored.
1350 .It Ic \&minss Ar width
1351 Set minimum word space.
1352 This is a Heirloom extension and currently ignored.
1353 .It Ic \&mk Op Ar register
1354 Mark vertical position.
1356 .It Ic \&mso Ar filename
1357 Load a macro file using the search path.
1358 Ignored because insecure.
1360 Disable adjusting without changing the adjustment mode.
1362 .It Ic \&ne Op Ar height
1363 Declare the need for the specified minimum vertical space
1364 before the next trap or the bottom of the page.
1367 Break the output line and switch to no-fill mode.
1368 Subsequent input lines are kept together on the same output line
1369 even when exceeding the right margin,
1370 and line breaks in subsequent input cause output line breaks.
1371 This request is implied by the
1373 .Ic \&Bd Fl unfilled
1382 request switches back to the default fill mode.
1384 Turn off automatic hyphenation mode.
1386 .It Ic \&nhychar Ar char ...
1387 Define hyphenation-inhibiting characters.
1388 This is a Heirloom extension and currently ignored.
1389 .It Ic \&nm Op Ar start Op Ar inc Op Ar space Op Ar indent
1391 Currently unsupported.
1392 .It Ic \&nn Op Ar number
1393 Temporarily turn off line numbering.
1394 Currently unsupported.
1395 .It Ic \&nop Ar body
1396 Execute the rest of the input line as a request, macro, or text line,
1399 request and any space characters immediately following it.
1400 This is mostly used to indent text lines inside macro definitions.
1401 .It Ic \&nr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression Op Ar stepsize
1402 Define or change a register.
1403 A register is an arbitrary string value that defines some sort of state,
1404 which influences parsing and/or formatting.
1408 .Sx Numerical expressions
1410 If it is prefixed by a sign, the register will be
1411 incremented or decremented instead of assigned to.
1417 auto-increment feature.
1418 It remains unchanged when omitted while changing an existing register,
1419 and it defaults to 0 when defining a new register.
1423 is handled specially:
1426 If set to a positive integer value, certain
1428 macros will behave in the same way as in the
1431 If set to 0, these macros will behave in the same way as outside the
1433 section, even when called within the
1436 Note that starting a new
1440 macro will reset this register.
1443 .Ic \&nrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression
1446 Define or change a floating-point register.
1447 This is a Heirloom extension and currently unsupported.
1450 This is a groff extension and currently ignored.
1452 Turn on no-space mode.
1454 .It Ic \&nx Op Ar filename
1455 Abort processing of the current input file and process another one.
1456 Ignored because insecure.
1457 .It Ic \&open Ar stream file
1458 Open a file for writing.
1459 Ignored because insecure.
1460 .It Ic \&opena Ar stream file
1461 Open a file for appending.
1462 Ignored because insecure.
1464 Output saved vertical space.
1466 .It Ic \&output Ar string
1467 Output directly to intermediate output.
1469 .It Ic \&padj Op Cm 1 | 0
1470 Globally control paragraph-at-once adjustment.
1471 This is a Heirloom extension and currently ignored.
1472 .It Ic \&papersize Ar media
1474 This is a Heirloom extension and currently ignored.
1475 .It Ic \&pc Op Ar char
1476 Change the page number character.
1480 This is a groff extension and currently ignored.
1481 .It Ic \&pi Ar command
1482 Pipe output to a shell command.
1483 Ignored because insecure.
1485 Low-level request used by
1487 This is a Heirloom extension and currently unsupported.
1488 .It Ic \&pl Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1492 Print names and sizes of macros, strings, and diversions
1493 to standard error output.
1495 .It Ic \&pn Oo Cm + Ns | Ns Cm - Oc Ns Ar number
1496 Change the page number of the next page.
1499 Print all number registers on standard error output.
1501 .It Ic \&po Op Oo Cm + Ns | Ns Cm - Oc Ns Ar offset
1502 Set a horizontal page offset.
1503 If no argument is specified, the page offset is reverted to its
1505 If a sign is specified, the new page offset is calculated relative
1506 to the current one; otherwise, it is absolute.
1507 The argument follows the syntax of
1509 and the default scaling unit is
1511 .It Ic \&ps Op Oo Cm + Ns | Ns Cm - Oc Ns size
1514 .It Ic \&psbb Ar filename
1515 Retrieve the bounding box of a PostScript file.
1516 Currently unsupported.
1517 .It Ic \&pshape Ar indent length ...
1518 Set a special shape for the current paragraph.
1519 This is a Heirloom extension and currently unsupported.
1520 .It Ic \&pso Ar command
1521 Include output of a shell command.
1522 Ignored because insecure.
1524 Print the names and positions of all traps on standard error output.
1525 This is a groff extension and currently ignored.
1526 .It Ic \&pvs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1527 Change post-vertical spacing.
1528 This is a groff extension and currently ignored.
1529 .It Ic \&rchar Ar glyph ...
1530 Remove glyph definitions.
1531 Currently unsupported.
1532 .It Ic \&rd Op Ar prompt Op Ar argument ...
1533 Read from standard input.
1535 .It Ic \&recursionlimit Ar maxrec maxtail
1536 Set the maximum stack depth for recursive macros.
1537 This is a Heirloom extension and currently ignored.
1538 .It Ic \&return Op Ar twice
1539 Exit the presently executed macro and return to the caller.
1540 The argument is currently ignored.
1541 .It Ic \&rfschar Ar font glyph ...
1542 Remove font-specific fallback glyph definitions.
1543 Currently unsupported.
1544 .It Ic \&rhang Ar font char ... afmunits
1545 Hang characters at right margin.
1546 This is a Heirloom extension and currently ignored.
1550 input lines to the right margin without filling.
1553 An argument of 0 or less ends right adjustment.
1554 .It Ic \&rm Ar macroname
1555 Remove a request, macro or string.
1556 .It Ic \&rn Ar oldname newname
1557 Rename a request, macro, diversion, or string.
1560 user-defined macros,
1564 macros, and user-defined strings can be renamed, but renaming of
1565 predefined strings and of
1567 requests is not supported, and diversions are not implemented at all.
1568 .It Ic \&rnn Ar oldname newname
1569 Rename a number register.
1570 Currently unsupported.
1571 .It Ic \&rr Ar register
1576 .It Ic \&rt Op Ar dist
1577 Return to marked vertical position.
1579 .It Ic \&schar Ar glyph Op Ar string
1580 Define global fallback glyph.
1581 This is a groff extension and currently unsupported.
1582 .It Ic \&sentchar Ar char ...
1583 Define sentence-ending characters.
1584 This is a Heirloom extension and currently ignored.
1585 .It Ic \&shc Op Ar glyph
1586 Change the soft hyphen character.
1588 .It Ic \&shift Op Ar number
1589 Shift macro arguments
1591 times, by default once: \e\e$i becomes what \e\e$i+number was.
1592 Also decrement \en(.$ by
1594 .It Ic \&sizes Ar size ...
1595 Define permissible point sizes.
1596 This is a groff extension and currently ignored.
1597 .It Ic \&so Ar filename
1598 Include a source file.
1599 The file is read and its contents processed as input in place of the
1602 To avoid inadvertent inclusion of unrelated files,
1604 only accepts relative paths not containing the strings
1609 This request requires
1611 to change to the right directory before calling
1613 per convention to the root of the manual tree.
1614 Typical usage looks like:
1616 .Dl \&.so man3/Xcursor.3
1618 As the whole concept is rather fragile, the use of
1624 .It Ic \&sp Op Ar height
1625 Break the output line and emit vertical space.
1626 The argument follows the syntax of
1628 and defaults to one blank line
1630 .It Ic \&spacewidth Op Cm 1 | 0
1631 Set the space width from the font metrics file.
1632 This is a Heirloom extension and currently ignored.
1633 .It Ic \&special Op Ar font ...
1634 Define a special font.
1635 This is a groff extension and currently ignored.
1636 .It Ic \&spreadwarn Op Ar width
1637 Warn about wide spacing between words.
1639 .It Ic \&ss Ar wordspace Op Ar sentencespace
1640 Set space character size.
1642 .It Ic \&sty Ar position style
1643 Associate style with a font position.
1644 This is a groff extension and currently ignored.
1645 .It Ic \&substring Ar stringname startpos Op Ar endpos
1646 Replace a user-defined string with a substring.
1647 Currently unsupported.
1648 .It Ic \&sv Op Ar height
1649 Save vertical space.
1651 .It Ic \&sy Ar command
1652 Execute shell command.
1653 Ignored because insecure.
1655 Re-start a table layout, retaining the options of the prior table
1659 .It Ic \&ta Op Ar width ... Op Cm T Ar width ...
1663 argument follows the syntax of
1664 .Sx Scaling Widths .
1665 If prefixed by a plus sign, it is relative to the previous tab stop.
1666 The arguments after the
1668 marker are used repeatedly as often as needed; for each reuse,
1669 they are taken relative to the last previously established tab stop.
1672 is called without arguments, all tab stops are cleared.
1673 .It Ic \&tc Op Ar glyph
1674 Change tab repetition character.
1675 Currently unsupported.
1677 End a table context.
1680 .It Ic \&ti Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1681 Break the output line and indent the next output line by
1683 If a sign is specified, the temporary indentation is calculated
1684 relative to the current indentation; otherwise, it is absolute.
1685 The argument follows the syntax of
1687 and the default scaling unit is
1689 .It Ic \&tkf Ar font minps width1 maxps width2
1690 Enable track kerning for a font.
1692 .It Ic \&tl No \& Ap Ar left Ap Ar center Ap Ar right Ap
1694 Currently unsupported.
1695 .It Ic \&tm Ar string
1696 Print to standard error output.
1698 .It Ic \&tm1 Ar string
1699 Print to standard error output, allowing leading blanks.
1700 This is a groff extension and currently ignored.
1701 .It Ic \&tmc Ar string
1702 Print to standard error output without a trailing newline.
1703 This is a groff extension and currently ignored.
1704 .It Ic \&tr Ar glyph glyph ...
1705 Output character translation.
1706 The first glyph in each pair is replaced by the second one.
1707 Character escapes can be used; for example,
1711 replaces all invocations of \e(xx with \e(yy.
1712 .It Ic \&track Ar font minps width1 maxps width2
1713 Static letter space tracking.
1714 This is a Heirloom extension and currently ignored.
1715 .It Ic \&transchar Ar char ...
1716 Define transparent characters for sentence-ending.
1717 This is a Heirloom extension and currently ignored.
1718 .It Ic \&trf Ar filename
1719 Output the contents of a file, disallowing invalid characters.
1720 This is a groff extension and ignored because insecure.
1721 .It Ic \&trimat Ar left top width height
1722 Set the TrimBox page parameter for PDF generation.
1723 This is a Heirloom extension and currently ignored.
1724 .It Ic \&trin Ar glyph glyph ...
1725 Output character translation, ignored by
1727 Currently unsupported.
1728 .It Ic \&trnt Ar glyph glyph ...
1729 Output character translation, ignored by \e!.
1730 Currently unsupported.
1733 This is a groff extension and currently ignored.
1735 Begin a table, which formats input in aligned rows and columns.
1738 for a description of the tbl language.
1740 Globally set the underline font.
1747 .It Ic \&unformat Ar divname
1748 Unformat spaces and tabs in a diversion.
1749 Currently unsupported.
1750 .It Ic \&unwatch Ar macroname
1751 Disable notification for string or macro.
1752 This is a Heirloom extension and currently ignored.
1753 .It Ic \&unwatchn Ar register
1754 Disable notification for register.
1755 This is a Heirloom extension and currently ignored.
1756 .It Ic \&vpt Op Cm 1 | 0
1757 Enable or disable vertical position traps.
1758 This is a groff extension and currently ignored.
1759 .It Ic \&vs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1760 Change vertical spacing.
1762 .It Ic \&warn Ar flags
1765 .It Ic \&warnscale Ar si
1766 Set the scaling indicator used in warnings.
1767 This is a groff extension and currently ignored.
1768 .It Ic \&watch Ar macroname
1769 Notify on change of string or macro.
1770 This is a Heirloom extension and currently ignored.
1771 .It Ic \&watchlength Ar maxlength
1772 On change, report the contents of macros and strings
1773 up to the specified length.
1774 This is a Heirloom extension and currently ignored.
1775 .It Ic \&watchn Ar register
1776 Notify on change of register.
1777 This is a Heirloom extension and currently ignored.
1778 .It Ic \&wh Ar dist Op Ar macroname
1779 Set a page location trap.
1780 Currently unsupported.
1781 .It Ic \&while Ar condition body
1782 Repeated execution while a
1784 is true, with syntax similar to
1786 Currently implemented with two restrictions: cannot nest,
1787 and each loop must start and end in the same scope.
1788 .It Ic \&write Oo \(dq Oc Ns Ar string
1789 Write to an open file.
1790 Ignored because insecure.
1791 .It Ic \&writec Oo \(dq Oc Ns Ar string
1792 Write to an open file without appending a newline.
1793 Ignored because insecure.
1794 .It Ic \&writem Ar macroname
1795 Write macro or string to an open file.
1796 Ignored because insecure.
1797 .It Ic \&xflag Ar level
1798 Set the extension level.
1799 This is a Heirloom extension and currently ignored.
1801 .Ss Numerical expressions
1807 requests accept integer numerical expressions as arguments.
1808 These are always evaluated using the C
1810 type; integer overflow works the same way as in the C language.
1811 Numbers consist of an arbitrary number of digits
1815 prefixed by an optional sign
1819 Each number may be followed by one optional scaling unit described below
1820 .Sx Scaling Widths .
1821 The following equations hold:
1822 .Bd -literal -offset indent
1823 1i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240
1824 254c = 100i = 24000u = 24000
1828 The following binary operators are implemented.
1829 Unless otherwise stated, they behave as in the C language:
1831 .Bl -tag -width 2n -compact
1841 remainder of division
1849 equal to, same effect as
1851 (this differs from C)
1853 less than or equal to
1855 greater than or equal to
1857 not equal to (corresponds to C
1859 this one is of limited portability, it is supported by Heirloom roff,
1862 logical and (corresponds to C
1865 logical or (corresponds to C
1868 minimum (not available in C)
1870 maximum (not available in C)
1873 There is no concept of precedence; evaluation proceeds from left to right,
1874 except when subexpressions are enclosed in parentheses.
1875 Inside parentheses, whitespace is ignored.
1876 .Sh ESCAPE SEQUENCE REFERENCE
1880 parser recognises the following escape sequences.
1885 documents, using escape sequences is discouraged except for those
1890 A backslash followed by any character not listed here
1891 simply prints that character itself.
1894 A backslash at the end of an input line can be used to continue the
1895 logical input line on the next physical input line, joining the text
1896 on both lines together as if it were on a single input line.
1898 The escape sequence backslash-space
1900 is an unpaddable space-sized non-breaking space character; see
1905 Embed text up to and including the end of the input line into the
1906 current diversion or into intermediate output without interpreting
1907 requests, macros, and escapes.
1908 Currently unsupported.
1910 The rest of the input line is treated as
1913 Line continuation with comment.
1914 Discard the rest of the physical input line and continue the logical
1915 input line on the next physical input line, joining the text on
1916 both lines together as if it were on a single input line.
1917 This is a groff extension.
1918 .It Ic \e$ Ns Ar arg
1919 Macro argument expansion, see
1922 Hyphenation allowed at this point of the word; ignored by
1925 Non-printing zero-width character,
1926 often used for various kinds of escaping; see
1936 Acute accent special character; use
1940 .Sx Special Characters
1941 with two-letter names, see
1944 Zero-width space transparent to end-of-sentence detection;
1947 .It Ic \e*[ Ns Ar name Ns Ic \&]
1948 Interpolate the string with the
1950 For short names, there are variants
1955 One string is predefined on the
1959 expands to the name of the output device,
1960 for example ascii, utf8, ps, pdf, html, or markdown.
1962 Macro sets traditionally predefine additional strings which are not
1963 portable and differ across implementations.
1969 Strings can be defined, changed, and deleted with the
1976 Left italic correction (groff extension); ignored by
1980 .Dq mathematical minus sign ;
1985 Right italic correction (groff extension); ignored by
1988 Breaking the line is allowed at this point of the word
1989 without inserting a hyphen.
1991 Embed the text up to the next
1993 into the current diversion without interpreting requests, macros,
1995 This is a groff extension and currently unsupported.
1996 .It Ic \e[ Ns Ar name Ns Ic \&]
1997 .Sx Special Characters
1998 with names of arbitrary length, see
2001 One-twelfth em half-narrow space character, effectively zero-width in
2004 Underline special character; use
2008 Grave accent special character; use
2012 Begin conditional input; see
2015 One-sixth em narrow space character, effectively zero-width in
2018 End conditional input; see
2021 Paddable non-breaking space character.
2023 Digit width space character.
2024 .It Ic \eA\(aq Ns Ar name Ns Ic \(aq
2029 is a syntactically valid identifier that can be used
2030 as a name for a macro or user-defined string, or
2033 This is a thoroughly non-portable groff extension.
2034 Heirloom troff uses the same escape sequence with the same syntax
2035 for a completely different purpose,
2036 defining a hyperlink target position, also called an
2040 The Heirloom semantics is not supported by
2043 Leader character; ignored by
2045 .It Ic \eB\(aq Ns Ar string Ns Ic \(aq
2050 conforms to the syntax of
2051 .Sx Numerical expressions
2055 .It Ic \eb\(aq Ns Ar string Ns Ic \(aq
2056 Bracket building function; ignored by
2058 .It Ic \eC\(aq Ns Ar name Ns Ic \(aq
2059 .Sx Special Characters
2060 with names of arbitrary length.
2062 When encountered at the end of an input text line,
2063 the next input text line is considered to continue that line,
2064 even if there are request or macro lines in between.
2065 No whitespace is inserted.
2066 .It Ic \eD\(aq Ns Ar string Ns Ic \(aq
2067 Draw graphics function; ignored by
2070 Move down by half a line; ignored by
2073 Escape character intended to not be interpreted in copy mode.
2076 it currently does the same as
2080 Backslash special character.
2081 .It Ic \eF[ Ns Ar name Ns Ic \&]
2082 Switch font family (groff extension); ignored by
2084 For short names, there are variants
2088 .It Ic \ef[ Ns Ar name Ns Ic \&]
2092 .Sx Font Selection .
2093 For short names, there are variants
2101 .It Ic \eg[ Ns Ar name Ns Ic \&]
2102 Interpolate the format of a number register; ignored by
2104 which interpolates an empty string instead.
2105 For short names, there are variants
2109 .It Ic \eH\(aq Ns Oo +|- Oc Ns Ar number Ns Ic \(aq
2110 Set the height of the current font; ignored by
2112 .It Ic \eh\(aq Ns Oo Cm \&| Oc Ns Ar width Ns Ic \(aq
2114 If the vertical bar is given, the motion is relative to the current
2116 Otherwise, it is relative to the current position.
2117 The default scaling unit is
2119 .It Ic \ek[ Ns Ar name Ns Ic \&]
2120 Mark horizontal input place in register; ignored by
2122 For short names, there are variants
2126 .It Ic \eL\(aq Ns Ar number Ns Oo Ar c Oc Ns Ic \(aq
2127 Vertical line drawing function; ignored by
2129 .It Ic \el\(aq Ns Ar width Ns Oo Ar c Oc Ns Ic \(aq
2130 Draw a horizontal line of
2134 .It Ic \eM[ Ns Ar name Ns Ic \&]
2135 Set fill (background) color (groff extension); ignored by
2137 For short names, there are variants
2141 .It Ic \em[ Ns Ar name Ns Ic \&]
2142 Set glyph drawing color (groff extension); ignored by
2144 For short names, there are variants
2148 .It Ic \eN\(aq Ns Ar number Ns Ic \(aq
2151 on the current font.
2152 .It Ic \en Ns Oo +|- Oc Ns Ic \&[ Ns Ar name Ns Ic \&]
2153 Interpolate the number register
2155 For short names, there are variants
2159 If the optional sign is specified,
2160 the register is first incremented or decremented by the
2162 that was specified in the relevant
2164 request, and the changed value is interpolated.
2165 .It Ic \eO Ns Ar digit , Ic \eO[5 Ns arguments Ns Ic \&]
2167 This is a groff extension and currently unsupported.
2173 .It Ic \eo\(aq Ns Ar string Ns Ic \(aq
2174 Overstrike, writing all the characters contained in the
2176 to the same output position.
2177 In terminal and HTML output modes,
2178 only the last one of the characters is visible.
2180 Break the output line at the end of the current word.
2181 .It Ic \eR\(aq Ns Ar name Oo +|- Oc Ns Ar number Ns Ic \(aq
2182 Set number register; ignored by
2185 Reverse line feed: move up by one output line.
2186 Currently unsupported.
2187 .It Ic \eS\(aq Ns Ar number Ns Ic \(aq
2188 Slant output; ignored by
2190 .It Ic \es\(aq Ns Oo +|- Oc Ns Ar number Ns Ic \(aq
2191 Change point size; ignored by
2194 .Ic \es Ns Oo +|- Oc Ns Ar n ,
2195 .Ic \es Ns Oo +|- Oc Ns Ic \(aq Ns Ar number Ns Ic \(aq ,
2196 .Ic \es[ Ns Oo +|- Oc Ns Ar number Ns Ic \&] ,
2198 .Ic \es Ns Oo +|- Oc Ns Ic \&[ Ns Ar number Ns Ic \&]
2199 are also parsed and ignored.
2201 Horizontal tab; ignored by
2204 Move up by half a line; ignored by
2206 .It Ic \eV[ Ns Ar name Ns Ic \&]
2207 Interpolate an environment variable.
2208 For short names, there are variants
2212 This escape sequence is intentionally unsupported;
2215 .Dq Pf $ Brq Ar name
2216 instead of inspecting the environment.
2217 .It Ic \ev\(aq Ns Ar number Ns Ic \(aq
2218 Vertical motion; ignored by
2220 .It Ic \ew\(aq Ns Ar string Ns Ic \(aq
2221 Interpolate the width of the
2225 implementation assumes that after expansion of user-defined strings, the
2227 only contains normal characters, no escape sequences, and that each
2228 character has a width of 24 basic units.
2229 .It Ic \eX\(aq Ns Ar string Ns Ic \(aq
2232 as device control function; ignored in nroff mode and by
2234 .It Ic \ex\(aq Ns Ar number Ns Ic \(aq
2235 Extra line space function; ignored by
2237 .It Ic \eY[ Ns Ar name Ns Ic \&]
2238 Output a string as a device control function; ignored in nroff mode and by
2240 For short names, there are variants
2244 .It Ic \eZ\(aq Ns Ar string Ns Ic \(aq
2247 with zero width and height; ignored by
2250 Output the next character without advancing the cursor position.
2255 implementation of the
2257 language is incomplete.
2258 Major unimplemented features include:
2262 For security reasons,
2264 never reads or writes external files except via
2266 requests with safe relative paths.
2268 There is no automatic hyphenation, no adjustment to the right margin,
2269 and very limited support for centering; the output is always set flush-left.
2271 Support for setting tabulator and leader characters is missing,
2272 and support for manually changing indentation is limited.
2276 scaling unit is the default terminal unit.
2277 In traditional troff systems, this unit changes depending on the
2280 Width measurements are implemented in a crude way
2281 and often yield wrong results.
2282 Support for explicit movement requests and escapes is limited.
2284 There is no concept of output pages, no support for floats,
2285 graphics drawing, and picture inclusion;
2286 terminal output is always continuous.
2288 Requests regarding color, font families, font sizes,
2289 and glyph manipulation are ignored.
2290 Font support is very limited.
2291 Kerning is not implemented, and no ligatures are produced.
2295 macro control character does not suppress output line breaks.
2297 Diversions and environments are not implemented,
2298 and support for traps is very incomplete.
2300 Use of macros is not supported inside
2305 The special semantics of the
2307 number register is an idiosyncrasy of
2309 manuals and not supported by other
2320 .%A Joseph F. Ossanna
2321 .%A Brian W. Kernighan
2322 .%I AT&T Bell Laboratories
2323 .%T Troff User's Manual
2324 .%R Computing Science Technical Report
2326 .%C Murray Hill, New Jersey
2328 .%U http://www.kohala.com/start/troff/cstr54.ps
2331 .%A Joseph F. Ossanna
2332 .%A Brian W. Kernighan
2334 .%T Heirloom Documentation Tools Nroff/Troff User's Manual
2335 .%D September 17, 2007
2336 .%U http://heirloom.sourceforge.net/doctools/troff.pdf
2339 The RUNOFF typesetting system, whose input forms the basis for
2341 was written in MAD and FAP for the CTSS operating system by Jerome E.
2343 Doug McIlroy rewrote it in BCPL in 1969, renaming it
2345 Dennis M. Ritchie rewrote McIlroy's
2347 in PDP-11 assembly for
2349 Joseph F. Ossanna improved roff and renamed it nroff
2352 then ported nroff to C as troff, which Brian W. Kernighan released with
2354 In 1989, James Clark re-implemented troff in C++, naming it groff.
2359 reference was written by
2360 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
2362 .An Ingo Schwarze Aq Mt schwarze@openbsd.org .