xref: /titanic_51/usr/src/man/man5/mandoc_roff.5 (revision 260e9a87725c090ba5835b1f9f0b62fa2f96036f)
1*260e9a87SYuri Pankov.\"	$Id: roff.7,v 1.70 2015/02/17 17:16:52 schwarze Exp $
2*260e9a87SYuri Pankov.\"
3*260e9a87SYuri Pankov.\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
4*260e9a87SYuri Pankov.\" Copyright (c) 2010, 2011, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
595c635efSGarrett D'Amore.\"
695c635efSGarrett D'Amore.\" Permission to use, copy, modify, and distribute this software for any
795c635efSGarrett D'Amore.\" purpose with or without fee is hereby granted, provided that the above
895c635efSGarrett D'Amore.\" copyright notice and this permission notice appear in all copies.
995c635efSGarrett D'Amore.\"
1095c635efSGarrett D'Amore.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1195c635efSGarrett D'Amore.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1295c635efSGarrett D'Amore.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1395c635efSGarrett D'Amore.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1495c635efSGarrett D'Amore.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1595c635efSGarrett D'Amore.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1695c635efSGarrett D'Amore.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1795c635efSGarrett D'Amore.\"
18*260e9a87SYuri Pankov.Dd $Mdocdate: February 17 2015 $
1995c635efSGarrett D'Amore.Dt MANDOC_ROFF 5
2095c635efSGarrett D'Amore.Os
2195c635efSGarrett D'Amore.Sh NAME
22*260e9a87SYuri Pankov.Nm roff
2395c635efSGarrett D'Amore.Nd roff language reference for mandoc
2495c635efSGarrett D'Amore.Sh DESCRIPTION
2595c635efSGarrett D'AmoreThe
2695c635efSGarrett D'Amore.Nm roff
2795c635efSGarrett D'Amorelanguage is a general purpose text formatting language.
2895c635efSGarrett D'AmoreSince traditional implementations of the
2995c635efSGarrett D'Amore.Xr mdoc 5
3095c635efSGarrett D'Amoreand
3195c635efSGarrett D'Amore.Xr man 5
3295c635efSGarrett D'Amoremanual formatting languages are based on it,
3395c635efSGarrett D'Amoremany real-world manuals use small numbers of
3495c635efSGarrett D'Amore.Nm
35*260e9a87SYuri Pankovrequests and escape sequences intermixed with their
3695c635efSGarrett D'Amore.Xr mdoc 5
3795c635efSGarrett D'Amoreor
3895c635efSGarrett D'Amore.Xr man 5
3995c635efSGarrett D'Amorecode.
4095c635efSGarrett D'AmoreTo properly format such manuals, the
4195c635efSGarrett D'Amore.Xr mandoc 1
4295c635efSGarrett D'Amoreutility supports a tiny subset of
4395c635efSGarrett D'Amore.Nm
44*260e9a87SYuri Pankovrequests and escapes.
45*260e9a87SYuri PankovOnly these requests and escapes supported by
4695c635efSGarrett D'Amore.Xr mandoc 1
4795c635efSGarrett D'Amoreare documented in the present manual,
4895c635efSGarrett D'Amoretogether with the basic language syntax shared by
4995c635efSGarrett D'Amore.Nm ,
5095c635efSGarrett D'Amore.Xr mdoc 5 ,
5195c635efSGarrett D'Amoreand
5295c635efSGarrett D'Amore.Xr man 5 .
5395c635efSGarrett D'AmoreFor complete
5495c635efSGarrett D'Amore.Nm
5595c635efSGarrett D'Amoremanuals, consult the
5695c635efSGarrett D'Amore.Sx SEE ALSO
5795c635efSGarrett D'Amoresection.
5895c635efSGarrett D'Amore.Pp
5995c635efSGarrett D'AmoreInput lines beginning with the control character
6095c635efSGarrett D'Amore.Sq \&.
6195c635efSGarrett D'Amoreare parsed for requests and macros.
6295c635efSGarrett D'AmoreSuch lines are called
6395c635efSGarrett D'Amore.Dq request lines
6495c635efSGarrett D'Amoreor
6595c635efSGarrett D'Amore.Dq macro lines ,
6695c635efSGarrett D'Amorerespectively.
6795c635efSGarrett D'AmoreRequests change the processing state and manipulate the formatting;
6895c635efSGarrett D'Amoresome macros also define the document structure and produce formatted
6995c635efSGarrett D'Amoreoutput.
7095c635efSGarrett D'AmoreThe single quote
7195c635efSGarrett D'Amore.Pq Qq \(aq
7295c635efSGarrett D'Amoreis accepted as an alternative control character,
7395c635efSGarrett D'Amoretreated by
7495c635efSGarrett D'Amore.Xr mandoc 1
7595c635efSGarrett D'Amorejust like
7695c635efSGarrett D'Amore.Ql \&.
7795c635efSGarrett D'Amore.Pp
7895c635efSGarrett D'AmoreLines not beginning with control characters are called
7995c635efSGarrett D'Amore.Dq text lines .
8095c635efSGarrett D'AmoreThey provide free-form text to be printed; the formatting of the text
8195c635efSGarrett D'Amoredepends on the respective processing context.
8295c635efSGarrett D'Amore.Sh LANGUAGE SYNTAX
83*260e9a87SYuri Pankov.Nm roff
8495c635efSGarrett D'Amoredocuments may contain only graphable 7-bit ASCII characters, the space
8595c635efSGarrett D'Amorecharacter, and, in certain circumstances, the tab character.
86*260e9a87SYuri PankovThe backslash character
8795c635efSGarrett D'Amore.Sq \e
88*260e9a87SYuri Pankovindicates the start of an escape sequence, used for example for
8995c635efSGarrett D'Amore.Sx Comments ,
9095c635efSGarrett D'Amore.Sx Special Characters ,
9195c635efSGarrett D'Amore.Sx Predefined Strings ,
9295c635efSGarrett D'Amoreand
9395c635efSGarrett D'Amoreuser-defined strings defined using the
9495c635efSGarrett D'Amore.Sx ds
9595c635efSGarrett D'Amorerequest.
96*260e9a87SYuri PankovFor a listing of escape sequences, consult the
97*260e9a87SYuri Pankov.Sx ESCAPE SEQUENCE REFERENCE
98*260e9a87SYuri Pankovbelow.
9995c635efSGarrett D'Amore.Ss Comments
10095c635efSGarrett D'AmoreText following an escaped double-quote
10195c635efSGarrett D'Amore.Sq \e\(dq ,
10295c635efSGarrett D'Amorewhether in a request, macro, or text line, is ignored to the end of the line.
10395c635efSGarrett D'AmoreA request line beginning with a control character and comment escape
10495c635efSGarrett D'Amore.Sq \&.\e\(dq
10595c635efSGarrett D'Amoreis also ignored.
10695c635efSGarrett D'AmoreFurthermore, request lines with only a control character and optional
10795c635efSGarrett D'Amoretrailing whitespace are stripped from input.
10895c635efSGarrett D'Amore.Pp
10995c635efSGarrett D'AmoreExamples:
11095c635efSGarrett D'Amore.Bd -literal -offset indent -compact
11195c635efSGarrett D'Amore\&.\e\(dq This is a comment line.
11295c635efSGarrett D'Amore\&.\e\(dq The next line is ignored:
11395c635efSGarrett D'Amore\&.
11495c635efSGarrett D'Amore\&.Sh EXAMPLES \e\(dq This is a comment, too.
11595c635efSGarrett D'Amore\&example text \e\(dq And so is this.
11695c635efSGarrett D'Amore.Ed
11795c635efSGarrett D'Amore.Ss Special Characters
11895c635efSGarrett D'AmoreSpecial characters are used to encode special glyphs and are rendered
11995c635efSGarrett D'Amoredifferently across output media.
12095c635efSGarrett D'AmoreThey may occur in request, macro, and text lines.
12195c635efSGarrett D'AmoreSequences begin with the escape character
12295c635efSGarrett D'Amore.Sq \e
12395c635efSGarrett D'Amorefollowed by either an open-parenthesis
12495c635efSGarrett D'Amore.Sq \&(
12595c635efSGarrett D'Amorefor two-character sequences; an open-bracket
12695c635efSGarrett D'Amore.Sq \&[
12795c635efSGarrett D'Amorefor n-character sequences (terminated at a close-bracket
12895c635efSGarrett D'Amore.Sq \&] ) ;
12995c635efSGarrett D'Amoreor a single one character sequence.
13095c635efSGarrett D'Amore.Pp
13195c635efSGarrett D'AmoreExamples:
13295c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact
13395c635efSGarrett D'Amore.It Li \e(em
13495c635efSGarrett D'AmoreTwo-letter em dash escape.
13595c635efSGarrett D'Amore.It Li \ee
13695c635efSGarrett D'AmoreOne-letter backslash escape.
13795c635efSGarrett D'Amore.El
13895c635efSGarrett D'Amore.Pp
13995c635efSGarrett D'AmoreSee
14095c635efSGarrett D'Amore.Xr mandoc_char 5
14195c635efSGarrett D'Amorefor a complete list.
14295c635efSGarrett D'Amore.Ss Text Decoration
14395c635efSGarrett D'AmoreTerms may be text-decorated using the
14495c635efSGarrett D'Amore.Sq \ef
14595c635efSGarrett D'Amoreescape followed by an indicator: B (bold), I (italic), R (regular), or P
14695c635efSGarrett D'Amore(revert to previous mode).
14795c635efSGarrett D'AmoreA numerical representation 3, 2, or 1 (bold, italic, and regular,
14895c635efSGarrett D'Amorerespectively) may be used instead.
14995c635efSGarrett D'AmoreThe indicator or numerical representative may be preceded by C
15095c635efSGarrett D'Amore(constant-width), which is ignored.
15195c635efSGarrett D'Amore.Pp
152*260e9a87SYuri PankovThe two-character indicator
153*260e9a87SYuri Pankov.Sq BI
154*260e9a87SYuri Pankovrequests a font that is both bold and italic.
155*260e9a87SYuri PankovIt may not be portable to old roff implementations.
156*260e9a87SYuri Pankov.Pp
15795c635efSGarrett D'AmoreExamples:
15895c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact
15995c635efSGarrett D'Amore.It Li \efBbold\efR
160*260e9a87SYuri PankovWrite in \fBbold\fP, then switch to regular font mode.
16195c635efSGarrett D'Amore.It Li \efIitalic\efP
162*260e9a87SYuri PankovWrite in \fIitalic\fP, then return to previous font mode.
163*260e9a87SYuri Pankov.It Li \ef(BIbold italic\efP
164*260e9a87SYuri PankovWrite in \f(BIbold italic\fP, then return to previous font mode.
16595c635efSGarrett D'Amore.El
16695c635efSGarrett D'Amore.Pp
16795c635efSGarrett D'AmoreText decoration is
16895c635efSGarrett D'Amore.Em not
16995c635efSGarrett D'Amorerecommended for
17095c635efSGarrett D'Amore.Xr mdoc 5 ,
17195c635efSGarrett D'Amorewhich encourages semantic annotation.
17295c635efSGarrett D'Amore.Ss Predefined Strings
17395c635efSGarrett D'AmorePredefined strings, like
17495c635efSGarrett D'Amore.Sx Special Characters ,
17595c635efSGarrett D'Amoremark special output glyphs.
17695c635efSGarrett D'AmorePredefined strings are escaped with the slash-asterisk,
17795c635efSGarrett D'Amore.Sq \e* :
17895c635efSGarrett D'Amoresingle-character
17995c635efSGarrett D'Amore.Sq \e*X ,
18095c635efSGarrett D'Amoretwo-character
18195c635efSGarrett D'Amore.Sq \e*(XX ,
18295c635efSGarrett D'Amoreand N-character
18395c635efSGarrett D'Amore.Sq \e*[N] .
18495c635efSGarrett D'Amore.Pp
18595c635efSGarrett D'AmoreExamples:
18695c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact
18795c635efSGarrett D'Amore.It Li \e*(Am
18895c635efSGarrett D'AmoreTwo-letter ampersand predefined string.
18995c635efSGarrett D'Amore.It Li \e*q
19095c635efSGarrett D'AmoreOne-letter double-quote predefined string.
19195c635efSGarrett D'Amore.El
19295c635efSGarrett D'Amore.Pp
19395c635efSGarrett D'AmorePredefined strings are not recommended for use,
19495c635efSGarrett D'Amoreas they differ across implementations.
19595c635efSGarrett D'AmoreThose supported by
19695c635efSGarrett D'Amore.Xr mandoc 1
19795c635efSGarrett D'Amoreare listed in
19895c635efSGarrett D'Amore.Xr mandoc_char 5 .
19995c635efSGarrett D'AmoreManuals using these predefined strings are almost certainly not portable.
20095c635efSGarrett D'Amore.Ss Whitespace
20195c635efSGarrett D'AmoreWhitespace consists of the space character.
20295c635efSGarrett D'AmoreIn text lines, whitespace is preserved within a line.
20395c635efSGarrett D'AmoreIn request and macro lines, whitespace delimits arguments and is discarded.
20495c635efSGarrett D'Amore.Pp
20595c635efSGarrett D'AmoreUnescaped trailing spaces are stripped from text line input unless in a
20695c635efSGarrett D'Amoreliteral context.
20795c635efSGarrett D'AmoreIn general, trailing whitespace on any input line is discouraged for
20895c635efSGarrett D'Amorereasons of portability.
20995c635efSGarrett D'AmoreIn the rare case that a blank character is needed at the end of an
21095c635efSGarrett D'Amoreinput line, it may be forced by
21195c635efSGarrett D'Amore.Sq \e\ \e& .
21295c635efSGarrett D'Amore.Pp
21395c635efSGarrett D'AmoreLiteral space characters can be produced in the output
21495c635efSGarrett D'Amoreusing escape sequences.
21595c635efSGarrett D'AmoreIn macro lines, they can also be included in arguments using quotation; see
21695c635efSGarrett D'Amore.Sx MACRO SYNTAX
21795c635efSGarrett D'Amorefor details.
21895c635efSGarrett D'Amore.Pp
21995c635efSGarrett D'AmoreBlank text lines, which may include whitespace, are only permitted
22095c635efSGarrett D'Amorewithin literal contexts.
22195c635efSGarrett D'AmoreIf the first character of a text line is a space, that line is printed
22295c635efSGarrett D'Amorewith a leading newline.
22395c635efSGarrett D'Amore.Ss Scaling Widths
22495c635efSGarrett D'AmoreMany requests and macros support scaled widths for their arguments.
22595c635efSGarrett D'AmoreThe syntax for a scaled width is
22695c635efSGarrett D'Amore.Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
22795c635efSGarrett D'Amorewhere a decimal must be preceded or followed by at least one digit.
22895c635efSGarrett D'AmoreNegative numbers, while accepted, are truncated to zero.
22995c635efSGarrett D'Amore.Pp
23095c635efSGarrett D'AmoreThe following scaling units are accepted:
23195c635efSGarrett D'Amore.Pp
23295c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact
23395c635efSGarrett D'Amore.It c
23495c635efSGarrett D'Amorecentimetre
23595c635efSGarrett D'Amore.It i
23695c635efSGarrett D'Amoreinch
23795c635efSGarrett D'Amore.It P
23895c635efSGarrett D'Amorepica (~1/6 inch)
23995c635efSGarrett D'Amore.It p
24095c635efSGarrett D'Amorepoint (~1/72 inch)
24195c635efSGarrett D'Amore.It f
242*260e9a87SYuri Pankovscale
24395c635efSGarrett D'Amore.Sq u
244*260e9a87SYuri Pankovby 65536
24595c635efSGarrett D'Amore.It v
24695c635efSGarrett D'Amoredefault vertical span
24795c635efSGarrett D'Amore.It m
24895c635efSGarrett D'Amorewidth of rendered
24995c635efSGarrett D'Amore.Sq m
25095c635efSGarrett D'Amore.Pq em
25195c635efSGarrett D'Amorecharacter
25295c635efSGarrett D'Amore.It n
25395c635efSGarrett D'Amorewidth of rendered
25495c635efSGarrett D'Amore.Sq n
25595c635efSGarrett D'Amore.Pq en
25695c635efSGarrett D'Amorecharacter
25795c635efSGarrett D'Amore.It u
258*260e9a87SYuri Pankovdefault horizontal span for the terminal
25995c635efSGarrett D'Amore.It M
26095c635efSGarrett D'Amoremini-em (~1/100 em)
26195c635efSGarrett D'Amore.El
26295c635efSGarrett D'Amore.Pp
26395c635efSGarrett D'AmoreUsing anything other than
26495c635efSGarrett D'Amore.Sq m ,
26595c635efSGarrett D'Amore.Sq n ,
26695c635efSGarrett D'Amoreor
26795c635efSGarrett D'Amore.Sq v
26895c635efSGarrett D'Amoreis necessarily non-portable across output media.
26995c635efSGarrett D'AmoreSee
27095c635efSGarrett D'Amore.Sx COMPATIBILITY .
27195c635efSGarrett D'Amore.Pp
27295c635efSGarrett D'AmoreIf a scaling unit is not provided, the numerical value is interpreted
27395c635efSGarrett D'Amoreunder the default rules of
27495c635efSGarrett D'Amore.Sq v
27595c635efSGarrett D'Amorefor vertical spaces and
27695c635efSGarrett D'Amore.Sq u
27795c635efSGarrett D'Amorefor horizontal ones.
27895c635efSGarrett D'Amore.Pp
27995c635efSGarrett D'AmoreExamples:
28095c635efSGarrett D'Amore.Bl -tag -width ".Bl -tag -width 2i" -offset indent -compact
28195c635efSGarrett D'Amore.It Li \&.Bl -tag -width 2i
28295c635efSGarrett D'Amoretwo-inch tagged list indentation in
28395c635efSGarrett D'Amore.Xr mdoc 5
28495c635efSGarrett D'Amore.It Li \&.HP 2i
28595c635efSGarrett D'Amoretwo-inch tagged list indentation in
28695c635efSGarrett D'Amore.Xr man 5
28795c635efSGarrett D'Amore.It Li \&.sp 2v
28895c635efSGarrett D'Amoretwo vertical spaces
28995c635efSGarrett D'Amore.El
29095c635efSGarrett D'Amore.Ss Sentence Spacing
29195c635efSGarrett D'AmoreEach sentence should terminate at the end of an input line.
29295c635efSGarrett D'AmoreBy doing this, a formatter will be able to apply the proper amount of
29395c635efSGarrett D'Amorespacing after the end of sentence (unescaped) period, exclamation mark,
29495c635efSGarrett D'Amoreor question mark followed by zero or more non-sentence closing
29595c635efSGarrett D'Amoredelimiters
29695c635efSGarrett D'Amore.Po
29795c635efSGarrett D'Amore.Sq \&) ,
29895c635efSGarrett D'Amore.Sq \&] ,
29995c635efSGarrett D'Amore.Sq \&' ,
30095c635efSGarrett D'Amore.Sq \&"
30195c635efSGarrett D'Amore.Pc .
30295c635efSGarrett D'Amore.Pp
30395c635efSGarrett D'AmoreThe proper spacing is also intelligently preserved if a sentence ends at
30495c635efSGarrett D'Amorethe boundary of a macro line.
30595c635efSGarrett D'Amore.Pp
30695c635efSGarrett D'AmoreExamples:
30795c635efSGarrett D'Amore.Bd -literal -offset indent -compact
30895c635efSGarrett D'AmoreDo not end sentences mid-line like this.  Instead,
30995c635efSGarrett D'Amoreend a sentence like this.
31095c635efSGarrett D'AmoreA macro would end like this:
31195c635efSGarrett D'Amore\&.Xr mandoc 1 \&.
31295c635efSGarrett D'Amore.Ed
31395c635efSGarrett D'Amore.Sh REQUEST SYNTAX
31495c635efSGarrett D'AmoreA request or macro line consists of:
31595c635efSGarrett D'Amore.Pp
31695c635efSGarrett D'Amore.Bl -enum -compact
31795c635efSGarrett D'Amore.It
31895c635efSGarrett D'Amorethe control character
31995c635efSGarrett D'Amore.Sq \&.
32095c635efSGarrett D'Amoreor
32195c635efSGarrett D'Amore.Sq \(aq
32295c635efSGarrett D'Amoreat the beginning of the line,
32395c635efSGarrett D'Amore.It
32495c635efSGarrett D'Amoreoptionally an arbitrary amount of whitespace,
32595c635efSGarrett D'Amore.It
32695c635efSGarrett D'Amorethe name of the request or the macro, which is one word of arbitrary
32795c635efSGarrett D'Amorelength, terminated by whitespace,
32895c635efSGarrett D'Amore.It
32995c635efSGarrett D'Amoreand zero or more arguments delimited by whitespace.
33095c635efSGarrett D'Amore.El
33195c635efSGarrett D'Amore.Pp
33295c635efSGarrett D'AmoreThus, the following request lines are all equivalent:
33395c635efSGarrett D'Amore.Bd -literal -offset indent
33495c635efSGarrett D'Amore\&.ig end
33595c635efSGarrett D'Amore\&.ig    end
33695c635efSGarrett D'Amore\&.   ig end
33795c635efSGarrett D'Amore.Ed
33895c635efSGarrett D'Amore.Sh MACRO SYNTAX
33995c635efSGarrett D'AmoreMacros are provided by the
34095c635efSGarrett D'Amore.Xr mdoc 5
34195c635efSGarrett D'Amoreand
34295c635efSGarrett D'Amore.Xr man 5
34395c635efSGarrett D'Amorelanguages and can be defined by the
34495c635efSGarrett D'Amore.Sx \&de
34595c635efSGarrett D'Amorerequest.
34695c635efSGarrett D'AmoreWhen called, they follow the same syntax as requests, except that
34795c635efSGarrett D'Amoremacro arguments may optionally be quoted by enclosing them
34895c635efSGarrett D'Amorein double quote characters
34995c635efSGarrett D'Amore.Pq Sq \(dq .
35095c635efSGarrett D'AmoreQuoted text, even if it contains whitespace or would cause
35195c635efSGarrett D'Amorea macro invocation when unquoted, is always considered literal text.
35295c635efSGarrett D'AmoreInside quoted text, pairs of double quote characters
35395c635efSGarrett D'Amore.Pq Sq Qq
35495c635efSGarrett D'Amoreresolve to single double quote characters.
35595c635efSGarrett D'Amore.Pp
35695c635efSGarrett D'AmoreTo be recognised as the beginning of a quoted argument, the opening
35795c635efSGarrett D'Amorequote character must be preceded by a space character.
35895c635efSGarrett D'AmoreA quoted argument extends to the next double quote character that is not
35995c635efSGarrett D'Amorepart of a pair, or to the end of the input line, whichever comes earlier.
36095c635efSGarrett D'AmoreLeaving out the terminating double quote character at the end of the line
36195c635efSGarrett D'Amoreis discouraged.
36295c635efSGarrett D'AmoreFor clarity, if more arguments follow on the same input line,
36395c635efSGarrett D'Amoreit is recommended to follow the terminating double quote character
36495c635efSGarrett D'Amoreby a space character; in case the next character after the terminating
36595c635efSGarrett D'Amoredouble quote character is anything else, it is regarded as the beginning
36695c635efSGarrett D'Amoreof the next, unquoted argument.
36795c635efSGarrett D'Amore.Pp
36895c635efSGarrett D'AmoreBoth in quoted and unquoted arguments, pairs of backslashes
36995c635efSGarrett D'Amore.Pq Sq \e\e
37095c635efSGarrett D'Amoreresolve to single backslashes.
37195c635efSGarrett D'AmoreIn unquoted arguments, space characters can alternatively be included
37295c635efSGarrett D'Amoreby preceding them with a backslash
37395c635efSGarrett D'Amore.Pq Sq \e\~ ,
37495c635efSGarrett D'Amorebut quoting is usually better for clarity.
37595c635efSGarrett D'Amore.Pp
37695c635efSGarrett D'AmoreExamples:
37795c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact
37895c635efSGarrett D'Amore.It Li .Fn strlen \(dqconst char *s\(dq
37995c635efSGarrett D'AmoreGroup arguments
38095c635efSGarrett D'Amore.Qq const char *s
38195c635efSGarrett D'Amoreinto one function argument.
38295c635efSGarrett D'AmoreIf unspecified,
38395c635efSGarrett D'Amore.Qq const ,
38495c635efSGarrett D'Amore.Qq char ,
38595c635efSGarrett D'Amoreand
38695c635efSGarrett D'Amore.Qq *s
38795c635efSGarrett D'Amorewould be considered separate arguments.
38895c635efSGarrett D'Amore.It Li .Op \(dqFl a\(dq
38995c635efSGarrett D'AmoreConsider
39095c635efSGarrett D'Amore.Qq \&Fl a
39195c635efSGarrett D'Amoreas literal text instead of a flag macro.
39295c635efSGarrett D'Amore.El
39395c635efSGarrett D'Amore.Sh REQUEST REFERENCE
39495c635efSGarrett D'AmoreThe
39595c635efSGarrett D'Amore.Xr mandoc 1
39695c635efSGarrett D'Amore.Nm
39795c635efSGarrett D'Amoreparser recognises the following requests.
398*260e9a87SYuri PankovFor requests marked as "ignored" or "unsupported", any arguments are
399*260e9a87SYuri Pankovignored, and the number of arguments is not checked.
400*260e9a87SYuri Pankov.Ss \&ab
401*260e9a87SYuri PankovAbort processing.
402*260e9a87SYuri PankovCurrently unsupported.
40395c635efSGarrett D'Amore.Ss \&ad
40495c635efSGarrett D'AmoreSet line adjustment mode.
405*260e9a87SYuri PankovIt takes one argument to select normal, left, right,
406*260e9a87SYuri Pankovor center adjustment for subsequent text.
407*260e9a87SYuri PankovCurrently ignored.
408*260e9a87SYuri Pankov.Ss \&af
409*260e9a87SYuri PankovAssign an output format to a number register.
410*260e9a87SYuri PankovCurrently ignored.
411*260e9a87SYuri Pankov.Ss \&aln
412*260e9a87SYuri PankovCreate an alias for a number register.
413*260e9a87SYuri PankovCurrently unsupported.
414*260e9a87SYuri Pankov.Ss \&als
415*260e9a87SYuri PankovCreate an alias for a request, string, macro, or diversion.
416*260e9a87SYuri PankovCurrently unsupported.
41795c635efSGarrett D'Amore.Ss \&am
41895c635efSGarrett D'AmoreAppend to a macro definition.
41995c635efSGarrett D'AmoreThe syntax of this request is the same as that of
42095c635efSGarrett D'Amore.Sx \&de .
42195c635efSGarrett D'Amore.Ss \&am1
42295c635efSGarrett D'AmoreAppend to a macro definition, switching roff compatibility mode off
423*260e9a87SYuri Pankovduring macro execution (groff extension).
42495c635efSGarrett D'AmoreThe syntax of this request is the same as that of
42595c635efSGarrett D'Amore.Sx \&de1 .
426*260e9a87SYuri PankovSince
427*260e9a87SYuri Pankov.Xr mandoc 1
428*260e9a87SYuri Pankovdoes not implement
429*260e9a87SYuri Pankov.Nm
430*260e9a87SYuri Pankovcompatibility mode at all, it handles this request as an alias for
431*260e9a87SYuri Pankov.Sx \&am .
432*260e9a87SYuri Pankov.Ss \&ami
433*260e9a87SYuri PankovAppend to a macro definition, specifying the macro name indirectly
434*260e9a87SYuri Pankov(groff extension).
435*260e9a87SYuri PankovThe syntax of this request is the same as that of
436*260e9a87SYuri Pankov.Sx \&dei .
437*260e9a87SYuri Pankov.Ss \&ami1
438*260e9a87SYuri PankovAppend to a macro definition, specifying the macro name indirectly
439*260e9a87SYuri Pankovand switching roff compatibility mode off during macro execution
440*260e9a87SYuri Pankov(groff extension).
441*260e9a87SYuri PankovThe syntax of this request is the same as that of
442*260e9a87SYuri Pankov.Sx \&dei1 .
443*260e9a87SYuri PankovSince
444*260e9a87SYuri Pankov.Xr mandoc 1
445*260e9a87SYuri Pankovdoes not implement
446*260e9a87SYuri Pankov.Nm
447*260e9a87SYuri Pankovcompatibility mode at all, it handles this request as an alias for
448*260e9a87SYuri Pankov.Sx \&ami .
449*260e9a87SYuri Pankov.Ss \&as
450*260e9a87SYuri PankovAppend to a user-defined string.
451*260e9a87SYuri PankovThe syntax of this request is the same as that of
452*260e9a87SYuri Pankov.Sx \&ds .
453*260e9a87SYuri PankovIf a user-defined string with the specified name does not yet exist,
454*260e9a87SYuri Pankovit is set to the empty string before appending.
455*260e9a87SYuri Pankov.Ss \&as1
456*260e9a87SYuri PankovAppend to a user-defined string, switching roff compatibility mode off
457*260e9a87SYuri Pankovduring macro execution (groff extension).
458*260e9a87SYuri PankovThe syntax of this request is the same as that of
459*260e9a87SYuri Pankov.Sx \&ds1 .
460*260e9a87SYuri PankovSince
461*260e9a87SYuri Pankov.Xr mandoc 1
462*260e9a87SYuri Pankovdoes not implement
463*260e9a87SYuri Pankov.Nm
464*260e9a87SYuri Pankovcompatibility mode at all, it handles this request as an alias for
465*260e9a87SYuri Pankov.Sx \&as .
466*260e9a87SYuri Pankov.Ss \&asciify
467*260e9a87SYuri PankovFully unformat a diversion.
468*260e9a87SYuri PankovCurrently unsupported.
469*260e9a87SYuri Pankov.Ss \&backtrace
470*260e9a87SYuri PankovPrint a backtrace of the input stack.
471*260e9a87SYuri PankovThis is a groff extension and currently ignored.
472*260e9a87SYuri Pankov.Ss \&bd
473*260e9a87SYuri PankovArtificially embolden by repeated printing with small shifts.
474*260e9a87SYuri PankovCurrently ignored.
475*260e9a87SYuri Pankov.Ss \&bleedat
476*260e9a87SYuri PankovSet the BleedBox page parameter for PDF generation.
477*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
478*260e9a87SYuri Pankov.Ss \&blm
479*260e9a87SYuri PankovSet a blank line trap.
480*260e9a87SYuri PankovCurrently unsupported.
481*260e9a87SYuri Pankov.Ss \&box
482*260e9a87SYuri PankovBegin a diversion without including a partially filled line.
483*260e9a87SYuri PankovCurrently unsupported.
484*260e9a87SYuri Pankov.Ss \&boxa
485*260e9a87SYuri PankovAdd to a diversion without including a partially filled line.
486*260e9a87SYuri PankovCurrently unsupported.
487*260e9a87SYuri Pankov.Ss \&bp
488*260e9a87SYuri PankovBegin new page.
489*260e9a87SYuri PankovCurrently ignored.
490*260e9a87SYuri Pankov.Ss \&BP
491*260e9a87SYuri PankovDefine a frame and place a picture in it.
492*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
493*260e9a87SYuri Pankov.Ss \&br
494*260e9a87SYuri PankovBreak the output line.
495*260e9a87SYuri PankovSee
496*260e9a87SYuri Pankov.Xr man 5
497*260e9a87SYuri Pankovand
498*260e9a87SYuri Pankov.Xr mdoc 5 .
499*260e9a87SYuri Pankov.Ss \&break
500*260e9a87SYuri PankovBreak out of a
501*260e9a87SYuri Pankov.Sx \&while
502*260e9a87SYuri Pankovloop.
503*260e9a87SYuri PankovCurrently unsupported.
504*260e9a87SYuri Pankov.Ss \&breakchar
505*260e9a87SYuri PankovOptional line break characters.
506*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
507*260e9a87SYuri Pankov.Ss \&brnl
508*260e9a87SYuri PankovBreak output line after next N input lines.
509*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
510*260e9a87SYuri Pankov.Ss \&brp
511*260e9a87SYuri PankovBreak and spread output line.
512*260e9a87SYuri PankovCurrently, this is implemented as an alias for
513*260e9a87SYuri Pankov.Sx \&br .
514*260e9a87SYuri Pankov.Ss \&brpnl
515*260e9a87SYuri PankovBreak and spread output line after next N input lines.
516*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
517*260e9a87SYuri Pankov.Ss \&c2
518*260e9a87SYuri PankovChange the no-break control character.
519*260e9a87SYuri PankovCurrently unsupported.
520*260e9a87SYuri Pankov.Ss \&cc
521*260e9a87SYuri PankovChange the control character.
522*260e9a87SYuri PankovIts syntax is as follows:
523*260e9a87SYuri Pankov.Bd -literal -offset indent
524*260e9a87SYuri Pankov.Pf . Cm \&cc Op Ar c
525*260e9a87SYuri Pankov.Ed
526*260e9a87SYuri Pankov.Pp
527*260e9a87SYuri PankovIf
528*260e9a87SYuri Pankov.Ar c
529*260e9a87SYuri Pankovis not specified, the control character is reset to
530*260e9a87SYuri Pankov.Sq \&. .
531*260e9a87SYuri PankovTrailing characters are ignored.
532*260e9a87SYuri Pankov.Ss \&ce
533*260e9a87SYuri PankovCenter some lines.
534*260e9a87SYuri PankovIt takes one integer argument, specifying how many lines to center.
535*260e9a87SYuri PankovCurrently ignored.
536*260e9a87SYuri Pankov.Ss \&cf
537*260e9a87SYuri PankovOutput the contents of a file.
538*260e9a87SYuri PankovIgnored because insecure.
539*260e9a87SYuri Pankov.Ss \&cflags
540*260e9a87SYuri PankovSet character flags.
541*260e9a87SYuri PankovThis is a groff extension and currently ignored.
542*260e9a87SYuri Pankov.Ss \&ch
543*260e9a87SYuri PankovChange a trap location.
544*260e9a87SYuri PankovCurrently ignored.
545*260e9a87SYuri Pankov.Ss \&char
546*260e9a87SYuri PankovDefine a new glyph.
547*260e9a87SYuri PankovCurrently unsupported.
548*260e9a87SYuri Pankov.Ss \&chop
549*260e9a87SYuri PankovRemove the last character from a macro, string, or diversion.
550*260e9a87SYuri PankovCurrently unsupported.
551*260e9a87SYuri Pankov.Ss \&class
552*260e9a87SYuri PankovDefine a character class.
553*260e9a87SYuri PankovThis is a groff extension and currently ignored.
554*260e9a87SYuri Pankov.Ss \&close
555*260e9a87SYuri PankovClose an open file.
556*260e9a87SYuri PankovIgnored because insecure.
557*260e9a87SYuri Pankov.Ss \&CL
558*260e9a87SYuri PankovPrint text in color.
559*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
560*260e9a87SYuri Pankov.Ss \&color
561*260e9a87SYuri PankovActivate or deactivate colors.
562*260e9a87SYuri PankovThis is a groff extension and currently ignored.
563*260e9a87SYuri Pankov.Ss \&composite
564*260e9a87SYuri PankovDefine a name component for composite glyph names.
565*260e9a87SYuri PankovThis is a groff extension and currently unsupported.
566*260e9a87SYuri Pankov.Ss \&continue
567*260e9a87SYuri PankovImmediately start the next iteration of a
568*260e9a87SYuri Pankov.Sx \&while
569*260e9a87SYuri Pankovloop.
570*260e9a87SYuri PankovCurrently unsupported.
571*260e9a87SYuri Pankov.Ss \&cp
572*260e9a87SYuri PankovSwitch
573*260e9a87SYuri Pankov.Nm
574*260e9a87SYuri Pankovcompatibility mode on or off.
575*260e9a87SYuri PankovCurrently ignored.
576*260e9a87SYuri Pankov.Ss \&cropat
577*260e9a87SYuri PankovSet the CropBox page parameter for PDF generation.
578*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
579*260e9a87SYuri Pankov.Ss \&cs
580*260e9a87SYuri PankovConstant character spacing mode.
581*260e9a87SYuri PankovCurrently ignored.
582*260e9a87SYuri Pankov.Ss \&cu
583*260e9a87SYuri PankovUnderline including whitespace.
584*260e9a87SYuri PankovCurrently ignored.
585*260e9a87SYuri Pankov.Ss \&da
586*260e9a87SYuri PankovAppend to a diversion.
587*260e9a87SYuri PankovCurrently unsupported.
588*260e9a87SYuri Pankov.Ss \&dch
589*260e9a87SYuri PankovChange a trap location in the current diversion.
590*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
59195c635efSGarrett D'Amore.Ss \&de
59295c635efSGarrett D'AmoreDefine a
59395c635efSGarrett D'Amore.Nm
59495c635efSGarrett D'Amoremacro.
59595c635efSGarrett D'AmoreIts syntax can be either
59695c635efSGarrett D'Amore.Bd -literal -offset indent
59795c635efSGarrett D'Amore.Pf . Cm \&de Ar name
59895c635efSGarrett D'Amore.Ar macro definition
59995c635efSGarrett D'Amore\&..
60095c635efSGarrett D'Amore.Ed
60195c635efSGarrett D'Amore.Pp
60295c635efSGarrett D'Amoreor
60395c635efSGarrett D'Amore.Bd -literal -offset indent
60495c635efSGarrett D'Amore.Pf . Cm \&de Ar name Ar end
60595c635efSGarrett D'Amore.Ar macro definition
60695c635efSGarrett D'Amore.Pf . Ar end
60795c635efSGarrett D'Amore.Ed
60895c635efSGarrett D'Amore.Pp
60995c635efSGarrett D'AmoreBoth forms define or redefine the macro
61095c635efSGarrett D'Amore.Ar name
61195c635efSGarrett D'Amoreto represent the
61295c635efSGarrett D'Amore.Ar macro definition ,
61395c635efSGarrett D'Amorewhich may consist of one or more input lines, including the newline
61495c635efSGarrett D'Amorecharacters terminating each line, optionally containing calls to
61595c635efSGarrett D'Amore.Nm
61695c635efSGarrett D'Amorerequests,
61795c635efSGarrett D'Amore.Nm
61895c635efSGarrett D'Amoremacros or high-level macros like
61995c635efSGarrett D'Amore.Xr man 5
62095c635efSGarrett D'Amoreor
62195c635efSGarrett D'Amore.Xr mdoc 5
62295c635efSGarrett D'Amoremacros, whichever applies to the document in question.
62395c635efSGarrett D'Amore.Pp
62495c635efSGarrett D'AmoreSpecifying a custom
62595c635efSGarrett D'Amore.Ar end
62695c635efSGarrett D'Amoremacro works in the same way as for
62795c635efSGarrett D'Amore.Sx \&ig ;
62895c635efSGarrett D'Amorenamely, the call to
62995c635efSGarrett D'Amore.Sq Pf . Ar end
63095c635efSGarrett D'Amorefirst ends the
63195c635efSGarrett D'Amore.Ar macro definition ,
63295c635efSGarrett D'Amoreand after that, it is also evaluated as a
63395c635efSGarrett D'Amore.Nm
63495c635efSGarrett D'Amorerequest or
63595c635efSGarrett D'Amore.Nm
63695c635efSGarrett D'Amoremacro, but not as a high-level macro.
63795c635efSGarrett D'Amore.Pp
63895c635efSGarrett D'AmoreThe macro can be invoked later using the syntax
63995c635efSGarrett D'Amore.Pp
64095c635efSGarrett D'Amore.D1 Pf . Ar name Op Ar argument Op Ar argument ...
64195c635efSGarrett D'Amore.Pp
64295c635efSGarrett D'AmoreRegarding argument parsing, see
64395c635efSGarrett D'Amore.Sx MACRO SYNTAX
64495c635efSGarrett D'Amoreabove.
64595c635efSGarrett D'Amore.Pp
64695c635efSGarrett D'AmoreThe line invoking the macro will be replaced
64795c635efSGarrett D'Amorein the input stream by the
64895c635efSGarrett D'Amore.Ar macro definition ,
64995c635efSGarrett D'Amorereplacing all occurrences of
65095c635efSGarrett D'Amore.No \e\e$ Ns Ar N ,
65195c635efSGarrett D'Amorewhere
65295c635efSGarrett D'Amore.Ar N
65395c635efSGarrett D'Amoreis a digit, by the
65495c635efSGarrett D'Amore.Ar N Ns th Ar argument .
65595c635efSGarrett D'AmoreFor example,
65695c635efSGarrett D'Amore.Bd -literal -offset indent
65795c635efSGarrett D'Amore\&.de ZN
65895c635efSGarrett D'Amore\efI\e^\e\e$1\e^\efP\e\e$2
65995c635efSGarrett D'Amore\&..
66095c635efSGarrett D'Amore\&.ZN XtFree .
66195c635efSGarrett D'Amore.Ed
66295c635efSGarrett D'Amore.Pp
66395c635efSGarrett D'Amoreproduces
66495c635efSGarrett D'Amore.Pp
66595c635efSGarrett D'Amore.D1 \efI\e^XtFree\e^\efP.
66695c635efSGarrett D'Amore.Pp
66795c635efSGarrett D'Amorein the input stream, and thus in the output: \fI\^XtFree\^\fP.
66895c635efSGarrett D'Amore.Pp
66995c635efSGarrett D'AmoreSince macros and user-defined strings share a common string table,
67095c635efSGarrett D'Amoredefining a macro
67195c635efSGarrett D'Amore.Ar name
67295c635efSGarrett D'Amoreclobbers the user-defined string
67395c635efSGarrett D'Amore.Ar name ,
67495c635efSGarrett D'Amoreand the
67595c635efSGarrett D'Amore.Ar macro definition
67695c635efSGarrett D'Amorecan also be printed using the
67795c635efSGarrett D'Amore.Sq \e*
67895c635efSGarrett D'Amorestring interpolation syntax described below
67995c635efSGarrett D'Amore.Sx ds ,
68095c635efSGarrett D'Amorebut this is rarely useful because every macro definition contains at least
68195c635efSGarrett D'Amoreone explicit newline character.
68295c635efSGarrett D'Amore.Pp
68395c635efSGarrett D'AmoreIn order to prevent endless recursion, both groff and
68495c635efSGarrett D'Amore.Xr mandoc 1
68595c635efSGarrett D'Amorelimit the stack depth for expanding macros and strings
686*260e9a87SYuri Pankovto a large, but finite number, and
687*260e9a87SYuri Pankov.Xr mandoc 1
688*260e9a87SYuri Pankovalso limits the length of the expanded input line.
689*260e9a87SYuri PankovDo not rely on the exact values of these limits.
69095c635efSGarrett D'Amore.Ss \&de1
69195c635efSGarrett D'AmoreDefine a
69295c635efSGarrett D'Amore.Nm
69395c635efSGarrett D'Amoremacro that will be executed with
69495c635efSGarrett D'Amore.Nm
69595c635efSGarrett D'Amorecompatibility mode switched off during macro execution.
696*260e9a87SYuri PankovThis is a groff extension.
69795c635efSGarrett D'AmoreSince
69895c635efSGarrett D'Amore.Xr mandoc 1
69995c635efSGarrett D'Amoredoes not implement
70095c635efSGarrett D'Amore.Nm
70195c635efSGarrett D'Amorecompatibility mode at all, it handles this request as an alias for
70295c635efSGarrett D'Amore.Sx \&de .
703*260e9a87SYuri Pankov.Ss \&defcolor
704*260e9a87SYuri PankovDefine a color name.
705*260e9a87SYuri PankovThis is a groff extension and currently ignored.
706*260e9a87SYuri Pankov.Ss \&dei
707*260e9a87SYuri PankovDefine a
708*260e9a87SYuri Pankov.Nm
709*260e9a87SYuri Pankovmacro, specifying the macro name indirectly (groff extension).
710*260e9a87SYuri PankovThe syntax of this request is the same as that of
711*260e9a87SYuri Pankov.Sx \&de .
712*260e9a87SYuri PankovThe request
713*260e9a87SYuri Pankov.Pp
714*260e9a87SYuri Pankov.D1 Pf . Cm \&dei Ar name Op Ar end
715*260e9a87SYuri Pankov.Pp
716*260e9a87SYuri Pankovhas the same effect as:
717*260e9a87SYuri Pankov.Pp
718*260e9a87SYuri Pankov.D1 Pf . Cm \&de No \e* Ns Bo Ar name Bc Op \e* Ns Bq Ar end
719*260e9a87SYuri Pankov.Ss \&dei1
720*260e9a87SYuri PankovDefine a
721*260e9a87SYuri Pankov.Nm
722*260e9a87SYuri Pankovmacro that will be executed with
723*260e9a87SYuri Pankov.Nm
724*260e9a87SYuri Pankovcompatibility mode switched off during macro execution,
725*260e9a87SYuri Pankovspecifying the macro name indirectly (groff extension).
726*260e9a87SYuri PankovSince
727*260e9a87SYuri Pankov.Xr mandoc 1
728*260e9a87SYuri Pankovdoes not implement
729*260e9a87SYuri Pankov.Nm
730*260e9a87SYuri Pankovcompatibility mode at all, it handles this request as an alias for
731*260e9a87SYuri Pankov.Sx \&dei .
732*260e9a87SYuri Pankov.Ss \&device
733*260e9a87SYuri PankovThis request only makes sense with the groff-specific intermediate
734*260e9a87SYuri Pankovoutput format and is unsupported.
735*260e9a87SYuri Pankov.Ss \&devicem
736*260e9a87SYuri PankovThis request only makes sense with the groff-specific intermediate
737*260e9a87SYuri Pankovoutput format and is unsupported.
738*260e9a87SYuri Pankov.Ss \&di
739*260e9a87SYuri PankovBegin a diversion.
740*260e9a87SYuri PankovCurrently unsupported.
741*260e9a87SYuri Pankov.Ss \&do
742*260e9a87SYuri PankovExecute
743*260e9a87SYuri Pankov.Nm
744*260e9a87SYuri Pankovrequest or macro line with compatibility mode disabled.
745*260e9a87SYuri PankovCurrently unsupported.
74695c635efSGarrett D'Amore.Ss \&ds
74795c635efSGarrett D'AmoreDefine a user-defined string.
74895c635efSGarrett D'AmoreIts syntax is as follows:
74995c635efSGarrett D'Amore.Pp
75095c635efSGarrett D'Amore.D1 Pf . Cm \&ds Ar name Oo \(dq Oc Ns Ar string
75195c635efSGarrett D'Amore.Pp
75295c635efSGarrett D'AmoreThe
75395c635efSGarrett D'Amore.Ar name
75495c635efSGarrett D'Amoreand
75595c635efSGarrett D'Amore.Ar string
75695c635efSGarrett D'Amorearguments are space-separated.
75795c635efSGarrett D'AmoreIf the
75895c635efSGarrett D'Amore.Ar string
75995c635efSGarrett D'Amorebegins with a double-quote character, that character will not be part
76095c635efSGarrett D'Amoreof the string.
76195c635efSGarrett D'AmoreAll remaining characters on the input line form the
76295c635efSGarrett D'Amore.Ar string ,
76395c635efSGarrett D'Amoreincluding whitespace and double-quote characters, even trailing ones.
76495c635efSGarrett D'Amore.Pp
76595c635efSGarrett D'AmoreThe
76695c635efSGarrett D'Amore.Ar string
76795c635efSGarrett D'Amorecan be interpolated into subsequent text by using
76895c635efSGarrett D'Amore.No \e* Ns Bq Ar name
76995c635efSGarrett D'Amorefor a
77095c635efSGarrett D'Amore.Ar name
77195c635efSGarrett D'Amoreof arbitrary length, or \e*(NN or \e*N if the length of
77295c635efSGarrett D'Amore.Ar name
77395c635efSGarrett D'Amoreis two or one characters, respectively.
77495c635efSGarrett D'AmoreInterpolation can be prevented by escaping the leading backslash;
77595c635efSGarrett D'Amorethat is, an asterisk preceded by an even number of backslashes
77695c635efSGarrett D'Amoredoes not trigger string interpolation.
77795c635efSGarrett D'Amore.Pp
77895c635efSGarrett D'AmoreSince user-defined strings and macros share a common string table,
77995c635efSGarrett D'Amoredefining a string
78095c635efSGarrett D'Amore.Ar name
78195c635efSGarrett D'Amoreclobbers the macro
78295c635efSGarrett D'Amore.Ar name ,
78395c635efSGarrett D'Amoreand the
78495c635efSGarrett D'Amore.Ar name
78595c635efSGarrett D'Amoreused for defining a string can also be invoked as a macro,
78695c635efSGarrett D'Amorein which case the following input line will be appended to the
78795c635efSGarrett D'Amore.Ar string ,
78895c635efSGarrett D'Amoreforming a new input line passed to the
78995c635efSGarrett D'Amore.Nm
79095c635efSGarrett D'Amoreparser.
79195c635efSGarrett D'AmoreFor example,
79295c635efSGarrett D'Amore.Bd -literal -offset indent
79395c635efSGarrett D'Amore\&.ds badidea .S
79495c635efSGarrett D'Amore\&.badidea
79595c635efSGarrett D'AmoreH SYNOPSIS
79695c635efSGarrett D'Amore.Ed
79795c635efSGarrett D'Amore.Pp
79895c635efSGarrett D'Amoreinvokes the
79995c635efSGarrett D'Amore.Cm SH
80095c635efSGarrett D'Amoremacro when used in a
80195c635efSGarrett D'Amore.Xr man 5
80295c635efSGarrett D'Amoredocument.
80395c635efSGarrett D'AmoreSuch abuse is of course strongly discouraged.
804*260e9a87SYuri Pankov.Ss \&ds1
805*260e9a87SYuri PankovDefine a user-defined string that will be expanded with
806*260e9a87SYuri Pankov.Nm
807*260e9a87SYuri Pankovcompatibility mode switched off during string expansion.
808*260e9a87SYuri PankovThis is a groff extension.
809*260e9a87SYuri PankovSince
810*260e9a87SYuri Pankov.Xr mandoc 1
811*260e9a87SYuri Pankovdoes not implement
812*260e9a87SYuri Pankov.Nm
813*260e9a87SYuri Pankovcompatibility mode at all, it handles this request as an alias for
814*260e9a87SYuri Pankov.Sx \&ds .
815*260e9a87SYuri Pankov.Ss \&dwh
816*260e9a87SYuri PankovSet a location trap in the current diversion.
817*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
818*260e9a87SYuri Pankov.Ss \&dt
819*260e9a87SYuri PankovSet a trap within a diversion.
820*260e9a87SYuri PankovCurrently unsupported.
821*260e9a87SYuri Pankov.Ss \&ec
822*260e9a87SYuri PankovChange the escape character.
823*260e9a87SYuri PankovCurrently unsupported.
824*260e9a87SYuri Pankov.Ss \&ecs
825*260e9a87SYuri PankovRestore the escape character.
826*260e9a87SYuri PankovCurrently unsupported.
827*260e9a87SYuri Pankov.Ss \&ecr
828*260e9a87SYuri PankovSave the escape character.
829*260e9a87SYuri PankovCurrently unsupported.
83095c635efSGarrett D'Amore.Ss \&el
83195c635efSGarrett D'AmoreThe
83295c635efSGarrett D'Amore.Qq else
83395c635efSGarrett D'Amorehalf of an if/else conditional.
83495c635efSGarrett D'AmorePops a result off the stack of conditional evaluations pushed by
83595c635efSGarrett D'Amore.Sx \&ie
83695c635efSGarrett D'Amoreand uses it as its conditional.
83795c635efSGarrett D'AmoreIf no stack entries are present (e.g., due to no prior
83895c635efSGarrett D'Amore.Sx \&ie
83995c635efSGarrett D'Amorecalls)
84095c635efSGarrett D'Amorethen false is assumed.
84195c635efSGarrett D'AmoreThe syntax of this request is similar to
84295c635efSGarrett D'Amore.Sx \&if
84395c635efSGarrett D'Amoreexcept that the conditional is missing.
844*260e9a87SYuri Pankov.Ss \&em
845*260e9a87SYuri PankovSet a trap at the end of input.
846*260e9a87SYuri PankovCurrently unsupported.
84795c635efSGarrett D'Amore.Ss \&EN
84895c635efSGarrett D'AmoreEnd an equation block.
84995c635efSGarrett D'AmoreSee
85095c635efSGarrett D'Amore.Sx \&EQ .
851*260e9a87SYuri Pankov.Ss \&eo
852*260e9a87SYuri PankovDisable the escape mechanism completely.
853*260e9a87SYuri PankovCurrently unsupported.
854*260e9a87SYuri Pankov.Ss \&EP
855*260e9a87SYuri PankovEnd a picture started by
856*260e9a87SYuri Pankov.Sx \&BP .
857*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
85895c635efSGarrett D'Amore.Ss \&EQ
85995c635efSGarrett D'AmoreBegin an equation block.
86095c635efSGarrett D'AmoreSee
86195c635efSGarrett D'Amore.Xr eqn 5
86295c635efSGarrett D'Amorefor a description of the equation language.
863*260e9a87SYuri Pankov.Ss \&errprint
864*260e9a87SYuri PankovPrint a string like an error message.
865*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
866*260e9a87SYuri Pankov.Ss \&ev
867*260e9a87SYuri PankovSwitch to another environment.
868*260e9a87SYuri PankovCurrently unsupported.
869*260e9a87SYuri Pankov.Ss \&evc
870*260e9a87SYuri PankovCopy an environment into the current environment.
871*260e9a87SYuri PankovCurrently unsupported.
872*260e9a87SYuri Pankov.Ss \&ex
873*260e9a87SYuri PankovAbort processing and exit.
874*260e9a87SYuri PankovCurrently unsupported.
875*260e9a87SYuri Pankov.Ss \&fallback
876*260e9a87SYuri PankovSelect the fallback sequence for a font.
877*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
878*260e9a87SYuri Pankov.Ss \&fam
879*260e9a87SYuri PankovChange the font family.
880*260e9a87SYuri PankovTakes one argument specifying the font family to be selected.
881*260e9a87SYuri PankovIt is a groff extension and currently ignored.
882*260e9a87SYuri Pankov.Ss \&fc
883*260e9a87SYuri PankovDefine a delimiting and a padding character for fields.
884*260e9a87SYuri PankovCurrently unsupported.
885*260e9a87SYuri Pankov.Ss \&fchar
886*260e9a87SYuri PankovDefine a fallback glyph.
887*260e9a87SYuri PankovCurrently unsupported.
888*260e9a87SYuri Pankov.Ss \&fcolor
889*260e9a87SYuri PankovSet the fill color for \eD objects.
890*260e9a87SYuri PankovThis is a groff extension and currently ignored.
891*260e9a87SYuri Pankov.Ss \&fdeferlig
892*260e9a87SYuri PankovDefer ligature building.
893*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
894*260e9a87SYuri Pankov.Ss \&feature
895*260e9a87SYuri PankovEnable or disable an OpenType feature.
896*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
897*260e9a87SYuri Pankov.Ss \&fi
898*260e9a87SYuri PankovSwitch to fill mode.
899*260e9a87SYuri PankovSee
900*260e9a87SYuri Pankov.Xr man 5 .
901*260e9a87SYuri PankovIgnored in
902*260e9a87SYuri Pankov.Xr mdoc 5 .
903*260e9a87SYuri Pankov.Ss \&fkern
904*260e9a87SYuri PankovControl the use of kerning tables for a font.
905*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
906*260e9a87SYuri Pankov.Ss \&fl
907*260e9a87SYuri PankovFlush output.
908*260e9a87SYuri PankovCurrently ignored.
909*260e9a87SYuri Pankov.Ss \&flig
910*260e9a87SYuri PankovDefine ligatures.
911*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
912*260e9a87SYuri Pankov.Ss \&fp
913*260e9a87SYuri PankovAssign font position.
914*260e9a87SYuri PankovCurrently ignored.
915*260e9a87SYuri Pankov.Ss \&fps
916*260e9a87SYuri PankovMount a font with a special character map.
917*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
918*260e9a87SYuri Pankov.Ss \&fschar
919*260e9a87SYuri PankovDefine a font-specific fallback glyph.
920*260e9a87SYuri PankovThis is a groff extension and currently unsupported.
921*260e9a87SYuri Pankov.Ss \&fspacewidth
922*260e9a87SYuri PankovSet a font-specific width for the space character.
923*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
924*260e9a87SYuri Pankov.Ss \&fspecial
925*260e9a87SYuri PankovConditionally define a special font.
926*260e9a87SYuri PankovThis is a groff extension and currently ignored.
927*260e9a87SYuri Pankov.Ss \&ft
928*260e9a87SYuri PankovChange the font.
929*260e9a87SYuri PankovIts syntax is as follows:
930*260e9a87SYuri Pankov.Pp
931*260e9a87SYuri Pankov.D1 Pf . Cm \&ft Op Ar font
932*260e9a87SYuri Pankov.Pp
933*260e9a87SYuri PankovThe following
934*260e9a87SYuri Pankov.Ar font
935*260e9a87SYuri Pankovarguments are supported:
936*260e9a87SYuri Pankov.Bl -tag -width 4n -offset indent
937*260e9a87SYuri Pankov.It Cm B , BI , 3 , 4
938*260e9a87SYuri Pankovswitches to
939*260e9a87SYuri Pankov.Sy bold
940*260e9a87SYuri Pankovfont
941*260e9a87SYuri Pankov.It Cm I , 2
942*260e9a87SYuri Pankovswitches to
943*260e9a87SYuri Pankov.Em underlined
944*260e9a87SYuri Pankovfont
945*260e9a87SYuri Pankov.It Cm R , CW , 1
946*260e9a87SYuri Pankovswitches to normal font
947*260e9a87SYuri Pankov.It Cm P No "or no argument"
948*260e9a87SYuri Pankovswitches back to the previous font
949*260e9a87SYuri Pankov.El
950*260e9a87SYuri Pankov.Pp
951*260e9a87SYuri PankovThis request takes effect only locally, may be overridden by macros
952*260e9a87SYuri Pankovand escape sequences, and is only supported in
953*260e9a87SYuri Pankov.Xr man 5
954*260e9a87SYuri Pankovfor now.
955*260e9a87SYuri Pankov.Ss \&ftr
956*260e9a87SYuri PankovTranslate font name.
957*260e9a87SYuri PankovThis is a groff extension and currently ignored.
958*260e9a87SYuri Pankov.Ss \&fzoom
959*260e9a87SYuri PankovZoom font size.
960*260e9a87SYuri PankovCurrently ignored.
961*260e9a87SYuri Pankov.Ss \&gcolor
962*260e9a87SYuri PankovSet glyph color.
963*260e9a87SYuri PankovThis is a groff extension and currently ignored.
964*260e9a87SYuri Pankov.Ss \&hc
965*260e9a87SYuri PankovSet the hyphenation character.
966*260e9a87SYuri PankovCurrently ignored.
967*260e9a87SYuri Pankov.Ss \&hcode
968*260e9a87SYuri PankovSet hyphenation codes of characters.
969*260e9a87SYuri PankovCurrently ignored.
970*260e9a87SYuri Pankov.Ss \&hidechar
971*260e9a87SYuri PankovHide characters in a font.
972*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
973*260e9a87SYuri Pankov.Ss \&hla
974*260e9a87SYuri PankovSet hyphenation language.
975*260e9a87SYuri PankovThis is a groff extension and currently ignored.
976*260e9a87SYuri Pankov.Ss \&hlm
977*260e9a87SYuri PankovSet maximum number of consecutive hyphenated lines.
978*260e9a87SYuri PankovCurrently ignored.
979*260e9a87SYuri Pankov.Ss \&hpf
980*260e9a87SYuri PankovLoad hyphenation pattern file.
981*260e9a87SYuri PankovThis is a groff extension and currently ignored.
982*260e9a87SYuri Pankov.Ss \&hpfa
983*260e9a87SYuri PankovLoad hyphenation pattern file, appending to the current patterns.
984*260e9a87SYuri PankovThis is a groff extension and currently ignored.
985*260e9a87SYuri Pankov.Ss \&hpfcode
986*260e9a87SYuri PankovDefine mapping values for character codes in hyphenation patterns.
987*260e9a87SYuri PankovThis is a groff extension and currently ignored.
988*260e9a87SYuri Pankov.Ss \&hw
989*260e9a87SYuri PankovSpecify hyphenation points in words.
990*260e9a87SYuri PankovCurrently ignored.
99195c635efSGarrett D'Amore.Ss \&hy
99295c635efSGarrett D'AmoreSet automatic hyphenation mode.
993*260e9a87SYuri PankovCurrently ignored.
994*260e9a87SYuri Pankov.Ss \&hylang
995*260e9a87SYuri PankovSet hyphenation language.
996*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
997*260e9a87SYuri Pankov.Ss \&hylen
998*260e9a87SYuri PankovMinimum word length for hyphenation.
999*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1000*260e9a87SYuri Pankov.Ss \&hym
1001*260e9a87SYuri PankovSet hyphenation margin.
1002*260e9a87SYuri PankovThis is a groff extension and currently ignored.
1003*260e9a87SYuri Pankov.Ss \&hypp
1004*260e9a87SYuri PankovDefine hyphenation penalties.
1005*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1006*260e9a87SYuri Pankov.Ss \&hys
1007*260e9a87SYuri PankovSet hyphenation space.
1008*260e9a87SYuri PankovThis is a groff extension and currently ignored.
100995c635efSGarrett D'Amore.Ss \&ie
101095c635efSGarrett D'AmoreThe
101195c635efSGarrett D'Amore.Qq if
101295c635efSGarrett D'Amorehalf of an if/else conditional.
101395c635efSGarrett D'AmoreThe result of the conditional is pushed into a stack used by subsequent
101495c635efSGarrett D'Amoreinvocations of
101595c635efSGarrett D'Amore.Sx \&el ,
101695c635efSGarrett D'Amorewhich may be separated by any intervening input (or not exist at all).
101795c635efSGarrett D'AmoreIts syntax is equivalent to
101895c635efSGarrett D'Amore.Sx \&if .
101995c635efSGarrett D'Amore.Ss \&if
102095c635efSGarrett D'AmoreBegins a conditional.
1021*260e9a87SYuri PankovThis request has the following syntax:
1022*260e9a87SYuri Pankov.Bd -literal -offset indent
1023*260e9a87SYuri Pankov\&.if COND BODY
1024*260e9a87SYuri Pankov.Ed
1025*260e9a87SYuri Pankov.Bd -literal -offset indent
1026*260e9a87SYuri Pankov\&.if COND \e{BODY
1027*260e9a87SYuri PankovBODY...\e}
1028*260e9a87SYuri Pankov.Ed
1029*260e9a87SYuri Pankov.Bd -literal -offset indent
1030*260e9a87SYuri Pankov\&.if COND \e{\e
1031*260e9a87SYuri PankovBODY...
1032*260e9a87SYuri Pankov\&.\e}
1033*260e9a87SYuri Pankov.Ed
1034*260e9a87SYuri Pankov.Pp
1035*260e9a87SYuri PankovCOND is a conditional statement.
1036*260e9a87SYuri PankovCurrently,
1037*260e9a87SYuri Pankov.Xr mandoc 1
1038*260e9a87SYuri Pankovsupports the following subset of roff conditionals:
1039*260e9a87SYuri Pankov.Bl -bullet
1040*260e9a87SYuri Pankov.It
1041*260e9a87SYuri PankovIf
1042*260e9a87SYuri Pankov.Sq \&!
1043*260e9a87SYuri Pankovis prefixed to COND, the condition is logically inverted.
1044*260e9a87SYuri Pankov.It
1045*260e9a87SYuri PankovIf the first character of COND is
1046*260e9a87SYuri Pankov.Sq n
1047*260e9a87SYuri Pankov.Pq nroff mode
1048*260e9a87SYuri Pankovor
1049*260e9a87SYuri Pankov.Sq o
1050*260e9a87SYuri Pankov.Pq odd page ,
1051*260e9a87SYuri PankovCOND evaluates to true.
1052*260e9a87SYuri Pankov.It
1053*260e9a87SYuri PankovIf the first character of COND is
1054*260e9a87SYuri Pankov.Sq c
1055*260e9a87SYuri Pankov.Pq character available ,
1056*260e9a87SYuri Pankov.Sq d
1057*260e9a87SYuri Pankov.Pq string defined ,
1058*260e9a87SYuri Pankov.Sq e
1059*260e9a87SYuri Pankov.Pq even page ,
1060*260e9a87SYuri Pankov.Sq r
1061*260e9a87SYuri Pankov.Pq register accessed ,
1062*260e9a87SYuri Pankov.Sq t
1063*260e9a87SYuri Pankov.Pq troff mode ,
1064*260e9a87SYuri Pankovor
1065*260e9a87SYuri Pankov.Sq v
1066*260e9a87SYuri Pankov.Pq vroff mode ,
1067*260e9a87SYuri PankovCOND evaluates to false.
1068*260e9a87SYuri Pankov.It
1069*260e9a87SYuri PankovIf COND starts with a parenthesis or with an optionally signed
1070*260e9a87SYuri Pankovinteger number, it is evaluated according to the rules of
1071*260e9a87SYuri Pankov.Sx Numerical expressions
1072*260e9a87SYuri Pankovexplained below.
1073*260e9a87SYuri PankovIt evaluates to true if the result is positive,
1074*260e9a87SYuri Pankovor to false if the result is zero or negative.
1075*260e9a87SYuri Pankov.It
1076*260e9a87SYuri PankovOtherwise, the first character of COND is regarded as a delimiter
1077*260e9a87SYuri Pankovand COND evaluates to true if the string extending from its first
1078*260e9a87SYuri Pankovto its second occurrence is equal to the string extending from its
1079*260e9a87SYuri Pankovsecond to its third occurrence.
1080*260e9a87SYuri Pankov.It
1081*260e9a87SYuri PankovIf COND cannot be parsed, it evaluates to false.
1082*260e9a87SYuri Pankov.El
1083*260e9a87SYuri Pankov.Pp
108495c635efSGarrett D'AmoreIf a conditional is false, its children are not processed, but are
108595c635efSGarrett D'Amoresyntactically interpreted to preserve the integrity of the input
108695c635efSGarrett D'Amoredocument.
108795c635efSGarrett D'AmoreThus,
108895c635efSGarrett D'Amore.Pp
108995c635efSGarrett D'Amore.D1 \&.if t .ig
109095c635efSGarrett D'Amore.Pp
109195c635efSGarrett D'Amorewill discard the
109295c635efSGarrett D'Amore.Sq \&.ig ,
109395c635efSGarrett D'Amorewhich may lead to interesting results, but
109495c635efSGarrett D'Amore.Pp
109595c635efSGarrett D'Amore.D1 \&.if t .if t \e{\e
109695c635efSGarrett D'Amore.Pp
109795c635efSGarrett D'Amorewill continue to syntactically interpret to the block close of the final
109895c635efSGarrett D'Amoreconditional.
109995c635efSGarrett D'AmoreSub-conditionals, in this case, obviously inherit the truth value of
110095c635efSGarrett D'Amorethe parent.
110195c635efSGarrett D'Amore.Pp
110295c635efSGarrett D'AmoreIf the BODY section is begun by an escaped brace
110395c635efSGarrett D'Amore.Sq \e{ ,
1104*260e9a87SYuri Pankovscope continues until the end of the input line containing the
1105*260e9a87SYuri Pankovmatching closing-brace escape sequence
1106*260e9a87SYuri Pankov.Sq \e} .
110795c635efSGarrett D'AmoreIf the BODY is not enclosed in braces, scope continues until
110895c635efSGarrett D'Amorethe end of the line.
110995c635efSGarrett D'AmoreIf the COND is followed by a BODY on the same line, whether after a
111095c635efSGarrett D'Amorebrace or not, then requests and macros
111195c635efSGarrett D'Amore.Em must
111295c635efSGarrett D'Amorebegin with a control character.
111395c635efSGarrett D'AmoreIt is generally more intuitive, in this case, to write
111495c635efSGarrett D'Amore.Bd -literal -offset indent
111595c635efSGarrett D'Amore\&.if COND \e{\e
111695c635efSGarrett D'Amore\&.foo
111795c635efSGarrett D'Amorebar
111895c635efSGarrett D'Amore\&.\e}
111995c635efSGarrett D'Amore.Ed
112095c635efSGarrett D'Amore.Pp
112195c635efSGarrett D'Amorethan having the request or macro follow as
112295c635efSGarrett D'Amore.Pp
112395c635efSGarrett D'Amore.D1 \&.if COND \e{ .foo
112495c635efSGarrett D'Amore.Pp
112595c635efSGarrett D'AmoreThe scope of a conditional is always parsed, but only executed if the
112695c635efSGarrett D'Amoreconditional evaluates to true.
112795c635efSGarrett D'Amore.Pp
112895c635efSGarrett D'AmoreNote that the
112995c635efSGarrett D'Amore.Sq \e}
113095c635efSGarrett D'Amoreis converted into a zero-width escape sequence if not passed as a
113195c635efSGarrett D'Amorestandalone macro
113295c635efSGarrett D'Amore.Sq \&.\e} .
113395c635efSGarrett D'AmoreFor example,
113495c635efSGarrett D'Amore.Pp
113595c635efSGarrett D'Amore.D1 \&.Fl a \e} b
113695c635efSGarrett D'Amore.Pp
113795c635efSGarrett D'Amorewill result in
113895c635efSGarrett D'Amore.Sq \e}
113995c635efSGarrett D'Amorebeing considered an argument of the
114095c635efSGarrett D'Amore.Sq \&Fl
114195c635efSGarrett D'Amoremacro.
114295c635efSGarrett D'Amore.Ss \&ig
114395c635efSGarrett D'AmoreIgnore input.
114495c635efSGarrett D'AmoreIts syntax can be either
114595c635efSGarrett D'Amore.Bd -literal -offset indent
114695c635efSGarrett D'Amore.Pf . Cm \&ig
114795c635efSGarrett D'Amore.Ar ignored text
114895c635efSGarrett D'Amore\&..
114995c635efSGarrett D'Amore.Ed
115095c635efSGarrett D'Amore.Pp
115195c635efSGarrett D'Amoreor
115295c635efSGarrett D'Amore.Bd -literal -offset indent
115395c635efSGarrett D'Amore.Pf . Cm \&ig Ar end
115495c635efSGarrett D'Amore.Ar ignored text
115595c635efSGarrett D'Amore.Pf . Ar end
115695c635efSGarrett D'Amore.Ed
115795c635efSGarrett D'Amore.Pp
115895c635efSGarrett D'AmoreIn the first case, input is ignored until a
115995c635efSGarrett D'Amore.Sq \&..
116095c635efSGarrett D'Amorerequest is encountered on its own line.
116195c635efSGarrett D'AmoreIn the second case, input is ignored until the specified
116295c635efSGarrett D'Amore.Sq Pf . Ar end
116395c635efSGarrett D'Amoremacro is encountered.
116495c635efSGarrett D'AmoreDo not use the escape character
116595c635efSGarrett D'Amore.Sq \e
116695c635efSGarrett D'Amoreanywhere in the definition of
116795c635efSGarrett D'Amore.Ar end ;
116895c635efSGarrett D'Amoreit would cause very strange behaviour.
116995c635efSGarrett D'Amore.Pp
117095c635efSGarrett D'AmoreWhen the
117195c635efSGarrett D'Amore.Ar end
117295c635efSGarrett D'Amoremacro is a roff request or a roff macro, like in
117395c635efSGarrett D'Amore.Pp
117495c635efSGarrett D'Amore.D1 \&.ig if
117595c635efSGarrett D'Amore.Pp
117695c635efSGarrett D'Amorethe subsequent invocation of
117795c635efSGarrett D'Amore.Sx \&if
117895c635efSGarrett D'Amorewill first terminate the
117995c635efSGarrett D'Amore.Ar ignored text ,
118095c635efSGarrett D'Amorethen be invoked as usual.
118195c635efSGarrett D'AmoreOtherwise, it only terminates the
118295c635efSGarrett D'Amore.Ar ignored text ,
118395c635efSGarrett D'Amoreand arguments following it or the
118495c635efSGarrett D'Amore.Sq \&..
118595c635efSGarrett D'Amorerequest are discarded.
1186*260e9a87SYuri Pankov.Ss \&in
1187*260e9a87SYuri PankovChange indentation.
1188*260e9a87SYuri PankovSee
1189*260e9a87SYuri Pankov.Xr man 5 .
1190*260e9a87SYuri PankovIgnored in
1191*260e9a87SYuri Pankov.Xr mdoc 5 .
1192*260e9a87SYuri Pankov.Ss \&index
1193*260e9a87SYuri PankovFind a substring in a string.
1194*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
1195*260e9a87SYuri Pankov.Ss \&it
1196*260e9a87SYuri PankovSet an input line trap.
1197*260e9a87SYuri PankovIts syntax is as follows:
1198*260e9a87SYuri Pankov.Pp
1199*260e9a87SYuri Pankov.D1 Pf . Cm it Ar expression macro
1200*260e9a87SYuri Pankov.Pp
1201*260e9a87SYuri PankovThe named
1202*260e9a87SYuri Pankov.Ar macro
1203*260e9a87SYuri Pankovwill be invoked after processing the number of input text lines
1204*260e9a87SYuri Pankovspecified by the numerical
1205*260e9a87SYuri Pankov.Ar expression .
1206*260e9a87SYuri PankovWhile evaluating the
1207*260e9a87SYuri Pankov.Ar expression ,
1208*260e9a87SYuri Pankovthe unit suffixes described below
1209*260e9a87SYuri Pankov.Sx Scaling Widths
1210*260e9a87SYuri Pankovare ignored.
1211*260e9a87SYuri Pankov.Ss \&itc
1212*260e9a87SYuri PankovSet an input line trap, not counting lines ending with \ec.
1213*260e9a87SYuri PankovCurrently unsupported.
1214*260e9a87SYuri Pankov.Ss \&IX
1215*260e9a87SYuri PankovTo support the generation of a table of contents,
1216*260e9a87SYuri Pankov.Xr pod2man 1
1217*260e9a87SYuri Pankovemits this user-defined macro, usually without defining it.
1218*260e9a87SYuri PankovTo avoid reporting large numbers of spurious errors,
1219*260e9a87SYuri Pankov.Xr mandoc 1
1220*260e9a87SYuri Pankovignores it.
1221*260e9a87SYuri Pankov.Ss \&kern
1222*260e9a87SYuri PankovSwitch kerning on or off.
1223*260e9a87SYuri PankovCurrently ignored.
1224*260e9a87SYuri Pankov.Ss \&kernafter
1225*260e9a87SYuri PankovIncrease kerning after some characters.
1226*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1227*260e9a87SYuri Pankov.Ss \&kernbefore
1228*260e9a87SYuri PankovIncrease kerning before some characters.
1229*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1230*260e9a87SYuri Pankov.Ss \&kernpair
1231*260e9a87SYuri PankovAdd a kerning pair to the kerning table.
1232*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1233*260e9a87SYuri Pankov.Ss \&lc
1234*260e9a87SYuri PankovDefine a leader repetition character.
1235*260e9a87SYuri PankovCurrently unsupported.
1236*260e9a87SYuri Pankov.Ss \&lc_ctype
1237*260e9a87SYuri PankovSet the
1238*260e9a87SYuri Pankov.Dv LC_CTYPE
1239*260e9a87SYuri Pankovlocale.
1240*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
1241*260e9a87SYuri Pankov.Ss \&lds
1242*260e9a87SYuri PankovDefine a local string.
1243*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
1244*260e9a87SYuri Pankov.Ss \&length
1245*260e9a87SYuri PankovCount the number of input characters in a user-defined string.
1246*260e9a87SYuri PankovCurrently unsupported.
1247*260e9a87SYuri Pankov.Ss \&letadj
1248*260e9a87SYuri PankovDynamic letter spacing and reshaping.
1249*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1250*260e9a87SYuri Pankov.Ss \&lf
1251*260e9a87SYuri PankovChange the line number for error messages.
1252*260e9a87SYuri PankovIgnored because insecure.
1253*260e9a87SYuri Pankov.Ss \&lg
1254*260e9a87SYuri PankovSwitch the ligature mechanism on or off.
1255*260e9a87SYuri PankovCurrently ignored.
1256*260e9a87SYuri Pankov.Ss \&lhang
1257*260e9a87SYuri PankovHang characters at left margin.
1258*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1259*260e9a87SYuri Pankov.Ss \&linetabs
1260*260e9a87SYuri PankovEnable or disable line-tabs mode.
1261*260e9a87SYuri PankovThis is a groff extension and currently unsupported.
1262*260e9a87SYuri Pankov.Ss \&ll
1263*260e9a87SYuri PankovChange the output line length.
1264*260e9a87SYuri PankovIts syntax is as follows:
1265*260e9a87SYuri Pankov.Pp
1266*260e9a87SYuri Pankov.D1 Pf . Cm \&ll Op Oo +|- Oc Ns Ar width
1267*260e9a87SYuri Pankov.Pp
1268*260e9a87SYuri PankovIf the
1269*260e9a87SYuri Pankov.Ar width
1270*260e9a87SYuri Pankovargument is omitted, the line length is reset to its previous value.
1271*260e9a87SYuri PankovThe default setting for terminal output is 58n.
1272*260e9a87SYuri PankovIf a sign is given, the line length is added to or subtracted from;
1273*260e9a87SYuri Pankovotherwise, it is set to the provided value.
1274*260e9a87SYuri PankovUsing this request in new manuals is discouraged for several reasons,
1275*260e9a87SYuri Pankovamong others because it overrides the
1276*260e9a87SYuri Pankov.Xr mandoc 1
1277*260e9a87SYuri Pankov.Fl O Cm width
1278*260e9a87SYuri Pankovcommand line option.
1279*260e9a87SYuri Pankov.Ss \&lnr
1280*260e9a87SYuri PankovSet local number register.
1281*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
1282*260e9a87SYuri Pankov.Ss \&lnrf
1283*260e9a87SYuri PankovSet local floating-point register.
1284*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
1285*260e9a87SYuri Pankov.Ss \&lpfx
1286*260e9a87SYuri PankovSet a line prefix.
1287*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
1288*260e9a87SYuri Pankov.Ss \&ls
1289*260e9a87SYuri PankovSet line spacing.
1290*260e9a87SYuri PankovIt takes one integer argument specifying the vertical distance of
1291*260e9a87SYuri Pankovsubsequent output text lines measured in v units.
1292*260e9a87SYuri PankovCurrently ignored.
1293*260e9a87SYuri Pankov.Ss \&lsm
1294*260e9a87SYuri PankovSet a leading spaces trap.
1295*260e9a87SYuri PankovThis is a groff extension and currently unsupported.
1296*260e9a87SYuri Pankov.Ss \&lt
1297*260e9a87SYuri PankovSet title line length.
1298*260e9a87SYuri PankovCurrently ignored.
1299*260e9a87SYuri Pankov.Ss \&mc
1300*260e9a87SYuri PankovPrint margin character in the right margin.
1301*260e9a87SYuri PankovCurrently ignored.
1302*260e9a87SYuri Pankov.Ss \&mediasize
1303*260e9a87SYuri PankovSet the device media size.
1304*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1305*260e9a87SYuri Pankov.Ss \&minss
1306*260e9a87SYuri PankovSet minimum word space.
1307*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1308*260e9a87SYuri Pankov.Ss \&mk
1309*260e9a87SYuri PankovMark vertical position.
1310*260e9a87SYuri PankovCurrently ignored.
1311*260e9a87SYuri Pankov.Ss \&mso
1312*260e9a87SYuri PankovLoad a macro file.
1313*260e9a87SYuri PankovIgnored because insecure.
1314*260e9a87SYuri Pankov.Ss \&na
1315*260e9a87SYuri PankovDisable adjusting without changing the adjustment mode.
1316*260e9a87SYuri PankovCurrently ignored.
131795c635efSGarrett D'Amore.Ss \&ne
131895c635efSGarrett D'AmoreDeclare the need for the specified minimum vertical space
131995c635efSGarrett D'Amorebefore the next trap or the bottom of the page.
1320*260e9a87SYuri PankovCurrently ignored.
1321*260e9a87SYuri Pankov.Ss \&nf
1322*260e9a87SYuri PankovSwitch to no-fill mode.
1323*260e9a87SYuri PankovSee
1324*260e9a87SYuri Pankov.Xr man 5 .
1325*260e9a87SYuri PankovIgnored by
1326*260e9a87SYuri Pankov.Xr mdoc 5 .
132795c635efSGarrett D'Amore.Ss \&nh
132895c635efSGarrett D'AmoreTurn off automatic hyphenation mode.
1329*260e9a87SYuri PankovCurrently ignored.
1330*260e9a87SYuri Pankov.Ss \&nhychar
1331*260e9a87SYuri PankovDefine hyphenation-inhibiting characters.
1332*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1333*260e9a87SYuri Pankov.Ss \&nm
1334*260e9a87SYuri PankovPrint line numbers.
1335*260e9a87SYuri PankovCurrently unsupported.
1336*260e9a87SYuri Pankov.Ss \&nn
1337*260e9a87SYuri PankovTemporarily turn off line numbering.
1338*260e9a87SYuri PankovCurrently unsupported.
1339*260e9a87SYuri Pankov.Ss \&nop
1340*260e9a87SYuri PankovExexute the rest of the input line as a request or macro line.
1341*260e9a87SYuri PankovCurrently unsupported.
134295c635efSGarrett D'Amore.Ss \&nr
1343*260e9a87SYuri PankovDefine or change a register.
134495c635efSGarrett D'AmoreA register is an arbitrary string value that defines some sort of state,
134595c635efSGarrett D'Amorewhich influences parsing and/or formatting.
134695c635efSGarrett D'AmoreIts syntax is as follows:
134795c635efSGarrett D'Amore.Pp
1348*260e9a87SYuri Pankov.D1 Pf \. Cm \&nr Ar name Oo +|- Oc Ns Ar expression
134995c635efSGarrett D'Amore.Pp
1350*260e9a87SYuri PankovFor the syntax of
1351*260e9a87SYuri Pankov.Ar expression ,
1352*260e9a87SYuri Pankovsee
1353*260e9a87SYuri Pankov.Sx Numerical expressions
1354*260e9a87SYuri Pankovbelow.
1355*260e9a87SYuri PankovIf it is prefixed by a sign, the register will be
1356*260e9a87SYuri Pankovincremented or decremented instead of assigned to.
1357*260e9a87SYuri Pankov.Pp
1358*260e9a87SYuri PankovThe following register
135995c635efSGarrett D'Amore.Ar name
1360*260e9a87SYuri Pankovis handled specially:
136195c635efSGarrett D'Amore.Bl -tag -width Ds
136295c635efSGarrett D'Amore.It Cm nS
136395c635efSGarrett D'AmoreIf set to a positive integer value, certain
136495c635efSGarrett D'Amore.Xr mdoc 5
136595c635efSGarrett D'Amoremacros will behave in the same way as in the
136695c635efSGarrett D'Amore.Em SYNOPSIS
136795c635efSGarrett D'Amoresection.
136895c635efSGarrett D'AmoreIf set to 0, these macros will behave in the same way as outside the
136995c635efSGarrett D'Amore.Em SYNOPSIS
137095c635efSGarrett D'Amoresection, even when called within the
137195c635efSGarrett D'Amore.Em SYNOPSIS
137295c635efSGarrett D'Amoresection itself.
137395c635efSGarrett D'AmoreNote that starting a new
137495c635efSGarrett D'Amore.Xr mdoc 5
137595c635efSGarrett D'Amoresection with the
137695c635efSGarrett D'Amore.Cm \&Sh
137795c635efSGarrett D'Amoremacro will reset this register.
137895c635efSGarrett D'Amore.El
1379*260e9a87SYuri Pankov.Ss \&nrf
1380*260e9a87SYuri PankovDefine or change a floating-point register.
1381*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
1382*260e9a87SYuri Pankov.Ss \&nroff
1383*260e9a87SYuri PankovForce nroff mode.
1384*260e9a87SYuri PankovThis is a groff extension and currently ignored.
138595c635efSGarrett D'Amore.Ss \&ns
138695c635efSGarrett D'AmoreTurn on no-space mode.
1387*260e9a87SYuri PankovCurrently ignored.
1388*260e9a87SYuri Pankov.Ss \&nx
1389*260e9a87SYuri PankovAbort processing of the current input file and process another one.
1390*260e9a87SYuri PankovIgnored because insecure.
1391*260e9a87SYuri Pankov.Ss \&open
1392*260e9a87SYuri PankovOpen a file for writing.
1393*260e9a87SYuri PankovIgnored because insecure.
1394*260e9a87SYuri Pankov.Ss \&opena
1395*260e9a87SYuri PankovOpen a file for appending.
1396*260e9a87SYuri PankovIgnored because insecure.
1397*260e9a87SYuri Pankov.Ss \&os
1398*260e9a87SYuri PankovOutput saved vertical space.
1399*260e9a87SYuri PankovCurrently ignored.
1400*260e9a87SYuri Pankov.Ss \&output
1401*260e9a87SYuri PankovOutput directly to intermediate output.
1402*260e9a87SYuri PankovNot supported.
1403*260e9a87SYuri Pankov.Ss \&padj
1404*260e9a87SYuri PankovGlobally control paragraph-at-once adjustment.
1405*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1406*260e9a87SYuri Pankov.Ss \&papersize
1407*260e9a87SYuri PankovSet the paper size.
1408*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1409*260e9a87SYuri Pankov.Ss \&pc
1410*260e9a87SYuri PankovChange the page number character.
1411*260e9a87SYuri PankovCurrently ignored.
1412*260e9a87SYuri Pankov.Ss \&pev
1413*260e9a87SYuri PankovPrint environments.
1414*260e9a87SYuri PankovThis is a groff extension and currently ignored.
1415*260e9a87SYuri Pankov.Ss \&pi
1416*260e9a87SYuri PankovPipe output to a shell command.
1417*260e9a87SYuri PankovIgnored because insecure.
1418*260e9a87SYuri Pankov.Ss \&PI
1419*260e9a87SYuri PankovLow-level request used by
1420*260e9a87SYuri Pankov.Sx \&BP .
1421*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
1422*260e9a87SYuri Pankov.Ss \&pl
1423*260e9a87SYuri PankovChange page length.
1424*260e9a87SYuri PankovTakes one height argument.
1425*260e9a87SYuri PankovCurrently ignored.
1426*260e9a87SYuri Pankov.Ss \&pm
1427*260e9a87SYuri PankovPrint names and sizes of macros, strings, and diversions.
1428*260e9a87SYuri PankovCurrently ignored.
1429*260e9a87SYuri Pankov.Ss \&pn
1430*260e9a87SYuri PankovChange page number of the next page.
1431*260e9a87SYuri PankovCurrently ignored.
1432*260e9a87SYuri Pankov.Ss \&pnr
1433*260e9a87SYuri PankovPrint all number registers.
1434*260e9a87SYuri PankovCurrently ignored.
1435*260e9a87SYuri Pankov.Ss \&po
1436*260e9a87SYuri PankovSet horizontal page offset.
1437*260e9a87SYuri PankovCurrently ignored.
143895c635efSGarrett D'Amore.Ss \&ps
143995c635efSGarrett D'AmoreChange point size.
1440*260e9a87SYuri PankovTakes one numerical argument.
1441*260e9a87SYuri PankovCurrently ignored.
1442*260e9a87SYuri Pankov.Ss \&psbb
1443*260e9a87SYuri PankovRetrieve the bounding box of a PostScript file.
1444*260e9a87SYuri PankovCurrently unsupported.
1445*260e9a87SYuri Pankov.Ss \&pshape
1446*260e9a87SYuri PankovSet a special shape for the current paragraph.
1447*260e9a87SYuri PankovThis is a Heirloom extension and currently unsupported.
1448*260e9a87SYuri Pankov.Ss \&pso
1449*260e9a87SYuri PankovInclude output of a shell command.
1450*260e9a87SYuri PankovIgnored because insecure.
1451*260e9a87SYuri Pankov.Ss \&ptr
1452*260e9a87SYuri PankovPrint the names and positions of all traps.
1453*260e9a87SYuri PankovThis is a groff extension and currently ignored.
1454*260e9a87SYuri Pankov.Ss \&pvs
1455*260e9a87SYuri PankovChange post-vertical spacing.
1456*260e9a87SYuri PankovThis is a groff extension and currently ignored.
1457*260e9a87SYuri Pankov.Ss \&rchar
1458*260e9a87SYuri PankovRemove glyph definitions.
1459*260e9a87SYuri PankovCurrently unsupported.
1460*260e9a87SYuri Pankov.Ss \&rd
1461*260e9a87SYuri PankovRead from standard input.
1462*260e9a87SYuri PankovCurrently ignored.
1463*260e9a87SYuri Pankov.Ss \&recursionlimit
1464*260e9a87SYuri PankovSet the maximum stack depth for recursive macros.
1465*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1466*260e9a87SYuri Pankov.Ss \&return
1467*260e9a87SYuri PankovExit a macro and return to the caller.
1468*260e9a87SYuri PankovCurrently unsupported.
1469*260e9a87SYuri Pankov.Ss \&rfschar
1470*260e9a87SYuri PankovRemove font-specific fallback glyph definitions.
1471*260e9a87SYuri PankovCurrently unsupported.
1472*260e9a87SYuri Pankov.Ss \&rhang
1473*260e9a87SYuri PankovHang characters at right margin.
1474*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1475*260e9a87SYuri Pankov.Ss \&rj
1476*260e9a87SYuri PankovJustify unfilled text to the right margin.
1477*260e9a87SYuri PankovCurrently ignored.
1478*260e9a87SYuri Pankov.Ss \&rm
1479*260e9a87SYuri PankovRemove a request, macro or string.
1480*260e9a87SYuri PankovIts syntax is as follows:
1481*260e9a87SYuri Pankov.Pp
1482*260e9a87SYuri Pankov.D1 Pf \. Cm \&rm Ar name
1483*260e9a87SYuri Pankov.Ss \&rn
1484*260e9a87SYuri PankovRename a request, macro, diversion, or string.
1485*260e9a87SYuri PankovCurrently unsupported.
1486*260e9a87SYuri Pankov.Ss \&rnn
1487*260e9a87SYuri PankovRename a number register.
1488*260e9a87SYuri PankovCurrently unsupported.
1489*260e9a87SYuri Pankov.Ss \&rr
1490*260e9a87SYuri PankovRemove a register.
1491*260e9a87SYuri PankovIts syntax is as follows:
1492*260e9a87SYuri Pankov.Pp
1493*260e9a87SYuri Pankov.D1 Pf \. Cm \&rr Ar name
1494*260e9a87SYuri Pankov.Ss \&rs
1495*260e9a87SYuri PankovEnd no-space mode.
1496*260e9a87SYuri PankovCurrently ignored.
1497*260e9a87SYuri Pankov.Ss \&rt
1498*260e9a87SYuri PankovReturn to marked vertical position.
1499*260e9a87SYuri PankovCurrently ignored.
1500*260e9a87SYuri Pankov.Ss \&schar
1501*260e9a87SYuri PankovDefine global fallback glyph.
1502*260e9a87SYuri PankovThis is a groff extension and currently unsupported.
1503*260e9a87SYuri Pankov.Ss \&sentchar
1504*260e9a87SYuri PankovDefine sentence-ending characters.
1505*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1506*260e9a87SYuri Pankov.Ss \&shc
1507*260e9a87SYuri PankovChange the soft hyphen character.
1508*260e9a87SYuri PankovCurrently ignored.
1509*260e9a87SYuri Pankov.Ss \&shift
1510*260e9a87SYuri PankovShift macro arguments.
1511*260e9a87SYuri PankovCurrently unsupported.
1512*260e9a87SYuri Pankov.Ss \&sizes
1513*260e9a87SYuri PankovDefine permissible point sizes.
1514*260e9a87SYuri PankovThis is a groff extension and currently ignored.
151595c635efSGarrett D'Amore.Ss \&so
151695c635efSGarrett D'AmoreInclude a source file.
151795c635efSGarrett D'AmoreIts syntax is as follows:
151895c635efSGarrett D'Amore.Pp
151995c635efSGarrett D'Amore.D1 Pf \. Cm \&so Ar file
152095c635efSGarrett D'Amore.Pp
152195c635efSGarrett D'AmoreThe
152295c635efSGarrett D'Amore.Ar file
152395c635efSGarrett D'Amorewill be read and its contents processed as input in place of the
152495c635efSGarrett D'Amore.Sq \&.so
152595c635efSGarrett D'Amorerequest line.
152695c635efSGarrett D'AmoreTo avoid inadvertent inclusion of unrelated files,
152795c635efSGarrett D'Amore.Xr mandoc 1
152895c635efSGarrett D'Amoreonly accepts relative paths not containing the strings
152995c635efSGarrett D'Amore.Qq ../
153095c635efSGarrett D'Amoreand
153195c635efSGarrett D'Amore.Qq /.. .
153295c635efSGarrett D'Amore.Pp
153395c635efSGarrett D'AmoreThis request requires
153495c635efSGarrett D'Amore.Xr man 1
153595c635efSGarrett D'Amoreto change to the right directory before calling
153695c635efSGarrett D'Amore.Xr mandoc 1 ,
153795c635efSGarrett D'Amoreper convention to the root of the manual tree.
153895c635efSGarrett D'AmoreTypical usage looks like:
153995c635efSGarrett D'Amore.Pp
154095c635efSGarrett D'Amore.Dl \&.so man3/Xcursor.3
154195c635efSGarrett D'Amore.Pp
154295c635efSGarrett D'AmoreAs the whole concept is rather fragile, the use of
154395c635efSGarrett D'Amore.Sx \&so
154495c635efSGarrett D'Amoreis discouraged.
154595c635efSGarrett D'AmoreUse
154695c635efSGarrett D'Amore.Xr ln 1
154795c635efSGarrett D'Amoreinstead.
1548*260e9a87SYuri Pankov.Ss \&spacewidth
1549*260e9a87SYuri PankovSet the space width from the font metrics file.
1550*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1551*260e9a87SYuri Pankov.Ss \&special
1552*260e9a87SYuri PankovDefine a special font.
1553*260e9a87SYuri PankovThis is a groff extension and currently ignored.
1554*260e9a87SYuri Pankov.Ss \&spreadwarn
1555*260e9a87SYuri PankovWarn about wide spacing between words.
1556*260e9a87SYuri PankovCurrently ignored.
1557*260e9a87SYuri Pankov.Ss \&ss
1558*260e9a87SYuri PankovSet space character size.
1559*260e9a87SYuri PankovCurrently ignored.
1560*260e9a87SYuri Pankov.Ss \&sty
1561*260e9a87SYuri PankovAssociate style with a font position.
1562*260e9a87SYuri PankovThis is a groff extension and currently ignored.
1563*260e9a87SYuri Pankov.Ss \&substring
1564*260e9a87SYuri PankovReplace a user-defined string with a substring.
1565*260e9a87SYuri PankovCurrently unsupported.
1566*260e9a87SYuri Pankov.Ss \&sv
1567*260e9a87SYuri PankovSave vertical space.
1568*260e9a87SYuri PankovCurrently ignored.
1569*260e9a87SYuri Pankov.Ss \&sy
1570*260e9a87SYuri PankovExecute shell command.
1571*260e9a87SYuri PankovIgnored because insecure.
1572*260e9a87SYuri Pankov.Ss \&T&
1573*260e9a87SYuri PankovRe-start a table layout, retaining the options of the prior table
1574*260e9a87SYuri Pankovinvocation.
1575*260e9a87SYuri PankovSee
1576*260e9a87SYuri Pankov.Sx \&TS .
157795c635efSGarrett D'Amore.Ss \&ta
157895c635efSGarrett D'AmoreSet tab stops.
1579*260e9a87SYuri PankovTakes an arbitrary number of arguments.
1580*260e9a87SYuri PankovCurrently unsupported.
1581*260e9a87SYuri Pankov.Ss \&tc
1582*260e9a87SYuri PankovChange tab repetion character.
1583*260e9a87SYuri PankovCurrently unsupported.
1584*260e9a87SYuri Pankov.Ss \&TE
1585*260e9a87SYuri PankovEnd a table context.
1586*260e9a87SYuri PankovSee
1587*260e9a87SYuri Pankov.Sx \&TS .
1588*260e9a87SYuri Pankov.Ss \&ti
1589*260e9a87SYuri PankovTemporary indent.
1590*260e9a87SYuri PankovCurrently unsupported.
1591*260e9a87SYuri Pankov.Ss \&tkf
1592*260e9a87SYuri PankovEnable track kerning for a font.
1593*260e9a87SYuri PankovCurrently ignored.
1594*260e9a87SYuri Pankov.Ss \&tl
1595*260e9a87SYuri PankovPrint a title line.
1596*260e9a87SYuri PankovCurrently unsupported.
1597*260e9a87SYuri Pankov.Ss \&tm
1598*260e9a87SYuri PankovPrint to standard error output.
1599*260e9a87SYuri PankovCurrently ignored.
1600*260e9a87SYuri Pankov.Ss \&tm1
1601*260e9a87SYuri PankovPrint to standard error output, allowing leading blanks.
1602*260e9a87SYuri PankovThis is a groff extension and currently ignored.
1603*260e9a87SYuri Pankov.Ss \&tmc
1604*260e9a87SYuri PankovPrint to standard error output without a trailing newline.
1605*260e9a87SYuri PankovThis is a groff extension and currently ignored.
160695c635efSGarrett D'Amore.Ss \&tr
160795c635efSGarrett D'AmoreOutput character translation.
160895c635efSGarrett D'AmoreIts syntax is as follows:
160995c635efSGarrett D'Amore.Pp
161095c635efSGarrett D'Amore.D1 Pf \. Cm \&tr Ar [ab]+
161195c635efSGarrett D'Amore.Pp
161295c635efSGarrett D'AmorePairs of
161395c635efSGarrett D'Amore.Ar ab
161495c635efSGarrett D'Amorecharacters are replaced
161595c635efSGarrett D'Amore.Ar ( a
161695c635efSGarrett D'Amorefor
161795c635efSGarrett D'Amore.Ar b ) .
161895c635efSGarrett D'AmoreReplacement (or origin) characters may also be character escapes; thus,
161995c635efSGarrett D'Amore.Pp
162095c635efSGarrett D'Amore.Dl tr \e(xx\e(yy
162195c635efSGarrett D'Amore.Pp
162295c635efSGarrett D'Amorereplaces all invocations of \e(xx with \e(yy.
1623*260e9a87SYuri Pankov.Ss \&track
1624*260e9a87SYuri PankovStatic letter space tracking.
1625*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1626*260e9a87SYuri Pankov.Ss \&transchar
1627*260e9a87SYuri PankovDefine transparent characters for sentence-ending.
1628*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1629*260e9a87SYuri Pankov.Ss \&trf
1630*260e9a87SYuri PankovOutput the contents of a file, disallowing invalid characters.
1631*260e9a87SYuri PankovThis is a groff extension and ignored because insecure.
1632*260e9a87SYuri Pankov.Ss \&trimat
1633*260e9a87SYuri PankovSet the TrimBox page parameter for PDF generation.
1634*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1635*260e9a87SYuri Pankov.Ss \&trin
1636*260e9a87SYuri PankovOutput character translation, ignored by
1637*260e9a87SYuri Pankov.Cm \&asciify .
1638*260e9a87SYuri PankovCurrently unsupported.
1639*260e9a87SYuri Pankov.Ss \&trnt
1640*260e9a87SYuri PankovOutput character translation, ignored by \e!.
1641*260e9a87SYuri PankovCurrently unsupported.
1642*260e9a87SYuri Pankov.Ss \&troff
1643*260e9a87SYuri PankovForce troff mode.
1644*260e9a87SYuri PankovThis is a groff extension and currently ignored.
164595c635efSGarrett D'Amore.Ss \&TS
164695c635efSGarrett D'AmoreBegin a table, which formats input in aligned rows and columns.
164795c635efSGarrett D'AmoreSee
164895c635efSGarrett D'Amore.Xr tbl 5
164995c635efSGarrett D'Amorefor a description of the tbl language.
1650*260e9a87SYuri Pankov.Ss \&uf
1651*260e9a87SYuri PankovGlobally set the underline font.
1652*260e9a87SYuri PankovCurrently ignored.
1653*260e9a87SYuri Pankov.Ss \&ul
1654*260e9a87SYuri PankovUnderline.
1655*260e9a87SYuri PankovCurrently ignored.
1656*260e9a87SYuri Pankov.Ss \&unformat
1657*260e9a87SYuri PankovUnformat spaces and tabs in a diversion.
1658*260e9a87SYuri PankovCurrently unsupported.
1659*260e9a87SYuri Pankov.Ss \&unwatch
1660*260e9a87SYuri PankovDisable notification for string or macro.
1661*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1662*260e9a87SYuri Pankov.Ss \&unwatchn
1663*260e9a87SYuri PankovDisable notification for register.
1664*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1665*260e9a87SYuri Pankov.Ss \&vpt
1666*260e9a87SYuri PankovEnable or disable vertical position traps.
1667*260e9a87SYuri PankovThis is a groff extension and currently ignored.
1668*260e9a87SYuri Pankov.Ss \&vs
1669*260e9a87SYuri PankovChange vertical spacing.
1670*260e9a87SYuri PankovCurrently ignored.
1671*260e9a87SYuri Pankov.Ss \&warn
1672*260e9a87SYuri PankovSet warning level.
1673*260e9a87SYuri PankovCurrently ignored.
1674*260e9a87SYuri Pankov.Ss \&warnscale
1675*260e9a87SYuri PankovSet the scaling indicator used in warnings.
1676*260e9a87SYuri PankovThis is a groff extension and currently ignored.
1677*260e9a87SYuri Pankov.Ss \&watch
1678*260e9a87SYuri PankovNotify on change of string or macro.
1679*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1680*260e9a87SYuri Pankov.Ss \&watchlength
1681*260e9a87SYuri PankovOn change, report the contents of macros and strings
1682*260e9a87SYuri Pankovup to the sepcified length.
1683*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1684*260e9a87SYuri Pankov.Ss \&watchn
1685*260e9a87SYuri PankovNotify on change of register.
1686*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1687*260e9a87SYuri Pankov.Ss \&wh
1688*260e9a87SYuri PankovSet a page location trap.
1689*260e9a87SYuri PankovCurrently unsupported.
1690*260e9a87SYuri Pankov.Ss \&while
1691*260e9a87SYuri PankovRepeated execution while a condition is true.
1692*260e9a87SYuri PankovCurrently unsupported.
1693*260e9a87SYuri Pankov.Ss \&write
1694*260e9a87SYuri PankovWrite to an open file.
1695*260e9a87SYuri PankovIgnored because insecure.
1696*260e9a87SYuri Pankov.Ss \&writec
1697*260e9a87SYuri PankovWrite to an open file without appending a newline.
1698*260e9a87SYuri PankovIgnored because insecure.
1699*260e9a87SYuri Pankov.Ss \&writem
1700*260e9a87SYuri PankovWrite macro or string to an open file.
1701*260e9a87SYuri PankovIgnored because insecure.
1702*260e9a87SYuri Pankov.Ss \&xflag
1703*260e9a87SYuri PankovSet the extension level.
1704*260e9a87SYuri PankovThis is a Heirloom extension and currently ignored.
1705*260e9a87SYuri Pankov.Ss Numerical expressions
1706*260e9a87SYuri PankovThe
1707*260e9a87SYuri Pankov.Sx \&nr ,
1708*260e9a87SYuri Pankov.Sx \&if ,
1709*260e9a87SYuri Pankovand
1710*260e9a87SYuri Pankov.Sx \&ie
1711*260e9a87SYuri Pankovrequests accept integer numerical expressions as arguments.
1712*260e9a87SYuri PankovThese are always evaluated using the C
1713*260e9a87SYuri Pankov.Vt int
1714*260e9a87SYuri Pankovtype; integer overflow works the same way as in the C language.
1715*260e9a87SYuri PankovNumbers consist of an arbitrary number of digits
1716*260e9a87SYuri Pankov.Sq 0
1717*260e9a87SYuri Pankovto
1718*260e9a87SYuri Pankov.Sq 9
1719*260e9a87SYuri Pankovprefixed by an optional sign
1720*260e9a87SYuri Pankov.Sq +
1721*260e9a87SYuri Pankovor
1722*260e9a87SYuri Pankov.Sq - .
1723*260e9a87SYuri PankovEach number may be followed by one optional scaling unit described below
1724*260e9a87SYuri Pankov.Sx Scaling Widths .
1725*260e9a87SYuri PankovThe following equations hold:
1726*260e9a87SYuri Pankov.Bd -literal -offset indent
1727*260e9a87SYuri Pankov1i = 6v = 6P = 10m = 10n = 52p = 1000M = 240u = 240
1728*260e9a87SYuri Pankov254c = 100i = 24000u = 24000
1729*260e9a87SYuri Pankov1f = 65536u = 65536
1730*260e9a87SYuri Pankov.Ed
1731*260e9a87SYuri Pankov.Pp
1732*260e9a87SYuri PankovThe following binary operators are implemented.
1733*260e9a87SYuri PankovUnless otherwise stated, they behave as in the C language:
1734*260e9a87SYuri Pankov.Pp
1735*260e9a87SYuri Pankov.Bl -tag -width 2n -compact
1736*260e9a87SYuri Pankov.It Ic +
1737*260e9a87SYuri Pankovaddition
1738*260e9a87SYuri Pankov.It Ic -
1739*260e9a87SYuri Pankovsubtraction
1740*260e9a87SYuri Pankov.It Ic *
1741*260e9a87SYuri Pankovmultiplication
1742*260e9a87SYuri Pankov.It Ic /
1743*260e9a87SYuri Pankovdivision
1744*260e9a87SYuri Pankov.It Ic %
1745*260e9a87SYuri Pankovremainder of division
1746*260e9a87SYuri Pankov.It Ic <
1747*260e9a87SYuri Pankovless than
1748*260e9a87SYuri Pankov.It Ic >
1749*260e9a87SYuri Pankovgreater than
1750*260e9a87SYuri Pankov.It Ic ==
1751*260e9a87SYuri Pankovequal to
1752*260e9a87SYuri Pankov.It Ic =
1753*260e9a87SYuri Pankovequal to, same effect as
1754*260e9a87SYuri Pankov.Ic ==
1755*260e9a87SYuri Pankov(this differs from C)
1756*260e9a87SYuri Pankov.It Ic <=
1757*260e9a87SYuri Pankovless than or equal to
1758*260e9a87SYuri Pankov.It Ic >=
1759*260e9a87SYuri Pankovgreater than or equal to
1760*260e9a87SYuri Pankov.It Ic <>
1761*260e9a87SYuri Pankovnot equal to (corresponds to C
1762*260e9a87SYuri Pankov.Ic != ;
1763*260e9a87SYuri Pankovthis one is of limited portability, it is supported by Heirloom roff,
1764*260e9a87SYuri Pankovbut not by groff)
1765*260e9a87SYuri Pankov.It Ic &
1766*260e9a87SYuri Pankovlogical and (corresponds to C
1767*260e9a87SYuri Pankov.Ic && )
1768*260e9a87SYuri Pankov.It Ic \&:
1769*260e9a87SYuri Pankovlogical or (corresponds to C
1770*260e9a87SYuri Pankov.Ic \&|| )
1771*260e9a87SYuri Pankov.It Ic <?
1772*260e9a87SYuri Pankovminimum (not available in C)
1773*260e9a87SYuri Pankov.It Ic >?
1774*260e9a87SYuri Pankovmaximum (not available in C)
1775*260e9a87SYuri Pankov.El
1776*260e9a87SYuri Pankov.Pp
1777*260e9a87SYuri PankovThere is no concept of precendence; evaluation proceeds from left to right,
1778*260e9a87SYuri Pankovexcept when subexpressions are enclosed in parantheses.
1779*260e9a87SYuri PankovInside parentheses, whitespace is ignored.
1780*260e9a87SYuri Pankov.Sh ESCAPE SEQUENCE REFERENCE
1781*260e9a87SYuri PankovThe
1782*260e9a87SYuri Pankov.Xr mandoc 1
178395c635efSGarrett D'Amore.Nm
1784*260e9a87SYuri Pankovparser recognises the following escape sequences.
1785*260e9a87SYuri PankovNote that the
1786*260e9a87SYuri Pankov.Nm
1787*260e9a87SYuri Pankovlanguage defines more escape sequences not implemented in
1788*260e9a87SYuri Pankov.Xr mandoc 1 .
1789*260e9a87SYuri PankovIn
1790*260e9a87SYuri Pankov.Xr mdoc 5
1791*260e9a87SYuri Pankovand
1792*260e9a87SYuri Pankov.Xr man 5
1793*260e9a87SYuri Pankovdocuments, using escape sequences is discouraged except for those
1794*260e9a87SYuri Pankovdescribed in the
1795*260e9a87SYuri Pankov.Sx LANGUAGE SYNTAX
1796*260e9a87SYuri Pankovsection above.
1797*260e9a87SYuri Pankov.Pp
1798*260e9a87SYuri PankovA backslash followed by any character not listed here
1799*260e9a87SYuri Pankovsimply prints that character itself.
1800*260e9a87SYuri Pankov.Ss \e<newline>
1801*260e9a87SYuri PankovA backslash at the end of an input line can be used to continue the
1802*260e9a87SYuri Pankovlogical input line on the next physical input line, joining the text
1803*260e9a87SYuri Pankovon both lines together as if it were on a single input line.
1804*260e9a87SYuri Pankov.Ss \e<space>
1805*260e9a87SYuri PankovThe escape sequence backslash-space
1806*260e9a87SYuri Pankov.Pq Sq \e\ \&
1807*260e9a87SYuri Pankovis an unpaddable space-sized non-breaking space character; see
1808*260e9a87SYuri Pankov.Sx Whitespace .
1809*260e9a87SYuri Pankov.Ss \e\(dq
1810*260e9a87SYuri PankovThe rest of the input line is treated as
1811*260e9a87SYuri Pankov.Sx Comments .
1812*260e9a87SYuri Pankov.Ss \e%
1813*260e9a87SYuri PankovHyphenation allowed at this point of the word; ignored by
1814*260e9a87SYuri Pankov.Xr mandoc 1 .
1815*260e9a87SYuri Pankov.Ss \e&
1816*260e9a87SYuri PankovNon-printing zero-width character; see
1817*260e9a87SYuri Pankov.Sx Whitespace .
1818*260e9a87SYuri Pankov.Ss \e\(aq
1819*260e9a87SYuri PankovAcute accent special character; use
1820*260e9a87SYuri Pankov.Sq \e(aa
1821*260e9a87SYuri Pankovinstead.
1822*260e9a87SYuri Pankov.Ss \e( Ns Ar cc
1823*260e9a87SYuri Pankov.Sx Special Characters
1824*260e9a87SYuri Pankovwith two-letter names, see
1825*260e9a87SYuri Pankov.Xr mandoc_char 5 .
1826*260e9a87SYuri Pankov.Ss \e*[ Ns Ar name ]
1827*260e9a87SYuri PankovInterpolate the string with the
1828*260e9a87SYuri Pankov.Ar name ;
1829*260e9a87SYuri Pankovsee
1830*260e9a87SYuri Pankov.Sx Predefined Strings
1831*260e9a87SYuri Pankovand
1832*260e9a87SYuri Pankov.Sx ds .
1833*260e9a87SYuri PankovFor short names, there are variants
1834*260e9a87SYuri Pankov.No \e* Ns Ar c
1835*260e9a87SYuri Pankovand
1836*260e9a87SYuri Pankov.No \e*( Ns Ar cc .
1837*260e9a87SYuri Pankov.Ss \e-
1838*260e9a87SYuri PankovSpecial character
1839*260e9a87SYuri Pankov.Dq mathematical minus sign .
1840*260e9a87SYuri Pankov.Ss \e[ Ns Ar name ]
1841*260e9a87SYuri Pankov.Sx Special Characters
1842*260e9a87SYuri Pankovwith names of arbitrary length, see
1843*260e9a87SYuri Pankov.Xr mandoc_char 5 .
1844*260e9a87SYuri Pankov.Ss \e^
1845*260e9a87SYuri PankovOne-twelfth em half-narrow space character, effectively zero-width in
1846*260e9a87SYuri Pankov.Xr mandoc 1 .
1847*260e9a87SYuri Pankov.Ss \e`
1848*260e9a87SYuri PankovGrave accent special character; use
1849*260e9a87SYuri Pankov.Sq \e(ga
1850*260e9a87SYuri Pankovinstead.
1851*260e9a87SYuri Pankov.Ss \e{
1852*260e9a87SYuri PankovBegin conditional input; see
1853*260e9a87SYuri Pankov.Sx if .
1854*260e9a87SYuri Pankov.Ss \e\(ba
1855*260e9a87SYuri PankovOne-sixth em narrow space character, effectively zero-width in
1856*260e9a87SYuri Pankov.Xr mandoc 1 .
1857*260e9a87SYuri Pankov.Ss \e}
1858*260e9a87SYuri PankovEnd conditional input; see
1859*260e9a87SYuri Pankov.Sx if .
1860*260e9a87SYuri Pankov.Ss \e~
1861*260e9a87SYuri PankovPaddable non-breaking space character.
1862*260e9a87SYuri Pankov.Ss \e0
1863*260e9a87SYuri PankovDigit width space character.
1864*260e9a87SYuri Pankov.Ss \eA\(aq Ns Ar string Ns \(aq
1865*260e9a87SYuri PankovAnchor definition; ignored by
1866*260e9a87SYuri Pankov.Xr mandoc 1 .
1867*260e9a87SYuri Pankov.Ss \eB\(aq Ns Ar string Ns \(aq
1868*260e9a87SYuri PankovInterpolate
1869*260e9a87SYuri Pankov.Sq 1
1870*260e9a87SYuri Pankovif
1871*260e9a87SYuri Pankov.Ar string
1872*260e9a87SYuri Pankovconforms to the syntax of
1873*260e9a87SYuri Pankov.Sx Numerical expressions
1874*260e9a87SYuri Pankovexplained above and
1875*260e9a87SYuri Pankov.Sq 0
1876*260e9a87SYuri Pankovotherwise.
1877*260e9a87SYuri Pankov.Ss \eb\(aq Ns Ar string Ns \(aq
1878*260e9a87SYuri PankovBracket building function; ignored by
1879*260e9a87SYuri Pankov.Xr mandoc 1 .
1880*260e9a87SYuri Pankov.Ss \eC\(aq Ns Ar name Ns \(aq
1881*260e9a87SYuri Pankov.Sx Special Characters
1882*260e9a87SYuri Pankovwith names of arbitrary length.
1883*260e9a87SYuri Pankov.Ss \ec
1884*260e9a87SYuri PankovWhen encountered at the end of an input text line,
1885*260e9a87SYuri Pankovthe next input text line is considered to continue that line,
1886*260e9a87SYuri Pankoveven if there are request or macro lines in between.
1887*260e9a87SYuri PankovNo whitespace is inserted.
1888*260e9a87SYuri Pankov.Ss \eD\(aq Ns Ar string Ns \(aq
1889*260e9a87SYuri PankovDraw graphics function; ignored by
1890*260e9a87SYuri Pankov.Xr mandoc 1 .
1891*260e9a87SYuri Pankov.Ss \ed
1892*260e9a87SYuri PankovMove down by half a line; ignored by
1893*260e9a87SYuri Pankov.Xr mandoc 1 .
1894*260e9a87SYuri Pankov.Ss \ee
1895*260e9a87SYuri PankovBackslash special character.
1896*260e9a87SYuri Pankov.Ss \eF[ Ns Ar name ]
1897*260e9a87SYuri PankovSwitch font family (groff extension); ignored by
1898*260e9a87SYuri Pankov.Xr mandoc 1 .
1899*260e9a87SYuri PankovFor short names, there are variants
1900*260e9a87SYuri Pankov.No \eF Ns Ar c
1901*260e9a87SYuri Pankovand
1902*260e9a87SYuri Pankov.No \eF( Ns Ar cc .
1903*260e9a87SYuri Pankov.Ss \ef[ Ns Ar name ]
1904*260e9a87SYuri PankovSwitch to the font
1905*260e9a87SYuri Pankov.Ar name ,
1906*260e9a87SYuri Pankovsee
1907*260e9a87SYuri Pankov.Sx Text Decoration .
1908*260e9a87SYuri PankovFor short names, there are variants
1909*260e9a87SYuri Pankov.No \ef Ns Ar c
1910*260e9a87SYuri Pankovand
1911*260e9a87SYuri Pankov.No \ef( Ns Ar cc .
1912*260e9a87SYuri Pankov.Ss \eg[ Ns Ar name ]
1913*260e9a87SYuri PankovInterpolate the format of a number register; ignored by
1914*260e9a87SYuri Pankov.Xr mandoc 1 .
1915*260e9a87SYuri PankovFor short names, there are variants
1916*260e9a87SYuri Pankov.No \eg Ns Ar c
1917*260e9a87SYuri Pankovand
1918*260e9a87SYuri Pankov.No \eg( Ns Ar cc .
1919*260e9a87SYuri Pankov.Ss \eH\(aq Ns Oo +|- Oc Ns Ar number Ns \(aq
1920*260e9a87SYuri PankovSet the height of the current font; ignored by
1921*260e9a87SYuri Pankov.Xr mandoc 1 .
1922*260e9a87SYuri Pankov.Ss \eh\(aq Ns Ar number Ns \(aq
1923*260e9a87SYuri PankovHorizontal motion; ignored by
1924*260e9a87SYuri Pankov.Xr mandoc 1 .
1925*260e9a87SYuri Pankov.Ss \ek[ Ns Ar name ]
1926*260e9a87SYuri PankovMark horizontal input place in register; ignored by
1927*260e9a87SYuri Pankov.Xr mandoc 1 .
1928*260e9a87SYuri PankovFor short names, there are variants
1929*260e9a87SYuri Pankov.No \ek Ns Ar c
1930*260e9a87SYuri Pankovand
1931*260e9a87SYuri Pankov.No \ek( Ns Ar cc .
1932*260e9a87SYuri Pankov.Ss \eL\(aq Ns Ar number Ns Oo Ar c Oc Ns \(aq
1933*260e9a87SYuri PankovVertical line drawing function; ignored by
1934*260e9a87SYuri Pankov.Xr mandoc 1 .
1935*260e9a87SYuri Pankov.Ss \el\(aq Ns Ar number Ns Oo Ar c Oc Ns \(aq
1936*260e9a87SYuri PankovHorizontal line drawing function; ignored by
1937*260e9a87SYuri Pankov.Xr mandoc 1 .
1938*260e9a87SYuri Pankov.Ss \eM[ Ns Ar name ]
1939*260e9a87SYuri PankovSet fill (background) color (groff extension); ignored by
1940*260e9a87SYuri Pankov.Xr mandoc 1 .
1941*260e9a87SYuri PankovFor short names, there are variants
1942*260e9a87SYuri Pankov.No \eM Ns Ar c
1943*260e9a87SYuri Pankovand
1944*260e9a87SYuri Pankov.No \eM( Ns Ar cc .
1945*260e9a87SYuri Pankov.Ss \em[ Ns Ar name ]
1946*260e9a87SYuri PankovSet glyph drawing color (groff extension); ignored by
1947*260e9a87SYuri Pankov.Xr mandoc 1 .
1948*260e9a87SYuri PankovFor short names, there are variants
1949*260e9a87SYuri Pankov.No \em Ns Ar c
1950*260e9a87SYuri Pankovand
1951*260e9a87SYuri Pankov.No \em( Ns Ar cc .
1952*260e9a87SYuri Pankov.Ss \eN\(aq Ns Ar number Ns \(aq
1953*260e9a87SYuri PankovCharacter
1954*260e9a87SYuri Pankov.Ar number
1955*260e9a87SYuri Pankovon the current font.
1956*260e9a87SYuri Pankov.Ss \en[ Ns Ar name ]
1957*260e9a87SYuri PankovInterpolate the number register
1958*260e9a87SYuri Pankov.Ar name .
1959*260e9a87SYuri PankovFor short names, there are variants
1960*260e9a87SYuri Pankov.No \en Ns Ar c
1961*260e9a87SYuri Pankovand
1962*260e9a87SYuri Pankov.No \en( Ns Ar cc .
1963*260e9a87SYuri Pankov.Ss \eo\(aq Ns Ar string Ns \(aq
1964*260e9a87SYuri PankovOverstrike, writing all the characters contained in the
1965*260e9a87SYuri Pankov.Ar string
1966*260e9a87SYuri Pankovto the same output position.
1967*260e9a87SYuri PankovIn terminal and HTML output modes,
1968*260e9a87SYuri Pankovonly the last one of the characters is visible.
1969*260e9a87SYuri Pankov.Ss \eR\(aq Ns Ar name Oo +|- Oc Ns Ar number Ns \(aq
1970*260e9a87SYuri PankovSet number register; ignored by
1971*260e9a87SYuri Pankov.Xr mandoc 1 .
1972*260e9a87SYuri Pankov.Ss \eS\(aq Ns Ar number Ns \(aq
1973*260e9a87SYuri PankovSlant output; ignored by
1974*260e9a87SYuri Pankov.Xr mandoc 1 .
1975*260e9a87SYuri Pankov.Ss \es\(aq Ns Oo +|- Oc Ns Ar number Ns \(aq
1976*260e9a87SYuri PankovChange point size; ignored by
1977*260e9a87SYuri Pankov.Xr mandoc 1 .
1978*260e9a87SYuri PankovAlternative forms
1979*260e9a87SYuri Pankov.No \es Ns Oo +|- Oc Ns Ar n ,
1980*260e9a87SYuri Pankov.No \es Ns Oo +|- Oc Ns \(aq Ns Ar number Ns \(aq ,
1981*260e9a87SYuri Pankov.No \es Ns [ Oo +|- Oc Ns Ar number ] ,
1982*260e9a87SYuri Pankovand
1983*260e9a87SYuri Pankov.No \es Ns Oo +|- Oc Ns [ Ar number Ns ]
1984*260e9a87SYuri Pankovare also parsed and ignored.
1985*260e9a87SYuri Pankov.Ss \et
1986*260e9a87SYuri PankovHorizontal tab; ignored by
1987*260e9a87SYuri Pankov.Xr mandoc 1 .
1988*260e9a87SYuri Pankov.Ss \eu
1989*260e9a87SYuri PankovMove up by half a line; ignored by
1990*260e9a87SYuri Pankov.Xr mandoc 1 .
1991*260e9a87SYuri Pankov.Ss \eV[ Ns Ar name ]
1992*260e9a87SYuri PankovInterpolate an environment variable; ignored by
1993*260e9a87SYuri Pankov.Xr mandoc 1 .
1994*260e9a87SYuri PankovFor short names, there are variants
1995*260e9a87SYuri Pankov.No \eV Ns Ar c
1996*260e9a87SYuri Pankovand
1997*260e9a87SYuri Pankov.No \eV( Ns Ar cc .
1998*260e9a87SYuri Pankov.Ss \ev\(aq Ns Ar number Ns \(aq
1999*260e9a87SYuri PankovVertical motion; ignored by
2000*260e9a87SYuri Pankov.Xr mandoc 1 .
2001*260e9a87SYuri Pankov.Ss \ew\(aq Ns Ar string Ns \(aq
2002*260e9a87SYuri PankovInterpolate the width of the
2003*260e9a87SYuri Pankov.Ar string .
2004*260e9a87SYuri PankovThe
2005*260e9a87SYuri Pankov.Xr mandoc 1
2006*260e9a87SYuri Pankovimplementation assumes that after expansion of user-defined strings, the
2007*260e9a87SYuri Pankov.Ar string
2008*260e9a87SYuri Pankovonly contains normal characters, no escape sequences, and that each
2009*260e9a87SYuri Pankovcharacter has a width of 24 basic units.
2010*260e9a87SYuri Pankov.Ss \eX\(aq Ns Ar string Ns \(aq
2011*260e9a87SYuri PankovOutput
2012*260e9a87SYuri Pankov.Ar string
2013*260e9a87SYuri Pankovas device control function; ignored in nroff mode and by
2014*260e9a87SYuri Pankov.Xr mandoc 1 .
2015*260e9a87SYuri Pankov.Ss \ex\(aq Ns Ar number Ns \(aq
2016*260e9a87SYuri PankovExtra line space function; ignored by
2017*260e9a87SYuri Pankov.Xr mandoc 1 .
2018*260e9a87SYuri Pankov.Ss \eY[ Ns Ar name ]
2019*260e9a87SYuri PankovOutput a string as a device control function; ignored in nroff mode and by
2020*260e9a87SYuri Pankov.Xr mandoc 1 .
2021*260e9a87SYuri PankovFor short names, there are variants
2022*260e9a87SYuri Pankov.No \eY Ns Ar c
2023*260e9a87SYuri Pankovand
2024*260e9a87SYuri Pankov.No \eY( Ns Ar cc .
2025*260e9a87SYuri Pankov.Ss \eZ\(aq Ns Ar string Ns \(aq
2026*260e9a87SYuri PankovPrint
2027*260e9a87SYuri Pankov.Ar string
2028*260e9a87SYuri Pankovwith zero width and height; ignored by
2029*260e9a87SYuri Pankov.Xr mandoc 1 .
2030*260e9a87SYuri Pankov.Ss \ez
2031*260e9a87SYuri PankovOutput the next character without advancing the cursor position;
2032*260e9a87SYuri Pankovapproximated in
2033*260e9a87SYuri Pankov.Xr mandoc 1
2034*260e9a87SYuri Pankovby simply skipping the next character.
2035*260e9a87SYuri Pankov.Sh COMPATIBILITY
2036*260e9a87SYuri PankovThe
2037*260e9a87SYuri Pankov.Xr mandoc 1
2038*260e9a87SYuri Pankovimplementation of the
2039*260e9a87SYuri Pankov.Nm
2040*260e9a87SYuri Pankovlanguage is intentionally incomplete.
2041*260e9a87SYuri PankovUnimplemented features include:
204295c635efSGarrett D'Amore.Pp
204395c635efSGarrett D'Amore.Bl -dash -compact
204495c635efSGarrett D'Amore.It
2045*260e9a87SYuri PankovFor security reasons,
2046*260e9a87SYuri Pankov.Xr mandoc 1
2047*260e9a87SYuri Pankovnever reads or writes external files except via
2048*260e9a87SYuri Pankov.Sx \&so
2049*260e9a87SYuri Pankovrequests with safe relative paths.
2050*260e9a87SYuri Pankov.It
2051*260e9a87SYuri PankovThere is no automatic hyphenation, no adjustment to the right margin,
2052*260e9a87SYuri Pankovand no centering; the output is always set flush-left.
2053*260e9a87SYuri Pankov.It
2054*260e9a87SYuri PankovSupport for setting tabulator positions
2055*260e9a87SYuri Pankovand tabulator and leader characters is missing,
2056*260e9a87SYuri Pankovand support for manually changing indentation is limited.
205795c635efSGarrett D'Amore.It
205895c635efSGarrett D'AmoreThe
2059*260e9a87SYuri Pankov.Sq u
2060*260e9a87SYuri Pankovscaling unit is the default terminal unit.
2061*260e9a87SYuri PankovIn traditional troff systems, this unit changes depending on the
2062*260e9a87SYuri Pankovoutput media.
206395c635efSGarrett D'Amore.It
2064*260e9a87SYuri PankovWidth measurements are implemented in a crude way
2065*260e9a87SYuri Pankovand often yield wrong results.
2066*260e9a87SYuri PankovExplicit movement requests and escapes are ignored.
2067*260e9a87SYuri Pankov.It
2068*260e9a87SYuri PankovThere is no concept of output pages, no support for floats,
2069*260e9a87SYuri Pankovgraphics drawing, and picture inclusion;
2070*260e9a87SYuri Pankovterminal output is always continuous.
2071*260e9a87SYuri Pankov.It
2072*260e9a87SYuri PankovRequests regarding color, font families, and glyph manipulation
2073*260e9a87SYuri Pankovare ignored.
2074*260e9a87SYuri PankovFont support is very limited.
2075*260e9a87SYuri PankovKerning is not implemented, and no ligatures are produced.
207695c635efSGarrett D'Amore.It
207795c635efSGarrett D'AmoreThe
2078*260e9a87SYuri Pankov.Qq \(aq
2079*260e9a87SYuri Pankovmacro control character does not suppress output line breaks.
2080*260e9a87SYuri Pankov.It
2081*260e9a87SYuri PankovDiversions are not implemented,
2082*260e9a87SYuri Pankovand support for traps is very incomplete.
2083*260e9a87SYuri Pankov.It
2084*260e9a87SYuri PankovWhile recursion is supported,
2085*260e9a87SYuri Pankov.Sx \&while
2086*260e9a87SYuri Pankovloops are not.
208795c635efSGarrett D'Amore.El
2088*260e9a87SYuri Pankov.Pp
2089*260e9a87SYuri PankovThe special semantics of the
2090*260e9a87SYuri Pankov.Cm nS
2091*260e9a87SYuri Pankovnumber register is an idiosyncracy of
2092*260e9a87SYuri Pankov.Ox
2093*260e9a87SYuri Pankovmanuals and not supported by other
2094*260e9a87SYuri Pankov.Xr mdoc 5
2095*260e9a87SYuri Pankovimplementations.
209695c635efSGarrett D'Amore.Sh SEE ALSO
209795c635efSGarrett D'Amore.Xr mandoc 1 ,
209895c635efSGarrett D'Amore.Xr eqn 5 ,
209995c635efSGarrett D'Amore.Xr man 5 ,
210095c635efSGarrett D'Amore.Xr mandoc_char 5 ,
210195c635efSGarrett D'Amore.Xr mdoc 5 ,
210295c635efSGarrett D'Amore.Xr tbl 5
210395c635efSGarrett D'Amore.Rs
210495c635efSGarrett D'Amore.%A Joseph F. Ossanna
210595c635efSGarrett D'Amore.%A Brian W. Kernighan
210695c635efSGarrett D'Amore.%I AT&T Bell Laboratories
210795c635efSGarrett D'Amore.%T Troff User's Manual
210895c635efSGarrett D'Amore.%R Computing Science Technical Report
210995c635efSGarrett D'Amore.%N 54
211095c635efSGarrett D'Amore.%C Murray Hill, New Jersey
211195c635efSGarrett D'Amore.%D 1976 and 1992
211295c635efSGarrett D'Amore.%U http://www.kohala.com/start/troff/cstr54.ps
211395c635efSGarrett D'Amore.Re
211495c635efSGarrett D'Amore.Rs
211595c635efSGarrett D'Amore.%A Joseph F. Ossanna
211695c635efSGarrett D'Amore.%A Brian W. Kernighan
211795c635efSGarrett D'Amore.%A Gunnar Ritter
211895c635efSGarrett D'Amore.%T Heirloom Documentation Tools Nroff/Troff User's Manual
211995c635efSGarrett D'Amore.%D September 17, 2007
212095c635efSGarrett D'Amore.%U http://heirloom.sourceforge.net/doctools/troff.pdf
212195c635efSGarrett D'Amore.Re
212295c635efSGarrett D'Amore.Sh HISTORY
212395c635efSGarrett D'AmoreThe RUNOFF typesetting system, whose input forms the basis for
212495c635efSGarrett D'Amore.Nm ,
212595c635efSGarrett D'Amorewas written in MAD and FAP for the CTSS operating system by Jerome E.
212695c635efSGarrett D'AmoreSaltzer in 1964.
212795c635efSGarrett D'AmoreDoug McIlroy rewrote it in BCPL in 1969, renaming it
212895c635efSGarrett D'Amore.Nm .
212995c635efSGarrett D'AmoreDennis M. Ritchie rewrote McIlroy's
213095c635efSGarrett D'Amore.Nm
213195c635efSGarrett D'Amorein PDP-11 assembly for
213295c635efSGarrett D'Amore.At v1 ,
213395c635efSGarrett D'AmoreJoseph F. Ossanna improved roff and renamed it nroff
213495c635efSGarrett D'Amorefor
213595c635efSGarrett D'Amore.At v2 ,
213695c635efSGarrett D'Amorethen ported nroff to C as troff, which Brian W. Kernighan released with
213795c635efSGarrett D'Amore.At v7 .
213895c635efSGarrett D'AmoreIn 1989, James Clarke re-implemented troff in C++, naming it groff.
213995c635efSGarrett D'Amore.Sh AUTHORS
214095c635efSGarrett D'Amore.An -nosplit
214195c635efSGarrett D'AmoreThis
214295c635efSGarrett D'Amore.Nm
214395c635efSGarrett D'Amorereference was written by
2144*260e9a87SYuri Pankov.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
214595c635efSGarrett D'Amoreand
2146*260e9a87SYuri Pankov.An Ingo Schwarze Aq Mt schwarze@openbsd.org .
2147