1 .\" $Id: roff.7,v 1.103 2018/08/23 14:29:38 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: August 23 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 tiny subset of
45 Only these requests and escapes supported by
47 are documented in the present manual,
48 together with the basic language syntax shared by
59 Input lines beginning with the control character
61 are parsed for requests and macros.
67 Requests change the processing state and manipulate the formatting;
68 some macros also define the document structure and produce formatted
72 is accepted as an alternative control character,
78 Lines not beginning with control characters are called
80 They provide free-form text to be printed; the formatting of the text
81 depends on the respective processing context.
84 documents may contain only graphable 7-bit ASCII characters, the space
85 character, and, in certain circumstances, the tab character.
86 The backslash character
88 indicates the start of an escape sequence, used for example for
91 .Sx Special Characters .
92 For a listing of escape sequences, consult the
93 .Sx ESCAPE SEQUENCE REFERENCE
96 Text following an escaped double-quote
98 whether in a request, macro, or text line, is ignored to the end of the line.
99 A request line beginning with a control character and comment escape
102 Furthermore, request lines with only a control character and optional
103 trailing whitespace are stripped from input.
106 .Bd -literal -offset indent -compact
107 \&.\e\(dq This is a comment line.
108 \&.\e\(dq The next line is ignored:
110 \&.Sh EXAMPLES \e\(dq This is a comment, too.
111 \&example text \e\(dq And so is this.
113 .Ss Special Characters
114 Special characters are used to encode special glyphs and are rendered
115 differently across output media.
116 They may occur in request, macro, and text lines.
117 Sequences begin with the escape character
119 followed by either an open-parenthesis
121 for two-character sequences; an open-bracket
123 for n-character sequences (terminated at a close-bracket
125 or a single one character sequence.
128 .Bl -tag -width Ds -offset indent -compact
130 Two-letter em dash escape.
132 One-letter backslash escape.
139 Terms may be text-decorated using the
141 escape followed by an indicator: B (bold), I (italic), R (regular), or P
142 (revert to previous mode).
143 A numerical representation 3, 2, or 1 (bold, italic, and regular,
144 respectively) may be used instead.
145 The indicator or numerical representative may be preceded by C
146 (constant-width), which is ignored.
148 The two-character indicator
150 requests a font that is both bold and italic.
151 It may not be portable to old roff implementations.
154 .Bl -tag -width Ds -offset indent -compact
156 Write in \fBbold\fP, then switch to regular font mode.
157 .It Li \efIitalic\efP
158 Write in \fIitalic\fP, then return to previous font mode.
159 .It Li \ef(BIbold italic\efP
160 Write in \f(BIbold italic\fP, then return to previous font mode.
167 which encourages semantic annotation.
169 Whitespace consists of the space character.
170 In text lines, whitespace is preserved within a line.
171 In request and macro lines, whitespace delimits arguments and is discarded.
173 Unescaped trailing spaces are stripped from text line input unless in a
175 In general, trailing whitespace on any input line is discouraged for
176 reasons of portability.
177 In the rare case that a space character is needed at the end of an
178 input line, it may be forced by
181 Literal space characters can be produced in the output
182 using escape sequences.
183 In macro lines, they can also be included in arguments using quotation; see
187 Blank text lines, which may include whitespace, are only permitted
188 within literal contexts.
189 If the first character of a text line is a space, that line is printed
190 with a leading newline.
192 Many requests and macros support scaled widths for their arguments.
193 The syntax for a scaled width is
194 .Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
195 where a decimal must be preceded or followed by at least one digit.
196 Negative numbers, while accepted, are truncated to zero.
198 The following scaling units are accepted:
200 .Bl -tag -width Ds -offset indent -compact
214 default vertical span
226 default horizontal span for the terminal
231 Using anything other than
236 is necessarily non-portable across output media.
240 If a scaling unit is not provided, the numerical value is interpreted
241 under the default rules of
243 for vertical spaces and
248 .Bl -tag -width ".Bl -tag -width 2i" -offset indent -compact
249 .It Li \&.Bl -tag -width 2i
250 two-inch tagged list indentation in
253 two-inch tagged list indentation in
259 Each sentence should terminate at the end of an input line.
260 By doing this, a formatter will be able to apply the proper amount of
261 spacing after the end of sentence (unescaped) period, exclamation mark,
262 or question mark followed by zero or more non-sentence closing
271 The proper spacing is also intelligently preserved if a sentence ends at
272 the boundary of a macro line.
275 .Bd -literal -offset indent -compact
276 Do not end sentences mid-line like this. Instead,
277 end a sentence like this.
278 A macro would end like this:
282 A request or macro line consists of:
286 the control character
290 at the beginning of the line,
292 optionally an arbitrary amount of whitespace,
294 the name of the request or the macro, which is one word of arbitrary
295 length, terminated by whitespace,
297 and zero or more arguments delimited by whitespace.
300 Thus, the following request lines are all equivalent:
301 .Bd -literal -offset indent
307 Macros are provided by the
311 languages and can be defined by the
314 When called, they follow the same syntax as requests, except that
315 macro arguments may optionally be quoted by enclosing them
316 in double quote characters
318 Quoted text, even if it contains whitespace or would cause
319 a macro invocation when unquoted, is always considered literal text.
320 Inside quoted text, pairs of double quote characters
322 resolve to single double quote characters.
324 To be recognised as the beginning of a quoted argument, the opening
325 quote character must be preceded by a space character.
326 A quoted argument extends to the next double quote character that is not
327 part of a pair, or to the end of the input line, whichever comes earlier.
328 Leaving out the terminating double quote character at the end of the line
330 For clarity, if more arguments follow on the same input line,
331 it is recommended to follow the terminating double quote character
332 by a space character; in case the next character after the terminating
333 double quote character is anything else, it is regarded as the beginning
334 of the next, unquoted argument.
336 Both in quoted and unquoted arguments, pairs of backslashes
338 resolve to single backslashes.
339 In unquoted arguments, space characters can alternatively be included
340 by preceding them with a backslash
342 but quoting is usually better for clarity.
345 .Bl -tag -width Ds -offset indent -compact
346 .It Li .Fn strlen \(dqconst char *s\(dq
349 into one function argument.
355 would be considered separate arguments.
356 .It Li .Op \(dqFl a\(dq
359 as literal text instead of a flag macro.
361 .Sh REQUEST REFERENCE
365 parser recognises the following requests.
366 For requests marked as "ignored" or "unsupported", any arguments are
367 ignored, and the number of arguments is not checked.
369 .It Ic \&ab Op Ar message
371 Currently unsupported.
372 .It Ic \&ad Op Cm b | c | l | n | r
373 Set line adjustment mode for subsequent text.
375 .It Ic \&af Ar registername format
376 Assign an output format to a number register.
378 .It Ic \&aln Ar newname oldname
379 Create an alias for a number register.
380 Currently unsupported.
381 .It Ic \&als Ar newname oldname
382 Create an alias for a request, string, macro, or diversion.
383 .It Ic \&am Ar macroname Op Ar endmacro
384 Append to a macro definition.
385 The syntax of this request is the same as that of
387 .It Ic \&am1 Ar macroname Op Ar endmacro
388 Append to a macro definition, switching roff compatibility mode off
389 during macro execution (groff extension).
390 The syntax of this request is the same as that of
396 compatibility mode at all, it handles this request as an alias for
398 .It Ic \&ami Ar macrostring Op Ar endstring
399 Append to a macro definition, specifying the macro name indirectly
401 The syntax of this request is the same as that of
403 .It Ic \&ami1 Ar macrostring Op Ar endstring
404 Append to a macro definition, specifying the macro name indirectly
405 and switching roff compatibility mode off during macro execution
407 The syntax of this request is the same as that of
413 compatibility mode at all, it handles this request as an alias for
415 .It Ic \&as Ar stringname Op Ar string
416 Append to a user-defined string.
417 The syntax of this request is the same as that of
419 If a user-defined string with the specified name does not yet exist,
420 it is set to the empty string before appending.
421 .It Ic \&as1 Ar stringname Op Ar string
422 Append to a user-defined string, switching roff compatibility mode off
423 during macro execution (groff extension).
424 The syntax of this request is the same as that of
430 compatibility mode at all, it handles this request as an alias for
432 .It Ic \&asciify Ar divname
433 Fully unformat a diversion.
434 Currently unsupported.
436 Print a backtrace of the input stack.
437 This is a groff extension and currently ignored.
438 .It Ic \&bd Ar font Oo Ar curfont Oc Op Ar offset
439 Artificially embolden by repeated printing with small shifts.
441 .It Ic \&bleedat Ar left top width height
442 Set the BleedBox page parameter for PDF generation.
443 This is a Heirloom extension and currently ignored.
444 .It Ic \&blm Ar macroname
445 Set a blank line trap.
446 Currently unsupported.
447 .It Ic \&box Ar divname
448 Begin a diversion without including a partially filled line.
449 Currently unsupported.
450 .It Ic \&boxa Ar divname
451 Add to a diversion without including a partially filled line.
452 Currently unsupported.
453 .It Ic \&bp Oo Cm + Ns | Ns Cm - Oc Ns Ar pagenumber
456 .It Ic \&BP Ar source height width position offset flags label
457 Define a frame and place a picture in it.
458 This is a Heirloom extension and currently unsupported.
460 Break the output line.
465 Currently unsupported.
466 .It Ic \&breakchar Ar char ...
467 Optional line break characters.
468 This is a Heirloom extension and currently ignored.
470 Break output line after the next
473 This is a Heirloom extension and currently ignored.
475 Break and spread output line.
476 Currently, this is implemented as an alias for
479 Break and spread output line after the next
482 This is a Heirloom extension and currently ignored.
483 .It Ic \&c2 Op Ar char
484 Change the no-break control character.
485 Currently unsupported.
486 .It Ic \&cc Op Ar char
487 Change the control character.
490 is not specified, the control character is reset to
492 Trailing characters are ignored.
496 input lines without filling.
499 An argument of 0 or less ends centering.
500 Currently, high level macros abort centering.
501 .It Ic \&cf Ar filename
502 Output the contents of a file.
503 Ignored because insecure.
504 .It Ic \&cflags Ar flags char ...
506 This is a groff extension and currently ignored.
507 .It Ic \&ch Ar macroname Op Ar dist
508 Change a trap location.
510 .It Ic \&char Ar glyphname Op Ar string
512 Currently unsupported.
513 .It Ic \&chop Ar stringname
514 Remove the last character from a macro, string, or diversion.
515 Currently unsupported.
516 .It Ic \&class Ar classname char ...
517 Define a character class.
518 This is a groff extension and currently ignored.
519 .It Ic \&close Ar streamname
521 Ignored because insecure.
522 .It Ic \&CL Ar color text
524 This is a Heirloom extension and currently unsupported.
525 .It Ic \&color Op Cm 1 | 0
526 Activate or deactivate colors.
527 This is a groff extension and currently ignored.
528 .It Ic \&composite Ar from to
529 Define a name component for composite glyph names.
530 This is a groff extension and currently unsupported.
532 Immediately start the next iteration of a
535 Currently unsupported.
536 .It Ic \&cp Op Cm 1 | 0
539 compatibility mode on or off.
541 .It Ic \&cropat Ar left top width height
542 Set the CropBox page parameter for PDF generation.
543 This is a Heirloom extension and currently ignored.
544 .It Ic \&cs Ar font Op Ar width Op Ar emsize
545 Constant character spacing mode.
550 input lines including whitespace.
552 .It Ic \&da Ar divname
553 Append to a diversion.
554 Currently unsupported.
555 .It Ic \&dch Ar macroname Op Ar dist
556 Change a trap location in the current diversion.
557 This is a Heirloom extension and currently unsupported.
558 .It Ic \&de Ar macroname Op Ar endmacro
562 Its syntax can be either
563 .Bd -literal -offset indent
564 .Pf . Ic \&de Ar macroname
570 .Bd -literal -offset indent
571 .Pf . Ic \&de Ar macroname Ar endmacro
576 Both forms define or redefine the macro
580 which may consist of one or more input lines, including the newline
581 characters terminating each line, optionally containing calls to
585 macros or high-level macros like
589 macros, whichever applies to the document in question.
593 macro works in the same way as for
599 and after that, it is also evaluated as a
603 macro, but not as a high-level macro.
605 The macro can be invoked later using the syntax
607 .D1 Pf . Ar macroname Op Ar argument Op Ar argument ...
609 Regarding argument parsing, see
613 The line invoking the macro will be replaced
614 in the input stream by the
616 replacing all occurrences of
621 .Ar N Ns th Ar argument .
623 .Bd -literal -offset indent
625 \efI\e^\e\e$1\e^\efP\e\e$2
632 .D1 \efI\e^XtFree\e^\efP.
634 in the input stream, and thus in the output: \fI\^XtFree\^\fP.
635 Each occurrence of \e\e$* is replaced with all the arguments,
636 joined together with single space characters.
637 The variant \e\e$@ is similar, except that each argument is
640 Since macros and user-defined strings share a common string table,
643 clobbers the user-defined string
647 can also be printed using the
649 string interpolation syntax described below
651 but this is rarely useful because every macro definition contains at least
652 one explicit newline character.
654 In order to prevent endless recursion, both groff and
656 limit the stack depth for expanding macros and strings
657 to a large, but finite number, and
659 also limits the length of the expanded input line.
660 Do not rely on the exact values of these limits.
661 .It Ic \&de1 Ar macroname Op Ar endmacro
664 macro that will be executed with
666 compatibility mode switched off during macro execution.
667 This is a groff extension.
672 compatibility mode at all, it handles this request as an alias for
674 .It Ic \&defcolor Ar newname scheme component ...
676 This is a groff extension and currently ignored.
677 .It Ic \&dei Ar macrostring Op Ar endstring
680 macro, specifying the macro name indirectly (groff extension).
681 The syntax of this request is the same as that of
683 The effect is the same as:
685 .D1 Pf . Cm \&de No \e* Ns Bo Ar macrostring Bc Op \e* Ns Bq Ar endstring
686 .It Ic \&dei1 Ar macrostring Op Ar endstring
689 macro that will be executed with
691 compatibility mode switched off during macro execution,
692 specifying the macro name indirectly (groff extension).
697 compatibility mode at all, it handles this request as an alias for
699 .It Ic \&device Ar string ...
700 .It Ic \&devicem Ar stringname
701 These two requests only make sense with the groff-specific intermediate
702 output format and are unsupported.
703 .It Ic \&di Ar divname
705 Currently unsupported.
706 .It Ic \&do Ar command Op Ar argument ...
709 request or macro line with compatibility mode disabled.
710 Currently unsupported.
711 .It Ic \&ds Ar stringname Op Oo \(dq Oc Ns Ar string
712 Define a user-defined string.
717 arguments are space-separated.
720 begins with a double-quote character, that character will not be part
722 All remaining characters on the input line form the
724 including whitespace and double-quote characters, even trailing ones.
728 can be interpolated into subsequent text by using
729 .No \e* Ns Bq Ar stringname
732 of arbitrary length, or \e*(NN or \e*N if the length of
734 is two or one characters, respectively.
735 Interpolation can be prevented by escaping the leading backslash;
736 that is, an asterisk preceded by an even number of backslashes
737 does not trigger string interpolation.
739 Since user-defined strings and macros share a common string table,
746 used for defining a string can also be invoked as a macro,
747 in which case the following input line will be appended to the
749 forming a new input line passed to the
753 .Bd -literal -offset indent
764 Such abuse is of course strongly discouraged.
765 .It Ic \&ds1 Ar stringname Op Oo \(dq Oc Ns Ar string
766 Define a user-defined string that will be expanded with
768 compatibility mode switched off during string expansion.
769 This is a groff extension.
774 compatibility mode at all, it handles this request as an alias for
776 .It Ic \&dwh Ar dist macroname
777 Set a location trap in the current diversion.
778 This is a Heirloom extension and currently unsupported.
779 .It Ic \&dt Op Ar dist macroname
780 Set a trap within a diversion.
781 Currently unsupported.
782 .It Ic \&ec Op Ar char
783 Enable the escape mechanism and change the escape character.
786 argument defaults to the backslash
789 Restore the escape character.
790 Currently unsupported.
792 Save the escape character.
793 Currently unsupported.
797 half of an if/else conditional.
798 Pops a result off the stack of conditional evaluations pushed by
800 and uses it as its conditional.
801 If no stack entries are present (e.g., due to no prior
804 then false is assumed.
805 The syntax of this request is similar to
807 except that the conditional is missing.
808 .It Ic \&em Ar macroname
809 Set a trap at the end of input.
810 Currently unsupported.
812 End an equation block.
816 Disable the escape mechanism completely.
818 End a picture started by
820 This is a Heirloom extension and currently unsupported.
822 Begin an equation block.
825 for a description of the equation language.
826 .It Ic \&errprint Ar message
827 Print a string like an error message.
828 This is a Heirloom extension and currently ignored.
829 .It Ic \&ev Op Ar envname
830 Switch to another environment.
831 Currently unsupported.
832 .It Ic \&evc Op Ar envname
833 Copy an environment into the current environment.
834 Currently unsupported.
836 Abort processing and exit.
837 Currently unsupported.
838 .It Ic \&fallback Ar curfont font ...
839 Select the fallback sequence for a font.
840 This is a Heirloom extension and currently ignored.
841 .It Ic \&fam Op Ar familyname
842 Change the font family.
843 This is a groff extension and currently ignored.
844 .It Ic \&fc Op Ar delimchar Op Ar padchar
845 Define a delimiting and a padding character for fields.
846 Currently unsupported.
847 .It Ic \&fchar Ar glyphname Op Ar string
848 Define a fallback glyph.
849 Currently unsupported.
850 .It Ic \&fcolor Ar colorname
851 Set the fill color for \eD objects.
852 This is a groff extension and currently ignored.
853 .It Ic \&fdeferlig Ar font string ...
854 Defer ligature building.
855 This is a Heirloom extension and currently ignored.
856 .It Ic \&feature Cm + Ns | Ns Cm - Ns Ar name
857 Enable or disable an OpenType feature.
858 This is a Heirloom extension and currently ignored.
865 .It Ic \&fkern Ar font minkern
866 Control the use of kerning tables for a font.
867 This is a Heirloom extension and currently ignored.
871 .It Ic \&flig Ar font string char ...
873 This is a Heirloom extension and currently ignored.
874 .It Ic \&fp Ar position font Op Ar filename
875 Assign font position.
877 .It Ic \&fps Ar mapname ...
878 Mount a font with a special character map.
879 This is a Heirloom extension and currently ignored.
880 .It Ic \&fschar Ar font glyphname Op Ar string
881 Define a font-specific fallback glyph.
882 This is a groff extension and currently unsupported.
883 .It Ic \&fspacewidth Ar font Op Ar afmunits
884 Set a font-specific width for the space character.
885 This is a Heirloom extension and currently ignored.
886 .It Ic \&fspecial Ar curfont Op Ar font ...
887 Conditionally define a special font.
888 This is a groff extension and currently ignored.
889 .It Ic \&ft Op Ar font
893 arguments are supported:
894 .Bl -tag -width 4n -offset indent
895 .It Cm B , BI , CB , 3 , 4
903 .It Cm R , CR , CW , 1
904 switches to normal font
905 .It Cm P No "or no argument"
906 switches back to the previous font
909 This request takes effect only locally and may be overridden
910 by macros and escape sequences.
911 .It Ic \&ftr Ar newname Op Ar oldname
913 This is a groff extension and currently ignored.
914 .It Ic \&fzoom Ar font Op Ar permille
917 .It Ic \&gcolor Op Ar colorname
919 This is a groff extension and currently ignored.
920 .It Ic \&hc Op Ar char
921 Set the hyphenation character.
923 .It Ic \&hcode Ar char code ...
924 Set hyphenation codes of characters.
926 .It Ic \&hidechar Ar font char ...
927 Hide characters in a font.
928 This is a Heirloom extension and currently ignored.
929 .It Ic \&hla Ar language
930 Set hyphenation language.
931 This is a groff extension and currently ignored.
932 .It Ic \&hlm Op Ar number
933 Set maximum number of consecutive hyphenated lines.
935 .It Ic \&hpf Ar filename
936 Load hyphenation pattern file.
937 This is a groff extension and currently ignored.
938 .It Ic \&hpfa Ar filename
939 Load hyphenation pattern file, appending to the current patterns.
940 This is a groff extension and currently ignored.
941 .It Ic \&hpfcode Ar code code ...
942 Define mapping values for character codes in hyphenation patterns.
943 This is a groff extension and currently ignored.
944 .It Ic \&hw Ar word ...
945 Specify hyphenation points in words.
947 .It Ic \&hy Op Ar mode
948 Set automatic hyphenation mode.
950 .It Ic \&hylang Ar language
951 Set hyphenation language.
952 This is a Heirloom extension and currently ignored.
953 .It Ic \&hylen Ar nchar
954 Minimum word length for hyphenation.
955 This is a Heirloom extension and currently ignored.
956 .It Ic \&hym Op Ar length
957 Set hyphenation margin.
958 This is a groff extension and currently ignored.
959 .It Ic \&hypp Ar penalty ...
960 Define hyphenation penalties.
961 This is a Heirloom extension and currently ignored.
962 .It Ic \&hys Op Ar length
963 Set hyphenation space.
964 This is a groff extension and currently ignored.
965 .It Ic \&ie Ar condition body
968 half of an if/else conditional.
969 The result of the conditional is pushed into a stack used by subsequent
972 which may be separated by any intervening input (or not exist at all).
973 Its syntax is equivalent to
975 .It Ic \&if Ar condition body
977 This request can also be written as follows:
978 .Bd -unfilled -offset indent
979 .Pf . Ic \&if Ar condition No \e{ Ns Ar body
982 .Bd -unfilled -offset indent
983 .Pf . Ic \&if Ar condition No \e{\e
990 is a boolean expression.
993 supports the following subset of roff conditionals:
1000 it is logically inverted.
1002 If the first character of
1010 it evaluates to true, and the
1012 starts with the next character.
1014 If the first character of
1024 it evaluates to false, and the
1026 starts with the next character.
1028 If the first character of
1032 .Pq character available ,
1033 it evaluates to true if the following character is an ASCII character
1034 or a valid character escape sequence, or to false otherwise.
1037 starts with the character following that next character.
1039 If the first character of
1043 it evaluates to true if the rest of
1045 is the name of an existing user defined macro or string;
1046 otherwise, it evaluates to false.
1048 If the first character of
1052 it evaluates to true if the rest of
1054 is the name of an existing number register;
1055 otherwise, it evaluates to false.
1059 starts with a parenthesis or with an optionally signed
1060 integer number, it is evaluated according to the rules of
1061 .Sx Numerical expressions
1063 It evaluates to true if the result is positive,
1064 or to false if the result is zero or negative.
1066 Otherwise, the first character of
1068 is regarded as a delimiter and it evaluates to true if the string
1069 extending from its first to its second occurrence is equal to the
1070 string extending from its second to its third occurrence.
1074 cannot be parsed, it evaluates to false.
1077 If a conditional is false, its children are not processed, but are
1078 syntactically interpreted to preserve the integrity of the input
1086 which may lead to interesting results, but
1088 .D1 \&.if t .if t \e{\e
1090 will continue to syntactically interpret to the block close of the final
1092 Sub-conditionals, in this case, obviously inherit the truth value of
1097 section is begun by an escaped brace
1099 scope continues until the end of the input line containing the
1100 matching closing-brace escape sequence
1104 is not enclosed in braces, scope continues until the end of the line.
1109 on the same line, whether after a brace or not, then requests and macros
1111 begin with a control character.
1112 It is generally more intuitive, in this case, to write
1113 .Bd -unfilled -offset indent
1114 .Pf . Ic \&if Ar condition No \e{\e
1119 than having the request or macro follow as
1121 .D1 Pf . Ic \&if Ar condition Pf \e{. Ar request
1123 The scope of a conditional is always parsed, but only executed if the
1124 conditional evaluates to true.
1128 is converted into a zero-width escape sequence if not passed as a
1137 being considered an argument of the
1140 .It Ic \&ig Op Ar endmacro
1142 Its syntax can be either
1143 .Bd -literal -offset indent
1150 .Bd -literal -offset indent
1151 .Pf . Cm \&ig Ar endmacro
1156 In the first case, input is ignored until a
1158 request is encountered on its own line.
1159 In the second case, input is ignored until the specified
1160 .Sq Pf . Ar endmacro
1162 Do not use the escape character
1164 anywhere in the definition of
1166 it would cause very strange behaviour.
1170 is a roff request or a roff macro, like in
1174 the subsequent invocation of
1176 will first terminate the
1178 then be invoked as usual.
1179 Otherwise, it only terminates the
1181 and arguments following it or the
1183 request are discarded.
1184 .It Ic \&in Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1190 .It Ic \&index Ar register stringname substring
1191 Find a substring in a string.
1192 This is a Heirloom extension and currently unsupported.
1193 .It Ic \&it Ar expression macro
1194 Set an input line trap.
1197 will be invoked after processing the number of input text lines
1198 specified by the numerical
1200 While evaluating the
1202 the unit suffixes described below
1205 .It Ic \&it Ar expression macro
1206 Set an input line trap, not counting lines ending with \ec.
1207 Currently unsupported.
1208 .It Ic \&IX Ar class keystring
1209 To support the generation of a table of contents,
1211 emits this user-defined macro, usually without defining it.
1212 To avoid reporting large numbers of spurious errors,
1215 .It Ic \&kern Op Cm 1 | 0
1216 Switch kerning on or off.
1218 .It Ic \&kernafter Ar font char ... afmunits ...
1219 Increase kerning after some characters.
1220 This is a Heirloom extension and currently ignored.
1221 .It Ic \&kernbefore Ar font char ... afmunits ...
1222 Increase kerning before some characters.
1223 This is a Heirloom extension and currently ignored.
1224 .It Ic \&kernpair Ar font char ... font char ... afmunits
1225 Add a kerning pair to the kerning table.
1226 This is a Heirloom extension and currently ignored.
1227 .It Ic \&lc Op Ar glyph
1228 Define a leader repetition character.
1229 Currently unsupported.
1230 .It Ic \&lc_ctype Ar localename
1234 This is a Heirloom extension and currently unsupported.
1235 .It Ic \&lds Ar macroname string
1236 Define a local string.
1237 This is a Heirloom extension and currently unsupported.
1238 .It Ic \&length Ar register string
1239 Count the number of input characters in a string.
1240 Currently unsupported.
1241 .It Ic \&letadj Ar lspmin lshmin letss lspmax lshmax
1242 Dynamic letter spacing and reshaping.
1243 This is a Heirloom extension and currently ignored.
1244 .It Ic \&lf Ar lineno Op Ar filename
1245 Change the line number for error messages.
1246 Ignored because insecure.
1247 .It Ic \&lg Op Cm 1 | 0
1248 Switch the ligature mechanism on or off.
1250 .It Ic \&lhang Ar font char ... afmunits
1251 Hang characters at left margin.
1252 This is a Heirloom extension and currently ignored.
1253 .It Ic \&linetabs Op Cm 1 | 0
1254 Enable or disable line-tabs mode.
1255 This is a groff extension and currently unsupported.
1256 .It Ic \&ll Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1257 Change the output line length.
1260 argument is omitted, the line length is reset to its previous value.
1261 The default setting for terminal output is 78n.
1262 If a sign is given, the line length is added to or subtracted from;
1263 otherwise, it is set to the provided value.
1264 Using this request in new manuals is discouraged for several reasons,
1265 among others because it overrides the
1268 command line option.
1269 .It Ic \&lnr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1270 Set local number register.
1271 This is a Heirloom extension and currently unsupported.
1272 .It Ic \&lnrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1273 Set local floating-point register.
1274 This is a Heirloom extension and currently unsupported.
1275 .It Ic \&lpfx Ar string
1277 This is a Heirloom extension and currently unsupported.
1278 .It Ic \&ls Op Ar factor
1280 It takes one integer argument specifying the vertical distance of
1281 subsequent output text lines measured in v units.
1283 .It Ic \&lsm Ar macroname
1284 Set a leading spaces trap.
1285 This is a groff extension and currently unsupported.
1286 .It Ic \< Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1287 Set title line length.
1289 .It Ic \&mc Ar glyph Op Ar dist
1290 Print margin character in the right margin.
1293 is currently ignored; instead, 1n is used.
1294 .It Ic \&mediasize Ar media
1295 Set the device media size.
1296 This is a Heirloom extension and currently ignored.
1297 .It Ic \&minss Ar width
1298 Set minimum word space.
1299 This is a Heirloom extension and currently ignored.
1300 .It Ic \&mk Op Ar register
1301 Mark vertical position.
1303 .It Ic \&mso Ar filename
1304 Load a macro file using the search path.
1305 Ignored because insecure.
1307 Disable adjusting without changing the adjustment mode.
1309 .It Ic \&ne Op Ar height
1310 Declare the need for the specified minimum vertical space
1311 before the next trap or the bottom of the page.
1314 Switch to no-fill mode.
1320 Turn off automatic hyphenation mode.
1322 .It Ic \&nhychar Ar char ...
1323 Define hyphenation-inhibiting characters.
1324 This is a Heirloom extension and currently ignored.
1325 .It Ic \&nm Op Ar start Op Ar inc Op Ar space Op Ar indent
1327 Currently unsupported.
1328 .It Ic \&nn Op Ar number
1329 Temporarily turn off line numbering.
1330 Currently unsupported.
1331 .It Ic \&nop Ar body
1332 Execute the rest of the input line as a request, macro, or text line,
1335 request and any space characters immediately following it.
1336 This is mostly used to indent text lines inside macro definitions.
1337 .It Ic \&nr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression Op Ar stepsize
1338 Define or change a register.
1339 A register is an arbitrary string value that defines some sort of state,
1340 which influences parsing and/or formatting.
1344 .Sx Numerical expressions
1346 If it is prefixed by a sign, the register will be
1347 incremented or decremented instead of assigned to.
1353 auto-increment feature.
1354 It remains unchanged when omitted while changing an existing register,
1355 and it defaults to 0 when defining a new register.
1359 is handled specially:
1362 If set to a positive integer value, certain
1364 macros will behave in the same way as in the
1367 If set to 0, these macros will behave in the same way as outside the
1369 section, even when called within the
1372 Note that starting a new
1376 macro will reset this register.
1379 .Ic \&nrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression
1382 Define or change a floating-point register.
1383 This is a Heirloom extension and currently unsupported.
1386 This is a groff extension and currently ignored.
1388 Turn on no-space mode.
1390 .It Ic \&nx Op Ar filename
1391 Abort processing of the current input file and process another one.
1392 Ignored because insecure.
1393 .It Ic \&open Ar stream file
1394 Open a file for writing.
1395 Ignored because insecure.
1396 .It Ic \&opena Ar stream file
1397 Open a file for appending.
1398 Ignored because insecure.
1400 Output saved vertical space.
1402 .It Ic \&output Ar string
1403 Output directly to intermediate output.
1405 .It Ic \&padj Op Cm 1 | 0
1406 Globally control paragraph-at-once adjustment.
1407 This is a Heirloom extension and currently ignored.
1408 .It Ic \&papersize Ar media
1410 This is a Heirloom extension and currently ignored.
1411 .It Ic \&pc Op Ar char
1412 Change the page number character.
1416 This is a groff extension and currently ignored.
1417 .It Ic \&pi Ar command
1418 Pipe output to a shell command.
1419 Ignored because insecure.
1421 Low-level request used by
1423 This is a Heirloom extension and currently unsupported.
1424 .It Ic \&pl Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1428 Print names and sizes of macros, strings, and diversions
1429 to standard error output.
1431 .It Ic \&pn Oo Cm + Ns | Ns Cm - Oc Ns Ar number
1432 Change the page number of the next page.
1435 Print all number registers on standard error output.
1437 .It Ic \&po Op Oo Cm + Ns | Ns Cm - Oc Ns Ar offset
1438 Set a horizontal page offset.
1439 If no argument is specified, the page offset is reverted to its
1441 If a sign is specified, the new page offset is calculated relative
1442 to the current one; otherwise, it is absolute.
1443 The argument follows the syntax of
1445 and the default scaling unit is
1447 .It Ic \&ps Op Oo Cm + Ns | Ns Cm - Oc Ns size
1450 .It Ic \&psbb Ar filename
1451 Retrieve the bounding box of a PostScript file.
1452 Currently unsupported.
1453 .It Ic \&pshape Ar indent length ...
1454 Set a special shape for the current paragraph.
1455 This is a Heirloom extension and currently unsupported.
1456 .It Ic \&pso Ar command
1457 Include output of a shell command.
1458 Ignored because insecure.
1460 Print the names and positions of all traps on standard error output.
1461 This is a groff extension and currently ignored.
1462 .It Ic \&pvs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1463 Change post-vertical spacing.
1464 This is a groff extension and currently ignored.
1465 .It Ic \&rchar Ar glyph ...
1466 Remove glyph definitions.
1467 Currently unsupported.
1468 .It Ic \&rd Op Ar prompt Op Ar argument ...
1469 Read from standard input.
1471 .It Ic \&recursionlimit Ar maxrec maxtail
1472 Set the maximum stack depth for recursive macros.
1473 This is a Heirloom extension and currently ignored.
1474 .It Ic \&return Op Ar twice
1475 Exit the presently executed macro and return to the caller.
1476 The argument is currently ignored.
1477 .It Ic \&rfschar Ar font glyph ...
1478 Remove font-specific fallback glyph definitions.
1479 Currently unsupported.
1480 .It Ic \&rhang Ar font char ... afmunits
1481 Hang characters at right margin.
1482 This is a Heirloom extension and currently ignored.
1486 input lines to the right margin without filling.
1489 An argument of 0 or less ends right adjustment.
1490 .It Ic \&rm Ar macroname
1491 Remove a request, macro or string.
1492 .It Ic \&rn Ar oldname newname
1493 Rename a request, macro, diversion, or string.
1496 user-defined macros,
1500 macros, and user-defined strings can be renamed, but renaming of
1501 predefined strings and of
1503 requests is not supported, and diversions are not implemented at all.
1504 .It Ic \&rnn Ar oldname newname
1505 Rename a number register.
1506 Currently unsupported.
1507 .It Ic \&rr Ar register
1512 .It Ic \&rt Op Ar dist
1513 Return to marked vertical position.
1515 .It Ic \&schar Ar glyph Op Ar string
1516 Define global fallback glyph.
1517 This is a groff extension and currently unsupported.
1518 .It Ic \&sentchar Ar char ...
1519 Define sentence-ending characters.
1520 This is a Heirloom extension and currently ignored.
1521 .It Ic \&shc Op Ar glyph
1522 Change the soft hyphen character.
1524 .It Ic \&shift Op Ar number
1525 Shift macro arguments
1527 times, by default once: \e\e$i becomes what \e\e$i+number was.
1528 Also decrement \en(.$ by
1530 .It Ic \&sizes Ar size ...
1531 Define permissible point sizes.
1532 This is a groff extension and currently ignored.
1533 .It Ic \&so Ar filename
1534 Include a source file.
1535 The file is read and its contents processed as input in place of the
1538 To avoid inadvertent inclusion of unrelated files,
1540 only accepts relative paths not containing the strings
1545 This request requires
1547 to change to the right directory before calling
1549 per convention to the root of the manual tree.
1550 Typical usage looks like:
1552 .Dl \&.so man3/Xcursor.3
1554 As the whole concept is rather fragile, the use of
1560 .It Ic \&sp Op Ar height
1561 Break the output line and emit vertical space.
1562 The argument follows the syntax of
1564 and defaults to one blank line
1566 .It Ic \&spacewidth Op Cm 1 | 0
1567 Set the space width from the font metrics file.
1568 This is a Heirloom extension and currently ignored.
1569 .It Ic \&special Op Ar font ...
1570 Define a special font.
1571 This is a groff extension and currently ignored.
1572 .It Ic \&spreadwarn Op Ar width
1573 Warn about wide spacing between words.
1575 .It Ic \&ss Ar wordspace Op Ar sentencespace
1576 Set space character size.
1578 .It Ic \&sty Ar position style
1579 Associate style with a font position.
1580 This is a groff extension and currently ignored.
1581 .It Ic \&substring Ar stringname startpos Op Ar endpos
1582 Replace a user-defined string with a substring.
1583 Currently unsupported.
1584 .It Ic \&sv Op Ar height
1585 Save vertical space.
1587 .It Ic \&sy Ar command
1588 Execute shell command.
1589 Ignored because insecure.
1591 Re-start a table layout, retaining the options of the prior table
1595 .It Ic \&ta Op Ar width ... Op Cm T Ar width ...
1599 argument follows the syntax of
1600 .Sx Scaling Widths .
1601 If prefixed by a plus sign, it is relative to the previous tab stop.
1602 The arguments after the
1604 marker are used repeatedly as often as needed; for each reuse,
1605 they are taken relative to the last previously established tab stop.
1608 is called without arguments, all tab stops are cleared.
1609 .It Ic \&tc Op Ar glyph
1610 Change tab repetition character.
1611 Currently unsupported.
1613 End a table context.
1616 .It Ic \&ti Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1617 Break the output line and indent the next output line by
1619 If a sign is specified, the temporary indentation is calculated
1620 relative to the current indentation; otherwise, it is absolute.
1621 The argument follows the syntax of
1623 and the default scaling unit is
1625 .It Ic \&tkf Ar font minps width1 maxps width2
1626 Enable track kerning for a font.
1628 .It Ic \&tl No \& Ap Ar left Ap Ar center Ap Ar right Ap
1630 Currently unsupported.
1631 .It Ic \&tm Ar string
1632 Print to standard error output.
1634 .It Ic \&tm1 Ar string
1635 Print to standard error output, allowing leading blanks.
1636 This is a groff extension and currently ignored.
1637 .It Ic \&tmc Ar string
1638 Print to standard error output without a trailing newline.
1639 This is a groff extension and currently ignored.
1640 .It Ic \&tr Ar glyph glyph ...
1641 Output character translation.
1642 The first glyph in each pair is replaced by the second one.
1643 Character escapes can be used; for example,
1647 replaces all invocations of \e(xx with \e(yy.
1648 .It Ic \&track Ar font minps width1 maxps width2
1649 Static letter space tracking.
1650 This is a Heirloom extension and currently ignored.
1651 .It Ic \&transchar Ar char ...
1652 Define transparent characters for sentence-ending.
1653 This is a Heirloom extension and currently ignored.
1654 .It Ic \&trf Ar filename
1655 Output the contents of a file, disallowing invalid characters.
1656 This is a groff extension and ignored because insecure.
1657 .It Ic \&trimat Ar left top width height
1658 Set the TrimBox page parameter for PDF generation.
1659 This is a Heirloom extension and currently ignored.
1660 .It Ic \&trin Ar glyph glyph ...
1661 Output character translation, ignored by
1663 Currently unsupported.
1664 .It Ic \&trnt Ar glyph glyph ...
1665 Output character translation, ignored by \e!.
1666 Currently unsupported.
1669 This is a groff extension and currently ignored.
1671 Begin a table, which formats input in aligned rows and columns.
1674 for a description of the tbl language.
1676 Globally set the underline font.
1683 .It Ic \&unformat Ar divname
1684 Unformat spaces and tabs in a diversion.
1685 Currently unsupported.
1686 .It Ic \&unwatch Ar macroname
1687 Disable notification for string or macro.
1688 This is a Heirloom extension and currently ignored.
1689 .It Ic \&unwatchn Ar register
1690 Disable notification for register.
1691 This is a Heirloom extension and currently ignored.
1692 .It Ic \&vpt Op Cm 1 | 0
1693 Enable or disable vertical position traps.
1694 This is a groff extension and currently ignored.
1695 .It Ic \&vs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1696 Change vertical spacing.
1698 .It Ic \&warn Ar flags
1701 .It Ic \&warnscale Ar si
1702 Set the scaling indicator used in warnings.
1703 This is a groff extension and currently ignored.
1704 .It Ic \&watch Ar macroname
1705 Notify on change of string or macro.
1706 This is a Heirloom extension and currently ignored.
1707 .It Ic \&watchlength Ar maxlength
1708 On change, report the contents of macros and strings
1709 up to the specified length.
1710 This is a Heirloom extension and currently ignored.
1711 .It Ic \&watchn Ar register
1712 Notify on change of register.
1713 This is a Heirloom extension and currently ignored.
1714 .It Ic \&wh Ar dist Op Ar macroname
1715 Set a page location trap.
1716 Currently unsupported.
1717 .It Ic \&while Ar condition body
1718 Repeated execution while a condition is true.
1719 Currently unsupported.
1720 .It Ic \&write Oo \(dq Oc Ns Ar string
1721 Write to an open file.
1722 Ignored because insecure.
1723 .It Ic \&writec Oo \(dq Oc Ns Ar string
1724 Write to an open file without appending a newline.
1725 Ignored because insecure.
1726 .It Ic \&writem Ar macroname
1727 Write macro or string to an open file.
1728 Ignored because insecure.
1729 .It Ic \&xflag Ar level
1730 Set the extension level.
1731 This is a Heirloom extension and currently ignored.
1733 .Ss Numerical expressions
1739 requests accept integer numerical expressions as arguments.
1740 These are always evaluated using the C
1742 type; integer overflow works the same way as in the C language.
1743 Numbers consist of an arbitrary number of digits
1747 prefixed by an optional sign
1751 Each number may be followed by one optional scaling unit described below
1752 .Sx Scaling Widths .
1753 The following equations hold:
1754 .Bd -literal -offset indent
1755 1i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240
1756 254c = 100i = 24000u = 24000
1760 The following binary operators are implemented.
1761 Unless otherwise stated, they behave as in the C language:
1763 .Bl -tag -width 2n -compact
1773 remainder of division
1781 equal to, same effect as
1783 (this differs from C)
1785 less than or equal to
1787 greater than or equal to
1789 not equal to (corresponds to C
1791 this one is of limited portability, it is supported by Heirloom roff,
1794 logical and (corresponds to C
1797 logical or (corresponds to C
1800 minimum (not available in C)
1802 maximum (not available in C)
1805 There is no concept of precedence; evaluation proceeds from left to right,
1806 except when subexpressions are enclosed in parentheses.
1807 Inside parentheses, whitespace is ignored.
1808 .Sh ESCAPE SEQUENCE REFERENCE
1812 parser recognises the following escape sequences.
1815 language defines more escape sequences not implemented in
1821 documents, using escape sequences is discouraged except for those
1826 A backslash followed by any character not listed here
1827 simply prints that character itself.
1829 A backslash at the end of an input line can be used to continue the
1830 logical input line on the next physical input line, joining the text
1831 on both lines together as if it were on a single input line.
1833 The escape sequence backslash-space
1835 is an unpaddable space-sized non-breaking space character; see
1838 The rest of the input line is treated as
1841 Line continuation with comment.
1842 Discard the rest of the physical input line and continue the logical
1843 input line on the next physical input line, joining the text on
1844 both lines together as if it were on a single input line.
1845 This is a groff extension.
1847 Macro argument expansion, see
1850 Hyphenation allowed at this point of the word; ignored by
1853 Non-printing zero-width character; see
1856 Acute accent special character; use
1860 .Sx Special Characters
1861 with two-letter names, see
1863 .Ss \e* Ns Bq Ar name
1864 Interpolate the string with the
1866 For short names, there are variants
1871 One string is predefined on the
1873 language level: \e*(.T expands to the name of the output device,
1874 for example ascii, utf8, ps, pdf, html, or markdown.
1876 Macro sets traditionally predefine additional strings which are not
1877 portable and differ across implementations.
1883 Strings can be defined, changed, and deleted with the
1890 Left italic correction (groff extension); ignored by
1894 .Dq mathematical minus sign .
1896 Right italic correction (groff extension); ignored by
1898 .Ss \e Ns Bq Ar name
1899 .Sx Special Characters
1900 with names of arbitrary length, see
1903 One-twelfth em half-narrow space character, effectively zero-width in
1906 Grave accent special character; use
1910 Begin conditional input; see
1913 One-sixth em narrow space character, effectively zero-width in
1916 End conditional input; see
1919 Paddable non-breaking space character.
1921 Digit width space character.
1922 .Ss \eA\(aq Ns Ar string Ns \(aq
1923 Anchor definition; ignored by
1925 .Ss \eB\(aq Ns Ar string Ns \(aq
1930 conforms to the syntax of
1931 .Sx Numerical expressions
1935 .Ss \eb\(aq Ns Ar string Ns \(aq
1936 Bracket building function; ignored by
1938 .Ss \eC\(aq Ns Ar name Ns \(aq
1939 .Sx Special Characters
1940 with names of arbitrary length.
1942 When encountered at the end of an input text line,
1943 the next input text line is considered to continue that line,
1944 even if there are request or macro lines in between.
1945 No whitespace is inserted.
1946 .Ss \eD\(aq Ns Ar string Ns \(aq
1947 Draw graphics function; ignored by
1950 Move down by half a line; ignored by
1953 Backslash special character.
1954 .Ss \eF Ns Bq Ar name
1955 Switch font family (groff extension); ignored by
1957 For short names, there are variants
1961 .Ss \ef Ns Bq Ar name
1965 .Sx Text Decoration .
1966 For short names, there are variants
1970 .Ss \eg Ns Bq Ar name
1971 Interpolate the format of a number register; ignored by
1973 For short names, there are variants
1977 .Ss \eH\(aq Ns Oo +|- Oc Ns Ar number Ns \(aq
1978 Set the height of the current font; ignored by
1980 .Ss \eh\(aq Ns Oo Cm \&| Oc Ns Ar width Ns \(aq
1982 If the vertical bar is given, the motion is relative to the current
1984 Otherwise, it is relative to the current position.
1985 The default scaling unit is
1987 .Ss \ek Ns Bq Ar name
1988 Mark horizontal input place in register; ignored by
1990 For short names, there are variants
1994 .Ss \eL\(aq Ns Ar number Ns Oo Ar c Oc Ns \(aq
1995 Vertical line drawing function; ignored by
1997 .Ss \el\(aq Ns Ar width Ns Oo Ar c Oc Ns \(aq
1998 Draw a horizontal line of
2002 .Ss \eM Ns Bq Ar name
2003 Set fill (background) color (groff extension); ignored by
2005 For short names, there are variants
2009 .Ss \em Ns Bq Ar name
2010 Set glyph drawing color (groff extension); ignored by
2012 For short names, there are variants
2016 .Ss \eN\(aq Ns Ar number Ns \(aq
2019 on the current font.
2020 .Ss \en Ns Oo +|- Oc Ns Bq Ar name
2021 Interpolate the number register
2023 For short names, there are variants
2027 If the optional sign is specified,
2028 the register is first incremented or decremented by the
2030 that was specified in the relevant
2032 request, and the changed value is interpolated.
2033 .Ss \eo\(aq Ns Ar string Ns \(aq
2034 Overstrike, writing all the characters contained in the
2036 to the same output position.
2037 In terminal and HTML output modes,
2038 only the last one of the characters is visible.
2040 Break the output line at the end of the current word.
2041 .Ss \eR\(aq Ns Ar name Oo +|- Oc Ns Ar number Ns \(aq
2042 Set number register; ignored by
2044 .Ss \eS\(aq Ns Ar number Ns \(aq
2045 Slant output; ignored by
2047 .Ss \es\(aq Ns Oo +|- Oc Ns Ar number Ns \(aq
2048 Change point size; ignored by
2051 .No \es Ns Oo +|- Oc Ns Ar n ,
2052 .No \es Ns Oo +|- Oc Ns \(aq Ns Ar number Ns \(aq ,
2053 .No \es Ns Bq Oo +|- Oc Ns Ar number ,
2055 .No \es Ns Oo +|- Oc Ns Bq Ar number
2056 are also parsed and ignored.
2058 Horizontal tab; ignored by
2061 Move up by half a line; ignored by
2063 .Ss \eV Ns Bq Ar name
2064 Interpolate an environment variable; ignored by
2066 For short names, there are variants
2070 .Ss \ev\(aq Ns Ar number Ns \(aq
2071 Vertical motion; ignored by
2073 .Ss \ew\(aq Ns Ar string Ns \(aq
2074 Interpolate the width of the
2078 implementation assumes that after expansion of user-defined strings, the
2080 only contains normal characters, no escape sequences, and that each
2081 character has a width of 24 basic units.
2082 .Ss \eX\(aq Ns Ar string Ns \(aq
2085 as device control function; ignored in nroff mode and by
2087 .Ss \ex\(aq Ns Ar number Ns \(aq
2088 Extra line space function; ignored by
2090 .Ss \eY Ns Bq Ar name
2091 Output a string as a device control function; ignored in nroff mode and by
2093 For short names, there are variants
2097 .Ss \eZ\(aq Ns Ar string Ns \(aq
2100 with zero width and height; ignored by
2103 Output the next character without advancing the cursor position.
2107 implementation of the
2109 language is intentionally incomplete.
2110 Unimplemented features include:
2114 For security reasons,
2116 never reads or writes external files except via
2118 requests with safe relative paths.
2120 There is no automatic hyphenation, no adjustment to the right margin,
2121 and no centering; the output is always set flush-left.
2123 Support for setting tabulator positions
2124 and tabulator and leader characters is missing,
2125 and support for manually changing indentation is limited.
2129 scaling unit is the default terminal unit.
2130 In traditional troff systems, this unit changes depending on the
2133 Width measurements are implemented in a crude way
2134 and often yield wrong results.
2135 Explicit movement requests and escapes are ignored.
2137 There is no concept of output pages, no support for floats,
2138 graphics drawing, and picture inclusion;
2139 terminal output is always continuous.
2141 Requests regarding color, font families, and glyph manipulation
2143 Font support is very limited.
2144 Kerning is not implemented, and no ligatures are produced.
2148 macro control character does not suppress output line breaks.
2150 Diversions are not implemented,
2151 and support for traps is very incomplete.
2153 While recursion is supported,
2158 The special semantics of the
2160 number register is an idiosyncracy of
2162 manuals and not supported by other
2173 .%A Joseph F. Ossanna
2174 .%A Brian W. Kernighan
2175 .%I AT&T Bell Laboratories
2176 .%T Troff User's Manual
2177 .%R Computing Science Technical Report
2179 .%C Murray Hill, New Jersey
2181 .%U http://www.kohala.com/start/troff/cstr54.ps
2184 .%A Joseph F. Ossanna
2185 .%A Brian W. Kernighan
2187 .%T Heirloom Documentation Tools Nroff/Troff User's Manual
2188 .%D September 17, 2007
2189 .%U http://heirloom.sourceforge.net/doctools/troff.pdf
2192 The RUNOFF typesetting system, whose input forms the basis for
2194 was written in MAD and FAP for the CTSS operating system by Jerome E.
2196 Doug McIlroy rewrote it in BCPL in 1969, renaming it
2198 Dennis M. Ritchie rewrote McIlroy's
2200 in PDP-11 assembly for
2202 Joseph F. Ossanna improved roff and renamed it nroff
2205 then ported nroff to C as troff, which Brian W. Kernighan released with
2207 In 1989, James Clarke re-implemented troff in C++, naming it groff.
2212 reference was written by
2213 .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
2215 .An Ingo Schwarze Aq Mt schwarze@openbsd.org .