.\" Automatically generated from an mdoc input file. Do not edit. .\" $Id: roff.7,v 1.111 2019/01/01 03:45:29 schwarze Exp $ .\" .\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons .\" Copyright (c) 2010-2019 Ingo Schwarze .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .TH "ROFF" "7" "January 1, 2019" "Debian" "Miscellaneous Information Manual" .nh .if n .ad l .SH "NAME" \fBroff\fR \- roff language reference for mandoc .SH "DESCRIPTION" The \fBroff\fR language is a general purpose text formatting language. Since traditional implementations of the mdoc(7) and man(7) manual formatting languages are based on it, many real-world manuals use small numbers of \fBroff\fR requests and escape sequences intermixed with their mdoc(7) or man(7) code. To properly format such manuals, the mandoc(1) utility supports a subset of \fBroff\fR requests and escapes. Even though this manual page lists all \fBroff\fR requests and escape sequences, it only contains partial information about requests not supported by mandoc(1) and about language features that do not matter for manual pages. For complete \fBroff\fR manuals, consult the \fISEE ALSO\fR section. .PP Input lines beginning with the control character \(oq\&.\(cq are parsed for requests and macros. Such lines are called \(lqrequest lines\(rq or \(lqmacro lines\(rq, respectively. Requests change the processing state and manipulate the formatting; some macros also define the document structure and produce formatted output. The single quote ("\(aq") is accepted as an alternative control character, treated by mandoc(1) just like \(oq\&.\(cq .PP Lines not beginning with control characters are called \(lqtext lines\(rq. They provide free-form text to be printed; the formatting of the text depends on the respective processing context. .SH "LANGUAGE SYNTAX" \fBroff\fR documents may contain only graphable 7-bit ASCII characters, the space character, and, in certain circumstances, the tab character. The backslash character \(oq\e\(cq indicates the start of an escape sequence, used for example for \fIComments\fR and \fISpecial Characters\fR. For a complete listing of escape sequences, consult the \fIESCAPE SEQUENCE REFERENCE\fR below. .SS "Comments" Text following an escaped double-quote \(oq\e\(dq\(cq, whether in a request, macro, or text line, is ignored to the end of the line. A request line beginning with a control character and comment escape \(oq\&.\e\(dq\(cq is also ignored. Furthermore, request lines with only a control character and optional trailing whitespace are stripped from input. .PP Examples: .nf .RS 6n \&.\e\(dq This is a comment line. \&.\e\(dq The next line is ignored: \&. \&.Sh EXAMPLES \e\(dq This is a comment, too. \&example text \e\(dq And so is this. .RE .fi .SS "Special Characters" Special characters are used to encode special glyphs and are rendered differently across output media. They may occur in request, macro, and text lines. Sequences begin with the escape character \(oq\e\(cq followed by either an open-parenthesis \(oq\&(\(cq for two-character sequences; an open-bracket \(oq\&[\(cq for n-character sequences (terminated at a close-bracket \(oq\&]\(cq); or a single one character sequence. .PP Examples: .RS 6n .PD 0 .TP 8n \fR\e(em\fR Two-letter em dash escape. .TP 8n \fR\ee\fR One-letter backslash escape. .RE .PD .PP See mandoc_char(7) for a complete list. .SS "Font Selection" In mdoc(7) and man(7) documents, fonts are usually selected with macros. The \fB\ef\fR escape sequence and the \fB\&ft\fR request can be used to manually change the font, but this is not recommended in mdoc(7) documents. Such manual font changes are overridden by many subsequent macros. .PP The following fonts are supported: .PP .RS 6n .PD 0 .TP 4n \fBB\fR Bold font. .TP 4n \fBBI\fR A font that is both bold and italic. .TP 4n \fBCB\fR Bold constant width font. Same as \fBB\fR in terminal output. .TP 4n \fBCI\fR Italic constant width font. Same as \fBI\fR in terminal output. .TP 4n \fBCR\fR Regular constant width font. Same as \fBR\fR in terminal output. .TP 4n \fBCW\fR An alias for \fBCR\fR. .TP 4n \fBI\fR Italic font. .TP 4n \fBP\fR Return to the previous font. If a macro caused a font change since the last \fB\ef\fR eascape sequence or \fB\&ft\fR request, this returns to the font before the last font change in the macro rather than to the font before the last manual font change. .TP 4n \fBR\fR Roman font. This is the default font. .TP 4n \fB1\fR An alias for \fBR\fR. .TP 4n \fB2\fR An alias for \fBI\fR. .TP 4n \fB3\fR An alias for \fBB\fR. .TP 4n \fB4\fR An alias for \fBBI\fR. .RE .PD .PP Examples: .RS 6n .PD 0 .TP 8n \fR\efBbold\efR\fR Write in \fBbold\fP, then switch to regular font mode. .TP 8n \fR\efIitalic\efP\fR Write in \fIitalic\fP, then return to previous font mode. .TP 8n \fR\ef(BIbold italic\efP\fR Write in \f(BIbold italic\fP, then return to previous font mode. .RE .PD .SS "Whitespace" Whitespace consists of the space character. In text lines, whitespace is preserved within a line. In request and macro lines, whitespace delimits arguments and is discarded. .PP Unescaped trailing spaces are stripped from text line input unless in a literal context. In general, trailing whitespace on any input line is discouraged for reasons of portability. In the rare case that a space character is needed at the end of an input line, it may be forced by \(oq\e\ \e&\(cq. .PP Literal space characters can be produced in the output using escape sequences. In macro lines, they can also be included in arguments using quotation; see \fIMACRO SYNTAX\fR for details. .PP Blank text lines, which may include whitespace, are only permitted within literal contexts. If the first character of a text line is a space, that line is printed with a leading newline. .SS "Scaling Widths" Many requests and macros support scaled widths for their arguments. The syntax for a scaled width is \(oq\fR[+-]?[0-9]*.[0-9]*[:unit:]\fR\(cq, where a decimal must be preceded or followed by at least one digit. .PP The following scaling units are accepted: .PP .RS 6n .PD 0 .TP 8n c centimetre .TP 8n i inch .TP 8n P pica (1/6 inch) .TP 8n p point (1/72 inch) .TP 8n f scale \(oqu\(cq by 65536 .TP 8n v default vertical span .TP 8n m width of rendered \(oqm\(cq (em) character .TP 8n n width of rendered \(oqn\(cq (en) character .TP 8n u default horizontal span for the terminal .TP 8n M mini-em (1/100 em) .RE .PD .PP Using anything other than \(oqm\(cq, \(oqn\(cq, or \(oqv\(cq is necessarily non-portable across output media. See \fICOMPATIBILITY\fR. .PP If a scaling unit is not provided, the numerical value is interpreted under the default rules of \(oqv\(cq for vertical spaces and \(oqu\(cq for horizontal ones. .PP Examples: .RS 6n .PD 0 .TP 20n \fR\&.Bl -tag -width 2i\fR two-inch tagged list indentation in mdoc(7) .TP 20n \fR\&.HP 2i\fR two-inch tagged list indentation in man(7) .TP 20n \fR\&.sp 2v\fR two vertical spaces .RE .PD .SS "Sentence Spacing" Each sentence should terminate at the end of an input line. By doing this, a formatter will be able to apply the proper amount of spacing after the end of sentence (unescaped) period, exclamation mark, or question mark followed by zero or more non-sentence closing delimiters (\(oq\&)\(cq, \(oq\&]\(cq, \(oq\&'\(cq, \(oq\&"\(cq) \&. .PP The proper spacing is also intelligently preserved if a sentence ends at the boundary of a macro line. .PP Examples: .nf .RS 6n Do not end sentences mid-line like this. Instead, end a sentence like this. A macro would end like this: \&.Xr mandoc 1 \&. .RE .fi .SH "REQUEST SYNTAX" A request or macro line consists of: .TP 5n 1.\& the control character \(oq\&.\(cq or \(oq\(aq\(cq at the beginning of the line, .PD 0 .TP 5n 2.\& optionally an arbitrary amount of whitespace, .TP 5n 3.\& the name of the request or the macro, which is one word of arbitrary length, terminated by whitespace, .TP 5n 4.\& and zero or more arguments delimited by whitespace. .PD .PP Thus, the following request lines are all equivalent: .nf .sp .RS 6n \&.ig end \&.ig end \&. ig end .RE .fi .SH "MACRO SYNTAX" Macros are provided by the mdoc(7) and man(7) languages and can be defined by the \fB\&de\fR request. When called, they follow the same syntax as requests, except that macro arguments may optionally be quoted by enclosing them in double quote characters (\(oq\(dq\(cq). Quoted text, even if it contains whitespace or would cause a macro invocation when unquoted, is always considered literal text. Inside quoted text, pairs of double quote characters (\(oq""\(cq) resolve to single double quote characters. .PP To be recognised as the beginning of a quoted argument, the opening quote character must be preceded by a space character. A quoted argument extends to the next double quote character that is not part of a pair, or to the end of the input line, whichever comes earlier. Leaving out the terminating double quote character at the end of the line is discouraged. For clarity, if more arguments follow on the same input line, it is recommended to follow the terminating double quote character by a space character; in case the next character after the terminating double quote character is anything else, it is regarded as the beginning of the next, unquoted argument. .PP Both in quoted and unquoted arguments, pairs of backslashes (\(oq\e\e\(cq) resolve to single backslashes. In unquoted arguments, space characters can alternatively be included by preceding them with a backslash (\(oq\e\~\(cq), but quoting is usually better for clarity. .PP Examples: .RS 6n .PD 0 .TP 8n \fR.Fn strlen \(dqconst char *s\(dq\fR Group arguments "const char *s" into one function argument. If unspecified, "const", "char", and "*s" would be considered separate arguments. .TP 8n \fR.Op \(dqFl a\(dq\fR Consider "\&Fl a" as literal text instead of a flag macro. .RE .PD .SH "REQUEST REFERENCE" The mandoc(1) \fBroff\fR parser recognises the following requests. For requests marked as "ignored" or "unsupported", any arguments are ignored, and the number of arguments is not checked. .TP 8n \fB\&ab\fR [\fImessage\fR] Abort processing. Currently unsupported. .TP 8n \fB\&ad\fR [\fBb\fR | \fBc\fR | \fBl\fR | \fBn\fR | \fBr\fR] Set line adjustment mode for subsequent text. Currently ignored. .TP 8n \fB\&af\fR \fIregistername format\fR Assign an output format to a number register. Currently ignored. .TP 8n \fB\&aln\fR \fInewname oldname\fR Create an alias for a number register. Currently unsupported. .TP 8n \fB\&als\fR \fInewname oldname\fR Create an alias for a request, string, macro, or diversion. .TP 8n \fB\&am\fR \fImacroname\fR [\fIendmacro\fR] Append to a macro definition. The syntax of this request is the same as that of \fB\&de\fR. .TP 8n \fB\&am1\fR \fImacroname\fR [\fIendmacro\fR] Append to a macro definition, switching roff compatibility mode off during macro execution (groff extension). The syntax of this request is the same as that of \fB\&de1\fR. Since mandoc(1) does not implement \fBroff\fR compatibility mode at all, it handles this request as an alias for \fB\&am\fR. .TP 8n \fB\&ami\fR \fImacrostring\fR [\fIendstring\fR] Append to a macro definition, specifying the macro name indirectly (groff extension). The syntax of this request is the same as that of \fB\&dei\fR. .TP 8n \fB\&ami1\fR \fImacrostring\fR [\fIendstring\fR] Append to a macro definition, specifying the macro name indirectly and switching roff compatibility mode off during macro execution (groff extension). The syntax of this request is the same as that of \fB\&dei1\fR. Since mandoc(1) does not implement \fBroff\fR compatibility mode at all, it handles this request as an alias for \fB\&ami\fR. .TP 8n \fB\&as\fR \fIstringname\fR [\fIstring\fR] Append to a user-defined string. The syntax of this request is the same as that of \fB\&ds\fR. If a user-defined string with the specified name does not yet exist, it is set to the empty string before appending. .TP 8n \fB\&as1\fR \fIstringname\fR [\fIstring\fR] Append to a user-defined string, switching roff compatibility mode off during macro execution (groff extension). The syntax of this request is the same as that of \fB\&ds1\fR. Since mandoc(1) does not implement \fBroff\fR compatibility mode at all, it handles this request as an alias for \fB\&as\fR. .TP 8n \fB\&asciify\fR \fIdivname\fR Fully unformat a diversion. Currently unsupported. .TP 8n \fB\&backtrace\fR Print a backtrace of the input stack. This is a groff extension and currently ignored. .TP 8n \fB\&bd\fR \fIfont\fR [\fIcurfont\fR] [\fIoffset\fR] Artificially embolden by repeated printing with small shifts. Currently ignored. .TP 8n \fB\&bleedat\fR \fIleft top width height\fR Set the BleedBox page parameter for PDF generation. This is a Heirloom extension and currently ignored. .TP 8n \fB\&blm\fR \fImacroname\fR Set a blank line trap. Currently unsupported. .TP 8n \fB\&box\fR \fIdivname\fR Begin a diversion without including a partially filled line. Currently unsupported. .TP 8n \fB\&boxa\fR \fIdivname\fR Add to a diversion without including a partially filled line. Currently unsupported. .TP 8n \fB\&bp\fR [\fB+\fR|\fB-\fR]\fIpagenumber\fR Begin a new page. Currently ignored. .TP 8n \fB\&BP\fR \fIsource height width position offset flags label\fR Define a frame and place a picture in it. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&br\fR Break the output line. .TP 8n \fB\&break\fR .br Break out of a \fB\&while\fR loop. Currently unsupported. .TP 8n \fB\&breakchar\fR \fIchar ...\fR Optional line break characters. This is a Heirloom extension and currently ignored. .TP 8n \fB\&brnl\fR \fIN\fR Break output line after the next \fIN\fR input lines. This is a Heirloom extension and currently ignored. .TP 8n \fB\&brp\fR Break and spread output line. Currently, this is implemented as an alias for \fB\&br\fR. .TP 8n \fB\&brpnl\fR \fIN\fR Break and spread output line after the next \fIN\fR input lines. This is a Heirloom extension and currently ignored. .TP 8n \fB\&c2\fR [\fIchar\fR] Change the no-break control character. Currently unsupported. .TP 8n \fB\&cc\fR [\fIchar\fR] Change the control character. If \fIchar\fR is not specified, the control character is reset to \(oq\&.\(cq. Trailing characters are ignored. .TP 8n \fB\&ce\fR [\fIN\fR] Center the next \fIN\fR input lines without filling. \fIN\fR defaults to 1. An argument of 0 or less ends centering. Currently, high level macros abort centering. .TP 8n \fB\&cf\fR \fIfilename\fR Output the contents of a file. Ignored because insecure. .TP 8n \fB\&cflags\fR \fIflags char ...\fR Set character flags. This is a groff extension and currently ignored. .TP 8n \fB\&ch\fR \fImacroname\fR [\fIdist\fR] Change a trap location. Currently ignored. .TP 8n \fB\&char\fR \fIglyph\fR [\fIstring\fR] Define or redefine the ASCII character or character escape sequence \fIglyph\fR to be rendered as \fIstring\fR, which can be empty. Only partially supported in mandoc(1); may interact incorrectly with \fB\&tr\fR. .TP 8n \fB\&chop\fR \fIstringname\fR Remove the last character from a macro, string, or diversion. Currently unsupported. .TP 8n \fB\&class\fR \fIclassname char ...\fR Define a character class. This is a groff extension and currently ignored. .TP 8n \fB\&close\fR \fIstreamname\fR Close an open file. Ignored because insecure. .TP 8n \fB\&CL\fR \fIcolor text\fR Print text in color. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&color\fR [\fB1\fR | \fB0\fR] Activate or deactivate colors. This is a groff extension and currently ignored. .TP 8n \fB\&composite\fR \fIfrom to\fR Define a name component for composite glyph names. This is a groff extension and currently unsupported. .TP 8n \fB\&continue\fR Immediately start the next iteration of a \fB\&while\fR loop. Currently unsupported. .TP 8n \fB\&cp\fR [\fB1\fR | \fB0\fR] Switch \fBroff\fR compatibility mode on or off. Currently ignored. .TP 8n \fB\&cropat\fR \fIleft top width height\fR Set the CropBox page parameter for PDF generation. This is a Heirloom extension and currently ignored. .TP 8n \fB\&cs\fR \fIfont\fR [\fIwidth\fR [\fIemsize\fR]] Constant character spacing mode. Currently ignored. .TP 8n \fB\&cu\fR [\fIN\fR] Underline next \fIN\fR input lines including whitespace. Currently ignored. .TP 8n \fB\&da\fR \fIdivname\fR Append to a diversion. Currently unsupported. .TP 8n \fB\&dch\fR \fImacroname\fR [\fIdist\fR] Change a trap location in the current diversion. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&de\fR \fImacroname\fR [\fIendmacro\fR] Define a \fBroff\fR macro. Its syntax can be either .nf .sp .RS 14n \&.\fB\&de\fR \fImacroname\fR \fIdefinition\fR \&.. .RE .fi .RS 8n .sp or .nf .sp .RS 14n \&.\fB\&de\fR \fImacroname\fR \fIendmacro\fR \fIdefinition\fR \&.\fIendmacro\fR .RE .fi .sp Both forms define or redefine the macro \fImacroname\fR to represent the \fIdefinition\fR, which may consist of one or more input lines, including the newline characters terminating each line, optionally containing calls to \fBroff\fR requests, \fBroff\fR macros or high-level macros like man(7) or mdoc(7) macros, whichever applies to the document in question. .sp Specifying a custom \fIendmacro\fR works in the same way as for \fB\&ig\fR; namely, the call to \(oq.\fIendmacro\fR\(cq first ends the \fIdefinition\fR, and after that, it is also evaluated as a \fBroff\fR request or \fBroff\fR macro, but not as a high-level macro. .sp The macro can be invoked later using the syntax .sp .RS 14n \&.\fImacroname\fR [\fIargument\fR [\fIargument ...\fR]] .RE .sp Regarding argument parsing, see \fIMACRO SYNTAX\fR above. .sp The line invoking the macro will be replaced in the input stream by the \fIdefinition\fR, replacing all occurrences of \e\e$\fIN\fR, where \fIN\fR is a digit, by the \fIN\fRth \fIargument\fR. For example, .nf .sp .RS 14n \&.de ZN \efI\e^\e\e$1\e^\efP\e\e$2 \&.. \&.ZN XtFree . .RE .fi .sp produces .sp .RS 14n \efI\e^XtFree\e^\efP. .RE .sp in the input stream, and thus in the output: \fI\^XtFree\^\fP. Each occurrence of \e\e$* is replaced with all the arguments, joined together with single space characters. The variant \e\e$@ is similar, except that each argument is individually quoted. .sp Since macros and user-defined strings share a common string table, defining a macro \fImacroname\fR clobbers the user-defined string \fImacroname\fR, and the \fIdefinition\fR can also be printed using the \(oq\e*\(cq string interpolation syntax described below \fBds\fR, but this is rarely useful because every macro definition contains at least one explicit newline character. .sp In order to prevent endless recursion, both groff and mandoc(1) limit the stack depth for expanding macros and strings to a large, but finite number, and mandoc(1) also limits the length of the expanded input line. Do not rely on the exact values of these limits. .RE .TP 8n \fB\&de1\fR \fImacroname\fR [\fIendmacro\fR] Define a \fBroff\fR macro that will be executed with \fBroff\fR compatibility mode switched off during macro execution. This is a groff extension. Since mandoc(1) does not implement \fBroff\fR compatibility mode at all, it handles this request as an alias for \fB\&de\fR. .TP 8n \fB\&defcolor\fR \fInewname scheme component ...\fR Define a color name. This is a groff extension and currently ignored. .TP 8n \fB\&dei\fR \fImacrostring\fR [\fIendstring\fR] Define a \fBroff\fR macro, specifying the macro name indirectly (groff extension). The syntax of this request is the same as that of \fB\&de\fR. The effect is the same as: .sp .RS 14n \&.\fB\&de\fR \e*[\fImacrostring\fR] [\e*[\fIendstring\fR]] .RE .TP 8n \fB\&dei1\fR \fImacrostring\fR [\fIendstring\fR] Define a \fBroff\fR macro that will be executed with \fBroff\fR compatibility mode switched off during macro execution, specifying the macro name indirectly (groff extension). Since mandoc(1) does not implement \fBroff\fR compatibility mode at all, it handles this request as an alias for \fB\&dei\fR. .TP 8n \fB\&device\fR \fIstring ...\fR .TP 8n \fB\&devicem\fR \fIstringname\fR These two requests only make sense with the groff-specific intermediate output format and are unsupported. .TP 8n \fB\&di\fR \fIdivname\fR Begin a diversion. Currently unsupported. .TP 8n \fB\&do\fR \fIcommand\fR [\fIargument ...\fR] Execute \fBroff\fR request or macro line with compatibility mode disabled. Currently unsupported. .TP 8n \fB\&ds\fR \fIstringname\fR [[\(dq]\fIstring\fR] Define a user-defined string. The \fIstringname\fR and \fIstring\fR arguments are space-separated. If the \fIstring\fR begins with a double-quote character, that character will not be part of the string. All remaining characters on the input line form the \fIstring\fR, including whitespace and double-quote characters, even trailing ones. .sp The \fIstring\fR can be interpolated into subsequent text by using \e*[\fIstringname\fR] for a \fIstringname\fR of arbitrary length, or \e*(NN or \e*N if the length of \fIstringname\fR is two or one characters, respectively. Interpolation can be prevented by escaping the leading backslash; that is, an asterisk preceded by an even number of backslashes does not trigger string interpolation. .sp Since user-defined strings and macros share a common string table, defining a string \fIstringname\fR clobbers the macro \fIstringname\fR, and the \fIstringname\fR used for defining a string can also be invoked as a macro, in which case the following input line will be appended to the \fIstring\fR, forming a new input line passed to the \fBroff\fR parser. For example, .nf .sp .RS 14n \&.ds badidea .S \&.badidea H SYNOPSIS .RE .fi .RS 8n .sp invokes the \fBSH\fR macro when used in a man(7) document. Such abuse is of course strongly discouraged. .RE .TP 8n \fB\&ds1\fR \fIstringname\fR [[\(dq]\fIstring\fR] Define a user-defined string that will be expanded with \fBroff\fR compatibility mode switched off during string expansion. This is a groff extension. Since mandoc(1) does not implement \fBroff\fR compatibility mode at all, it handles this request as an alias for \fB\&ds\fR. .TP 8n \fB\&dwh\fR \fIdist macroname\fR Set a location trap in the current diversion. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&dt\fR [\fIdist macroname\fR] Set a trap within a diversion. Currently unsupported. .TP 8n \fB\&ec\fR [\fIchar\fR] Enable the escape mechanism and change the escape character. The \fIchar\fR argument defaults to the backslash (\(oq\e\(cq). .TP 8n \fB\&ecr\fR Restore the escape character. Currently unsupported. .TP 8n \fB\&ecs\fR Save the escape character. Currently unsupported. .TP 8n \fB\&el\fR \fIbody\fR The \(lqelse\(rq half of an if/else conditional. Pops a result off the stack of conditional evaluations pushed by \fB\&ie\fR and uses it as its conditional. If no stack entries are present (e.g., due to no prior \fB\&ie\fR calls) then false is assumed. The syntax of this request is similar to \fB\&if\fR except that the conditional is missing. .TP 8n \fB\&em\fR \fImacroname\fR Set a trap at the end of input. Currently unsupported. .TP 8n \fB\&EN\fR End an equation block. See \fB\&EQ\fR. .TP 8n \fB\&eo\fR Disable the escape mechanism completely. .TP 8n \fB\&EP\fR End a picture started by \fB\&BP\fR. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&EQ\fR Begin an equation block. See eqn(7) for a description of the equation language. .TP 8n \fB\&errprint\fR \fImessage\fR Print a string like an error message. This is a Heirloom extension and currently ignored. .TP 8n \fB\&ev\fR [\fIenvname\fR] Switch to another environment. Currently unsupported. .TP 8n \fB\&evc\fR [\fIenvname\fR] Copy an environment into the current environment. Currently unsupported. .TP 8n \fB\&ex\fR Abort processing and exit. Currently unsupported. .TP 8n \fB\&fallback\fR \fIcurfont font ...\fR Select the fallback sequence for a font. This is a Heirloom extension and currently ignored. .TP 8n \fB\&fam\fR [\fIfamilyname\fR] Change the font family. This is a groff extension and currently ignored. .TP 8n \fB\&fc\fR [\fIdelimchar\fR [\fIpadchar\fR]] Define a delimiting and a padding character for fields. Currently unsupported. .TP 8n \fB\&fchar\fR \fIglyphname\fR [\fIstring\fR] Define a fallback glyph. Currently unsupported. .TP 8n \fB\&fcolor\fR \fIcolorname\fR Set the fill color for \eD objects. This is a groff extension and currently ignored. .TP 8n \fB\&fdeferlig\fR \fIfont string ...\fR Defer ligature building. This is a Heirloom extension and currently ignored. .TP 8n \fB\&feature\fR \fB+\fR|\fB-\fR\fIname\fR Enable or disable an OpenType feature. This is a Heirloom extension and currently ignored. .TP 8n \fB\&fi\fR Break the output line and switch to fill mode, which is active by default but can be ended with the \fB\&nf\fR request. In fill mode, input from subsequent input lines is added to the same output line until the next word no longer fits, at which point the output line is broken. This request is implied by the mdoc(7) \fB\&Sh\fR macro and by the man(7) \fB\&SH\fR, \fB\&SS\fR, and \fB\&EE\fR macros. .TP 8n \fB\&fkern\fR \fIfont minkern\fR Control the use of kerning tables for a font. This is a Heirloom extension and currently ignored. .TP 8n \fB\&fl\fR Flush output. Currently ignored. .TP 8n \fB\&flig\fR \fIfont string char ...\fR Define ligatures. This is a Heirloom extension and currently ignored. .TP 8n \fB\&fp\fR \fIposition font\fR [\fIfilename\fR] Assign font position. Currently ignored. .TP 8n \fB\&fps\fR \fImapname ...\fR Mount a font with a special character map. This is a Heirloom extension and currently ignored. .TP 8n \fB\&fschar\fR \fIfont glyphname\fR [\fIstring\fR] Define a font-specific fallback glyph. This is a groff extension and currently unsupported. .TP 8n \fB\&fspacewidth\fR \fIfont\fR [\fIafmunits\fR] Set a font-specific width for the space character. This is a Heirloom extension and currently ignored. .TP 8n \fB\&fspecial\fR \fIcurfont\fR [\fIfont ...\fR] Conditionally define a special font. This is a groff extension and currently ignored. .TP 8n \fB\&ft\fR [\fIfont\fR] Change the font; see \fIFont Selection\fR. The \fIfont\fR argument defaults to \fBP\fR. .TP 8n \fB\&ftr\fR \fInewname\fR [\fIoldname\fR] Translate font name. This is a groff extension and currently ignored. .TP 8n \fB\&fzoom\fR \fIfont\fR [\fIpermille\fR] Zoom font size. Currently ignored. .TP 8n \fB\&gcolor\fR [\fIcolorname\fR] Set glyph color. This is a groff extension and currently ignored. .TP 8n \fB\&hc\fR [\fIchar\fR] Set the hyphenation character. Currently ignored. .TP 8n \fB\&hcode\fR \fIchar code ...\fR Set hyphenation codes of characters. Currently ignored. .TP 8n \fB\&hidechar\fR \fIfont char ...\fR Hide characters in a font. This is a Heirloom extension and currently ignored. .TP 8n \fB\&hla\fR \fIlanguage\fR Set hyphenation language. This is a groff extension and currently ignored. .TP 8n \fB\&hlm\fR [\fInumber\fR] Set maximum number of consecutive hyphenated lines. Currently ignored. .TP 8n \fB\&hpf\fR \fIfilename\fR Load hyphenation pattern file. This is a groff extension and currently ignored. .TP 8n \fB\&hpfa\fR \fIfilename\fR Load hyphenation pattern file, appending to the current patterns. This is a groff extension and currently ignored. .TP 8n \fB\&hpfcode\fR \fIcode code ...\fR Define mapping values for character codes in hyphenation patterns. This is a groff extension and currently ignored. .TP 8n \fB\&hw\fR \fIword ...\fR Specify hyphenation points in words. Currently ignored. .TP 8n \fB\&hy\fR [\fImode\fR] Set automatic hyphenation mode. Currently ignored. .TP 8n \fB\&hylang\fR \fIlanguage\fR Set hyphenation language. This is a Heirloom extension and currently ignored. .TP 8n \fB\&hylen\fR \fInchar\fR Minimum word length for hyphenation. This is a Heirloom extension and currently ignored. .TP 8n \fB\&hym\fR [\fIlength\fR] Set hyphenation margin. This is a groff extension and currently ignored. .TP 8n \fB\&hypp\fR \fIpenalty ...\fR Define hyphenation penalties. This is a Heirloom extension and currently ignored. .TP 8n \fB\&hys\fR [\fIlength\fR] Set hyphenation space. This is a groff extension and currently ignored. .TP 8n \fB\&ie\fR \fIcondition body\fR The \(lqif\(rq half of an if/else conditional. The result of the conditional is pushed into a stack used by subsequent invocations of \fB\&el\fR, which may be separated by any intervening input (or not exist at all). Its syntax is equivalent to \fB\&if\fR. .TP 8n \fB\&if\fR \fIcondition body\fR Begin a conditional. This request can also be written as follows: .nf .sp .RS 14n \&.\fB\&if\fR \fIcondition\fR \e{\fIbody\fR \fIbody ...\fR\e} .RE .fi .RS 8n .nf .sp .RS 14n \&.\fB\&if\fR \fIcondition\fR \e{\e \fIbody ...\fR \&.\e} .RE .fi .sp The \fIcondition\fR is a boolean expression. Currently, mandoc(1) supports the following subset of roff conditionals: .TP 4n \fB\(bu\fR If \(oq\&!\(cq is prefixed to \fIcondition\fR, it is logically inverted. .TP 4n \fB\(bu\fR If the first character of \fIcondition\fR is \(oqn\(cq (nroff mode) or \(oqo\(cq (odd page), it evaluates to true, and the \fIbody\fR starts with the next character. .TP 4n \fB\(bu\fR If the first character of \fIcondition\fR is \(oqe\(cq (even page), \(oqt\(cq (troff mode), or \(oqv\(cq (vroff mode), it evaluates to false, and the \fIbody\fR starts with the next character. .TP 4n \fB\(bu\fR If the first character of \fIcondition\fR is \(oqc\(cq (character available), it evaluates to true if the following character is an ASCII character or a valid character escape sequence, or to false otherwise. The \fIbody\fR starts with the character following that next character. .TP 4n \fB\(bu\fR If the first character of \fIcondition\fR is \(oqd\(cq, it evaluates to true if the rest of \fIcondition\fR is the name of an existing user defined macro or string; otherwise, it evaluates to false. .TP 4n \fB\(bu\fR If the first character of \fIcondition\fR is \(oqr\(cq, it evaluates to true if the rest of \fIcondition\fR is the name of an existing number register; otherwise, it evaluates to false. .TP 4n \fB\(bu\fR If the \fIcondition\fR starts with a parenthesis or with an optionally signed integer number, it is evaluated according to the rules of \fINumerical expressions\fR explained below. It evaluates to true if the result is positive, or to false if the result is zero or negative. .TP 4n \fB\(bu\fR Otherwise, the first character of \fIcondition\fR is regarded as a delimiter and it evaluates to true if the string extending from its first to its second occurrence is equal to the string extending from its second to its third occurrence. .TP 4n \fB\(bu\fR If \fIcondition\fR cannot be parsed, it evaluates to false. .PP If a conditional is false, its children are not processed, but are syntactically interpreted to preserve the integrity of the input document. Thus, .sp .RS 14n \&.if t .ig .RE .sp will discard the \(oq\&.ig\(cq, which may lead to interesting results, but .sp .RS 14n \&.if t .if t \e{\e .RE .sp will continue to syntactically interpret to the block close of the final conditional. Sub-conditionals, in this case, obviously inherit the truth value of the parent. .sp If the \fIbody\fR section is begun by an escaped brace \(oq\e{\(cq, scope continues until the end of the input line containing the matching closing-brace escape sequence \(oq\e}\(cq. If the \fIbody\fR is not enclosed in braces, scope continues until the end of the line. If the \fIcondition\fR is followed by a \fIbody\fR on the same line, whether after a brace or not, then requests and macros \fImust\fR begin with a control character. It is generally more intuitive, in this case, to write .nf .sp .RS 14n \&.\fB\&if\fR \fIcondition\fR \e{\e \&.\fIrequest\fR \&.\e} .RE .fi .sp than having the request or macro follow as .sp .RS 14n \&.\fB\&if\fR \fIcondition\fR \e{.\fIrequest\fR .RE .sp The scope of a conditional is always parsed, but only executed if the conditional evaluates to true. .sp Note that the \(oq\e}\(cq is converted into a zero-width escape sequence if not passed as a standalone macro \(oq\&.\e}\(cq. For example, .sp .RS 14n \&.Fl a \e} b .RE .sp will result in \(oq\e}\(cq being considered an argument of the \(oq\&Fl\(cq macro. .RE .TP 8n \fB\&ig\fR [\fIendmacro\fR] Ignore input. Its syntax can be either .nf .sp .RS 14n \&.\fB\&ig\fR \fIignored text\fR \&.. .RE .fi .RS 8n .sp or .nf .sp .RS 14n \&.\fB\&ig\fR \fIendmacro\fR \fIignored text\fR \&.\fIendmacro\fR .RE .fi .sp In the first case, input is ignored until a \(oq\&..\(cq request is encountered on its own line. In the second case, input is ignored until the specified \(oq.\fIendmacro\fR\(cq is encountered. Do not use the escape character \(oq\e\(cq anywhere in the definition of \fIendmacro\fR; it would cause very strange behaviour. .sp When the \fIendmacro\fR is a roff request or a roff macro, like in .sp .RS 14n \&.ig if .RE .sp the subsequent invocation of \fB\&if\fR will first terminate the \fIignored text\fR, then be invoked as usual. Otherwise, it only terminates the \fIignored text\fR, and arguments following it or the \(oq\&..\(cq request are discarded. .RE .TP 8n \fB\&in\fR [[\fB+\fR|\fB-\fR]\fIwidth\fR] Change indentation. See man(7). Ignored in mdoc(7). .TP 8n \fB\&index\fR \fIregister stringname substring\fR Find a substring in a string. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&it\fR \fIexpression macro\fR Set an input line trap. The named \fImacro\fR will be invoked after processing the number of input text lines specified by the numerical \fIexpression\fR. While evaluating the \fIexpression\fR, the unit suffixes described below \fIScaling Widths\fR are ignored. .TP 8n \fB\&itc\fR \fIexpression macro\fR Set an input line trap, not counting lines ending with \ec. Currently unsupported. .TP 8n \fB\&IX\fR \fIclass keystring\fR To support the generation of a table of contents, pod2man(1) emits this user-defined macro, usually without defining it. To avoid reporting large numbers of spurious errors, mandoc(1) ignores it. .TP 8n \fB\&kern\fR [\fB1\fR | \fB0\fR] Switch kerning on or off. Currently ignored. .TP 8n \fB\&kernafter\fR \fIfont char ... afmunits ...\fR Increase kerning after some characters. This is a Heirloom extension and currently ignored. .TP 8n \fB\&kernbefore\fR \fIfont char ... afmunits ...\fR Increase kerning before some characters. This is a Heirloom extension and currently ignored. .TP 8n \fB\&kernpair\fR \fIfont char ... font char ... afmunits\fR Add a kerning pair to the kerning table. This is a Heirloom extension and currently ignored. .TP 8n \fB\&lc\fR [\fIglyph\fR] Define a leader repetition character. Currently unsupported. .TP 8n \fB\&lc_ctype\fR \fIlocalename\fR Set the \fRLC_CTYPE\fR locale. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&lds\fR \fImacroname string\fR Define a local string. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&length\fR \fIregister string\fR Count the number of input characters in a string. Currently unsupported. .TP 8n \fB\&letadj\fR \fIlspmin lshmin letss lspmax lshmax\fR Dynamic letter spacing and reshaping. This is a Heirloom extension and currently ignored. .TP 8n \fB\&lf\fR \fIlineno\fR [\fIfilename\fR] Change the line number for error messages. Ignored because insecure. .TP 8n \fB\&lg\fR [\fB1\fR | \fB0\fR] Switch the ligature mechanism on or off. Currently ignored. .TP 8n \fB\&lhang\fR \fIfont char ... afmunits\fR Hang characters at left margin. This is a Heirloom extension and currently ignored. .TP 8n \fB\&linetabs\fR [\fB1\fR | \fB0\fR] Enable or disable line-tabs mode. This is a groff extension and currently unsupported. .TP 8n \fB\&ll\fR [[\fB+\fR|\fB-\fR]\fIwidth\fR] Change the output line length. If the \fIwidth\fR argument is omitted, the line length is reset to its previous value. The default setting for terminal output is 78n. If a sign is given, the line length is added to or subtracted from; otherwise, it is set to the provided value. Using this request in new manuals is discouraged for several reasons, among others because it overrides the mandoc(1) \fB\-O\fR \fBwidth\fR command line option. .TP 8n \fB\&lnr\fR \fIregister\fR [\fB+\fR|\fB-\fR]\fIvalue\fR [\fIincrement\fR] Set local number register. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&lnrf\fR \fIregister\fR [\fB+\fR|\fB-\fR]\fIvalue\fR [\fIincrement\fR] Set local floating-point register. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&lpfx\fR \fIstring\fR Set a line prefix. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&ls\fR [\fIfactor\fR] Set line spacing. It takes one integer argument specifying the vertical distance of subsequent output text lines measured in v units. Currently ignored. .TP 8n \fB\&lsm\fR \fImacroname\fR Set a leading spaces trap. This is a groff extension and currently unsupported. .TP 8n \fB\<\fR [[\fB+\fR|\fB-\fR]\fIwidth\fR] Set title line length. Currently ignored. .TP 8n \fB\&mc\fR \fIglyph\fR [\fIdist\fR] Print margin character in the right margin. The \fIdist\fR is currently ignored; instead, 1n is used. .TP 8n \fB\&mediasize\fR \fImedia\fR Set the device media size. This is a Heirloom extension and currently ignored. .TP 8n \fB\&minss\fR \fIwidth\fR Set minimum word space. This is a Heirloom extension and currently ignored. .TP 8n \fB\&mk\fR [\fIregister\fR] Mark vertical position. Currently ignored. .TP 8n \fB\&mso\fR \fIfilename\fR Load a macro file using the search path. Ignored because insecure. .TP 8n \fB\&na\fR Disable adjusting without changing the adjustment mode. Currently ignored. .TP 8n \fB\&ne\fR [\fIheight\fR] Declare the need for the specified minimum vertical space before the next trap or the bottom of the page. Currently ignored. .TP 8n \fB\&nf\fR Break the output line and switch to no-fill mode. Subsequent input lines are kept together on the same output line even when exceeding the right margin, and line breaks in subsequent input cause output line breaks. This request is implied by the mdoc(7) \fB\&Bd\fR \fB\-unfilled\fR and \fB\&Bd\fR \fB\-literal\fR macros and by the man(7) \fB\&EX\fR macro. The \fB\&fi\fR request switches back to the default fill mode. .TP 8n \fB\&nh\fR Turn off automatic hyphenation mode. Currently ignored. .TP 8n \fB\&nhychar\fR \fIchar ...\fR Define hyphenation-inhibiting characters. This is a Heirloom extension and currently ignored. .TP 8n \fB\&nm\fR [\fIstart\fR [\fIinc\fR [\fIspace\fR [\fIindent\fR]]]] Print line numbers. Currently unsupported. .TP 8n \fB\&nn\fR [\fInumber\fR] Temporarily turn off line numbering. Currently unsupported. .TP 8n \fB\&nop\fR \fIbody\fR Execute the rest of the input line as a request, macro, or text line, skipping the \fB\&nop\fR request and any space characters immediately following it. This is mostly used to indent text lines inside macro definitions. .TP 8n \fB\&nr\fR \fIregister\fR [\fB+\fR|\fB-\fR]\fIexpression\fR [\fIstepsize\fR] Define or change a register. A register is an arbitrary string value that defines some sort of state, which influences parsing and/or formatting. For the syntax of \fIexpression\fR, see \fINumerical expressions\fR below. If it is prefixed by a sign, the register will be incremented or decremented instead of assigned to. .sp The \fIstepsize\fR is used by the \fB\en+\fR auto-increment feature. It remains unchanged when omitted while changing an existing register, and it defaults to 0 when defining a new register. .sp The following \fIregister\fR is handled specially: .PP .RS 8n .PD 0 .TP 8n \fBnS\fR If set to a positive integer value, certain mdoc(7) macros will behave in the same way as in the \fISYNOPSIS\fR section. If set to 0, these macros will behave in the same way as outside the \fISYNOPSIS\fR section, even when called within the \fISYNOPSIS\fR section itself. Note that starting a new mdoc(7) section with the \fB\&Sh\fR macro will reset this register. .PP .RE .PD .TP 8n \fB\&nrf\fR \fIregister\fR [\fB+\fR|\fB-\fR]\fIexpression\fR [\fIincrement\fR] Define or change a floating-point register. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&nroff\fR .br Force nroff mode. This is a groff extension and currently ignored. .TP 8n \fB\&ns\fR Turn on no-space mode. Currently ignored. .TP 8n \fB\&nx\fR [\fIfilename\fR] Abort processing of the current input file and process another one. Ignored because insecure. .TP 8n \fB\&open\fR \fIstream file\fR Open a file for writing. Ignored because insecure. .TP 8n \fB\&opena\fR \fIstream file\fR Open a file for appending. Ignored because insecure. .TP 8n \fB\&os\fR Output saved vertical space. Currently ignored. .TP 8n \fB\&output\fR \fIstring\fR Output directly to intermediate output. Not supported. .TP 8n \fB\&padj\fR [\fB1\fR | \fB0\fR] Globally control paragraph-at-once adjustment. This is a Heirloom extension and currently ignored. .TP 8n \fB\&papersize\fR \fImedia\fR Set the paper size. This is a Heirloom extension and currently ignored. .TP 8n \fB\&pc\fR [\fIchar\fR] Change the page number character. Currently ignored. .TP 8n \fB\&pev\fR Print environments. This is a groff extension and currently ignored. .TP 8n \fB\&pi\fR \fIcommand\fR Pipe output to a shell command. Ignored because insecure. .TP 8n \fB\&PI\fR Low-level request used by \fB\&BP\fR. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&pl\fR [[\fB+\fR|\fB-\fR]\fIheight\fR] Change page length. Currently ignored. .TP 8n \fB\&pm\fR Print names and sizes of macros, strings, and diversions to standard error output. Currently ignored. .TP 8n \fB\&pn\fR [\fB+\fR|\fB-\fR]\fInumber\fR Change the page number of the next page. Currently ignored. .TP 8n \fB\&pnr\fR Print all number registers on standard error output. Currently ignored. .TP 8n \fB\&po\fR [[\fB+\fR|\fB-\fR]\fIoffset\fR] Set a horizontal page offset. If no argument is specified, the page offset is reverted to its previous value. If a sign is specified, the new page offset is calculated relative to the current one; otherwise, it is absolute. The argument follows the syntax of \fIScaling Widths\fR and the default scaling unit is \fBm\fR. .TP 8n \fB\&ps\fR [[\fB+\fR|\fB-\fR]size] Change point size. Currently ignored. .TP 8n \fB\&psbb\fR \fIfilename\fR Retrieve the bounding box of a PostScript file. Currently unsupported. .TP 8n \fB\&pshape\fR \fIindent length ...\fR Set a special shape for the current paragraph. This is a Heirloom extension and currently unsupported. .TP 8n \fB\&pso\fR \fIcommand\fR Include output of a shell command. Ignored because insecure. .TP 8n \fB\&ptr\fR Print the names and positions of all traps on standard error output. This is a groff extension and currently ignored. .TP 8n \fB\&pvs\fR [[\fB+\fR|\fB-\fR]\fIheight\fR] Change post-vertical spacing. This is a groff extension and currently ignored. .TP 8n \fB\&rchar\fR \fIglyph ...\fR Remove glyph definitions. Currently unsupported. .TP 8n \fB\&rd\fR [\fIprompt\fR [\fIargument ...\fR]] Read from standard input. Currently ignored. .TP 8n \fB\&recursionlimit\fR \fImaxrec maxtail\fR Set the maximum stack depth for recursive macros. This is a Heirloom extension and currently ignored. .TP 8n \fB\&return\fR [\fItwice\fR] Exit the presently executed macro and return to the caller. The argument is currently ignored. .TP 8n \fB\&rfschar\fR \fIfont glyph ...\fR Remove font-specific fallback glyph definitions. Currently unsupported. .TP 8n \fB\&rhang\fR \fIfont char ... afmunits\fR Hang characters at right margin. This is a Heirloom extension and currently ignored. .TP 8n \fB\&rj\fR [\fIN\fR] Justify the next \fIN\fR input lines to the right margin without filling. \fIN\fR defaults to 1. An argument of 0 or less ends right adjustment. .TP 8n \fB\&rm\fR \fImacroname\fR Remove a request, macro or string. .TP 8n \fB\&rn\fR \fIoldname newname\fR Rename a request, macro, diversion, or string. In mandoc(1), user-defined macros, mdoc(7) and man(7) macros, and user-defined strings can be renamed, but renaming of predefined strings and of \fBroff\fR requests is not supported, and diversions are not implemented at all. .TP 8n \fB\&rnn\fR \fIoldname newname\fR Rename a number register. Currently unsupported. .TP 8n \fB\&rr\fR \fIregister\fR Remove a register. .TP 8n \fB\&rs\fR End no-space mode. Currently ignored. .TP 8n \fB\&rt\fR [\fIdist\fR] Return to marked vertical position. Currently ignored. .TP 8n \fB\&schar\fR \fIglyph\fR [\fIstring\fR] Define global fallback glyph. This is a groff extension and currently unsupported. .TP 8n \fB\&sentchar\fR \fIchar ...\fR Define sentence-ending characters. This is a Heirloom extension and currently ignored. .TP 8n \fB\&shc\fR [\fIglyph\fR] Change the soft hyphen character. Currently ignored. .TP 8n \fB\&shift\fR [\fInumber\fR] Shift macro arguments \fInumber\fR times, by default once: \e\e$i becomes what \e\e$i+number was. Also decrement \en(.$ by \fInumber\fR. .TP 8n \fB\&sizes\fR \fIsize ...\fR Define permissible point sizes. This is a groff extension and currently ignored. .TP 8n \fB\&so\fR \fIfilename\fR Include a source file. The file is read and its contents processed as input in place of the \fB\&so\fR request line. To avoid inadvertent inclusion of unrelated files, mandoc(1) only accepts relative paths not containing the strings "../" and "/..". .sp This request requires man(1) to change to the right directory before calling mandoc(1), per convention to the root of the manual tree. Typical usage looks like: .sp .RS 14n \&.so man3/Xcursor.3 .RE .RS 8n .sp As the whole concept is rather fragile, the use of \fB\&so\fR is discouraged. Use ln(1) instead. .RE .TP 8n \fB\&sp\fR [\fIheight\fR] Break the output line and emit vertical space. The argument follows the syntax of \fIScaling Widths\fR and defaults to one blank line (\fR1v\fR). .TP 8n \fB\&spacewidth\fR [\fB1\fR | \fB0\fR] Set the space width from the font metrics file. This is a Heirloom extension and currently ignored. .TP 8n \fB\&special\fR [\fIfont ...\fR] Define a special font. This is a groff extension and currently ignored. .TP 8n \fB\&spreadwarn\fR [\fIwidth\fR] Warn about wide spacing between words. Currently ignored. .TP 8n \fB\&ss\fR \fIwordspace\fR [\fIsentencespace\fR] Set space character size. Currently ignored. .TP 8n \fB\&sty\fR \fIposition style\fR Associate style with a font position. This is a groff extension and currently ignored. .TP 8n \fB\&substring\fR \fIstringname startpos\fR [\fIendpos\fR] Replace a user-defined string with a substring. Currently unsupported. .TP 8n \fB\&sv\fR [\fIheight\fR] Save vertical space. Currently ignored. .TP 8n \fB\&sy\fR \fIcommand\fR Execute shell command. Ignored because insecure. .TP 8n \fB\&T&\fR Re-start a table layout, retaining the options of the prior table invocation. See \fB\&TS\fR. .TP 8n \fB\&ta\fR [\fIwidth ...\fR [\fBT\fR \fIwidth ...\fR]] Set tab stops. Each \fIwidth\fR argument follows the syntax of \fIScaling Widths\fR. If prefixed by a plus sign, it is relative to the previous tab stop. The arguments after the \fBT\fR marker are used repeatedly as often as needed; for each reuse, they are taken relative to the last previously established tab stop. When \fB\&ta\fR is called without arguments, all tab stops are cleared. .TP 8n \fB\&tc\fR [\fIglyph\fR] Change tab repetition character. Currently unsupported. .TP 8n \fB\&TE\fR End a table context. See \fB\&TS\fR. .TP 8n \fB\&ti\fR [\fB+\fR|\fB-\fR]\fIwidth\fR Break the output line and indent the next output line by \fIwidth\fR. If a sign is specified, the temporary indentation is calculated relative to the current indentation; otherwise, it is absolute. The argument follows the syntax of \fIScaling Widths\fR and the default scaling unit is \fBm\fR. .TP 8n \fB\&tkf\fR \fIfont minps width1 maxps width2\fR Enable track kerning for a font. Currently ignored. .TP 8n \fB\&tl\fR \&'\fIleft\fR'\fIcenter\fR'\fIright\fR'Print a title line. Currently unsupported. .TP 8n \fB\&tm\fR \fIstring\fR Print to standard error output. Currently ignored. .TP 8n \fB\&tm1\fR \fIstring\fR Print to standard error output, allowing leading blanks. This is a groff extension and currently ignored. .TP 8n \fB\&tmc\fR \fIstring\fR Print to standard error output without a trailing newline. This is a groff extension and currently ignored. .TP 8n \fB\&tr\fR \fIglyph glyph ...\fR Output character translation. The first glyph in each pair is replaced by the second one. Character escapes can be used; for example, .sp .RS 14n tr \e(xx\e(yy .RE .RS 8n .sp replaces all invocations of \e(xx with \e(yy. .RE .TP 8n \fB\&track\fR \fIfont minps width1 maxps width2\fR Static letter space tracking. This is a Heirloom extension and currently ignored. .TP 8n \fB\&transchar\fR \fIchar ...\fR Define transparent characters for sentence-ending. This is a Heirloom extension and currently ignored. .TP 8n \fB\&trf\fR \fIfilename\fR Output the contents of a file, disallowing invalid characters. This is a groff extension and ignored because insecure. .TP 8n \fB\&trimat\fR \fIleft top width height\fR Set the TrimBox page parameter for PDF generation. This is a Heirloom extension and currently ignored. .TP 8n \fB\&trin\fR \fIglyph glyph ...\fR Output character translation, ignored by \fB\&asciify\fR. Currently unsupported. .TP 8n \fB\&trnt\fR \fIglyph glyph ...\fR Output character translation, ignored by \e!. Currently unsupported. .TP 8n \fB\&troff\fR .br Force troff mode. This is a groff extension and currently ignored. .TP 8n \fB\&TS\fR Begin a table, which formats input in aligned rows and columns. See tbl(7) for a description of the tbl language. .TP 8n \fB\&uf\fR \fIfont\fR Globally set the underline font. Currently ignored. .TP 8n \fB\&ul\fR [\fIN\fR] Underline next \fIN\fR input lines. Currently ignored. .TP 8n \fB\&unformat\fR \fIdivname\fR Unformat spaces and tabs in a diversion. Currently unsupported. .TP 8n \fB\&unwatch\fR \fImacroname\fR Disable notification for string or macro. This is a Heirloom extension and currently ignored. .TP 8n \fB\&unwatchn\fR \fIregister\fR Disable notification for register. This is a Heirloom extension and currently ignored. .TP 8n \fB\&vpt\fR [\fB1\fR | \fB0\fR] Enable or disable vertical position traps. This is a groff extension and currently ignored. .TP 8n \fB\&vs\fR [[\fB+\fR|\fB-\fR]\fIheight\fR] Change vertical spacing. Currently ignored. .TP 8n \fB\&warn\fR \fIflags\fR Set warning level. Currently ignored. .TP 8n \fB\&warnscale\fR \fIsi\fR Set the scaling indicator used in warnings. This is a groff extension and currently ignored. .TP 8n \fB\&watch\fR \fImacroname\fR Notify on change of string or macro. This is a Heirloom extension and currently ignored. .TP 8n \fB\&watchlength\fR \fImaxlength\fR On change, report the contents of macros and strings up to the specified length. This is a Heirloom extension and currently ignored. .TP 8n \fB\&watchn\fR \fIregister\fR Notify on change of register. This is a Heirloom extension and currently ignored. .TP 8n \fB\&wh\fR \fIdist\fR [\fImacroname\fR] Set a page location trap. Currently unsupported. .TP 8n \fB\&while\fR \fIcondition body\fR Repeated execution while a \fIcondition\fR is true, with syntax similar to \fB\&if\fR. Currently implemented with two restrictions: cannot nest, and each loop must start and end in the same scope. .TP 8n \fB\&write\fR [\(dq]\fIstring\fR Write to an open file. Ignored because insecure. .TP 8n \fB\&writec\fR [\(dq]\fIstring\fR Write to an open file without appending a newline. Ignored because insecure. .TP 8n \fB\&writem\fR \fImacroname\fR Write macro or string to an open file. Ignored because insecure. .TP 8n \fB\&xflag\fR \fIlevel\fR Set the extension level. This is a Heirloom extension and currently ignored. .SS "Numerical expressions" The \fB\&nr\fR, \fB\&if\fR, and \fB\&ie\fR requests accept integer numerical expressions as arguments. These are always evaluated using the C \fIint\fR type; integer overflow works the same way as in the C language. Numbers consist of an arbitrary number of digits \(oq0\(cq to \(oq9\(cq prefixed by an optional sign \(oq+\(cq or \(oq-\(cq. Each number may be followed by one optional scaling unit described below \fIScaling Widths\fR. The following equations hold: .nf .sp .RS 6n 1i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240 254c = 100i = 24000u = 24000 1f = 65536u = 65536 .RE .fi .PP The following binary operators are implemented. Unless otherwise stated, they behave as in the C language: .TP 4n \fB+\fR addition .PD 0 .TP 4n \fB-\fR subtraction .TP 4n \fB*\fR multiplication .TP 4n \fB/\fR division .TP 4n \fB%\fR remainder of division .TP 4n \fB<\fR less than .TP 4n \fB>\fR greater than .TP 4n \fB==\fR equal to .TP 4n \fB=\fR equal to, same effect as \fB==\fR (this differs from C) .TP 4n \fB<=\fR less than or equal to .TP 4n \fB>=\fR greater than or equal to .TP 4n \fB<>\fR not equal to (corresponds to C \fB!=\fR; this one is of limited portability, it is supported by Heirloom roff, but not by groff) .TP 4n \fB&\fR logical and (corresponds to C \fB&&\fR) .TP 4n \fB\&:\fR .br logical or (corresponds to C \fB||\fR) .TP 4n \fB?\fR maximum (not available in C) .PD .PP There is no concept of precedence; evaluation proceeds from left to right, except when subexpressions are enclosed in parentheses. Inside parentheses, whitespace is ignored. .SH "ESCAPE SEQUENCE REFERENCE" The mandoc(1) \fBroff\fR parser recognises the following escape sequences. In mdoc(7) and man(7) documents, using escape sequences is discouraged except for those described in the \fILANGUAGE SYNTAX\fR section above. .PP A backslash followed by any character not listed here simply prints that character itself. .TP 8n \fB\e\fR A backslash at the end of an input line can be used to continue the logical input line on the next physical input line, joining the text on both lines together as if it were on a single input line. .TP 8n \fB\e\fR The escape sequence backslash-space (\(oq\e\ \&\(cq) is an unpaddable space-sized non-breaking space character; see \fIWhitespace\fR and mandoc_char(7). .TP 8n \fB\e!\fR Embed text up to and including the end of the input line into the current diversion or into intermediate output without interpreting requests, macros, and escapes. Currently unsupported. .TP 8n \fB\e\(dq\fR The rest of the input line is treated as \fIComments\fR. .TP 8n \fB\e#\fR Line continuation with comment. Discard the rest of the physical input line and continue the logical input line on the next physical input line, joining the text on both lines together as if it were on a single input line. This is a groff extension. .TP 8n \fB\e$\fR\fIarg\fR Macro argument expansion, see \fB\&de\fR. .TP 8n \fB\e%\fR Hyphenation allowed at this point of the word; ignored by mandoc(1). .TP 8n \fB\e&\fR Non-printing zero-width character, often used for various kinds of escaping; see \fIWhitespace\fR, mandoc_char(7), and the \(lqMACRO SYNTAX\(rq and \(lqDelimiters\(rq sections in mdoc(7). .TP 8n \fB\e\(aq\fR Acute accent special character; use \fB\e(aa\fR instead. .TP 8n \fB\e(\fR\fIcc\fR \fISpecial Characters\fR with two-letter names, see mandoc_char(7). .TP 8n \fB\e)\fR Zero-width space transparent to end-of-sentence detection; ignored by mandoc(1). .TP 8n \fB\e*[\fR\fIname\fR\fB\&]\fR Interpolate the string with the \fIname\fR. For short names, there are variants \fB\e*\fR\fIc\fR and \fB\e*(\fR\fIcc\fR. .sp One string is predefined on the \fBroff\fR language level: \fB\e*(.T\fR expands to the name of the output device, for example ascii, utf8, ps, pdf, html, or markdown. .sp Macro sets traditionally predefine additional strings which are not portable and differ across implementations. Those supported by mandoc(1) are listed in mandoc_char(7). .sp Strings can be defined, changed, and deleted with the \fB\&ds\fR, \fB\&as\fR, and \fB\&rm\fR requests. .TP 8n \fB\e,\fR Left italic correction (groff extension); ignored by mandoc(1). .TP 8n \fB\e-\fR Special character \(lqmathematical minus sign\(rq; see mandoc_char(7) for details. .TP 8n \fB\e/\fR Right italic correction (groff extension); ignored by mandoc(1). .TP 8n \fB\e:\fR Breaking the line is allowed at this point of the word without inserting a hyphen. .TP 8n \fB\e?\fR Embed the text up to the next \fB\e?\fR into the current diversion without interpreting requests, macros, and escapes. This is a groff extension and currently unsupported. .TP 8n \fB\e[\fR\fIname\fR\fB\&]\fR \fISpecial Characters\fR with names of arbitrary length, see mandoc_char(7). .TP 8n \fB\e^\fR One-twelfth em half-narrow space character, effectively zero-width in mandoc(1). .TP 8n \fB\e_\fR Underline special character; use \fB\e(ul\fR instead. .TP 8n \fB\e`\fR Grave accent special character; use \fB\e(ga\fR instead. .TP 8n \fB\e{\fR Begin conditional input; see \fB\&if\fR. .TP 8n \fB\e\(ba\fR One-sixth em narrow space character, effectively zero-width in mandoc(1). .TP 8n \fB\e}\fR End conditional input; see \fB\&if\fR. .TP 8n \fB\e~\fR Paddable non-breaking space character. .TP 8n \fB\e0\fR Digit width space character. .TP 8n \fB\eA\(aq\fR\fIstring\fR\fB\(aq\fR Anchor definition; ignored by mandoc(1). .TP 8n \fB\ea\fR Leader character; ignored by mandoc(1). .TP 8n \fB\eB\(aq\fR\fIstring\fR\fB\(aq\fR Interpolate \(oq1\(cq if \fIstring\fR conforms to the syntax of \fINumerical expressions\fR explained above or \(oq0\(cq otherwise. .TP 8n \fB\eb\(aq\fR\fIstring\fR\fB\(aq\fR Bracket building function; ignored by mandoc(1). .TP 8n \fB\eC\(aq\fR\fIname\fR\fB\(aq\fR \fISpecial Characters\fR with names of arbitrary length. .TP 8n \fB\ec\fR When encountered at the end of an input text line, the next input text line is considered to continue that line, even if there are request or macro lines in between. No whitespace is inserted. .TP 8n \fB\eD\(aq\fR\fIstring\fR\fB\(aq\fR Draw graphics function; ignored by mandoc(1). .TP 8n \fB\ed\fR Move down by half a line; ignored by mandoc(1). .TP 8n \fB\eE\fR Escape character intended to not be interpreted in copy mode. In mandoc(1), it currently does the same as \fB\e\fR itself. .TP 8n \fB\ee\fR Backslash special character. .TP 8n \fB\eF[\fR\fIname\fR\fB\&]\fR Switch font family (groff extension); ignored by mandoc(1). For short names, there are variants \fB\eF\fR\fIc\fR and \fB\eF(\fR\fIcc\fR. .TP 8n \fB\ef[\fR\fIname\fR\fB\&]\fR Switch to the font \fIname\fR, see \fIFont Selection\fR. For short names, there are variants \fB\ef\fR\fIc\fR and \fB\ef(\fR\fIcc\fR. An empty name \fB\ef[]\fR defaults to \fB\efP\fR. .TP 8n \fB\eg[\fR\fIname\fR\fB\&]\fR Interpolate the format of a number register; ignored by mandoc(1). For short names, there are variants \fB\eg\fR\fIc\fR and \fB\eg(\fR\fIcc\fR. .TP 8n \fB\eH\(aq\fR[+|-]\fInumber\fR\fB\(aq\fR Set the height of the current font; ignored by mandoc(1). .TP 8n \fB\eh\(aq\fR[\fB\&|\fR]\fIwidth\fR\fB\(aq\fR Horizontal motion. If the vertical bar is given, the motion is relative to the current indentation. Otherwise, it is relative to the current position. The default scaling unit is \fBm\fR. .TP 8n \fB\ek[\fR\fIname\fR\fB\&]\fR Mark horizontal input place in register; ignored by mandoc(1). For short names, there are variants \fB\ek\fR\fIc\fR and \fB\ek(\fR\fIcc\fR. .TP 8n \fB\eL\(aq\fR\fInumber\fR[\fIc\fR]\fB\(aq\fR Vertical line drawing function; ignored by mandoc(1). .TP 8n \fB\el\(aq\fR\fIwidth\fR[\fIc\fR]\fB\(aq\fR Draw a horizontal line of \fIwidth\fR using the glyph \fIc\fR. .TP 8n \fB\eM[\fR\fIname\fR\fB\&]\fR Set fill (background) color (groff extension); ignored by mandoc(1). For short names, there are variants \fB\eM\fR\fIc\fR and \fB\eM(\fR\fIcc\fR. .TP 8n \fB\em[\fR\fIname\fR\fB\&]\fR Set glyph drawing color (groff extension); ignored by mandoc(1). For short names, there are variants \fB\em\fR\fIc\fR and \fB\em(\fR\fIcc\fR. .TP 8n \fB\eN\(aq\fR\fInumber\fR\fB\(aq\fR Character \fInumber\fR on the current font. .TP 8n \fB\en\fR[+|-]\fB\&[\fR\fIname\fR\fB\&]\fR Interpolate the number register \fIname\fR. For short names, there are variants \fB\en\fR\fIc\fR and \fB\en(\fR\fIcc\fR. If the optional sign is specified, the register is first incremented or decremented by the \fIstepsize\fR that was specified in the relevant \fB\&nr\fR request, and the changed value is interpolated. .TP 8n \fB\eO\fR\fIdigit\fR, \fB\eO[5\fRarguments\fB\&]\fR Suppress output. This is a groff extension and currently unsupported. With an argument of \fB1\fR, \fB2\fR, \fB3\fR, or \fB4\fR, it is ignored. .TP 8n \fB\eo\(aq\fR\fIstring\fR\fB\(aq\fR Overstrike, writing all the characters contained in the \fIstring\fR to the same output position. In terminal and HTML output modes, only the last one of the characters is visible. .TP 8n \fB\ep\fR Break the output line at the end of the current word. .TP 8n \fB\eR\(aq\fR\fIname\fR [+|-]\fInumber\fR\fB\(aq\fR Set number register; ignored by mandoc(1). .TP 8n \fB\er\fR Move up by one line; ignored by mandoc(1). .TP 8n \fB\eS\(aq\fR\fInumber\fR\fB\(aq\fR Slant output; ignored by mandoc(1). .TP 8n \fB\es\(aq\fR[+|-]\fInumber\fR\fB\(aq\fR Change point size; ignored by mandoc(1). Alternative forms \fB\es\fR[+|-]\fIn\fR, \fB\es\fR[+|-]\fB\(aq\fR\fInumber\fR\fB\(aq\fR, \fB\es[\fR[+|-]\fInumber\fR\fB\&]\fR, and \fB\es\fR[+|-]\fB\&[\fR\fInumber\fR\fB\&]\fR are also parsed and ignored. .TP 8n \fB\et\fR Horizontal tab; ignored by mandoc(1). .TP 8n \fB\eu\fR Move up by half a line; ignored by mandoc(1). .TP 8n \fB\eV[\fR\fIname\fR\fB\&]\fR Interpolate an environment variable; ignored by mandoc(1). For short names, there are variants \fB\eV\fR\fIc\fR and \fB\eV(\fR\fIcc\fR. .TP 8n \fB\ev\(aq\fR\fInumber\fR\fB\(aq\fR Vertical motion; ignored by mandoc(1). .TP 8n \fB\ew\(aq\fR\fIstring\fR\fB\(aq\fR Interpolate the width of the \fIstring\fR. The mandoc(1) implementation assumes that after expansion of user-defined strings, the \fIstring\fR only contains normal characters, no escape sequences, and that each character has a width of 24 basic units. .TP 8n \fB\eX\(aq\fR\fIstring\fR\fB\(aq\fR Output \fIstring\fR as device control function; ignored in nroff mode and by mandoc(1). .TP 8n \fB\ex\(aq\fR\fInumber\fR\fB\(aq\fR Extra line space function; ignored by mandoc(1). .TP 8n \fB\eY[\fR\fIname\fR\fB\&]\fR Output a string as a device control function; ignored in nroff mode and by mandoc(1). For short names, there are variants \fB\eY\fR\fIc\fR and \fB\eY(\fR\fIcc\fR. .TP 8n \fB\eZ\(aq\fR\fIstring\fR\fB\(aq\fR Print \fIstring\fR with zero width and height; ignored by mandoc(1). .TP 8n \fB\ez\fR Output the next character without advancing the cursor position. .SH "COMPATIBILITY" The mandoc(1) implementation of the \fBroff\fR language is incomplete. Major unimplemented features include: .TP 4n \fB-\fR For security reasons, mandoc(1) never reads or writes external files except via \fB\&so\fR requests with safe relative paths. .PD 0 .TP 4n \fB-\fR There is no automatic hyphenation, no adjustment to the right margin, and very limited support for centering; the output is always set flush-left. .TP 4n \fB-\fR Support for setting tabulator and leader characters is missing, and support for manually changing indentation is limited. .TP 4n \fB-\fR The \(oqu\(cq scaling unit is the default terminal unit. In traditional troff systems, this unit changes depending on the output media. .TP 4n \fB-\fR Width measurements are implemented in a crude way and often yield wrong results. Support for explicit movement requests and escapes is limited. .TP 4n \fB-\fR There is no concept of output pages, no support for floats, graphics drawing, and picture inclusion; terminal output is always continuous. .TP 4n \fB-\fR Requests regarding color, font families, font sizes, and glyph manipulation are ignored. Font support is very limited. Kerning is not implemented, and no ligatures are produced. .TP 4n \fB-\fR The "\(aq" macro control character does not suppress output line breaks. .TP 4n \fB-\fR Diversions and environments are not implemented, and support for traps is very incomplete. .TP 4n \fB-\fR Use of macros is not supported inside tbl(7) code. .PD .PP The special semantics of the \fBnS\fR number register is an idiosyncracy of OpenBSD manuals and not supported by other mdoc(7) implementations. .SH "SEE ALSO" mandoc(1), eqn(7), man(7), mandoc_char(7), mdoc(7), tbl(7) .PP Joseph F. Ossanna, Brian W. Kernighan, \fITroff User's Manual\fR, \fIAT&T Bell Laboratories\fR, Computing Science Technical Report, 54, http://www.kohala.com/start/troff/cstr54.ps, Murray Hill, New Jersey, 1976 and 1992. .PP Joseph F. Ossanna, Brian W. Kernighan, and Gunnar Ritter, \fIHeirloom Documentation Tools Nroff/Troff User's Manual\fR, http://heirloom.sourceforge.net/doctools/troff.pdf, September 17, 2007. .SH "HISTORY" The RUNOFF typesetting system, whose input forms the basis for \fBroff\fR, was written in MAD and FAP for the CTSS operating system by Jerome E. Saltzer in 1964. Doug McIlroy rewrote it in BCPL in 1969, renaming it \fBroff\fR. Dennis M. Ritchie rewrote McIlroy's \fBroff\fR in PDP-11 assembly for Version\~1 AT&T UNIX, Joseph F. Ossanna improved roff and renamed it nroff for Version\~2 AT&T UNIX, then ported nroff to C as troff, which Brian W. Kernighan released with Version\~7 AT&T UNIX. In 1989, James Clarke re-implemented troff in C++, naming it groff. .SH "AUTHORS" This \fBroff\fR reference was written by Kristaps Dzonsons <\fIkristaps@bsd.lv\fR> and Ingo Schwarze <\fIschwarze@openbsd.org\fR>.