1 .\" $Id: roff.7,v 1.107 2018/10/04 15:32:09 schwarze Exp $
3 .\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
4 .\" Copyright (c) 2010-2018 Ingo Schwarze <schwarze@openbsd.org>
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: October 4 2018 $
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, it only has partial information about requests not supported by
49 and about language features that do not matter for manual pages.
56 Input lines beginning with the control character
58 are parsed for requests and macros.
64 Requests change the processing state and manipulate the formatting;
65 some macros also define the document structure and produce formatted
69 is accepted as an alternative control character,
75 Lines not beginning with control characters are called
77 They provide free-form text to be printed; the formatting of the text
78 depends on the respective processing context.
81 documents may contain only graphable 7-bit ASCII characters, the space
82 character, and, in certain circumstances, the tab character.
83 The backslash character
85 indicates the start of an escape sequence, used for example for
88 .Sx Special Characters .
89 For a listing of escape sequences, consult the
90 .Sx ESCAPE SEQUENCE REFERENCE
93 Text following an escaped double-quote
95 whether in a request, macro, or text line, is ignored to the end of the line.
96 A request line beginning with a control character and comment escape
99 Furthermore, request lines with only a control character and optional
100 trailing whitespace are stripped from input.
103 .Bd -literal -offset indent -compact
104 \&.\e\(dq This is a comment line.
105 \&.\e\(dq The next line is ignored:
107 \&.Sh EXAMPLES \e\(dq This is a comment, too.
108 \&example text \e\(dq And so is this.
110 .Ss Special Characters
111 Special characters are used to encode special glyphs and are rendered
112 differently across output media.
113 They may occur in request, macro, and text lines.
114 Sequences begin with the escape character
116 followed by either an open-parenthesis
118 for two-character sequences; an open-bracket
120 for n-character sequences (terminated at a close-bracket
122 or a single one character sequence.
125 .Bl -tag -width Ds -offset indent -compact
127 Two-letter em dash escape.
129 One-letter backslash escape.
136 Terms may be text-decorated using the
138 escape followed by an indicator: B (bold), I (italic), R (regular), or P
139 (revert to previous mode).
140 A numerical representation 3, 2, or 1 (bold, italic, and regular,
141 respectively) may be used instead.
142 The indicator or numerical representative may be preceded by C
143 (constant-width), which is ignored.
145 The two-character indicator
147 requests a font that is both bold and italic.
148 It may not be portable to old roff implementations.
151 .Bl -tag -width Ds -offset indent -compact
153 Write in \fBbold\fP, then switch to regular font mode.
154 .It Li \efIitalic\efP
155 Write in \fIitalic\fP, then return to previous font mode.
156 .It Li \ef(BIbold italic\efP
157 Write in \f(BIbold italic\fP, then return to previous font mode.
164 which encourages semantic annotation.
166 Whitespace consists of the space character.
167 In text lines, whitespace is preserved within a line.
168 In request and macro lines, whitespace delimits arguments and is discarded.
170 Unescaped trailing spaces are stripped from text line input unless in a
172 In general, trailing whitespace on any input line is discouraged for
173 reasons of portability.
174 In the rare case that a space character is needed at the end of an
175 input line, it may be forced by
178 Literal space characters can be produced in the output
179 using escape sequences.
180 In macro lines, they can also be included in arguments using quotation; see
184 Blank text lines, which may include whitespace, are only permitted
185 within literal contexts.
186 If the first character of a text line is a space, that line is printed
187 with a leading newline.
189 Many requests and macros support scaled widths for their arguments.
190 The syntax for a scaled width is
191 .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
192 where a decimal must be preceded or followed by at least one digit.
194 The following scaling units are accepted:
196 .Bl -tag -width Ds -offset indent -compact
210 default vertical span
222 default horizontal span for the terminal
227 Using anything other than
232 is necessarily non-portable across output media.
236 If a scaling unit is not provided, the numerical value is interpreted
237 under the default rules of
239 for vertical spaces and
244 .Bl -tag -width ".Bl -tag -width 2i" -offset indent -compact
245 .It Li \&.Bl -tag -width 2i
246 two-inch tagged list indentation in
249 two-inch tagged list indentation in
255 Each sentence should terminate at the end of an input line.
256 By doing this, a formatter will be able to apply the proper amount of
257 spacing after the end of sentence (unescaped) period, exclamation mark,
258 or question mark followed by zero or more non-sentence closing
267 The proper spacing is also intelligently preserved if a sentence ends at
268 the boundary of a macro line.
271 .Bd -literal -offset indent -compact
272 Do not end sentences mid-line like this. Instead,
273 end a sentence like this.
274 A macro would end like this:
278 A request or macro line consists of:
282 the control character
286 at the beginning of the line,
288 optionally an arbitrary amount of whitespace,
290 the name of the request or the macro, which is one word of arbitrary
291 length, terminated by whitespace,
293 and zero or more arguments delimited by whitespace.
296 Thus, the following request lines are all equivalent:
297 .Bd -literal -offset indent
303 Macros are provided by the
307 languages and can be defined by the
310 When called, they follow the same syntax as requests, except that
311 macro arguments may optionally be quoted by enclosing them
312 in double quote characters
314 Quoted text, even if it contains whitespace or would cause
315 a macro invocation when unquoted, is always considered literal text.
316 Inside quoted text, pairs of double quote characters
318 resolve to single double quote characters.
320 To be recognised as the beginning of a quoted argument, the opening
321 quote character must be preceded by a space character.
322 A quoted argument extends to the next double quote character that is not
323 part of a pair, or to the end of the input line, whichever comes earlier.
324 Leaving out the terminating double quote character at the end of the line
326 For clarity, if more arguments follow on the same input line,
327 it is recommended to follow the terminating double quote character
328 by a space character; in case the next character after the terminating
329 double quote character is anything else, it is regarded as the beginning
330 of the next, unquoted argument.
332 Both in quoted and unquoted arguments, pairs of backslashes
334 resolve to single backslashes.
335 In unquoted arguments, space characters can alternatively be included
336 by preceding them with a backslash
338 but quoting is usually better for clarity.
341 .Bl -tag -width Ds -offset indent -compact
342 .It Li .Fn strlen \(dqconst char *s\(dq
345 into one function argument.
351 would be considered separate arguments.
352 .It Li .Op \(dqFl a\(dq
355 as literal text instead of a flag macro.
357 .Sh REQUEST REFERENCE
361 parser recognises the following requests.
362 For requests marked as "ignored" or "unsupported", any arguments are
363 ignored, and the number of arguments is not checked.
365 .It Ic \&ab Op Ar message
367 Currently unsupported.
368 .It Ic \&ad Op Cm b | c | l | n | r
369 Set line adjustment mode for subsequent text.
371 .It Ic \&af Ar registername format
372 Assign an output format to a number register.
374 .It Ic \&aln Ar newname oldname
375 Create an alias for a number register.
376 Currently unsupported.
377 .It Ic \&als Ar newname oldname
378 Create an alias for a request, string, macro, or diversion.
379 .It Ic \&am Ar macroname Op Ar endmacro
380 Append to a macro definition.
381 The syntax of this request is the same as that of
383 .It Ic \&am1 Ar macroname Op Ar endmacro
384 Append to a macro definition, switching roff compatibility mode off
385 during macro execution (groff extension).
386 The syntax of this request is the same as that of
392 compatibility mode at all, it handles this request as an alias for
394 .It Ic \&ami Ar macrostring Op Ar endstring
395 Append to a macro definition, specifying the macro name indirectly
397 The syntax of this request is the same as that of
399 .It Ic \&ami1 Ar macrostring Op Ar endstring
400 Append to a macro definition, specifying the macro name indirectly
401 and switching roff compatibility mode off during macro execution
403 The syntax of this request is the same as that of
409 compatibility mode at all, it handles this request as an alias for
411 .It Ic \&as Ar stringname Op Ar string
412 Append to a user-defined string.
413 The syntax of this request is the same as that of
415 If a user-defined string with the specified name does not yet exist,
416 it is set to the empty string before appending.
417 .It Ic \&as1 Ar stringname Op Ar string
418 Append to a user-defined string, switching roff compatibility mode off
419 during macro execution (groff extension).
420 The syntax of this request is the same as that of
426 compatibility mode at all, it handles this request as an alias for
428 .It Ic \&asciify Ar divname
429 Fully unformat a diversion.
430 Currently unsupported.
432 Print a backtrace of the input stack.
433 This is a groff extension and currently ignored.
434 .It Ic \&bd Ar font Oo Ar curfont Oc Op Ar offset
435 Artificially embolden by repeated printing with small shifts.
437 .It Ic \&bleedat Ar left top width height
438 Set the BleedBox page parameter for PDF generation.
439 This is a Heirloom extension and currently ignored.
440 .It Ic \&blm Ar macroname
441 Set a blank line trap.
442 Currently unsupported.
443 .It Ic \&box Ar divname
444 Begin a diversion without including a partially filled line.
445 Currently unsupported.
446 .It Ic \&boxa Ar divname
447 Add to a diversion without including a partially filled line.
448 Currently unsupported.
449 .It Ic \&bp Oo Cm + Ns | Ns Cm - Oc Ns Ar pagenumber
452 .It Ic \&BP Ar source height width position offset flags label
453 Define a frame and place a picture in it.
454 This is a Heirloom extension and currently unsupported.
456 Break the output line.
461 Currently unsupported.
462 .It Ic \&breakchar Ar char ...
463 Optional line break characters.
464 This is a Heirloom extension and currently ignored.
466 Break output line after the next
469 This is a Heirloom extension and currently ignored.
471 Break and spread output line.
472 Currently, this is implemented as an alias for
475 Break and spread output line after the next
478 This is a Heirloom extension and currently ignored.
479 .It Ic \&c2 Op Ar char
480 Change the no-break control character.
481 Currently unsupported.
482 .It Ic \&cc Op Ar char
483 Change the control character.
486 is not specified, the control character is reset to
488 Trailing characters are ignored.
492 input lines without filling.
495 An argument of 0 or less ends centering.
496 Currently, high level macros abort centering.
497 .It Ic \&cf Ar filename
498 Output the contents of a file.
499 Ignored because insecure.
500 .It Ic \&cflags Ar flags char ...
502 This is a groff extension and currently ignored.
503 .It Ic \&ch Ar macroname Op Ar dist
504 Change a trap location.
506 .It Ic \&char Ar glyph Op Ar string
507 Define or redefine the ASCII character or character escape sequence
512 Only partially supported in
514 may interact incorrectly with
516 .It Ic \&chop Ar stringname
517 Remove the last character from a macro, string, or diversion.
518 Currently unsupported.
519 .It Ic \&class Ar classname char ...
520 Define a character class.
521 This is a groff extension and currently ignored.
522 .It Ic \&close Ar streamname
524 Ignored because insecure.
525 .It Ic \&CL Ar color text
527 This is a Heirloom extension and currently unsupported.
528 .It Ic \&color Op Cm 1 | 0
529 Activate or deactivate colors.
530 This is a groff extension and currently ignored.
531 .It Ic \&composite Ar from to
532 Define a name component for composite glyph names.
533 This is a groff extension and currently unsupported.
535 Immediately start the next iteration of a
538 Currently unsupported.
539 .It Ic \&cp Op Cm 1 | 0
542 compatibility mode on or off.
544 .It Ic \&cropat Ar left top width height
545 Set the CropBox page parameter for PDF generation.
546 This is a Heirloom extension and currently ignored.
547 .It Ic \&cs Ar font Op Ar width Op Ar emsize
548 Constant character spacing mode.
553 input lines including whitespace.
555 .It Ic \&da Ar divname
556 Append to a diversion.
557 Currently unsupported.
558 .It Ic \&dch Ar macroname Op Ar dist
559 Change a trap location in the current diversion.
560 This is a Heirloom extension and currently unsupported.
561 .It Ic \&de Ar macroname Op Ar endmacro
565 Its syntax can be either
566 .Bd -literal -offset indent
567 .Pf . Ic \&de Ar macroname
573 .Bd -literal -offset indent
574 .Pf . Ic \&de Ar macroname Ar endmacro
579 Both forms define or redefine the macro
583 which may consist of one or more input lines, including the newline
584 characters terminating each line, optionally containing calls to
588 macros or high-level macros like
592 macros, whichever applies to the document in question.
596 macro works in the same way as for
602 and after that, it is also evaluated as a
606 macro, but not as a high-level macro.
608 The macro can be invoked later using the syntax
610 .D1 Pf . Ar macroname Op Ar argument Op Ar argument ...
612 Regarding argument parsing, see
616 The line invoking the macro will be replaced
617 in the input stream by the
619 replacing all occurrences of
624 .Ar N Ns th Ar argument .
626 .Bd -literal -offset indent
628 \efI\e^\e\e$1\e^\efP\e\e$2
635 .D1 \efI\e^XtFree\e^\efP.
637 in the input stream, and thus in the output: \fI\^XtFree\^\fP.
638 Each occurrence of \e\e$* is replaced with all the arguments,
639 joined together with single space characters.
640 The variant \e\e$@ is similar, except that each argument is
643 Since macros and user-defined strings share a common string table,
646 clobbers the user-defined string
650 can also be printed using the
652 string interpolation syntax described below
654 but this is rarely useful because every macro definition contains at least
655 one explicit newline character.
657 In order to prevent endless recursion, both groff and
659 limit the stack depth for expanding macros and strings
660 to a large, but finite number, and
662 also limits the length of the expanded input line.
663 Do not rely on the exact values of these limits.
664 .It Ic \&de1 Ar macroname Op Ar endmacro
667 macro that will be executed with
669 compatibility mode switched off during macro execution.
670 This is a groff extension.
675 compatibility mode at all, it handles this request as an alias for
677 .It Ic \&defcolor Ar newname scheme component ...
679 This is a groff extension and currently ignored.
680 .It Ic \&dei Ar macrostring Op Ar endstring
683 macro, specifying the macro name indirectly (groff extension).
684 The syntax of this request is the same as that of
686 The effect is the same as:
688 .D1 Pf . Cm \&de No \e* Ns Bo Ar macrostring Bc Op \e* Ns Bq Ar endstring
689 .It Ic \&dei1 Ar macrostring Op Ar endstring
692 macro that will be executed with
694 compatibility mode switched off during macro execution,
695 specifying the macro name indirectly (groff extension).
700 compatibility mode at all, it handles this request as an alias for
702 .It Ic \&device Ar string ...
703 .It Ic \&devicem Ar stringname
704 These two requests only make sense with the groff-specific intermediate
705 output format and are unsupported.
706 .It Ic \&di Ar divname
708 Currently unsupported.
709 .It Ic \&do Ar command Op Ar argument ...
712 request or macro line with compatibility mode disabled.
713 Currently unsupported.
714 .It Ic \&ds Ar stringname Op Oo \(dq Oc Ns Ar string
715 Define a user-defined string.
720 arguments are space-separated.
723 begins with a double-quote character, that character will not be part
725 All remaining characters on the input line form the
727 including whitespace and double-quote characters, even trailing ones.
731 can be interpolated into subsequent text by using
732 .No \e* Ns Bq Ar stringname
735 of arbitrary length, or \e*(NN or \e*N if the length of
737 is two or one characters, respectively.
738 Interpolation can be prevented by escaping the leading backslash;
739 that is, an asterisk preceded by an even number of backslashes
740 does not trigger string interpolation.
742 Since user-defined strings and macros share a common string table,
749 used for defining a string can also be invoked as a macro,
750 in which case the following input line will be appended to the
752 forming a new input line passed to the
756 .Bd -literal -offset indent
767 Such abuse is of course strongly discouraged.
768 .It Ic \&ds1 Ar stringname Op Oo \(dq Oc Ns Ar string
769 Define a user-defined string that will be expanded with
771 compatibility mode switched off during string expansion.
772 This is a groff extension.
777 compatibility mode at all, it handles this request as an alias for
779 .It Ic \&dwh Ar dist macroname
780 Set a location trap in the current diversion.
781 This is a Heirloom extension and currently unsupported.
782 .It Ic \&dt Op Ar dist macroname
783 Set a trap within a diversion.
784 Currently unsupported.
785 .It Ic \&ec Op Ar char
786 Enable the escape mechanism and change the escape character.
789 argument defaults to the backslash
792 Restore the escape character.
793 Currently unsupported.
795 Save the escape character.
796 Currently unsupported.
800 half of an if/else conditional.
801 Pops a result off the stack of conditional evaluations pushed by
803 and uses it as its conditional.
804 If no stack entries are present (e.g., due to no prior
807 then false is assumed.
808 The syntax of this request is similar to
810 except that the conditional is missing.
811 .It Ic \&em Ar macroname
812 Set a trap at the end of input.
813 Currently unsupported.
815 End an equation block.
819 Disable the escape mechanism completely.
821 End a picture started by
823 This is a Heirloom extension and currently unsupported.
825 Begin an equation block.
828 for a description of the equation language.
829 .It Ic \&errprint Ar message
830 Print a string like an error message.
831 This is a Heirloom extension and currently ignored.
832 .It Ic \&ev Op Ar envname
833 Switch to another environment.
834 Currently unsupported.
835 .It Ic \&evc Op Ar envname
836 Copy an environment into the current environment.
837 Currently unsupported.
839 Abort processing and exit.
840 Currently unsupported.
841 .It Ic \&fallback Ar curfont font ...
842 Select the fallback sequence for a font.
843 This is a Heirloom extension and currently ignored.
844 .It Ic \&fam Op Ar familyname
845 Change the font family.
846 This is a groff extension and currently ignored.
847 .It Ic \&fc Op Ar delimchar Op Ar padchar
848 Define a delimiting and a padding character for fields.
849 Currently unsupported.
850 .It Ic \&fchar Ar glyphname Op Ar string
851 Define a fallback glyph.
852 Currently unsupported.
853 .It Ic \&fcolor Ar colorname
854 Set the fill color for \eD objects.
855 This is a groff extension and currently ignored.
856 .It Ic \&fdeferlig Ar font string ...
857 Defer ligature building.
858 This is a Heirloom extension and currently ignored.
859 .It Ic \&feature Cm + Ns | Ns Cm - Ns Ar name
860 Enable or disable an OpenType feature.
861 This is a Heirloom extension and currently ignored.
868 .It Ic \&fkern Ar font minkern
869 Control the use of kerning tables for a font.
870 This is a Heirloom extension and currently ignored.
874 .It Ic \&flig Ar font string char ...
876 This is a Heirloom extension and currently ignored.
877 .It Ic \&fp Ar position font Op Ar filename
878 Assign font position.
880 .It Ic \&fps Ar mapname ...
881 Mount a font with a special character map.
882 This is a Heirloom extension and currently ignored.
883 .It Ic \&fschar Ar font glyphname Op Ar string
884 Define a font-specific fallback glyph.
885 This is a groff extension and currently unsupported.
886 .It Ic \&fspacewidth Ar font Op Ar afmunits
887 Set a font-specific width for the space character.
888 This is a Heirloom extension and currently ignored.
889 .It Ic \&fspecial Ar curfont Op Ar font ...
890 Conditionally define a special font.
891 This is a groff extension and currently ignored.
892 .It Ic \&ft Op Ar font
896 arguments are supported:
897 .Bl -tag -width 4n -offset indent
898 .It Cm B , BI , CB , 3 , 4
906 .It Cm R , CR , CW , 1
907 switches to normal font
908 .It Cm P No "or no argument"
909 switches back to the previous font
912 This request takes effect only locally and may be overridden
913 by macros and escape sequences.
914 .It Ic \&ftr Ar newname Op Ar oldname
916 This is a groff extension and currently ignored.
917 .It Ic \&fzoom Ar font Op Ar permille
920 .It Ic \&gcolor Op Ar colorname
922 This is a groff extension and currently ignored.
923 .It Ic \&hc Op Ar char
924 Set the hyphenation character.
926 .It Ic \&hcode Ar char code ...
927 Set hyphenation codes of characters.
929 .It Ic \&hidechar Ar font char ...
930 Hide characters in a font.
931 This is a Heirloom extension and currently ignored.
932 .It Ic \&hla Ar language
933 Set hyphenation language.
934 This is a groff extension and currently ignored.
935 .It Ic \&hlm Op Ar number
936 Set maximum number of consecutive hyphenated lines.
938 .It Ic \&hpf Ar filename
939 Load hyphenation pattern file.
940 This is a groff extension and currently ignored.
941 .It Ic \&hpfa Ar filename
942 Load hyphenation pattern file, appending to the current patterns.
943 This is a groff extension and currently ignored.
944 .It Ic \&hpfcode Ar code code ...
945 Define mapping values for character codes in hyphenation patterns.
946 This is a groff extension and currently ignored.
947 .It Ic \&hw Ar word ...
948 Specify hyphenation points in words.
950 .It Ic \&hy Op Ar mode
951 Set automatic hyphenation mode.
953 .It Ic \&hylang Ar language
954 Set hyphenation language.
955 This is a Heirloom extension and currently ignored.
956 .It Ic \&hylen Ar nchar
957 Minimum word length for hyphenation.
958 This is a Heirloom extension and currently ignored.
959 .It Ic \&hym Op Ar length
960 Set hyphenation margin.
961 This is a groff extension and currently ignored.
962 .It Ic \&hypp Ar penalty ...
963 Define hyphenation penalties.
964 This is a Heirloom extension and currently ignored.
965 .It Ic \&hys Op Ar length
966 Set hyphenation space.
967 This is a groff extension and currently ignored.
968 .It Ic \&ie Ar condition body
971 half of an if/else conditional.
972 The result of the conditional is pushed into a stack used by subsequent
975 which may be separated by any intervening input (or not exist at all).
976 Its syntax is equivalent to
978 .It Ic \&if Ar condition body
980 This request can also be written as follows:
981 .Bd -unfilled -offset indent
982 .Pf . Ic \&if Ar condition No \e{ Ns Ar body
985 .Bd -unfilled -offset indent
986 .Pf . Ic \&if Ar condition No \e{\e
993 is a boolean expression.
996 supports the following subset of roff conditionals:
1003 it is logically inverted.
1005 If the first character of
1013 it evaluates to true, and the
1015 starts with the next character.
1017 If the first character of
1027 it evaluates to false, and the
1029 starts with the next character.
1031 If the first character of
1035 .Pq character available ,
1036 it evaluates to true if the following character is an ASCII character
1037 or a valid character escape sequence, or to false otherwise.
1040 starts with the character following that next character.
1042 If the first character of
1046 it evaluates to true if the rest of
1048 is the name of an existing user defined macro or string;
1049 otherwise, it evaluates to false.
1051 If the first character of
1055 it evaluates to true if the rest of
1057 is the name of an existing number register;
1058 otherwise, it evaluates to false.
1062 starts with a parenthesis or with an optionally signed
1063 integer number, it is evaluated according to the rules of
1064 .Sx Numerical expressions
1066 It evaluates to true if the result is positive,
1067 or to false if the result is zero or negative.
1069 Otherwise, the first character of
1071 is regarded as a delimiter and it evaluates to true if the string
1072 extending from its first to its second occurrence is equal to the
1073 string extending from its second to its third occurrence.
1077 cannot be parsed, it evaluates to false.
1080 If a conditional is false, its children are not processed, but are
1081 syntactically interpreted to preserve the integrity of the input
1089 which may lead to interesting results, but
1091 .D1 \&.if t .if t \e{\e
1093 will continue to syntactically interpret to the block close of the final
1095 Sub-conditionals, in this case, obviously inherit the truth value of
1100 section is begun by an escaped brace
1102 scope continues until the end of the input line containing the
1103 matching closing-brace escape sequence
1107 is not enclosed in braces, scope continues until the end of the line.
1112 on the same line, whether after a brace or not, then requests and macros
1114 begin with a control character.
1115 It is generally more intuitive, in this case, to write
1116 .Bd -unfilled -offset indent
1117 .Pf . Ic \&if Ar condition No \e{\e
1122 than having the request or macro follow as
1124 .D1 Pf . Ic \&if Ar condition Pf \e{. Ar request
1126 The scope of a conditional is always parsed, but only executed if the
1127 conditional evaluates to true.
1131 is converted into a zero-width escape sequence if not passed as a
1140 being considered an argument of the
1143 .It Ic \&ig Op Ar endmacro
1145 Its syntax can be either
1146 .Bd -literal -offset indent
1153 .Bd -literal -offset indent
1154 .Pf . Cm \&ig Ar endmacro
1159 In the first case, input is ignored until a
1161 request is encountered on its own line.
1162 In the second case, input is ignored until the specified
1163 .Sq Pf . Ar endmacro
1165 Do not use the escape character
1167 anywhere in the definition of
1169 it would cause very strange behaviour.
1173 is a roff request or a roff macro, like in
1177 the subsequent invocation of
1179 will first terminate the
1181 then be invoked as usual.
1182 Otherwise, it only terminates the
1184 and arguments following it or the
1186 request are discarded.
1187 .It Ic \&in Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1193 .It Ic \&index Ar register stringname substring
1194 Find a substring in a string.
1195 This is a Heirloom extension and currently unsupported.
1196 .It Ic \&it Ar expression macro
1197 Set an input line trap.
1200 will be invoked after processing the number of input text lines
1201 specified by the numerical
1203 While evaluating the
1205 the unit suffixes described below
1208 .It Ic \&itc Ar expression macro
1209 Set an input line trap, not counting lines ending with \ec.
1210 Currently unsupported.
1211 .It Ic \&IX Ar class keystring
1212 To support the generation of a table of contents,
1214 emits this user-defined macro, usually without defining it.
1215 To avoid reporting large numbers of spurious errors,
1218 .It Ic \&kern Op Cm 1 | 0
1219 Switch kerning on or off.
1221 .It Ic \&kernafter Ar font char ... afmunits ...
1222 Increase kerning after some characters.
1223 This is a Heirloom extension and currently ignored.
1224 .It Ic \&kernbefore Ar font char ... afmunits ...
1225 Increase kerning before some characters.
1226 This is a Heirloom extension and currently ignored.
1227 .It Ic \&kernpair Ar font char ... font char ... afmunits
1228 Add a kerning pair to the kerning table.
1229 This is a Heirloom extension and currently ignored.
1230 .It Ic \&lc Op Ar glyph
1231 Define a leader repetition character.
1232 Currently unsupported.
1233 .It Ic \&lc_ctype Ar localename
1237 This is a Heirloom extension and currently unsupported.
1238 .It Ic \&lds Ar macroname string
1239 Define a local string.
1240 This is a Heirloom extension and currently unsupported.
1241 .It Ic \&length Ar register string
1242 Count the number of input characters in a string.
1243 Currently unsupported.
1244 .It Ic \&letadj Ar lspmin lshmin letss lspmax lshmax
1245 Dynamic letter spacing and reshaping.
1246 This is a Heirloom extension and currently ignored.
1247 .It Ic \&lf Ar lineno Op Ar filename
1248 Change the line number for error messages.
1249 Ignored because insecure.
1250 .It Ic \&lg Op Cm 1 | 0
1251 Switch the ligature mechanism on or off.
1253 .It Ic \&lhang Ar font char ... afmunits
1254 Hang characters at left margin.
1255 This is a Heirloom extension and currently ignored.
1256 .It Ic \&linetabs Op Cm 1 | 0
1257 Enable or disable line-tabs mode.
1258 This is a groff extension and currently unsupported.
1259 .It Ic \&ll Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1260 Change the output line length.
1263 argument is omitted, the line length is reset to its previous value.
1264 The default setting for terminal output is 78n.
1265 If a sign is given, the line length is added to or subtracted from;
1266 otherwise, it is set to the provided value.
1267 Using this request in new manuals is discouraged for several reasons,
1268 among others because it overrides the
1271 command line option.
1272 .It Ic \&lnr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1273 Set local number register.
1274 This is a Heirloom extension and currently unsupported.
1275 .It Ic \&lnrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1276 Set local floating-point register.
1277 This is a Heirloom extension and currently unsupported.
1278 .It Ic \&lpfx Ar string
1280 This is a Heirloom extension and currently unsupported.
1281 .It Ic \&ls Op Ar factor
1283 It takes one integer argument specifying the vertical distance of
1284 subsequent output text lines measured in v units.
1286 .It Ic \&lsm Ar macroname
1287 Set a leading spaces trap.
1288 This is a groff extension and currently unsupported.
1289 .It Ic \< Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1290 Set title line length.
1292 .It Ic \&mc Ar glyph Op Ar dist
1293 Print margin character in the right margin.
1296 is currently ignored; instead, 1n is used.
1297 .It Ic \&mediasize Ar media
1298 Set the device media size.
1299 This is a Heirloom extension and currently ignored.
1300 .It Ic \&minss Ar width
1301 Set minimum word space.
1302 This is a Heirloom extension and currently ignored.
1303 .It Ic \&mk Op Ar register
1304 Mark vertical position.
1306 .It Ic \&mso Ar filename
1307 Load a macro file using the search path.
1308 Ignored because insecure.
1310 Disable adjusting without changing the adjustment mode.
1312 .It Ic \&ne Op Ar height
1313 Declare the need for the specified minimum vertical space
1314 before the next trap or the bottom of the page.
1317 Switch to no-fill mode.
1323 Turn off automatic hyphenation mode.
1325 .It Ic \&nhychar Ar char ...
1326 Define hyphenation-inhibiting characters.
1327 This is a Heirloom extension and currently ignored.
1328 .It Ic \&nm Op Ar start Op Ar inc Op Ar space Op Ar indent
1330 Currently unsupported.
1331 .It Ic \&nn Op Ar number
1332 Temporarily turn off line numbering.
1333 Currently unsupported.
1334 .It Ic \&nop Ar body
1335 Execute the rest of the input line as a request, macro, or text line,
1338 request and any space characters immediately following it.
1339 This is mostly used to indent text lines inside macro definitions.
1340 .It Ic \&nr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression Op Ar stepsize
1341 Define or change a register.
1342 A register is an arbitrary string value that defines some sort of state,
1343 which influences parsing and/or formatting.
1347 .Sx Numerical expressions
1349 If it is prefixed by a sign, the register will be
1350 incremented or decremented instead of assigned to.
1356 auto-increment feature.
1357 It remains unchanged when omitted while changing an existing register,
1358 and it defaults to 0 when defining a new register.
1362 is handled specially:
1365 If set to a positive integer value, certain
1367 macros will behave in the same way as in the
1370 If set to 0, these macros will behave in the same way as outside the
1372 section, even when called within the
1375 Note that starting a new
1379 macro will reset this register.
1382 .Ic \&nrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression
1385 Define or change a floating-point register.
1386 This is a Heirloom extension and currently unsupported.
1389 This is a groff extension and currently ignored.
1391 Turn on no-space mode.
1393 .It Ic \&nx Op Ar filename
1394 Abort processing of the current input file and process another one.
1395 Ignored because insecure.
1396 .It Ic \&open Ar stream file
1397 Open a file for writing.
1398 Ignored because insecure.
1399 .It Ic \&opena Ar stream file
1400 Open a file for appending.
1401 Ignored because insecure.
1403 Output saved vertical space.
1405 .It Ic \&output Ar string
1406 Output directly to intermediate output.
1408 .It Ic \&padj Op Cm 1 | 0
1409 Globally control paragraph-at-once adjustment.
1410 This is a Heirloom extension and currently ignored.
1411 .It Ic \&papersize Ar media
1413 This is a Heirloom extension and currently ignored.
1414 .It Ic \&pc Op Ar char
1415 Change the page number character.
1419 This is a groff extension and currently ignored.
1420 .It Ic \&pi Ar command
1421 Pipe output to a shell command.
1422 Ignored because insecure.
1424 Low-level request used by
1426 This is a Heirloom extension and currently unsupported.
1427 .It Ic \&pl Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1431 Print names and sizes of macros, strings, and diversions
1432 to standard error output.
1434 .It Ic \&pn Oo Cm + Ns | Ns Cm - Oc Ns Ar number
1435 Change the page number of the next page.
1438 Print all number registers on standard error output.
1440 .It Ic \&po Op Oo Cm + Ns | Ns Cm - Oc Ns Ar offset
1441 Set a horizontal page offset.
1442 If no argument is specified, the page offset is reverted to its
1444 If a sign is specified, the new page offset is calculated relative
1445 to the current one; otherwise, it is absolute.
1446 The argument follows the syntax of
1448 and the default scaling unit is
1450 .It Ic \&ps Op Oo Cm + Ns | Ns Cm - Oc Ns size
1453 .It Ic \&psbb Ar filename
1454 Retrieve the bounding box of a PostScript file.
1455 Currently unsupported.
1456 .It Ic \&pshape Ar indent length ...
1457 Set a special shape for the current paragraph.
1458 This is a Heirloom extension and currently unsupported.
1459 .It Ic \&pso Ar command
1460 Include output of a shell command.
1461 Ignored because insecure.
1463 Print the names and positions of all traps on standard error output.
1464 This is a groff extension and currently ignored.
1465 .It Ic \&pvs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1466 Change post-vertical spacing.
1467 This is a groff extension and currently ignored.
1468 .It Ic \&rchar Ar glyph ...
1469 Remove glyph definitions.
1470 Currently unsupported.
1471 .It Ic \&rd Op Ar prompt Op Ar argument ...
1472 Read from standard input.
1474 .It Ic \&recursionlimit Ar maxrec maxtail
1475 Set the maximum stack depth for recursive macros.
1476 This is a Heirloom extension and currently ignored.
1477 .It Ic \&return Op Ar twice
1478 Exit the presently executed macro and return to the caller.
1479 The argument is currently ignored.
1480 .It Ic \&rfschar Ar font glyph ...
1481 Remove font-specific fallback glyph definitions.
1482 Currently unsupported.
1483 .It Ic \&rhang Ar font char ... afmunits
1484 Hang characters at right margin.
1485 This is a Heirloom extension and currently ignored.
1489 input lines to the right margin without filling.
1492 An argument of 0 or less ends right adjustment.
1493 .It Ic \&rm Ar macroname
1494 Remove a request, macro or string.
1495 .It Ic \&rn Ar oldname newname
1496 Rename a request, macro, diversion, or string.
1499 user-defined macros,
1503 macros, and user-defined strings can be renamed, but renaming of
1504 predefined strings and of
1506 requests is not supported, and diversions are not implemented at all.
1507 .It Ic \&rnn Ar oldname newname
1508 Rename a number register.
1509 Currently unsupported.
1510 .It Ic \&rr Ar register
1515 .It Ic \&rt Op Ar dist
1516 Return to marked vertical position.
1518 .It Ic \&schar Ar glyph Op Ar string
1519 Define global fallback glyph.
1520 This is a groff extension and currently unsupported.
1521 .It Ic \&sentchar Ar char ...
1522 Define sentence-ending characters.
1523 This is a Heirloom extension and currently ignored.
1524 .It Ic \&shc Op Ar glyph
1525 Change the soft hyphen character.
1527 .It Ic \&shift Op Ar number
1528 Shift macro arguments
1530 times, by default once: \e\e$i becomes what \e\e$i+number was.
1531 Also decrement \en(.$ by
1533 .It Ic \&sizes Ar size ...
1534 Define permissible point sizes.
1535 This is a groff extension and currently ignored.
1536 .It Ic \&so Ar filename
1537 Include a source file.
1538 The file is read and its contents processed as input in place of the
1541 To avoid inadvertent inclusion of unrelated files,
1543 only accepts relative paths not containing the strings
1548 This request requires
1550 to change to the right directory before calling
1552 per convention to the root of the manual tree.
1553 Typical usage looks like:
1555 .Dl \&.so man3/Xcursor.3
1557 As the whole concept is rather fragile, the use of
1563 .It Ic \&sp Op Ar height
1564 Break the output line and emit vertical space.
1565 The argument follows the syntax of
1567 and defaults to one blank line
1569 .It Ic \&spacewidth Op Cm 1 | 0
1570 Set the space width from the font metrics file.
1571 This is a Heirloom extension and currently ignored.
1572 .It Ic \&special Op Ar font ...
1573 Define a special font.
1574 This is a groff extension and currently ignored.
1575 .It Ic \&spreadwarn Op Ar width
1576 Warn about wide spacing between words.
1578 .It Ic \&ss Ar wordspace Op Ar sentencespace
1579 Set space character size.
1581 .It Ic \&sty Ar position style
1582 Associate style with a font position.
1583 This is a groff extension and currently ignored.
1584 .It Ic \&substring Ar stringname startpos Op Ar endpos
1585 Replace a user-defined string with a substring.
1586 Currently unsupported.
1587 .It Ic \&sv Op Ar height
1588 Save vertical space.
1590 .It Ic \&sy Ar command
1591 Execute shell command.
1592 Ignored because insecure.
1594 Re-start a table layout, retaining the options of the prior table
1598 .It Ic \&ta Op Ar width ... Op Cm T Ar width ...
1602 argument follows the syntax of
1603 .Sx Scaling Widths .
1604 If prefixed by a plus sign, it is relative to the previous tab stop.
1605 The arguments after the
1607 marker are used repeatedly as often as needed; for each reuse,
1608 they are taken relative to the last previously established tab stop.
1611 is called without arguments, all tab stops are cleared.
1612 .It Ic \&tc Op Ar glyph
1613 Change tab repetition character.
1614 Currently unsupported.
1616 End a table context.
1619 .It Ic \&ti Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1620 Break the output line and indent the next output line by
1622 If a sign is specified, the temporary indentation is calculated
1623 relative to the current indentation; otherwise, it is absolute.
1624 The argument follows the syntax of
1626 and the default scaling unit is
1628 .It Ic \&tkf Ar font minps width1 maxps width2
1629 Enable track kerning for a font.
1631 .It Ic \&tl No \& Ap Ar left Ap Ar center Ap Ar right Ap
1633 Currently unsupported.
1634 .It Ic \&tm Ar string
1635 Print to standard error output.
1637 .It Ic \&tm1 Ar string
1638 Print to standard error output, allowing leading blanks.
1639 This is a groff extension and currently ignored.
1640 .It Ic \&tmc Ar string
1641 Print to standard error output without a trailing newline.
1642 This is a groff extension and currently ignored.
1643 .It Ic \&tr Ar glyph glyph ...
1644 Output character translation.
1645 The first glyph in each pair is replaced by the second one.
1646 Character escapes can be used; for example,
1650 replaces all invocations of \e(xx with \e(yy.
1651 .It Ic \&track Ar font minps width1 maxps width2
1652 Static letter space tracking.
1653 This is a Heirloom extension and currently ignored.
1654 .It Ic \&transchar Ar char ...
1655 Define transparent characters for sentence-ending.
1656 This is a Heirloom extension and currently ignored.
1657 .It Ic \&trf Ar filename
1658 Output the contents of a file, disallowing invalid characters.
1659 This is a groff extension and ignored because insecure.
1660 .It Ic \&trimat Ar left top width height
1661 Set the TrimBox page parameter for PDF generation.
1662 This is a Heirloom extension and currently ignored.
1663 .It Ic \&trin Ar glyph glyph ...
1664 Output character translation, ignored by
1666 Currently unsupported.
1667 .It Ic \&trnt Ar glyph glyph ...
1668 Output character translation, ignored by \e!.
1669 Currently unsupported.
1672 This is a groff extension and currently ignored.
1674 Begin a table, which formats input in aligned rows and columns.
1677 for a description of the tbl language.
1679 Globally set the underline font.
1686 .It Ic \&unformat Ar divname
1687 Unformat spaces and tabs in a diversion.
1688 Currently unsupported.
1689 .It Ic \&unwatch Ar macroname
1690 Disable notification for string or macro.
1691 This is a Heirloom extension and currently ignored.
1692 .It Ic \&unwatchn Ar register
1693 Disable notification for register.
1694 This is a Heirloom extension and currently ignored.
1695 .It Ic \&vpt Op Cm 1 | 0
1696 Enable or disable vertical position traps.
1697 This is a groff extension and currently ignored.
1698 .It Ic \&vs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1699 Change vertical spacing.
1701 .It Ic \&warn Ar flags
1704 .It Ic \&warnscale Ar si
1705 Set the scaling indicator used in warnings.
1706 This is a groff extension and currently ignored.
1707 .It Ic \&watch Ar macroname
1708 Notify on change of string or macro.
1709 This is a Heirloom extension and currently ignored.
1710 .It Ic \&watchlength Ar maxlength
1711 On change, report the contents of macros and strings
1712 up to the specified length.
1713 This is a Heirloom extension and currently ignored.
1714 .It Ic \&watchn Ar register
1715 Notify on change of register.
1716 This is a Heirloom extension and currently ignored.
1717 .It Ic \&wh Ar dist Op Ar macroname
1718 Set a page location trap.
1719 Currently unsupported.
1720 .It Ic \&while Ar condition body
1721 Repeated execution while a
1723 is true, with syntax similar to
1725 Currently implemented with two restrictions: cannot nest,
1726 and each loop must start and end in the same scope.
1727 .It Ic \&write Oo \(dq Oc Ns Ar string
1728 Write to an open file.
1729 Ignored because insecure.
1730 .It Ic \&writec Oo \(dq Oc Ns Ar string
1731 Write to an open file without appending a newline.
1732 Ignored because insecure.
1733 .It Ic \&writem Ar macroname
1734 Write macro or string to an open file.
1735 Ignored because insecure.
1736 .It Ic \&xflag Ar level
1737 Set the extension level.
1738 This is a Heirloom extension and currently ignored.
1740 .Ss Numerical expressions
1746 requests accept integer numerical expressions as arguments.
1747 These are always evaluated using the C
1749 type; integer overflow works the same way as in the C language.
1750 Numbers consist of an arbitrary number of digits
1754 prefixed by an optional sign
1758 Each number may be followed by one optional scaling unit described below
1759 .Sx Scaling Widths .
1760 The following equations hold:
1761 .Bd -literal -offset indent
1762 1i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240
1763 254c = 100i = 24000u = 24000
1767 The following binary operators are implemented.
1768 Unless otherwise stated, they behave as in the C language:
1770 .Bl -tag -width 2n -compact
1780 remainder of division
1788 equal to, same effect as
1790 (this differs from C)
1792 less than or equal to
1794 greater than or equal to
1796 not equal to (corresponds to C
1798 this one is of limited portability, it is supported by Heirloom roff,
1801 logical and (corresponds to C
1804 logical or (corresponds to C
1807 minimum (not available in C)
1809 maximum (not available in C)
1812 There is no concept of precedence; evaluation proceeds from left to right,
1813 except when subexpressions are enclosed in parentheses.
1814 Inside parentheses, whitespace is ignored.
1815 .Sh ESCAPE SEQUENCE REFERENCE
1819 parser recognises the following escape sequences.
1822 language defines more escape sequences not implemented in
1828 documents, using escape sequences is discouraged except for those
1835 a backslash followed by any character not listed here
1836 simply prints that character itself.
1839 A backslash at the end of an input line can be used to continue the
1840 logical input line on the next physical input line, joining the text
1841 on both lines together as if it were on a single input line.
1843 The escape sequence backslash-space
1845 is an unpaddable space-sized non-breaking space character; see
1848 The rest of the input line is treated as
1851 Line continuation with comment.
1852 Discard the rest of the physical input line and continue the logical
1853 input line on the next physical input line, joining the text on
1854 both lines together as if it were on a single input line.
1855 This is a groff extension.
1856 .It Ic \e$ Ns Ar arg
1857 Macro argument expansion, see
1860 Hyphenation allowed at this point of the word; ignored by
1863 Non-printing zero-width character; see
1866 Acute accent special character; use
1870 .Sx Special Characters
1871 with two-letter names, see
1873 .It Ic \e*[ Ns Ar name Ns Ic \&]
1874 Interpolate the string with the
1876 For short names, there are variants
1881 One string is predefined on the
1885 expands to the name of the output device,
1886 for example ascii, utf8, ps, pdf, html, or markdown.
1888 Macro sets traditionally predefine additional strings which are not
1889 portable and differ across implementations.
1895 Strings can be defined, changed, and deleted with the
1902 Left italic correction (groff extension); ignored by
1906 .Dq mathematical minus sign .
1908 Right italic correction (groff extension); ignored by
1910 .It Ic \e[ Ns Ar name Ns Ic \&]
1911 .Sx Special Characters
1912 with names of arbitrary length, see
1915 One-twelfth em half-narrow space character, effectively zero-width in
1918 Grave accent special character; use
1922 Begin conditional input; see
1925 One-sixth em narrow space character, effectively zero-width in
1928 End conditional input; see
1931 Paddable non-breaking space character.
1933 Digit width space character.
1934 .It Ic \eA\(aq Ns Ar string Ns Ic \(aq
1935 Anchor definition; ignored by
1937 .It Ic \eB\(aq Ns Ar string Ns Ic \(aq
1942 conforms to the syntax of
1943 .Sx Numerical expressions
1947 .It Ic \eb\(aq Ns Ar string Ns Ic \(aq
1948 Bracket building function; ignored by
1950 .It Ic \eC\(aq Ns Ar name Ns Ic \(aq
1951 .Sx Special Characters
1952 with names of arbitrary length.
1954 When encountered at the end of an input text line,
1955 the next input text line is considered to continue that line,
1956 even if there are request or macro lines in between.
1957 No whitespace is inserted.
1958 .It Ic \eD\(aq Ns Ar string Ns Ic \(aq
1959 Draw graphics function; ignored by
1962 Move down by half a line; ignored by
1965 Backslash special character.
1966 .It Ic \eF[ Ns Ar name Ns Ic \&]
1967 Switch font family (groff extension); ignored by
1969 For short names, there are variants
1973 .It Ic \ef[ Ns Ar name Ns Ic \&]
1977 .Sx Text Decoration .
1978 For short names, there are variants
1982 .It Ic \eg[ Ns Ar name Ns Ic \&]
1983 Interpolate the format of a number register; ignored by
1985 For short names, there are variants
1989 .It Ic \eH\(aq Ns Oo +|- Oc Ns Ar number Ns Ic \(aq
1990 Set the height of the current font; ignored by
1992 .It Ic \eh\(aq Ns Oo Cm \&| Oc Ns Ar width Ns Ic \(aq
1994 If the vertical bar is given, the motion is relative to the current
1996 Otherwise, it is relative to the current position.
1997 The default scaling unit is
1999 .It Ic \ek[ Ns Ar name Ns Ic \&]
2000 Mark horizontal input place in register; ignored by
2002 For short names, there are variants
2006 .It Ic \eL\(aq Ns Ar number Ns Oo Ar c Oc Ns Ic \(aq
2007 Vertical line drawing function; ignored by
2009 .It Ic \el\(aq Ns Ar width Ns Oo Ar c Oc Ns Ic \(aq
2010 Draw a horizontal line of
2014 .It Ic \eM[ Ns Ar name Ns Ic \&]
2015 Set fill (background) color (groff extension); ignored by
2017 For short names, there are variants
2021 .It Ic \em[ Ns Ar name Ns Ic \&]
2022 Set glyph drawing color (groff extension); ignored by
2024 For short names, there are variants
2028 .It Ic \eN\(aq Ns Ar number Ns Ic \(aq
2031 on the current font.
2032 .It Ic \en Ns Oo +|- Oc Ns Ic \&[ Ns Ar name Ns Ic \&]
2033 Interpolate the number register
2035 For short names, there are variants
2039 If the optional sign is specified,
2040 the register is first incremented or decremented by the
2042 that was specified in the relevant
2044 request, and the changed value is interpolated.
2045 .It Ic \eo\(aq Ns Ar string Ns Ic \(aq
2046 Overstrike, writing all the characters contained in the
2048 to the same output position.
2049 In terminal and HTML output modes,
2050 only the last one of the characters is visible.
2052 Break the output line at the end of the current word.
2053 .It Ic \eR\(aq Ns Ar name Oo +|- Oc Ns Ar number Ns Ic \(aq
2054 Set number register; ignored by
2056 .It Ic \eS\(aq Ns Ar number Ns Ic \(aq
2057 Slant output; ignored by
2059 .It Ic \es\(aq Ns Oo +|- Oc Ns Ar number Ns Ic \(aq
2060 Change point size; ignored by
2063 .Ic \es Ns Oo +|- Oc Ns Ar n ,
2064 .Ic \es Ns Oo +|- Oc Ns Ic \(aq Ns Ar number Ns Ic \(aq ,
2065 .Ic \es[ Ns Oo +|- Oc Ns Ar number Ns Ic \&] ,
2067 .Ic \es Ns Oo +|- Oc Ns Ic \&[ Ns Ar number Ns Ic \&]
2068 are also parsed and ignored.
2070 Horizontal tab; ignored by
2073 Move up by half a line; ignored by
2075 .It Ic \eV[ Ns Ar name Ns Ic \&]
2076 Interpolate an environment variable; ignored by
2078 For short names, there are variants
2082 .It Ic \ev\(aq Ns Ar number Ns Ic \(aq
2083 Vertical motion; ignored by
2085 .It Ic \ew\(aq Ns Ar string Ns Ic \(aq
2086 Interpolate the width of the
2090 implementation assumes that after expansion of user-defined strings, the
2092 only contains normal characters, no escape sequences, and that each
2093 character has a width of 24 basic units.
2094 .It Ic \eX\(aq Ns Ar string Ns Ic \(aq
2097 as device control function; ignored in nroff mode and by
2099 .It Ic \ex\(aq Ns Ar number Ns Ic \(aq
2100 Extra line space function; ignored by
2102 .It Ic \eY[ Ns Ar name Ns Ic \&]
2103 Output a string as a device control function; ignored in nroff mode and by
2105 For short names, there are variants
2109 .It Ic \eZ\(aq Ns Ar string Ns Ic \(aq
2112 with zero width and height; ignored by
2115 Output the next character without advancing the cursor position.
2120 implementation of the
2122 language is incomplete.
2123 Major unimplemented features include:
2127 For security reasons,
2129 never reads or writes external files except via
2131 requests with safe relative paths.
2133 There is no automatic hyphenation, no adjustment to the right margin,
2134 and very limited support for centering; the output is always set flush-left.
2136 Support for setting tabulator and leader characters is missing,
2137 and support for manually changing indentation is limited.
2141 scaling unit is the default terminal unit.
2142 In traditional troff systems, this unit changes depending on the
2145 Width measurements are implemented in a crude way
2146 and often yield wrong results.
2147 Support for explicit movement requests and escapes is limited.
2149 There is no concept of output pages, no support for floats,
2150 graphics drawing, and picture inclusion;
2151 terminal output is always continuous.
2153 Requests regarding color, font families, font sizes,
2154 and glyph manipulation are ignored.
2155 Font support is very limited.
2156 Kerning is not implemented, and no ligatures are produced.
2160 macro control character does not suppress output line breaks.
2162 Diversions and environments are not implemented,
2163 and support for traps is very incomplete.
2165 Use of macros is not supported inside
2170 The special semantics of the
2172 number register is an idiosyncracy of
2174 manuals and not supported by other
2185 .%A Joseph F. Ossanna
2186 .%A Brian W. Kernighan
2187 .%I AT&T Bell Laboratories
2188 .%T Troff User's Manual
2189 .%R Computing Science Technical Report
2191 .%C Murray Hill, New Jersey
2193 .%U http://www.kohala.com/start/troff/cstr54.ps
2196 .%A Joseph F. Ossanna
2197 .%A Brian W. Kernighan
2199 .%T Heirloom Documentation Tools Nroff/Troff User's Manual
2200 .%D September 17, 2007
2201 .%U http://heirloom.sourceforge.net/doctools/troff.pdf
2204 The RUNOFF typesetting system, whose input forms the basis for
2206 was written in MAD and FAP for the CTSS operating system by Jerome E.
2208 Doug McIlroy rewrote it in BCPL in 1969, renaming it
2210 Dennis M. Ritchie rewrote McIlroy's
2212 in PDP-11 assembly for
2214 Joseph F. Ossanna improved roff and renamed it nroff
2217 then ported nroff to C as troff, which Brian W. Kernighan released with
2219 In 1989, James Clarke re-implemented troff in C++, naming it groff.
2224 reference was written by
2225 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
2227 .An Ingo Schwarze Aq Mt schwarze@openbsd.org .