xref: /minix3/external/bsd/mdocml/dist/roff.7 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc.\"	Id: roff.7,v 1.46 2013/12/26 02:43:18 schwarze Exp
2d65f6f70SBen Gras.\"
3*0a6a1f1dSLionel Sambuc.\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
4*0a6a1f1dSLionel Sambuc.\" Copyright (c) 2010, 2011, 2013 Ingo Schwarze <schwarze@openbsd.org>
5d65f6f70SBen Gras.\"
6d65f6f70SBen Gras.\" Permission to use, copy, modify, and distribute this software for any
7d65f6f70SBen Gras.\" purpose with or without fee is hereby granted, provided that the above
8d65f6f70SBen Gras.\" copyright notice and this permission notice appear in all copies.
9d65f6f70SBen Gras.\"
10d65f6f70SBen Gras.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11d65f6f70SBen Gras.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12d65f6f70SBen Gras.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13d65f6f70SBen Gras.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14d65f6f70SBen Gras.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15d65f6f70SBen Gras.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16d65f6f70SBen Gras.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17d65f6f70SBen Gras.\"
18*0a6a1f1dSLionel Sambuc.Dd December 26, 2013
19d65f6f70SBen Gras.Dt ROFF 7
20d65f6f70SBen Gras.Os
21d65f6f70SBen Gras.Sh NAME
22d65f6f70SBen Gras.Nm roff
23d65f6f70SBen Gras.Nd roff language reference for mandoc
24d65f6f70SBen Gras.Sh DESCRIPTION
25d65f6f70SBen GrasThe
26d65f6f70SBen Gras.Nm roff
27d65f6f70SBen Graslanguage is a general purpose text formatting language.
2892395e9cSLionel SambucSince traditional implementations of the
29d65f6f70SBen Gras.Xr mdoc 7
30d65f6f70SBen Grasand
31d65f6f70SBen Gras.Xr man 7
3292395e9cSLionel Sambucmanual formatting languages are based on it,
3392395e9cSLionel Sambucmany real-world manuals use small numbers of
34d65f6f70SBen Gras.Nm
35*0a6a1f1dSLionel Sambucrequests and escape sequences intermixed with their
3692395e9cSLionel Sambuc.Xr mdoc 7
37d65f6f70SBen Grasor
3892395e9cSLionel Sambuc.Xr man 7
3992395e9cSLionel Sambuccode.
4092395e9cSLionel SambucTo properly format such manuals, the
4192395e9cSLionel Sambuc.Xr mandoc 1
4292395e9cSLionel Sambucutility supports a tiny subset of
4392395e9cSLionel Sambuc.Nm
44*0a6a1f1dSLionel Sambucrequests and escapes.
45*0a6a1f1dSLionel SambucOnly these requests and escapes supported by
4692395e9cSLionel Sambuc.Xr mandoc 1
4792395e9cSLionel Sambucare documented in the present manual,
4892395e9cSLionel Sambuctogether with the basic language syntax shared by
4992395e9cSLionel Sambuc.Nm ,
5092395e9cSLionel Sambuc.Xr mdoc 7 ,
5192395e9cSLionel Sambucand
5292395e9cSLionel Sambuc.Xr man 7 .
5392395e9cSLionel SambucFor complete
5492395e9cSLionel Sambuc.Nm
5592395e9cSLionel Sambucmanuals, consult the
5692395e9cSLionel Sambuc.Sx SEE ALSO
5792395e9cSLionel Sambucsection.
58d65f6f70SBen Gras.Pp
5992395e9cSLionel SambucInput lines beginning with the control character
6092395e9cSLionel Sambuc.Sq \&.
6192395e9cSLionel Sambucare parsed for requests and macros.
6292395e9cSLionel SambucSuch lines are called
6392395e9cSLionel Sambuc.Dq request lines
6492395e9cSLionel Sambucor
6592395e9cSLionel Sambuc.Dq macro lines ,
6692395e9cSLionel Sambucrespectively.
6792395e9cSLionel SambucRequests change the processing state and manipulate the formatting;
6892395e9cSLionel Sambucsome macros also define the document structure and produce formatted
6992395e9cSLionel Sambucoutput.
7092395e9cSLionel SambucThe single quote
7192395e9cSLionel Sambuc.Pq Qq \(aq
7292395e9cSLionel Sambucis accepted as an alternative control character,
7392395e9cSLionel Sambuctreated by
7492395e9cSLionel Sambuc.Xr mandoc 1
7592395e9cSLionel Sambucjust like
7692395e9cSLionel Sambuc.Ql \&.
7792395e9cSLionel Sambuc.Pp
7892395e9cSLionel SambucLines not beginning with control characters are called
7992395e9cSLionel Sambuc.Dq text lines .
8092395e9cSLionel SambucThey provide free-form text to be printed; the formatting of the text
8192395e9cSLionel Sambucdepends on the respective processing context.
82d65f6f70SBen Gras.Sh LANGUAGE SYNTAX
83d65f6f70SBen Gras.Nm
84d65f6f70SBen Grasdocuments may contain only graphable 7-bit ASCII characters, the space
85d65f6f70SBen Grascharacter, and, in certain circumstances, the tab character.
86*0a6a1f1dSLionel SambucThe backslash character
8792395e9cSLionel Sambuc.Sq \e
88*0a6a1f1dSLionel Sambucindicates the start of an escape sequence, used for example for
8992395e9cSLionel Sambuc.Sx Comments ,
9092395e9cSLionel Sambuc.Sx Special Characters ,
9192395e9cSLionel Sambuc.Sx Predefined Strings ,
9292395e9cSLionel Sambucand
9392395e9cSLionel Sambucuser-defined strings defined using the
9492395e9cSLionel Sambuc.Sx ds
9592395e9cSLionel Sambucrequest.
96*0a6a1f1dSLionel SambucFor a listing of escape sequences, consult the
97*0a6a1f1dSLionel Sambuc.Sx ESCAPE SEQUENCE REFERENCE
98*0a6a1f1dSLionel Sambucbelow.
9992395e9cSLionel Sambuc.Ss Comments
10092395e9cSLionel SambucText following an escaped double-quote
10192395e9cSLionel Sambuc.Sq \e\(dq ,
10292395e9cSLionel Sambucwhether in a request, macro, or text line, is ignored to the end of the line.
10392395e9cSLionel SambucA request line beginning with a control character and comment escape
10492395e9cSLionel Sambuc.Sq \&.\e\(dq
10592395e9cSLionel Sambucis also ignored.
10692395e9cSLionel SambucFurthermore, request lines with only a control character and optional
10792395e9cSLionel Sambuctrailing whitespace are stripped from input.
108d65f6f70SBen Gras.Pp
10992395e9cSLionel SambucExamples:
11092395e9cSLionel Sambuc.Bd -literal -offset indent -compact
11192395e9cSLionel Sambuc\&.\e\(dq This is a comment line.
11292395e9cSLionel Sambuc\&.\e\(dq The next line is ignored:
11392395e9cSLionel Sambuc\&.
11492395e9cSLionel Sambuc\&.Sh EXAMPLES \e\(dq This is a comment, too.
11592395e9cSLionel Sambuc\&example text \e\(dq And so is this.
11692395e9cSLionel Sambuc.Ed
11792395e9cSLionel Sambuc.Ss Special Characters
11892395e9cSLionel SambucSpecial characters are used to encode special glyphs and are rendered
11992395e9cSLionel Sambucdifferently across output media.
12092395e9cSLionel SambucThey may occur in request, macro, and text lines.
12192395e9cSLionel SambucSequences begin with the escape character
12292395e9cSLionel Sambuc.Sq \e
12392395e9cSLionel Sambucfollowed by either an open-parenthesis
12492395e9cSLionel Sambuc.Sq \&(
12592395e9cSLionel Sambucfor two-character sequences; an open-bracket
12692395e9cSLionel Sambuc.Sq \&[
12792395e9cSLionel Sambucfor n-character sequences (terminated at a close-bracket
12892395e9cSLionel Sambuc.Sq \&] ) ;
12992395e9cSLionel Sambucor a single one character sequence.
13092395e9cSLionel Sambuc.Pp
13192395e9cSLionel SambucExamples:
13292395e9cSLionel Sambuc.Bl -tag -width Ds -offset indent -compact
13392395e9cSLionel Sambuc.It Li \e(em
13492395e9cSLionel SambucTwo-letter em dash escape.
13592395e9cSLionel Sambuc.It Li \ee
13692395e9cSLionel SambucOne-letter backslash escape.
13792395e9cSLionel Sambuc.El
13892395e9cSLionel Sambuc.Pp
13992395e9cSLionel SambucSee
14092395e9cSLionel Sambuc.Xr mandoc_char 7
14192395e9cSLionel Sambucfor a complete list.
14292395e9cSLionel Sambuc.Ss Text Decoration
14392395e9cSLionel SambucTerms may be text-decorated using the
14492395e9cSLionel Sambuc.Sq \ef
14592395e9cSLionel Sambucescape followed by an indicator: B (bold), I (italic), R (regular), or P
14692395e9cSLionel Sambuc(revert to previous mode).
14792395e9cSLionel SambucA numerical representation 3, 2, or 1 (bold, italic, and regular,
14892395e9cSLionel Sambucrespectively) may be used instead.
14992395e9cSLionel SambucThe indicator or numerical representative may be preceded by C
15092395e9cSLionel Sambuc(constant-width), which is ignored.
15192395e9cSLionel Sambuc.Pp
152*0a6a1f1dSLionel SambucThe two-character indicator
153*0a6a1f1dSLionel Sambuc.Sq BI
154*0a6a1f1dSLionel Sambucrequests a font that is both bold and italic.
155*0a6a1f1dSLionel SambucIt may not be portable to old roff implementations.
156*0a6a1f1dSLionel Sambuc.Pp
15792395e9cSLionel SambucExamples:
15892395e9cSLionel Sambuc.Bl -tag -width Ds -offset indent -compact
15992395e9cSLionel Sambuc.It Li \efBbold\efR
160*0a6a1f1dSLionel SambucWrite in \fBbold\fP, then switch to regular font mode.
16192395e9cSLionel Sambuc.It Li \efIitalic\efP
162*0a6a1f1dSLionel SambucWrite in \fIitalic\fP, then return to previous font mode.
163*0a6a1f1dSLionel Sambuc.It Li \ef(BIbold italic\efP
164*0a6a1f1dSLionel SambucWrite in \f(BIbold italic\fP, then return to previous font mode.
16592395e9cSLionel Sambuc.El
16692395e9cSLionel Sambuc.Pp
16792395e9cSLionel SambucText decoration is
16892395e9cSLionel Sambuc.Em not
16992395e9cSLionel Sambucrecommended for
17092395e9cSLionel Sambuc.Xr mdoc 7 ,
17192395e9cSLionel Sambucwhich encourages semantic annotation.
17292395e9cSLionel Sambuc.Ss Predefined Strings
17392395e9cSLionel SambucPredefined strings, like
17492395e9cSLionel Sambuc.Sx Special Characters ,
17592395e9cSLionel Sambucmark special output glyphs.
17692395e9cSLionel SambucPredefined strings are escaped with the slash-asterisk,
17792395e9cSLionel Sambuc.Sq \e* :
17892395e9cSLionel Sambucsingle-character
17992395e9cSLionel Sambuc.Sq \e*X ,
18092395e9cSLionel Sambuctwo-character
18192395e9cSLionel Sambuc.Sq \e*(XX ,
18292395e9cSLionel Sambucand N-character
18392395e9cSLionel Sambuc.Sq \e*[N] .
18492395e9cSLionel Sambuc.Pp
18592395e9cSLionel SambucExamples:
18692395e9cSLionel Sambuc.Bl -tag -width Ds -offset indent -compact
18792395e9cSLionel Sambuc.It Li \e*(Am
18892395e9cSLionel SambucTwo-letter ampersand predefined string.
18992395e9cSLionel Sambuc.It Li \e*q
19092395e9cSLionel SambucOne-letter double-quote predefined string.
19192395e9cSLionel Sambuc.El
19292395e9cSLionel Sambuc.Pp
19392395e9cSLionel SambucPredefined strings are not recommended for use,
19492395e9cSLionel Sambucas they differ across implementations.
19592395e9cSLionel SambucThose supported by
19692395e9cSLionel Sambuc.Xr mandoc 1
19792395e9cSLionel Sambucare listed in
19892395e9cSLionel Sambuc.Xr mandoc_char 7 .
19992395e9cSLionel SambucManuals using these predefined strings are almost certainly not portable.
20092395e9cSLionel Sambuc.Ss Whitespace
20192395e9cSLionel SambucWhitespace consists of the space character.
20292395e9cSLionel SambucIn text lines, whitespace is preserved within a line.
20392395e9cSLionel SambucIn request and macro lines, whitespace delimits arguments and is discarded.
20492395e9cSLionel Sambuc.Pp
20592395e9cSLionel SambucUnescaped trailing spaces are stripped from text line input unless in a
20692395e9cSLionel Sambucliteral context.
20792395e9cSLionel SambucIn general, trailing whitespace on any input line is discouraged for
20892395e9cSLionel Sambucreasons of portability.
20992395e9cSLionel SambucIn the rare case that a blank character is needed at the end of an
21092395e9cSLionel Sambucinput line, it may be forced by
21192395e9cSLionel Sambuc.Sq \e\ \e& .
21292395e9cSLionel Sambuc.Pp
21392395e9cSLionel SambucLiteral space characters can be produced in the output
21492395e9cSLionel Sambucusing escape sequences.
21592395e9cSLionel SambucIn macro lines, they can also be included in arguments using quotation; see
21692395e9cSLionel Sambuc.Sx MACRO SYNTAX
21792395e9cSLionel Sambucfor details.
21892395e9cSLionel Sambuc.Pp
21992395e9cSLionel SambucBlank text lines, which may include whitespace, are only permitted
22092395e9cSLionel Sambucwithin literal contexts.
22192395e9cSLionel SambucIf the first character of a text line is a space, that line is printed
22292395e9cSLionel Sambucwith a leading newline.
22392395e9cSLionel Sambuc.Ss Scaling Widths
22492395e9cSLionel SambucMany requests and macros support scaled widths for their arguments.
22592395e9cSLionel SambucThe syntax for a scaled width is
22692395e9cSLionel Sambuc.Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
22792395e9cSLionel Sambucwhere a decimal must be preceded or followed by at least one digit.
22892395e9cSLionel SambucNegative numbers, while accepted, are truncated to zero.
22992395e9cSLionel Sambuc.Pp
23092395e9cSLionel SambucThe following scaling units are accepted:
23192395e9cSLionel Sambuc.Pp
23292395e9cSLionel Sambuc.Bl -tag -width Ds -offset indent -compact
23392395e9cSLionel Sambuc.It c
23492395e9cSLionel Sambuccentimetre
23592395e9cSLionel Sambuc.It i
23692395e9cSLionel Sambucinch
23792395e9cSLionel Sambuc.It P
23892395e9cSLionel Sambucpica (~1/6 inch)
23992395e9cSLionel Sambuc.It p
24092395e9cSLionel Sambucpoint (~1/72 inch)
24192395e9cSLionel Sambuc.It f
24292395e9cSLionel Sambucsynonym for
24392395e9cSLionel Sambuc.Sq u
24492395e9cSLionel Sambuc.It v
24592395e9cSLionel Sambucdefault vertical span
24692395e9cSLionel Sambuc.It m
24792395e9cSLionel Sambucwidth of rendered
24892395e9cSLionel Sambuc.Sq m
24992395e9cSLionel Sambuc.Pq em
25092395e9cSLionel Sambuccharacter
25192395e9cSLionel Sambuc.It n
25292395e9cSLionel Sambucwidth of rendered
25392395e9cSLionel Sambuc.Sq n
25492395e9cSLionel Sambuc.Pq en
25592395e9cSLionel Sambuccharacter
25692395e9cSLionel Sambuc.It u
25792395e9cSLionel Sambucdefault horizontal span
25892395e9cSLionel Sambuc.It M
25992395e9cSLionel Sambucmini-em (~1/100 em)
26092395e9cSLionel Sambuc.El
26192395e9cSLionel Sambuc.Pp
26292395e9cSLionel SambucUsing anything other than
26392395e9cSLionel Sambuc.Sq m ,
26492395e9cSLionel Sambuc.Sq n ,
26592395e9cSLionel Sambuc.Sq u ,
26692395e9cSLionel Sambucor
26792395e9cSLionel Sambuc.Sq v
26892395e9cSLionel Sambucis necessarily non-portable across output media.
26992395e9cSLionel SambucSee
27092395e9cSLionel Sambuc.Sx COMPATIBILITY .
27192395e9cSLionel Sambuc.Pp
27292395e9cSLionel SambucIf a scaling unit is not provided, the numerical value is interpreted
27392395e9cSLionel Sambucunder the default rules of
27492395e9cSLionel Sambuc.Sq v
27592395e9cSLionel Sambucfor vertical spaces and
27692395e9cSLionel Sambuc.Sq u
27792395e9cSLionel Sambucfor horizontal ones.
27892395e9cSLionel Sambuc.Pp
27992395e9cSLionel SambucExamples:
28092395e9cSLionel Sambuc.Bl -tag -width ".Bl -tag -width 2i" -offset indent -compact
28192395e9cSLionel Sambuc.It Li \&.Bl -tag -width 2i
28292395e9cSLionel Sambuctwo-inch tagged list indentation in
28392395e9cSLionel Sambuc.Xr mdoc 7
28492395e9cSLionel Sambuc.It Li \&.HP 2i
28592395e9cSLionel Sambuctwo-inch tagged list indentation in
28692395e9cSLionel Sambuc.Xr man 7
28792395e9cSLionel Sambuc.It Li \&.sp 2v
28892395e9cSLionel Sambuctwo vertical spaces
28992395e9cSLionel Sambuc.El
29092395e9cSLionel Sambuc.Ss Sentence Spacing
29192395e9cSLionel SambucEach sentence should terminate at the end of an input line.
29292395e9cSLionel SambucBy doing this, a formatter will be able to apply the proper amount of
29392395e9cSLionel Sambucspacing after the end of sentence (unescaped) period, exclamation mark,
29492395e9cSLionel Sambucor question mark followed by zero or more non-sentence closing
29592395e9cSLionel Sambucdelimiters
29692395e9cSLionel Sambuc.Po
29792395e9cSLionel Sambuc.Sq \&) ,
29892395e9cSLionel Sambuc.Sq \&] ,
29992395e9cSLionel Sambuc.Sq \&' ,
30092395e9cSLionel Sambuc.Sq \&"
30192395e9cSLionel Sambuc.Pc .
30292395e9cSLionel Sambuc.Pp
30392395e9cSLionel SambucThe proper spacing is also intelligently preserved if a sentence ends at
30492395e9cSLionel Sambucthe boundary of a macro line.
30592395e9cSLionel Sambuc.Pp
30692395e9cSLionel SambucExamples:
30792395e9cSLionel Sambuc.Bd -literal -offset indent -compact
30892395e9cSLionel SambucDo not end sentences mid-line like this.  Instead,
30992395e9cSLionel Sambucend a sentence like this.
31092395e9cSLionel SambucA macro would end like this:
31192395e9cSLionel Sambuc\&.Xr mandoc 1 \&.
31292395e9cSLionel Sambuc.Ed
313d65f6f70SBen Gras.Sh REQUEST SYNTAX
314d65f6f70SBen GrasA request or macro line consists of:
315d65f6f70SBen Gras.Pp
316d65f6f70SBen Gras.Bl -enum -compact
317d65f6f70SBen Gras.It
318d65f6f70SBen Grasthe control character
319d65f6f70SBen Gras.Sq \&.
320d65f6f70SBen Grasor
321d65f6f70SBen Gras.Sq \(aq
322d65f6f70SBen Grasat the beginning of the line,
323d65f6f70SBen Gras.It
324d65f6f70SBen Grasoptionally an arbitrary amount of whitespace,
325d65f6f70SBen Gras.It
326d65f6f70SBen Grasthe name of the request or the macro, which is one word of arbitrary
327d65f6f70SBen Graslength, terminated by whitespace,
328d65f6f70SBen Gras.It
329d65f6f70SBen Grasand zero or more arguments delimited by whitespace.
330d65f6f70SBen Gras.El
331d65f6f70SBen Gras.Pp
332d65f6f70SBen GrasThus, the following request lines are all equivalent:
333d65f6f70SBen Gras.Bd -literal -offset indent
334d65f6f70SBen Gras\&.ig end
335d65f6f70SBen Gras\&.ig    end
336d65f6f70SBen Gras\&.   ig end
337d65f6f70SBen Gras.Ed
33892395e9cSLionel Sambuc.Sh MACRO SYNTAX
33992395e9cSLionel SambucMacros are provided by the
34092395e9cSLionel Sambuc.Xr mdoc 7
34192395e9cSLionel Sambucand
34292395e9cSLionel Sambuc.Xr man 7
34392395e9cSLionel Sambuclanguages and can be defined by the
34492395e9cSLionel Sambuc.Sx \&de
34592395e9cSLionel Sambucrequest.
34692395e9cSLionel SambucWhen called, they follow the same syntax as requests, except that
34792395e9cSLionel Sambucmacro arguments may optionally be quoted by enclosing them
34892395e9cSLionel Sambucin double quote characters
34992395e9cSLionel Sambuc.Pq Sq \(dq .
35092395e9cSLionel SambucQuoted text, even if it contains whitespace or would cause
35192395e9cSLionel Sambuca macro invocation when unquoted, is always considered literal text.
35292395e9cSLionel SambucInside quoted text, pairs of double quote characters
35392395e9cSLionel Sambuc.Pq Sq Qq
35492395e9cSLionel Sambucresolve to single double quote characters.
35592395e9cSLionel Sambuc.Pp
35692395e9cSLionel SambucTo be recognised as the beginning of a quoted argument, the opening
35792395e9cSLionel Sambucquote character must be preceded by a space character.
35892395e9cSLionel SambucA quoted argument extends to the next double quote character that is not
35992395e9cSLionel Sambucpart of a pair, or to the end of the input line, whichever comes earlier.
36092395e9cSLionel SambucLeaving out the terminating double quote character at the end of the line
36192395e9cSLionel Sambucis discouraged.
36292395e9cSLionel SambucFor clarity, if more arguments follow on the same input line,
36392395e9cSLionel Sambucit is recommended to follow the terminating double quote character
36492395e9cSLionel Sambucby a space character; in case the next character after the terminating
36592395e9cSLionel Sambucdouble quote character is anything else, it is regarded as the beginning
36692395e9cSLionel Sambucof the next, unquoted argument.
36792395e9cSLionel Sambuc.Pp
36892395e9cSLionel SambucBoth in quoted and unquoted arguments, pairs of backslashes
36992395e9cSLionel Sambuc.Pq Sq \e\e
37092395e9cSLionel Sambucresolve to single backslashes.
37192395e9cSLionel SambucIn unquoted arguments, space characters can alternatively be included
37292395e9cSLionel Sambucby preceding them with a backslash
37392395e9cSLionel Sambuc.Pq Sq \e\~ ,
37492395e9cSLionel Sambucbut quoting is usually better for clarity.
37592395e9cSLionel Sambuc.Pp
37692395e9cSLionel SambucExamples:
37792395e9cSLionel Sambuc.Bl -tag -width Ds -offset indent -compact
37892395e9cSLionel Sambuc.It Li .Fn strlen \(dqconst char *s\(dq
37992395e9cSLionel SambucGroup arguments
38092395e9cSLionel Sambuc.Qq const char *s
38192395e9cSLionel Sambucinto one function argument.
38292395e9cSLionel SambucIf unspecified,
38392395e9cSLionel Sambuc.Qq const ,
38492395e9cSLionel Sambuc.Qq char ,
38592395e9cSLionel Sambucand
38692395e9cSLionel Sambuc.Qq *s
38792395e9cSLionel Sambucwould be considered separate arguments.
38892395e9cSLionel Sambuc.It Li .Op \(dqFl a\(dq
38992395e9cSLionel SambucConsider
39092395e9cSLionel Sambuc.Qq \&Fl a
39192395e9cSLionel Sambucas literal text instead of a flag macro.
39292395e9cSLionel Sambuc.El
393d65f6f70SBen Gras.Sh REQUEST REFERENCE
394d65f6f70SBen GrasThe
395d65f6f70SBen Gras.Xr mandoc 1
396d65f6f70SBen Gras.Nm
39792395e9cSLionel Sambucparser recognises the following requests.
398d65f6f70SBen GrasNote that the
399d65f6f70SBen Gras.Nm
400d65f6f70SBen Graslanguage defines many more requests not implemented in
401d65f6f70SBen Gras.Xr mandoc 1 .
402d65f6f70SBen Gras.Ss \&ad
403d65f6f70SBen GrasSet line adjustment mode.
404d65f6f70SBen GrasThis line-scoped request is intended to have one argument to select
40592395e9cSLionel Sambucnormal, left, right, or centre adjustment for subsequent text.
406d65f6f70SBen GrasCurrently, it is ignored including its arguments,
407d65f6f70SBen Grasand the number of arguments is not checked.
408d65f6f70SBen Gras.Ss \&am
409d65f6f70SBen GrasAppend to a macro definition.
410d65f6f70SBen GrasThe syntax of this request is the same as that of
411d65f6f70SBen Gras.Sx \&de .
412d65f6f70SBen GrasIt is currently ignored by
413d65f6f70SBen Gras.Xr mandoc 1 ,
414d65f6f70SBen Grasas are its children.
415d65f6f70SBen Gras.Ss \&ami
416d65f6f70SBen GrasAppend to a macro definition, specifying the macro name indirectly.
417d65f6f70SBen GrasThe syntax of this request is the same as that of
418d65f6f70SBen Gras.Sx \&dei .
419d65f6f70SBen GrasIt is currently ignored by
420d65f6f70SBen Gras.Xr mandoc 1 ,
421d65f6f70SBen Grasas are its children.
422d65f6f70SBen Gras.Ss \&am1
423d65f6f70SBen GrasAppend to a macro definition, switching roff compatibility mode off
424d65f6f70SBen Grasduring macro execution.
425d65f6f70SBen GrasThe syntax of this request is the same as that of
426d65f6f70SBen Gras.Sx \&de1 .
427d65f6f70SBen GrasIt is currently ignored by
428d65f6f70SBen Gras.Xr mandoc 1 ,
429d65f6f70SBen Grasas are its children.
430*0a6a1f1dSLionel Sambuc.Ss \&cc
431*0a6a1f1dSLionel SambucChanges the control character.
432*0a6a1f1dSLionel SambucIts syntax is as follows:
433*0a6a1f1dSLionel Sambuc.Bd -literal -offset indent
434*0a6a1f1dSLionel Sambuc.Pf . Cm \&cc Op Ar c
435*0a6a1f1dSLionel Sambuc.Ed
436*0a6a1f1dSLionel Sambuc.Pp
437*0a6a1f1dSLionel SambucIf
438*0a6a1f1dSLionel Sambuc.Ar c
439*0a6a1f1dSLionel Sambucis not specified, the control character is reset to
440*0a6a1f1dSLionel Sambuc.Sq \&. .
441*0a6a1f1dSLionel SambucTrailing characters are ignored.
442d65f6f70SBen Gras.Ss \&de
443d65f6f70SBen GrasDefine a
444d65f6f70SBen Gras.Nm
445d65f6f70SBen Grasmacro.
446d65f6f70SBen GrasIts syntax can be either
447d65f6f70SBen Gras.Bd -literal -offset indent
448d65f6f70SBen Gras.Pf . Cm \&de Ar name
449d65f6f70SBen Gras.Ar macro definition
450d65f6f70SBen Gras\&..
451d65f6f70SBen Gras.Ed
452d65f6f70SBen Gras.Pp
453d65f6f70SBen Grasor
454d65f6f70SBen Gras.Bd -literal -offset indent
455d65f6f70SBen Gras.Pf . Cm \&de Ar name Ar end
456d65f6f70SBen Gras.Ar macro definition
457d65f6f70SBen Gras.Pf . Ar end
458d65f6f70SBen Gras.Ed
459d65f6f70SBen Gras.Pp
460d65f6f70SBen GrasBoth forms define or redefine the macro
461d65f6f70SBen Gras.Ar name
462d65f6f70SBen Grasto represent the
463d65f6f70SBen Gras.Ar macro definition ,
464d65f6f70SBen Graswhich may consist of one or more input lines, including the newline
465d65f6f70SBen Grascharacters terminating each line, optionally containing calls to
466d65f6f70SBen Gras.Nm
467d65f6f70SBen Grasrequests,
468d65f6f70SBen Gras.Nm
469d65f6f70SBen Grasmacros or high-level macros like
470d65f6f70SBen Gras.Xr man 7
471d65f6f70SBen Grasor
472d65f6f70SBen Gras.Xr mdoc 7
473d65f6f70SBen Grasmacros, whichever applies to the document in question.
474d65f6f70SBen Gras.Pp
475d65f6f70SBen GrasSpecifying a custom
476d65f6f70SBen Gras.Ar end
477d65f6f70SBen Grasmacro works in the same way as for
478d65f6f70SBen Gras.Sx \&ig ;
479d65f6f70SBen Grasnamely, the call to
480d65f6f70SBen Gras.Sq Pf . Ar end
481d65f6f70SBen Grasfirst ends the
482d65f6f70SBen Gras.Ar macro definition ,
483d65f6f70SBen Grasand after that, it is also evaluated as a
484d65f6f70SBen Gras.Nm
485d65f6f70SBen Grasrequest or
486d65f6f70SBen Gras.Nm
487d65f6f70SBen Grasmacro, but not as a high-level macro.
488d65f6f70SBen Gras.Pp
489d65f6f70SBen GrasThe macro can be invoked later using the syntax
490d65f6f70SBen Gras.Pp
491d65f6f70SBen Gras.D1 Pf . Ar name Op Ar argument Op Ar argument ...
492d65f6f70SBen Gras.Pp
49392395e9cSLionel SambucRegarding argument parsing, see
49492395e9cSLionel Sambuc.Sx MACRO SYNTAX
49592395e9cSLionel Sambucabove.
496d65f6f70SBen Gras.Pp
497d65f6f70SBen GrasThe line invoking the macro will be replaced
498d65f6f70SBen Grasin the input stream by the
499d65f6f70SBen Gras.Ar macro definition ,
500d65f6f70SBen Grasreplacing all occurrences of
501d65f6f70SBen Gras.No \e\e$ Ns Ar N ,
502d65f6f70SBen Graswhere
503d65f6f70SBen Gras.Ar N
504d65f6f70SBen Grasis a digit, by the
505d65f6f70SBen Gras.Ar N Ns th Ar argument .
506d65f6f70SBen GrasFor example,
507d65f6f70SBen Gras.Bd -literal -offset indent
508d65f6f70SBen Gras\&.de ZN
509d65f6f70SBen Gras\efI\e^\e\e$1\e^\efP\e\e$2
510d65f6f70SBen Gras\&..
511d65f6f70SBen Gras\&.ZN XtFree .
512d65f6f70SBen Gras.Ed
513d65f6f70SBen Gras.Pp
514d65f6f70SBen Grasproduces
515d65f6f70SBen Gras.Pp
516d65f6f70SBen Gras.D1 \efI\e^XtFree\e^\efP.
517d65f6f70SBen Gras.Pp
518d65f6f70SBen Grasin the input stream, and thus in the output: \fI\^XtFree\^\fP.
519d65f6f70SBen Gras.Pp
520d65f6f70SBen GrasSince macros and user-defined strings share a common string table,
521d65f6f70SBen Grasdefining a macro
522d65f6f70SBen Gras.Ar name
523d65f6f70SBen Grasclobbers the user-defined string
524d65f6f70SBen Gras.Ar name ,
525d65f6f70SBen Grasand the
526d65f6f70SBen Gras.Ar macro definition
527d65f6f70SBen Grascan also be printed using the
528d65f6f70SBen Gras.Sq \e*
529d65f6f70SBen Grasstring interpolation syntax described below
530d65f6f70SBen Gras.Sx ds ,
531d65f6f70SBen Grasbut this is rarely useful because every macro definition contains at least
532d65f6f70SBen Grasone explicit newline character.
533d65f6f70SBen Gras.Pp
534d65f6f70SBen GrasIn order to prevent endless recursion, both groff and
535d65f6f70SBen Gras.Xr mandoc 1
536d65f6f70SBen Graslimit the stack depth for expanding macros and strings
537d65f6f70SBen Grasto a large, but finite number.
538d65f6f70SBen GrasDo not rely on the exact value of this limit.
539d65f6f70SBen Gras.Ss \&dei
540d65f6f70SBen GrasDefine a
541d65f6f70SBen Gras.Nm
542d65f6f70SBen Grasmacro, specifying the macro name indirectly.
543d65f6f70SBen GrasThe syntax of this request is the same as that of
544d65f6f70SBen Gras.Sx \&de .
545d65f6f70SBen GrasIt is currently ignored by
546d65f6f70SBen Gras.Xr mandoc 1 ,
547d65f6f70SBen Grasas are its children.
548d65f6f70SBen Gras.Ss \&de1
549d65f6f70SBen GrasDefine a
550d65f6f70SBen Gras.Nm
551d65f6f70SBen Grasmacro that will be executed with
552d65f6f70SBen Gras.Nm
553d65f6f70SBen Grascompatibility mode switched off during macro execution.
554d65f6f70SBen GrasThis is a GNU extension not available in traditional
555d65f6f70SBen Gras.Nm
556d65f6f70SBen Grasimplementations and not even in older versions of groff.
557d65f6f70SBen GrasSince
558d65f6f70SBen Gras.Xr mandoc 1
559d65f6f70SBen Grasdoes not implement
560d65f6f70SBen Gras.Nm
561d65f6f70SBen Grascompatibility mode at all, it handles this request as an alias for
562d65f6f70SBen Gras.Sx \&de .
563d65f6f70SBen Gras.Ss \&ds
564d65f6f70SBen GrasDefine a user-defined string.
565d65f6f70SBen GrasIts syntax is as follows:
566d65f6f70SBen Gras.Pp
567d65f6f70SBen Gras.D1 Pf . Cm \&ds Ar name Oo \(dq Oc Ns Ar string
568d65f6f70SBen Gras.Pp
569d65f6f70SBen GrasThe
570d65f6f70SBen Gras.Ar name
571d65f6f70SBen Grasand
572d65f6f70SBen Gras.Ar string
573d65f6f70SBen Grasarguments are space-separated.
574d65f6f70SBen GrasIf the
575d65f6f70SBen Gras.Ar string
576d65f6f70SBen Grasbegins with a double-quote character, that character will not be part
577d65f6f70SBen Grasof the string.
578d65f6f70SBen GrasAll remaining characters on the input line form the
579d65f6f70SBen Gras.Ar string ,
580d65f6f70SBen Grasincluding whitespace and double-quote characters, even trailing ones.
581d65f6f70SBen Gras.Pp
582d65f6f70SBen GrasThe
583d65f6f70SBen Gras.Ar string
584d65f6f70SBen Grascan be interpolated into subsequent text by using
585d65f6f70SBen Gras.No \e* Ns Bq Ar name
586d65f6f70SBen Grasfor a
587d65f6f70SBen Gras.Ar name
588d65f6f70SBen Grasof arbitrary length, or \e*(NN or \e*N if the length of
589d65f6f70SBen Gras.Ar name
590d65f6f70SBen Grasis two or one characters, respectively.
591d65f6f70SBen GrasInterpolation can be prevented by escaping the leading backslash;
592d65f6f70SBen Grasthat is, an asterisk preceded by an even number of backslashes
593d65f6f70SBen Grasdoes not trigger string interpolation.
594d65f6f70SBen Gras.Pp
595d65f6f70SBen GrasSince user-defined strings and macros share a common string table,
596d65f6f70SBen Grasdefining a string
597d65f6f70SBen Gras.Ar name
598d65f6f70SBen Grasclobbers the macro
599d65f6f70SBen Gras.Ar name ,
600d65f6f70SBen Grasand the
601d65f6f70SBen Gras.Ar name
602d65f6f70SBen Grasused for defining a string can also be invoked as a macro,
603d65f6f70SBen Grasin which case the following input line will be appended to the
604d65f6f70SBen Gras.Ar string ,
605d65f6f70SBen Grasforming a new input line passed to the
606d65f6f70SBen Gras.Nm
607d65f6f70SBen Grasparser.
608d65f6f70SBen GrasFor example,
609d65f6f70SBen Gras.Bd -literal -offset indent
610d65f6f70SBen Gras\&.ds badidea .S
611d65f6f70SBen Gras\&.badidea
612d65f6f70SBen GrasH SYNOPSIS
613d65f6f70SBen Gras.Ed
614d65f6f70SBen Gras.Pp
615d65f6f70SBen Grasinvokes the
616d65f6f70SBen Gras.Cm SH
617d65f6f70SBen Grasmacro when used in a
618d65f6f70SBen Gras.Xr man 7
619d65f6f70SBen Grasdocument.
620d65f6f70SBen GrasSuch abuse is of course strongly discouraged.
621d65f6f70SBen Gras.Ss \&el
622d65f6f70SBen GrasThe
623d65f6f70SBen Gras.Qq else
624d65f6f70SBen Grashalf of an if/else conditional.
625d65f6f70SBen GrasPops a result off the stack of conditional evaluations pushed by
626d65f6f70SBen Gras.Sx \&ie
627d65f6f70SBen Grasand uses it as its conditional.
628d65f6f70SBen GrasIf no stack entries are present (e.g., due to no prior
629d65f6f70SBen Gras.Sx \&ie
630d65f6f70SBen Grascalls)
631d65f6f70SBen Grasthen false is assumed.
632d65f6f70SBen GrasThe syntax of this request is similar to
633d65f6f70SBen Gras.Sx \&if
634d65f6f70SBen Grasexcept that the conditional is missing.
63592395e9cSLionel Sambuc.Ss \&EN
63692395e9cSLionel SambucEnd an equation block.
63792395e9cSLionel SambucSee
63892395e9cSLionel Sambuc.Sx \&EQ .
63992395e9cSLionel Sambuc.Ss \&EQ
64092395e9cSLionel SambucBegin an equation block.
64192395e9cSLionel SambucSee
64292395e9cSLionel Sambuc.Xr eqn 7
64392395e9cSLionel Sambucfor a description of the equation language.
644*0a6a1f1dSLionel Sambuc.Ss \&fam
645*0a6a1f1dSLionel SambucChange the font family.
646*0a6a1f1dSLionel SambucThis line-scoped request is intended to have one argument specifying
647*0a6a1f1dSLionel Sambucthe font family to be selected.
648*0a6a1f1dSLionel SambucIt is a groff extension, and currently, it is ignored including its
649*0a6a1f1dSLionel Sambucarguments, and the number of arguments is not checked.
650*0a6a1f1dSLionel Sambuc.Ss \&hw
651*0a6a1f1dSLionel SambucSpecify hyphenation points in words.
652*0a6a1f1dSLionel SambucThis line-scoped request is currently ignored.
653d65f6f70SBen Gras.Ss \&hy
654d65f6f70SBen GrasSet automatic hyphenation mode.
655d65f6f70SBen GrasThis line-scoped request is currently ignored.
656d65f6f70SBen Gras.Ss \&ie
657d65f6f70SBen GrasThe
658d65f6f70SBen Gras.Qq if
659d65f6f70SBen Grashalf of an if/else conditional.
660d65f6f70SBen GrasThe result of the conditional is pushed into a stack used by subsequent
661d65f6f70SBen Grasinvocations of
662d65f6f70SBen Gras.Sx \&el ,
663d65f6f70SBen Graswhich may be separated by any intervening input (or not exist at all).
664d65f6f70SBen GrasIts syntax is equivalent to
665d65f6f70SBen Gras.Sx \&if .
666d65f6f70SBen Gras.Ss \&if
667d65f6f70SBen GrasBegins a conditional.
668d65f6f70SBen GrasRight now, the conditional evaluates to true
669d65f6f70SBen Grasif and only if it starts with the letter
670d65f6f70SBen Gras.Sy n ,
671d65f6f70SBen Grasindicating processing in nroff style as opposed to troff style.
672d65f6f70SBen GrasIf a conditional is false, its children are not processed, but are
673d65f6f70SBen Grassyntactically interpreted to preserve the integrity of the input
674d65f6f70SBen Grasdocument.
675d65f6f70SBen GrasThus,
676d65f6f70SBen Gras.Pp
677d65f6f70SBen Gras.D1 \&.if t .ig
678d65f6f70SBen Gras.Pp
679d65f6f70SBen Graswill discard the
680d65f6f70SBen Gras.Sq \&.ig ,
681d65f6f70SBen Graswhich may lead to interesting results, but
682d65f6f70SBen Gras.Pp
683d65f6f70SBen Gras.D1 \&.if t .if t \e{\e
684d65f6f70SBen Gras.Pp
685d65f6f70SBen Graswill continue to syntactically interpret to the block close of the final
686d65f6f70SBen Grasconditional.
687d65f6f70SBen GrasSub-conditionals, in this case, obviously inherit the truth value of
688d65f6f70SBen Grasthe parent.
689d65f6f70SBen GrasThis request has the following syntax:
690d65f6f70SBen Gras.Bd -literal -offset indent
691d65f6f70SBen Gras\&.if COND \e{\e
692d65f6f70SBen GrasBODY...
693d65f6f70SBen Gras\&.\e}
694d65f6f70SBen Gras.Ed
695d65f6f70SBen Gras.Bd -literal -offset indent
696d65f6f70SBen Gras\&.if COND \e{ BODY
697d65f6f70SBen GrasBODY... \e}
698d65f6f70SBen Gras.Ed
699d65f6f70SBen Gras.Bd -literal -offset indent
700d65f6f70SBen Gras\&.if COND \e{ BODY
701d65f6f70SBen GrasBODY...
702d65f6f70SBen Gras\&.\e}
703d65f6f70SBen Gras.Ed
704d65f6f70SBen Gras.Bd -literal -offset indent
705d65f6f70SBen Gras\&.if COND \e
706d65f6f70SBen GrasBODY
707d65f6f70SBen Gras.Ed
708d65f6f70SBen Gras.Pp
709d65f6f70SBen GrasCOND is a conditional statement.
710d65f6f70SBen Grasroff allows for complicated conditionals; mandoc is much simpler.
711d65f6f70SBen GrasAt this time, mandoc supports only
712d65f6f70SBen Gras.Sq n ,
713d65f6f70SBen Grasevaluating to true;
714d65f6f70SBen Grasand
715d65f6f70SBen Gras.Sq t ,
716d65f6f70SBen Gras.Sq e ,
717d65f6f70SBen Grasand
718d65f6f70SBen Gras.Sq o ,
719d65f6f70SBen Grasevaluating to false.
720d65f6f70SBen GrasAll other invocations are read up to the next end of line or space and
721d65f6f70SBen Grasevaluate as false.
722d65f6f70SBen Gras.Pp
723d65f6f70SBen GrasIf the BODY section is begun by an escaped brace
724d65f6f70SBen Gras.Sq \e{ ,
725d65f6f70SBen Grasscope continues until a closing-brace escape sequence
726d65f6f70SBen Gras.Sq \.\e} .
727d65f6f70SBen GrasIf the BODY is not enclosed in braces, scope continues until
728d65f6f70SBen Grasthe end of the line.
729d65f6f70SBen GrasIf the COND is followed by a BODY on the same line, whether after a
730d65f6f70SBen Grasbrace or not, then requests and macros
731d65f6f70SBen Gras.Em must
732d65f6f70SBen Grasbegin with a control character.
733d65f6f70SBen GrasIt is generally more intuitive, in this case, to write
734d65f6f70SBen Gras.Bd -literal -offset indent
735d65f6f70SBen Gras\&.if COND \e{\e
736d65f6f70SBen Gras\&.foo
737d65f6f70SBen Grasbar
738d65f6f70SBen Gras\&.\e}
739d65f6f70SBen Gras.Ed
740d65f6f70SBen Gras.Pp
741d65f6f70SBen Grasthan having the request or macro follow as
742d65f6f70SBen Gras.Pp
743d65f6f70SBen Gras.D1 \&.if COND \e{ .foo
744d65f6f70SBen Gras.Pp
745d65f6f70SBen GrasThe scope of a conditional is always parsed, but only executed if the
746d65f6f70SBen Grasconditional evaluates to true.
747d65f6f70SBen Gras.Pp
74892395e9cSLionel SambucNote that the
749d65f6f70SBen Gras.Sq \e}
75092395e9cSLionel Sambucis converted into a zero-width escape sequence if not passed as a
75192395e9cSLionel Sambucstandalone macro
75292395e9cSLionel Sambuc.Sq \&.\e} .
75392395e9cSLionel SambucFor example,
75492395e9cSLionel Sambuc.Pp
75592395e9cSLionel Sambuc.D1 \&.Fl a \e} b
75692395e9cSLionel Sambuc.Pp
75792395e9cSLionel Sambucwill result in
758d65f6f70SBen Gras.Sq \e}
75992395e9cSLionel Sambucbeing considered an argument of the
76092395e9cSLionel Sambuc.Sq \&Fl
76192395e9cSLionel Sambucmacro.
762d65f6f70SBen Gras.Ss \&ig
763d65f6f70SBen GrasIgnore input.
764d65f6f70SBen GrasIts syntax can be either
765d65f6f70SBen Gras.Bd -literal -offset indent
766d65f6f70SBen Gras.Pf . Cm \&ig
767d65f6f70SBen Gras.Ar ignored text
768d65f6f70SBen Gras\&..
769d65f6f70SBen Gras.Ed
770d65f6f70SBen Gras.Pp
771d65f6f70SBen Grasor
772d65f6f70SBen Gras.Bd -literal -offset indent
773d65f6f70SBen Gras.Pf . Cm \&ig Ar end
774d65f6f70SBen Gras.Ar ignored text
775d65f6f70SBen Gras.Pf . Ar end
776d65f6f70SBen Gras.Ed
777d65f6f70SBen Gras.Pp
778d65f6f70SBen GrasIn the first case, input is ignored until a
779d65f6f70SBen Gras.Sq \&..
780d65f6f70SBen Grasrequest is encountered on its own line.
781d65f6f70SBen GrasIn the second case, input is ignored until the specified
782d65f6f70SBen Gras.Sq Pf . Ar end
783d65f6f70SBen Grasmacro is encountered.
784d65f6f70SBen GrasDo not use the escape character
785d65f6f70SBen Gras.Sq \e
786d65f6f70SBen Grasanywhere in the definition of
787d65f6f70SBen Gras.Ar end ;
788d65f6f70SBen Grasit would cause very strange behaviour.
789d65f6f70SBen Gras.Pp
790d65f6f70SBen GrasWhen the
791d65f6f70SBen Gras.Ar end
792d65f6f70SBen Grasmacro is a roff request or a roff macro, like in
793d65f6f70SBen Gras.Pp
794d65f6f70SBen Gras.D1 \&.ig if
795d65f6f70SBen Gras.Pp
796d65f6f70SBen Grasthe subsequent invocation of
797d65f6f70SBen Gras.Sx \&if
798d65f6f70SBen Graswill first terminate the
799d65f6f70SBen Gras.Ar ignored text ,
800d65f6f70SBen Grasthen be invoked as usual.
801d65f6f70SBen GrasOtherwise, it only terminates the
802d65f6f70SBen Gras.Ar ignored text ,
803d65f6f70SBen Grasand arguments following it or the
804d65f6f70SBen Gras.Sq \&..
805d65f6f70SBen Grasrequest are discarded.
806d65f6f70SBen Gras.Ss \&ne
807d65f6f70SBen GrasDeclare the need for the specified minimum vertical space
808d65f6f70SBen Grasbefore the next trap or the bottom of the page.
809d65f6f70SBen GrasThis line-scoped request is currently ignored.
810d65f6f70SBen Gras.Ss \&nh
811d65f6f70SBen GrasTurn off automatic hyphenation mode.
812d65f6f70SBen GrasThis line-scoped request is currently ignored.
813d65f6f70SBen Gras.Ss \&rm
814d65f6f70SBen GrasRemove a request, macro or string.
815d65f6f70SBen GrasThis request is intended to have one argument,
816d65f6f70SBen Grasthe name of the request, macro or string to be undefined.
817d65f6f70SBen GrasCurrently, it is ignored including its arguments,
818d65f6f70SBen Grasand the number of arguments is not checked.
819d65f6f70SBen Gras.Ss \&nr
820*0a6a1f1dSLionel SambucDefine or change a register.
821d65f6f70SBen GrasA register is an arbitrary string value that defines some sort of state,
822d65f6f70SBen Graswhich influences parsing and/or formatting.
823d65f6f70SBen GrasIts syntax is as follows:
824d65f6f70SBen Gras.Pp
825*0a6a1f1dSLionel Sambuc.D1 Pf \. Cm \&nr Ar name Oo +|- Oc Ns Ar value
826d65f6f70SBen Gras.Pp
827d65f6f70SBen GrasThe
828d65f6f70SBen Gras.Ar value
829d65f6f70SBen Grasmay, at the moment, only be an integer.
830*0a6a1f1dSLionel SambucIf it is prefixed by a sign, the register will be
831*0a6a1f1dSLionel Sambucincremented or decremented instead of assigned to.
832*0a6a1f1dSLionel Sambuc.Pp
833*0a6a1f1dSLionel SambucThe following register
834d65f6f70SBen Gras.Ar name
835*0a6a1f1dSLionel Sambucis handled specially:
836d65f6f70SBen Gras.Bl -tag -width Ds
837d65f6f70SBen Gras.It Cm nS
838d65f6f70SBen GrasIf set to a positive integer value, certain
839d65f6f70SBen Gras.Xr mdoc 7
840d65f6f70SBen Grasmacros will behave in the same way as in the
841d65f6f70SBen Gras.Em SYNOPSIS
842d65f6f70SBen Grassection.
843d65f6f70SBen GrasIf set to 0, these macros will behave in the same way as outside the
844d65f6f70SBen Gras.Em SYNOPSIS
845d65f6f70SBen Grassection, even when called within the
846d65f6f70SBen Gras.Em SYNOPSIS
847d65f6f70SBen Grassection itself.
848d65f6f70SBen GrasNote that starting a new
849d65f6f70SBen Gras.Xr mdoc 7
850d65f6f70SBen Grassection with the
851d65f6f70SBen Gras.Cm \&Sh
852d65f6f70SBen Grasmacro will reset this register.
853d65f6f70SBen Gras.El
85492395e9cSLionel Sambuc.Ss \&ns
85592395e9cSLionel SambucTurn on no-space mode.
85692395e9cSLionel SambucThis line-scoped request is intended to take no arguments.
85792395e9cSLionel SambucCurrently, it is ignored including its arguments,
85892395e9cSLionel Sambucand the number of arguments is not checked.
85992395e9cSLionel Sambuc.Ss \&ps
86092395e9cSLionel SambucChange point size.
86192395e9cSLionel SambucThis line-scoped request is intended to take one numerical argument.
86292395e9cSLionel SambucCurrently, it is ignored including its arguments,
86392395e9cSLionel Sambucand the number of arguments is not checked.
864d65f6f70SBen Gras.Ss \&so
865d65f6f70SBen GrasInclude a source file.
866d65f6f70SBen GrasIts syntax is as follows:
867d65f6f70SBen Gras.Pp
868d65f6f70SBen Gras.D1 Pf \. Cm \&so Ar file
869d65f6f70SBen Gras.Pp
870d65f6f70SBen GrasThe
871d65f6f70SBen Gras.Ar file
872d65f6f70SBen Graswill be read and its contents processed as input in place of the
873d65f6f70SBen Gras.Sq \&.so
874d65f6f70SBen Grasrequest line.
87592395e9cSLionel SambucTo avoid inadvertent inclusion of unrelated files,
876d65f6f70SBen Gras.Xr mandoc 1
877d65f6f70SBen Grasonly accepts relative paths not containing the strings
878d65f6f70SBen Gras.Qq ../
879d65f6f70SBen Grasand
880d65f6f70SBen Gras.Qq /.. .
88192395e9cSLionel Sambuc.Pp
88292395e9cSLionel SambucThis request requires
88392395e9cSLionel Sambuc.Xr man 1
88492395e9cSLionel Sambucto change to the right directory before calling
88592395e9cSLionel Sambuc.Xr mandoc 1 ,
88692395e9cSLionel Sambucper convention to the root of the manual tree.
88792395e9cSLionel SambucTypical usage looks like:
88892395e9cSLionel Sambuc.Pp
88992395e9cSLionel Sambuc.Dl \&.so man3/Xcursor.3
89092395e9cSLionel Sambuc.Pp
89192395e9cSLionel SambucAs the whole concept is rather fragile, the use of
89292395e9cSLionel Sambuc.Sx \&so
89392395e9cSLionel Sambucis discouraged.
89492395e9cSLionel SambucUse
89592395e9cSLionel Sambuc.Xr ln 1
89692395e9cSLionel Sambucinstead.
89792395e9cSLionel Sambuc.Ss \&ta
89892395e9cSLionel SambucSet tab stops.
89992395e9cSLionel SambucThis line-scoped request can take an arbitrary number of arguments.
90092395e9cSLionel SambucCurrently, it is ignored including its arguments.
901d65f6f70SBen Gras.Ss \&tr
902d65f6f70SBen GrasOutput character translation.
90392395e9cSLionel SambucIts syntax is as follows:
90492395e9cSLionel Sambuc.Pp
90592395e9cSLionel Sambuc.D1 Pf \. Cm \&tr Ar [ab]+
90692395e9cSLionel Sambuc.Pp
90792395e9cSLionel SambucPairs of
90892395e9cSLionel Sambuc.Ar ab
90992395e9cSLionel Sambuccharacters are replaced
91092395e9cSLionel Sambuc.Ar ( a
91192395e9cSLionel Sambucfor
91292395e9cSLionel Sambuc.Ar b ) .
91392395e9cSLionel SambucReplacement (or origin) characters may also be character escapes; thus,
91492395e9cSLionel Sambuc.Pp
91592395e9cSLionel Sambuc.Dl tr \e(xx\e(yy
91692395e9cSLionel Sambuc.Pp
91792395e9cSLionel Sambucreplaces all invocations of \e(xx with \e(yy.
918d65f6f70SBen Gras.Ss \&T&
919d65f6f70SBen GrasRe-start a table layout, retaining the options of the prior table
920d65f6f70SBen Grasinvocation.
921d65f6f70SBen GrasSee
922d65f6f70SBen Gras.Sx \&TS .
923d65f6f70SBen Gras.Ss \&TE
924d65f6f70SBen GrasEnd a table context.
925d65f6f70SBen GrasSee
926d65f6f70SBen Gras.Sx \&TS .
927d65f6f70SBen Gras.Ss \&TS
928d65f6f70SBen GrasBegin a table, which formats input in aligned rows and columns.
929d65f6f70SBen GrasSee
930d65f6f70SBen Gras.Xr tbl 7
931d65f6f70SBen Grasfor a description of the tbl language.
932*0a6a1f1dSLionel Sambuc.Sh ESCAPE SEQUENCE REFERENCE
933*0a6a1f1dSLionel SambucThe
934*0a6a1f1dSLionel Sambuc.Xr mandoc 1
935*0a6a1f1dSLionel Sambuc.Nm
936*0a6a1f1dSLionel Sambucparser recognises the following escape sequences.
937*0a6a1f1dSLionel SambucNote that the
938*0a6a1f1dSLionel Sambuc.Nm
939*0a6a1f1dSLionel Sambuclanguage defines more escape sequences not implemented in
940*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
941*0a6a1f1dSLionel SambucIn
942*0a6a1f1dSLionel Sambuc.Xr mdoc 7
943*0a6a1f1dSLionel Sambucand
944*0a6a1f1dSLionel Sambuc.Xr man 7
945*0a6a1f1dSLionel Sambucdocuments, using escape sequences is discouraged except for those
946*0a6a1f1dSLionel Sambucdescribed in the
947*0a6a1f1dSLionel Sambuc.Sx LANGUAGE SYNTAX
948*0a6a1f1dSLionel Sambucsection above.
949*0a6a1f1dSLionel Sambuc.Pp
950*0a6a1f1dSLionel SambucA backslash followed by any character not listed here
951*0a6a1f1dSLionel Sambucsimply prints that character itself.
952*0a6a1f1dSLionel Sambuc.Ss \e<newline>
953*0a6a1f1dSLionel SambucA backslash at the end of an input line can be used to continue the
954*0a6a1f1dSLionel Sambuclogical input line on the next physical input line, joining the text
955*0a6a1f1dSLionel Sambucon both lines together as if it were on a single input line.
956*0a6a1f1dSLionel Sambuc.Ss \e<space>
957*0a6a1f1dSLionel SambucThe escape sequence backslash-space
958*0a6a1f1dSLionel Sambuc.Pq Sq \e\ \&
959*0a6a1f1dSLionel Sambucis an unpaddable space-sized non-breaking space character; see
960*0a6a1f1dSLionel Sambuc.Sx Whitespace .
961*0a6a1f1dSLionel Sambuc.Ss \e\(dq
962*0a6a1f1dSLionel SambucThe rest of the input line is treated as
963*0a6a1f1dSLionel Sambuc.Sx Comments .
964*0a6a1f1dSLionel Sambuc.Ss \e%
965*0a6a1f1dSLionel SambucHyphenation allowed at this point of the word; ignored by
966*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
967*0a6a1f1dSLionel Sambuc.Ss \e&
968*0a6a1f1dSLionel SambucNon-printing zero-width character; see
969*0a6a1f1dSLionel Sambuc.Sx Whitespace .
970*0a6a1f1dSLionel Sambuc.Ss \e\(aq
971*0a6a1f1dSLionel SambucAcute accent special character; use
972*0a6a1f1dSLionel Sambuc.Sq \e(aa
973*0a6a1f1dSLionel Sambucinstead.
974*0a6a1f1dSLionel Sambuc.Ss \e( Ns Ar cc
975*0a6a1f1dSLionel Sambuc.Sx Special Characters
976*0a6a1f1dSLionel Sambucwith two-letter names, see
977*0a6a1f1dSLionel Sambuc.Xr mandoc_char 7 .
978*0a6a1f1dSLionel Sambuc.Ss \e*[ Ns Ar name ]
979*0a6a1f1dSLionel SambucInterpolate the string with the
980*0a6a1f1dSLionel Sambuc.Ar name ;
981*0a6a1f1dSLionel Sambucsee
982*0a6a1f1dSLionel Sambuc.Sx Predefined Strings
983*0a6a1f1dSLionel Sambucand
984*0a6a1f1dSLionel Sambuc.Sx ds .
985*0a6a1f1dSLionel SambucFor short names, there are variants
986*0a6a1f1dSLionel Sambuc.No \e* Ns Ar c
987*0a6a1f1dSLionel Sambucand
988*0a6a1f1dSLionel Sambuc.No \e*( Ns Ar cc .
989*0a6a1f1dSLionel Sambuc.Ss \e-
990*0a6a1f1dSLionel SambucSpecial character
991*0a6a1f1dSLionel Sambuc.Dq mathematical minus sign .
992*0a6a1f1dSLionel Sambuc.Ss \e[ Ns Ar name ]
993*0a6a1f1dSLionel Sambuc.Sx Special Characters
994*0a6a1f1dSLionel Sambucwith names of arbitrary length, see
995*0a6a1f1dSLionel Sambuc.Xr mandoc_char 7 .
996*0a6a1f1dSLionel Sambuc.Ss \e^
997*0a6a1f1dSLionel SambucOne-twelfth em half-narrow space character, effectively zero-width in
998*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
999*0a6a1f1dSLionel Sambuc.Ss \e`
1000*0a6a1f1dSLionel SambucGrave accent special character; use
1001*0a6a1f1dSLionel Sambuc.Sq \e(ga
1002*0a6a1f1dSLionel Sambucinstead.
1003*0a6a1f1dSLionel Sambuc.Ss \e{
1004*0a6a1f1dSLionel SambucBegin conditional input; see
1005*0a6a1f1dSLionel Sambuc.Sx if .
1006*0a6a1f1dSLionel Sambuc.Ss \e\(ba
1007*0a6a1f1dSLionel SambucOne-sixth em narrow space character, effectively zero-width in
1008*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1009*0a6a1f1dSLionel Sambuc.Ss \e}
1010*0a6a1f1dSLionel SambucEnd conditional input; see
1011*0a6a1f1dSLionel Sambuc.Sx if .
1012*0a6a1f1dSLionel Sambuc.Ss \e~
1013*0a6a1f1dSLionel SambucPaddable non-breaking space character.
1014*0a6a1f1dSLionel Sambuc.Ss \e0
1015*0a6a1f1dSLionel SambucDigit width space character.
1016*0a6a1f1dSLionel Sambuc.Ss \eA\(aq Ns Ar string Ns \(aq
1017*0a6a1f1dSLionel SambucAnchor definition; ignored by
1018*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1019*0a6a1f1dSLionel Sambuc.Ss \eB\(aq Ns Ar string Ns \(aq
1020*0a6a1f1dSLionel SambucTest whether
1021*0a6a1f1dSLionel Sambuc.Ar string
1022*0a6a1f1dSLionel Sambucis a numerical expession; ignored by
1023*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1024*0a6a1f1dSLionel Sambuc.Ss \eb\(aq Ns Ar string Ns \(aq
1025*0a6a1f1dSLionel SambucBracket building function; ignored by
1026*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1027*0a6a1f1dSLionel Sambuc.Ss \eC\(aq Ns Ar name Ns \(aq
1028*0a6a1f1dSLionel Sambuc.Sx Special Characters
1029*0a6a1f1dSLionel Sambucwith names of arbitrary length.
1030*0a6a1f1dSLionel Sambuc.Ss \ec
1031*0a6a1f1dSLionel SambucInterrupt text processing to insert requests or macros; ignored by
1032*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1033*0a6a1f1dSLionel Sambuc.Ss \eD\(aq Ns Ar string Ns \(aq
1034*0a6a1f1dSLionel SambucDraw graphics function; ignored by
1035*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1036*0a6a1f1dSLionel Sambuc.Ss \ed
1037*0a6a1f1dSLionel SambucMove down by half a line; ignored by
1038*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1039*0a6a1f1dSLionel Sambuc.Ss \ee
1040*0a6a1f1dSLionel SambucBackslash special character.
1041*0a6a1f1dSLionel Sambuc.Ss \eF[ Ns Ar name ]
1042*0a6a1f1dSLionel SambucSwitch font family (groff extension); ignored by
1043*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1044*0a6a1f1dSLionel SambucFor short names, there are variants
1045*0a6a1f1dSLionel Sambuc.No \eF Ns Ar c
1046*0a6a1f1dSLionel Sambucand
1047*0a6a1f1dSLionel Sambuc.No \eF( Ns Ar cc .
1048*0a6a1f1dSLionel Sambuc.Ss \ef[ Ns Ar name ]
1049*0a6a1f1dSLionel SambucSwitch to the font
1050*0a6a1f1dSLionel Sambuc.Ar name ,
1051*0a6a1f1dSLionel Sambucsee
1052*0a6a1f1dSLionel Sambuc.Sx Text Decoration .
1053*0a6a1f1dSLionel SambucFor short names, there are variants
1054*0a6a1f1dSLionel Sambuc.No \ef Ns Ar c
1055*0a6a1f1dSLionel Sambucand
1056*0a6a1f1dSLionel Sambuc.No \ef( Ns Ar cc .
1057*0a6a1f1dSLionel Sambuc.Ss \eg[ Ns Ar name ]
1058*0a6a1f1dSLionel SambucInterpolate the format of a number register; ignored by
1059*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1060*0a6a1f1dSLionel SambucFor short names, there are variants
1061*0a6a1f1dSLionel Sambuc.No \eg Ns Ar c
1062*0a6a1f1dSLionel Sambucand
1063*0a6a1f1dSLionel Sambuc.No \eg( Ns Ar cc .
1064*0a6a1f1dSLionel Sambuc.Ss \eH\(aq Ns Oo +|- Oc Ns Ar number Ns \(aq
1065*0a6a1f1dSLionel SambucSet the height of the current font; ignored by
1066*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1067*0a6a1f1dSLionel Sambuc.Ss \eh\(aq Ns Ar number Ns \(aq
1068*0a6a1f1dSLionel SambucHorizontal motion; ignored by
1069*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1070*0a6a1f1dSLionel Sambuc.Ss \ek[ Ns Ar name ]
1071*0a6a1f1dSLionel SambucMark horizontal input place in register; ignored by
1072*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1073*0a6a1f1dSLionel SambucFor short names, there are variants
1074*0a6a1f1dSLionel Sambuc.No \ek Ns Ar c
1075*0a6a1f1dSLionel Sambucand
1076*0a6a1f1dSLionel Sambuc.No \ek( Ns Ar cc .
1077*0a6a1f1dSLionel Sambuc.Ss \eL\(aq Ns Ar number Ns Oo Ar c Oc Ns \(aq
1078*0a6a1f1dSLionel SambucVertical line drawing function; ignored by
1079*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1080*0a6a1f1dSLionel Sambuc.Ss \el\(aq Ns Ar number Ns Oo Ar c Oc Ns \(aq
1081*0a6a1f1dSLionel SambucHorizontal line drawing function; ignored by
1082*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1083*0a6a1f1dSLionel Sambuc.Ss \eM[ Ns Ar name ]
1084*0a6a1f1dSLionel SambucSet fill (background) color (groff extension); ignored by
1085*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1086*0a6a1f1dSLionel SambucFor short names, there are variants
1087*0a6a1f1dSLionel Sambuc.No \eM Ns Ar c
1088*0a6a1f1dSLionel Sambucand
1089*0a6a1f1dSLionel Sambuc.No \eM( Ns Ar cc .
1090*0a6a1f1dSLionel Sambuc.Ss \em[ Ns Ar name ]
1091*0a6a1f1dSLionel SambucSet glyph drawing color (groff extension); ignored by
1092*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1093*0a6a1f1dSLionel SambucFor short names, there are variants
1094*0a6a1f1dSLionel Sambuc.No \em Ns Ar c
1095*0a6a1f1dSLionel Sambucand
1096*0a6a1f1dSLionel Sambuc.No \em( Ns Ar cc .
1097*0a6a1f1dSLionel Sambuc.Ss \eN\(aq Ns Ar number Ns \(aq
1098*0a6a1f1dSLionel SambucCharacter
1099*0a6a1f1dSLionel Sambuc.Ar number
1100*0a6a1f1dSLionel Sambucon the current font.
1101*0a6a1f1dSLionel Sambuc.Ss \en[ Ns Ar name ]
1102*0a6a1f1dSLionel SambucInterpolate the number register
1103*0a6a1f1dSLionel Sambuc.Ar name .
1104*0a6a1f1dSLionel SambucFor short names, there are variants
1105*0a6a1f1dSLionel Sambuc.No \en Ns Ar c
1106*0a6a1f1dSLionel Sambucand
1107*0a6a1f1dSLionel Sambuc.No \en( Ns Ar cc .
1108*0a6a1f1dSLionel Sambuc.Ss \eo\(aq Ns Ar string Ns \(aq
1109*0a6a1f1dSLionel SambucOverstrike
1110*0a6a1f1dSLionel Sambuc.Ar string ;
1111*0a6a1f1dSLionel Sambucignored by
1112*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1113*0a6a1f1dSLionel Sambuc.Ss \eR\(aq Ns Ar name Oo +|- Oc Ns Ar number Ns \(aq
1114*0a6a1f1dSLionel SambucSet number register; ignored by
1115*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1116*0a6a1f1dSLionel Sambuc.Ss \eS\(aq Ns Ar number Ns \(aq
1117*0a6a1f1dSLionel SambucSlant output; ignored by
1118*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1119*0a6a1f1dSLionel Sambuc.Ss \es\(aq Ns Oo +|- Oc Ns Ar number Ns \(aq
1120*0a6a1f1dSLionel SambucChange point size; ignored by
1121*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1122*0a6a1f1dSLionel SambucAlternative forms
1123*0a6a1f1dSLionel Sambuc.No \es Ns Oo +|- Oc Ns Ar n ,
1124*0a6a1f1dSLionel Sambuc.No \es Ns Oo +|- Oc Ns \(aq Ns Ar number Ns \(aq ,
1125*0a6a1f1dSLionel Sambuc.No \es Ns [ Oo +|- Oc Ns Ar number ] ,
1126*0a6a1f1dSLionel Sambucand
1127*0a6a1f1dSLionel Sambuc.No \es Ns Oo +|- Oc Ns [ Ar number Ns ]
1128*0a6a1f1dSLionel Sambucare also parsed and ignored.
1129*0a6a1f1dSLionel Sambuc.Ss \et
1130*0a6a1f1dSLionel SambucHorizontal tab; ignored by
1131*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1132*0a6a1f1dSLionel Sambuc.Ss \eu
1133*0a6a1f1dSLionel SambucMove up by half a line; ignored by
1134*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1135*0a6a1f1dSLionel Sambuc.Ss \eV[ Ns Ar name ]
1136*0a6a1f1dSLionel SambucInterpolate an environment variable; ignored by
1137*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1138*0a6a1f1dSLionel SambucFor short names, there are variants
1139*0a6a1f1dSLionel Sambuc.No \eV Ns Ar c
1140*0a6a1f1dSLionel Sambucand
1141*0a6a1f1dSLionel Sambuc.No \eV( Ns Ar cc .
1142*0a6a1f1dSLionel Sambuc.Ss \ev\(aq Ns Ar number Ns \(aq
1143*0a6a1f1dSLionel SambucVertical motion; ignored by
1144*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1145*0a6a1f1dSLionel Sambuc.Ss \ew\(aq Ns Ar string Ns \(aq
1146*0a6a1f1dSLionel SambucInterpolate the width of the
1147*0a6a1f1dSLionel Sambuc.Ar string ;
1148*0a6a1f1dSLionel Sambucignored by
1149*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1150*0a6a1f1dSLionel Sambuc.Ss \eX\(aq Ns Ar string Ns \(aq
1151*0a6a1f1dSLionel SambucOutput
1152*0a6a1f1dSLionel Sambuc.Ar string
1153*0a6a1f1dSLionel Sambucas device control function; ignored in nroff mode and by
1154*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1155*0a6a1f1dSLionel Sambuc.Ss \ex\(aq Ns Ar number Ns \(aq
1156*0a6a1f1dSLionel SambucExtra line space function; ignored by
1157*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1158*0a6a1f1dSLionel Sambuc.Ss \eY[ Ns Ar name ]
1159*0a6a1f1dSLionel SambucOutput a string as a device control function; ignored in nroff mode and by
1160*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1161*0a6a1f1dSLionel SambucFor short names, there are variants
1162*0a6a1f1dSLionel Sambuc.No \eY Ns Ar c
1163*0a6a1f1dSLionel Sambucand
1164*0a6a1f1dSLionel Sambuc.No \eY( Ns Ar cc .
1165*0a6a1f1dSLionel Sambuc.Ss \eZ\(aq Ns Ar string Ns \(aq
1166*0a6a1f1dSLionel SambucPrint
1167*0a6a1f1dSLionel Sambuc.Ar string
1168*0a6a1f1dSLionel Sambucwith zero width and height; ignored by
1169*0a6a1f1dSLionel Sambuc.Xr mandoc 1 .
1170*0a6a1f1dSLionel Sambuc.Ss \ez
1171*0a6a1f1dSLionel SambucOutput the next character without advancing the cursor position;
1172*0a6a1f1dSLionel Sambucapproximated in
1173*0a6a1f1dSLionel Sambuc.Xr mandoc 1
1174*0a6a1f1dSLionel Sambucby simply skipping the next character.
1175d65f6f70SBen Gras.Sh COMPATIBILITY
1176*0a6a1f1dSLionel SambucThis section documents compatibility between mandoc and other
1177d65f6f70SBen Gras.Nm
1178d65f6f70SBen Grasimplementations, at this time limited to GNU troff
1179d65f6f70SBen Gras.Pq Qq groff .
1180d65f6f70SBen GrasThe term
1181d65f6f70SBen Gras.Qq historic groff
1182d65f6f70SBen Grasrefers to groff version 1.15.
1183d65f6f70SBen Gras.Pp
1184d65f6f70SBen Gras.Bl -dash -compact
1185d65f6f70SBen Gras.It
118692395e9cSLionel SambucIn mandoc, the
118792395e9cSLionel Sambuc.Sx \&EQ ,
118892395e9cSLionel Sambuc.Sx \&TE ,
118992395e9cSLionel Sambuc.Sx \&TS ,
119092395e9cSLionel Sambucand
119192395e9cSLionel Sambuc.Sx \&T& ,
119292395e9cSLionel Sambucmacros are considered regular macros.
119392395e9cSLionel SambucIn all other
119492395e9cSLionel Sambuc.Nm
119592395e9cSLionel Sambucimplementations, these are special macros that must be specified without
119692395e9cSLionel Sambucspacing between the control character (which must be a period) and the
119792395e9cSLionel Sambucmacro name.
119892395e9cSLionel Sambuc.It
1199d65f6f70SBen GrasThe
1200d65f6f70SBen Gras.Cm nS
1201d65f6f70SBen Grasregister is only compatible with OpenBSD's groff-1.15.
1202d65f6f70SBen Gras.It
1203d65f6f70SBen GrasHistoric groff did not accept white-space before a custom
1204d65f6f70SBen Gras.Ar end
1205d65f6f70SBen Grasmacro for the
1206d65f6f70SBen Gras.Sx \&ig
1207d65f6f70SBen Grasrequest.
1208d65f6f70SBen Gras.It
1209d65f6f70SBen GrasThe
1210d65f6f70SBen Gras.Sx \&if
1211d65f6f70SBen Grasand family would print funny white-spaces with historic groff when
1212d65f6f70SBen Grasusing the next-line syntax.
1213d65f6f70SBen Gras.El
1214d65f6f70SBen Gras.Sh SEE ALSO
1215d65f6f70SBen Gras.Xr mandoc 1 ,
121692395e9cSLionel Sambuc.Xr eqn 7 ,
1217d65f6f70SBen Gras.Xr man 7 ,
1218d65f6f70SBen Gras.Xr mandoc_char 7 ,
1219d65f6f70SBen Gras.Xr mdoc 7 ,
1220d65f6f70SBen Gras.Xr tbl 7
1221d65f6f70SBen Gras.Rs
1222d65f6f70SBen Gras.%A Joseph F. Ossanna
1223d65f6f70SBen Gras.%A Brian W. Kernighan
1224d65f6f70SBen Gras.%I AT&T Bell Laboratories
1225d65f6f70SBen Gras.%T Troff User's Manual
1226d65f6f70SBen Gras.%R Computing Science Technical Report
1227d65f6f70SBen Gras.%N 54
1228d65f6f70SBen Gras.%C Murray Hill, New Jersey
1229d65f6f70SBen Gras.%D 1976 and 1992
1230d65f6f70SBen Gras.%U http://www.kohala.com/start/troff/cstr54.ps
1231d65f6f70SBen Gras.Re
1232d65f6f70SBen Gras.Rs
1233d65f6f70SBen Gras.%A Joseph F. Ossanna
1234d65f6f70SBen Gras.%A Brian W. Kernighan
1235d65f6f70SBen Gras.%A Gunnar Ritter
1236d65f6f70SBen Gras.%T Heirloom Documentation Tools Nroff/Troff User's Manual
1237d65f6f70SBen Gras.%D September 17, 2007
1238d65f6f70SBen Gras.%U http://heirloom.sourceforge.net/doctools/troff.pdf
1239d65f6f70SBen Gras.Re
1240d65f6f70SBen Gras.Sh HISTORY
124192395e9cSLionel SambucThe RUNOFF typesetting system, whose input forms the basis for
1242d65f6f70SBen Gras.Nm ,
124392395e9cSLionel Sambucwas written in MAD and FAP for the CTSS operating system by Jerome E.
124492395e9cSLionel SambucSaltzer in 1964.
124592395e9cSLionel SambucDoug McIlroy rewrote it in BCPL in 1969, renaming it
124692395e9cSLionel Sambuc.Nm .
124792395e9cSLionel SambucDennis M. Ritchie rewrote McIlroy's
124892395e9cSLionel Sambuc.Nm
124992395e9cSLionel Sambucin PDP-11 assembly for
125092395e9cSLionel Sambuc.At v1 ,
125192395e9cSLionel SambucJoseph F. Ossanna improved roff and renamed it nroff
125292395e9cSLionel Sambucfor
125392395e9cSLionel Sambuc.At v2 ,
125492395e9cSLionel Sambucthen ported nroff to C as troff, which Brian W. Kernighan released with
125592395e9cSLionel Sambuc.At v7 .
125692395e9cSLionel SambucIn 1989, James Clarke re-implemented troff in C++, naming it groff.
1257d65f6f70SBen Gras.Sh AUTHORS
1258d65f6f70SBen Gras.An -nosplit
125992395e9cSLionel SambucThis
1260d65f6f70SBen Gras.Nm
1261d65f6f70SBen Grasreference was written by
1262*0a6a1f1dSLionel Sambuc.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
1263d65f6f70SBen Grasand
1264*0a6a1f1dSLionel Sambuc.An Ingo Schwarze Aq Mt schwarze@openbsd.org .
1265