Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
NAME
roff — roff language reference for mandocDESCRIPTION
The roff language is a general purpose text formatting language. Since traditional implementations of the mdoc(7) and man(7) manual formatting languages are based on it, many real-world manuals use small numbers of roff requests and escape sequences intermixed with their mdoc(7) or man(7) code. To properly format such manuals, the mandoc(1) utility supports a tiny subset of roff requests and escapes. Only these requests and escapes supported by mandoc(1) are documented in the present manual, together with the basic language syntax shared by roff, mdoc(7), and man(7). For complete roff manuals, consult the SEE ALSO section..
’LANGUAGE SYNTAX
roff documents may contain only graphable 7-bit ASCII characters, the space character, and, in certain circumstances, the tab character. The backslash character ‘\’ indicates the start of an escape sequence, used for example for Comments, Special Characters, Predefined Strings, and user-defined strings defined using the ds request. For a listing of escape sequences, consult the ESCAPE SEQUENCE REFERENCE below.Comments
Text following an escaped double-quote ‘\"’, whether in a request, macro, or text line, is ignored to the end of the line. A request line beginning with a control character and comment escape ‘.\"’ is also ignored. Furthermore, request lines with only a control character and optional trailing whitespace are stripped from input..\" This is a comment line. .\" The next line is ignored: . .Sh EXAMPLES \" This is a comment, too. example text \" And so is this.
Special Characters
Special characters are used to encode special glyphs and are rendered differently across output media. They may occur in request, macro, and text lines. Sequences begin with the escape character ‘\’ followed by either an open-parenthesis ‘(’ for two-character sequences; an open-bracket ‘[’ for n-character sequences (terminated at a close-bracket ‘]’); or a single one character sequence.-
\(em
- Two-letter em dash escape.
-
\e
- One-letter backslash escape.
Text Decoration
Terms may be text-decorated using the ‘\f’ escape followed by an indicator: B (bold), I (italic), R (regular), or P (revert to previous mode). A numerical representation 3, 2, or 1 (bold, italic, and regular, respectively) may be used instead. The indicator or numerical representative may be preceded by C (constant-width), which is ignored.-
\fBbold\fR
- Write in bold, then switch to regular font mode.
-
\fIitalic\fP
- Write in italic, then return to previous font mode.
-
\f(BIbold italic\fP
- Write in bold italic, then return to previous font mode.
Predefined Strings
Predefined strings, like Special Characters, mark special output glyphs. Predefined strings are escaped with the slash-asterisk, ‘\*’: single-character ‘\*X’, two-character ‘\*(XX’, and N-character ‘\*[N]’.-
\*(Am
- Two-letter ampersand predefined string.
-
\*q
- One-letter double-quote predefined string.
Whitespace
Whitespace consists of the space character. In text lines, whitespace is preserved within a line. In request and macro lines, whitespace delimits arguments and is discarded.Scaling Widths
Many requests and macros support scaled widths for their arguments. The syntax for a scaled width is ‘[+-]?[0-9]*.[0-9]*[:unit:]
’, where a decimal must be preceded or followed by at least one digit. Negative numbers, while accepted, are truncated to zero.- c
- centimetre
- i
- inch
- P
- pica (~1/6 inch)
- p
- point (~1/72 inch)
- f
- scale ‘u’ by 65536
- v
- default vertical span
- m
- width of rendered ‘m’ (em) character
- n
- width of rendered ‘n’ (en) character
- u
- default horizontal span for the terminal
- M
- mini-em (~1/100 em)
Sentence Spacing
Each sentence should terminate at the end of an input line. By doing this, a formatter will be able to apply the proper amount of spacing after the end of sentence (unescaped) period, exclamation mark, or question mark followed by zero or more non-sentence closing delimiters (‘)’, ‘]’, ‘'’, ‘"’).Do not end sentences mid-line like this. Instead, end a sentence like this. A macro would end like this: .Xr mandoc 1 .
REQUEST SYNTAX
A request or macro line consists of:- the control character ‘.’ or ‘'’ at the beginning of the line,
- optionally an arbitrary amount of whitespace,
- the name of the request or the macro, which is one word of arbitrary length, terminated by whitespace,
- and zero or more arguments delimited by whitespace.
.ig end .ig end . ig end
MACRO SYNTAX
Macros are provided by the mdoc(7) and man(7) languages and can be defined by the de request. When called, they follow the same syntax as requests, except that macro arguments may optionally be quoted by enclosing them in double quote characters (‘"’). Quoted text, even if it contains whitespace or would cause a macro invocation when unquoted, is always considered literal text. Inside quoted text, pairs of double quote characters (‘“”’) resolve to single double quote characters.-
.Fn strlen "const char *s"
- Group arguments “const char *s” into one function argument. If unspecified, “const”, “char”, and “*s” would be considered separate arguments.
-
.Op "Fl a"
- Consider “Fl a” as literal text instead of a flag macro.
REQUEST REFERENCE
The mandoc(1) roff parser recognises the following requests. For requests marked as "ignored" or "unsupported", any arguments are ignored, and the number of arguments is not checked.ab
Abort processing. Currently unsupported.ad
Set line adjustment mode. It takes one argument to select normal, left, right, or center adjustment for subsequent text. Currently ignored.af
Assign an output format to a number register. Currently ignored.aln
Create an alias for a number register. Currently unsupported.als
Create an alias for a request, string, macro, or diversion. Currently unsupported.am1
Append to a macro definition, switching roff compatibility mode off during macro execution (groff extension). The syntax of this request is the same as that of de1. Since mandoc(1) does not implement roff compatibility mode at all, it handles this request as an alias for am.ami
Append to a macro definition, specifying the macro name indirectly (groff extension). The syntax of this request is the same as that of dei.ami1
Append to a macro definition, specifying the macro name indirectly and switching roff compatibility mode off during macro execution (groff extension). The syntax of this request is the same as that of dei1. Since mandoc(1) does not implement roff compatibility mode at all, it handles this request as an alias for ami.as
Append to a user-defined string. The syntax of this request is the same as that of ds. If a user-defined string with the specified name does not yet exist, it is set to the empty string before appending.as1
Append to a user-defined string, switching roff compatibility mode off during macro execution (groff extension). The syntax of this request is the same as that of ds1. Since mandoc(1) does not implement roff compatibility mode at all, it handles this request as an alias for as.asciify
Fully unformat a diversion. Currently unsupported.backtrace
Print a backtrace of the input stack. This is a groff extension and currently ignored.bd
Artificially embolden by repeated printing with small shifts. Currently ignored.bleedat
Set the BleedBox page parameter for PDF generation. This is a Heirloom extension and currently ignored.blm
Set a blank line trap. Currently unsupported.box
Begin a diversion without including a partially filled line. Currently unsupported.boxa
Add to a diversion without including a partially filled line. Currently unsupported.bp
Begin new page. Currently ignored.BP
Define a frame and place a picture in it. This is a Heirloom extension and currently unsupported.breakchar
Optional line break characters. This is a Heirloom extension and currently ignored.brnl
Break output line after next N input lines. This is a Heirloom extension and currently ignored.brpnl
Break and spread output line after next N input lines. This is a Heirloom extension and currently ignored.c2
Change the no-break control character. Currently unsupported.cc
Change the control character. Its syntax is as follows:
.cc [c]
ce
Center some lines. It takes one integer argument, specifying how many lines to center. Currently ignored.cf
Output the contents of a file. Ignored because insecure.cflags
Set character flags. This is a groff extension and currently ignored.ch
Change a trap location. Currently ignored.char
Define a new glyph. Currently unsupported.chop
Remove the last character from a macro, string, or diversion. Currently unsupported.class
Define a character class. This is a groff extension and currently ignored.close
Close an open file. Ignored because insecure.CL
Print text in color. This is a Heirloom extension and currently unsupported.color
Activate or deactivate colors. This is a groff extension and currently ignored.composite
Define a name component for composite glyph names. This is a groff extension and currently unsupported.cp
Switch roff compatibility mode on or off. Currently ignored.cropat
Set the CropBox page parameter for PDF generation. This is a Heirloom extension and currently ignored.cs
Constant character spacing mode. Currently ignored.cu
Underline including whitespace. Currently ignored.da
Append to a diversion. Currently unsupported.dch
Change a trap location in the current diversion. This is a Heirloom extension and currently unsupported.de
Define a roff macro. Its syntax can be either.de name macro definition ..
.de name end macro definition .end
.name [argument [argument ...]]
\\$
N, where N is a digit, by the Nth argument. For example,.de ZN \fI\^\\$1\^\fP\\$2 .. .ZN XtFree .
\fI\^XtFree\^\fP.
de1
Define a roff macro that will be executed with roff compatibility mode switched off during macro execution. This is a groff extension. Since mandoc(1) does not implement roff compatibility mode at all, it handles this request as an alias for de.defcolor
Define a color name. This is a groff extension and currently ignored.dei
Define a roff macro, specifying the macro name indirectly (groff extension). The syntax of this request is the same as that of de. The request.dei name [end]
.de\*
[name] [\*[end]]
dei1
Define a roff macro that will be executed with roff compatibility mode switched off during macro execution, specifying the macro name indirectly (groff extension). Since mandoc(1) does not implement roff compatibility mode at all, it handles this request as an alias for dei.device
This request only makes sense with the groff-specific intermediate output format and is unsupported.devicem
This request only makes sense with the groff-specific intermediate output format and is unsupported.di
Begin a diversion. Currently unsupported.do
Execute roff request or macro line with compatibility mode disabled. Currently unsupported.ds
Define a user-defined string. Its syntax is as follows:.ds name ["]string
\*
[name] for a name of arbitrary length, or \*(NN or \*N if the length of name is two or one characters, respectively. Interpolation can be prevented by escaping the leading backslash; that is, an asterisk preceded by an even number of backslashes does not trigger string interpolation..ds badidea .S .badidea H SYNOPSIS
ds1
Define a user-defined string that will be expanded with roff compatibility mode switched off during string expansion. This is a groff extension. Since mandoc(1) does not implement roff compatibility mode at all, it handles this request as an alias for ds.dwh
Set a location trap in the current diversion. This is a Heirloom extension and currently unsupported.dt
Set a trap within a diversion. Currently unsupported.ec
Change the escape character. Currently unsupported.ecs
Restore the escape character. Currently unsupported.ecr
Save the escape character. Currently unsupported.el
The “else” half of an if/else conditional. Pops a result off the stack of conditional evaluations pushed by ie and uses it as its conditional. If no stack entries are present (e.g., due to no prior ie calls) then false is assumed. The syntax of this request is similar to if except that the conditional is missing.em
Set a trap at the end of input. Currently unsupported.eo
Disable the escape mechanism completely. Currently unsupported.errprint
Print a string like an error message. This is a Heirloom extension and currently ignored.ev
Switch to another environment. Currently unsupported.evc
Copy an environment into the current environment. Currently unsupported.ex
Abort processing and exit. Currently unsupported.fallback
Select the fallback sequence for a font. This is a Heirloom extension and currently ignored.fam
Change the font family. Takes one argument specifying the font family to be selected. It is a groff extension and currently ignored.fc
Define a delimiting and a padding character for fields. Currently unsupported.fchar
Define a fallback glyph. Currently unsupported.fcolor
Set the fill color for \D objects. This is a groff extension and currently ignored.fdeferlig
Defer ligature building. This is a Heirloom extension and currently ignored.feature
Enable or disable an OpenType feature. This is a Heirloom extension and currently ignored.fkern
Control the use of kerning tables for a font. This is a Heirloom extension and currently ignored.fl
Flush output. Currently ignored.flig
Define ligatures. This is a Heirloom extension and currently ignored.fp
Assign font position. Currently ignored.fps
Mount a font with a special character map. This is a Heirloom extension and currently ignored.fschar
Define a font-specific fallback glyph. This is a groff extension and currently unsupported.fspacewidth
Set a font-specific width for the space character. This is a Heirloom extension and currently ignored.fspecial
Conditionally define a special font. This is a groff extension and currently ignored.ft
Change the font. Its syntax is as follows:.ft [font]
- B, BI, 3, 4
- switches to bold font
- I, 2
- switches to underlined font
- R, CW, 1
- switches to normal font
-
P
or no argument
- switches back to the previous font
ftr
Translate font name. This is a groff extension and currently ignored.fzoom
Zoom font size. Currently ignored.gcolor
Set glyph color. This is a groff extension and currently ignored.hc
Set the hyphenation character. Currently ignored.hcode
Set hyphenation codes of characters. Currently ignored.hidechar
Hide characters in a font. This is a Heirloom extension and currently ignored.hla
Set hyphenation language. This is a groff extension and currently ignored.hlm
Set maximum number of consecutive hyphenated lines. Currently ignored.hpf
Load hyphenation pattern file. This is a groff extension and currently ignored.hpfa
Load hyphenation pattern file, appending to the current patterns. This is a groff extension and currently ignored.hpfcode
Define mapping values for character codes in hyphenation patterns. This is a groff extension and currently ignored.hw
Specify hyphenation points in words. Currently ignored.hy
Set automatic hyphenation mode. Currently ignored.hylang
Set hyphenation language. This is a Heirloom extension and currently ignored.hylen
Minimum word length for hyphenation. This is a Heirloom extension and currently ignored.hym
Set hyphenation margin. This is a groff extension and currently ignored.hypp
Define hyphenation penalties. This is a Heirloom extension and currently ignored.hys
Set hyphenation space. This is a groff extension and currently ignored.ie
The “if” half of an if/else conditional. The result of the conditional is pushed into a stack used by subsequent invocations of el, which may be separated by any intervening input (or not exist at all). Its syntax is equivalent to if.if
Begins a conditional. This request has the following syntax:.if COND BODY
.if COND \{BODY BODY...\}
.if COND \{\ BODY... .\}
- If ‘!’ is prefixed to COND, the condition is logically inverted.
- If the first character of COND is ‘n’ (nroff mode) or ‘o’ (odd page), COND evaluates to true.
- If the first character of COND is ‘c’ (character available), ‘d’ (string defined), ‘e’ (even page), ‘r’ (register accessed), ‘t’ (troff mode), or ‘v’ (vroff mode), COND evaluates to false.
- If COND starts with a parenthesis or with an optionally signed integer number, it is evaluated according to the rules of Numerical expressions explained below. It evaluates to true if the result is positive, or to false if the result is zero or negative.
- Otherwise, the first character of COND is regarded as a delimiter and COND evaluates to true if the string extending from its first to its second occurrence is equal to the string extending from its second to its third occurrence.
- If COND cannot be parsed, it evaluates to false.
.if t .ig
.if t .if t \{\
.if COND \{\ .foo bar .\}
.if COND \{ .foo
.Fl a \} b
ig
Ignore input. Its syntax can be either.ig ignored text ..
.ig end ignored text .end
.ig if
index
Find a substring in a string. This is a Heirloom extension and currently unsupported.it
Set an input line trap. Its syntax is as follows:.it expression macro
itc
Set an input line trap, not counting lines ending with \c. Currently unsupported.IX
To support the generation of a table of contents, pod2man(1) emits this user-defined macro, usually without defining it. To avoid reporting large numbers of spurious errors, mandoc(1) ignores it.kern
Switch kerning on or off. Currently ignored.kernafter
Increase kerning after some characters. This is a Heirloom extension and currently ignored.kernbefore
Increase kerning before some characters. This is a Heirloom extension and currently ignored.kernpair
Add a kerning pair to the kerning table. This is a Heirloom extension and currently ignored.lc
Define a leader repetition character. Currently unsupported.lc_ctype
Set the LC_CTYPE locale. This is a Heirloom extension and currently unsupported.lds
Define a local string. This is a Heirloom extension and currently unsupported.length
Count the number of input characters in a user-defined string. Currently unsupported.letadj
Dynamic letter spacing and reshaping. This is a Heirloom extension and currently ignored.lf
Change the line number for error messages. Ignored because insecure.lg
Switch the ligature mechanism on or off. Currently ignored.lhang
Hang characters at left margin. This is a Heirloom extension and currently ignored.linetabs
Enable or disable line-tabs mode. This is a groff extension and currently unsupported.ll
Change the output line length. Its syntax is as follows:.ll [[+|-]width]
lnr
Set local number register. This is a Heirloom extension and currently unsupported.lnrf
Set local floating-point register. This is a Heirloom extension and currently unsupported.lpfx
Set a line prefix. This is a Heirloom extension and currently unsupported.ls
Set line spacing. It takes one integer argument specifying the vertical distance of subsequent output text lines measured in v units. Currently ignored.lsm
Set a leading spaces trap. This is a groff extension and currently unsupported.lt
Set title line length. Currently ignored.mc
Print margin character in the right margin. Currently ignored.mediasize
Set the device media size. This is a Heirloom extension and currently ignored.minss
Set minimum word space. This is a Heirloom extension and currently ignored.mk
Mark vertical position. Currently ignored.mso
Load a macro file. Ignored because insecure.na
Disable adjusting without changing the adjustment mode. Currently ignored.ne
Declare the need for the specified minimum vertical space before the next trap or the bottom of the page. Currently ignored.nh
Turn off automatic hyphenation mode. Currently ignored.nhychar
Define hyphenation-inhibiting characters. This is a Heirloom extension and currently ignored.nm
Print line numbers. Currently unsupported.nn
Temporarily turn off line numbering. Currently unsupported.nop
Exexute the rest of the input line as a request or macro line. Currently unsupported.nr
Define or change a register. A register is an arbitrary string value that defines some sort of state, which influences parsing and/or formatting. Its syntax is as follows:.nr name [+|-]expression
- nS
- If set to a positive integer value, certain mdoc(7) macros will behave in the same way as in the SYNOPSIS section. If set to 0, these macros will behave in the same way as outside the SYNOPSIS section, even when called within the SYNOPSIS section itself. Note that starting a new mdoc(7) section with the Sh macro will reset this register.
nrf
Define or change a floating-point register. This is a Heirloom extension and currently unsupported.nroff
Force nroff mode. This is a groff extension and currently ignored.ns
Turn on no-space mode. Currently ignored.nx
Abort processing of the current input file and process another one. Ignored because insecure.open
Open a file for writing. Ignored because insecure.opena
Open a file for appending. Ignored because insecure.os
Output saved vertical space. Currently ignored.output
Output directly to intermediate output. Not supported.padj
Globally control paragraph-at-once adjustment. This is a Heirloom extension and currently ignored.papersize
Set the paper size. This is a Heirloom extension and currently ignored.pc
Change the page number character. Currently ignored.pev
Print environments. This is a groff extension and currently ignored.pi
Pipe output to a shell command. Ignored because insecure.pl
Change page length. Takes one height argument. Currently ignored.pm
Print names and sizes of macros, strings, and diversions. Currently ignored.pn
Change page number of the next page. Currently ignored.pnr
Print all number registers. Currently ignored.po
Set horizontal page offset. Currently ignored.ps
Change point size. Takes one numerical argument. Currently ignored.psbb
Retrieve the bounding box of a PostScript file. Currently unsupported.pshape
Set a special shape for the current paragraph. This is a Heirloom extension and currently unsupported.pso
Include output of a shell command. Ignored because insecure.ptr
Print the names and positions of all traps. This is a groff extension and currently ignored.pvs
Change post-vertical spacing. This is a groff extension and currently ignored.rchar
Remove glyph definitions. Currently unsupported.rd
Read from standard input. Currently ignored.recursionlimit
Set the maximum stack depth for recursive macros. This is a Heirloom extension and currently ignored.return
Exit a macro and return to the caller. Currently unsupported.rfschar
Remove font-specific fallback glyph definitions. Currently unsupported.rhang
Hang characters at right margin. This is a Heirloom extension and currently ignored.rj
Justify unfilled text to the right margin. Currently ignored.rn
Rename a request, macro, diversion, or string. Currently unsupported.rnn
Rename a number register. Currently unsupported.rs
End no-space mode. Currently ignored.rt
Return to marked vertical position. Currently ignored.schar
Define global fallback glyph. This is a groff extension and currently unsupported.sentchar
Define sentence-ending characters. This is a Heirloom extension and currently ignored.shc
Change the soft hyphen character. Currently ignored.shift
Shift macro arguments. Currently unsupported.sizes
Define permissible point sizes. This is a groff extension and currently ignored.so
Include a source file. Its syntax is as follows:.so file
.so man3/Xcursor.3
spacewidth
Set the space width from the font metrics file. This is a Heirloom extension and currently ignored.special
Define a special font. This is a groff extension and currently ignored.spreadwarn
Warn about wide spacing between words. Currently ignored.ss
Set space character size. Currently ignored.sty
Associate style with a font position. This is a groff extension and currently ignored.substring
Replace a user-defined string with a substring. Currently unsupported.sv
Save vertical space. Currently ignored.sy
Execute shell command. Ignored because insecure.ta
Set tab stops. Takes an arbitrary number of arguments. Currently unsupported.tc
Change tab repetion character. Currently unsupported.ti
Temporary indent. Currently unsupported.tkf
Enable track kerning for a font. Currently ignored.tl
Print a title line. Currently unsupported.tm
Print to standard error output. Currently ignored.tm1
Print to standard error output, allowing leading blanks. This is a groff extension and currently ignored.tmc
Print to standard error output without a trailing newline. This is a groff extension and currently ignored.tr
Output character translation. Its syntax is as follows:.tr [ab]+
tr \(xx\(yy
track
Static letter space tracking. This is a Heirloom extension and currently ignored.transchar
Define transparent characters for sentence-ending. This is a Heirloom extension and currently ignored.trf
Output the contents of a file, disallowing invalid characters. This is a groff extension and ignored because insecure.trimat
Set the TrimBox page parameter for PDF generation. This is a Heirloom extension and currently ignored.trin
Output character translation, ignored by asciify. Currently unsupported.trnt
Output character translation, ignored by \!. Currently unsupported.troff
Force troff mode. This is a groff extension and currently ignored.TS
Begin a table, which formats input in aligned rows and columns. See tbl(7) for a description of the tbl language.uf
Globally set the underline font. Currently ignored.ul
Underline. Currently ignored.unformat
Unformat spaces and tabs in a diversion. Currently unsupported.unwatch
Disable notification for string or macro. This is a Heirloom extension and currently ignored.unwatchn
Disable notification for register. This is a Heirloom extension and currently ignored.vpt
Enable or disable vertical position traps. This is a groff extension and currently ignored.vs
Change vertical spacing. Currently ignored.warn
Set warning level. Currently ignored.warnscale
Set the scaling indicator used in warnings. This is a groff extension and currently ignored.watch
Notify on change of string or macro. This is a Heirloom extension and currently ignored.watchlength
On change, report the contents of macros and strings up to the sepcified length. This is a Heirloom extension and currently ignored.watchn
Notify on change of register. This is a Heirloom extension and currently ignored.wh
Set a page location trap. Currently unsupported.while
Repeated execution while a condition is true. Currently unsupported.write
Write to an open file. Ignored because insecure.writec
Write to an open file without appending a newline. Ignored because insecure.writem
Write macro or string to an open file. Ignored because insecure.xflag
Set the extension level. This is a Heirloom extension and currently ignored.Numerical expressions
The nr, if, and ie requests accept integer numerical expressions as arguments. These are always evaluated using the C int type; integer overflow works the same way as in the C language. Numbers consist of an arbitrary number of digits ‘0’ to ‘9’ prefixed by an optional sign ‘+’ or ‘-’. Each number may be followed by one optional scaling unit described below Scaling Widths. The following equations hold:1i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240 254c = 100i = 24000u = 24000 1f = 65536u = 65536
- +
- addition
- -
- subtraction
- *
- multiplication
- /
- division
- %
- remainder of division
- <
- less than
- >
- greater than
- ==
- equal to
- =
- equal to, same effect as == (this differs from C)
- <=
- less than or equal to
- >=
- greater than or equal to
- <>
- not equal to (corresponds to C !=; this one is of limited portability, it is supported by Heirloom roff, but not by groff)
- &
- logical and (corresponds to C &&)
- :
- logical or (corresponds to C ||)
- <?
- minimum (not available in C)
- >?
- maximum (not available in C)
ESCAPE SEQUENCE REFERENCE
The mandoc(1) roff parser recognises the following escape sequences. Note that the roff language defines more escape sequences not implemented in mandoc(1). In mdoc(7) and man(7) documents, using escape sequences is discouraged except for those described in the LANGUAGE SYNTAX section above.\<newline>
A backslash at the end of an input line can be used to continue the logical input line on the next physical input line, joining the text on both lines together as if it were on a single input line.\<space>
The escape sequence backslash-space (‘\ ’) is an unpaddable space-sized non-breaking space character; see Whitespace.\&
Non-printing zero-width character; see Whitespace.\'
Acute accent special character; use ‘\(aa’ instead.name]">name]">\*[name]
Interpolate the string with the name; see Predefined Strings and ds. For short names, there are variants\*
c and \*(
cc.\-
Special character “mathematical minus sign”.\`
Grave accent special character; use ‘\(ga’ instead.\~
Paddable non-breaking space character.\0
Digit width space character.string'">string'">\A'string'
Anchor definition; ignored by mandoc(1).string'">string'">\B'string'
Interpolate ‘1’ if string conforms to the syntax of Numerical expressions explained above and ‘0’ otherwise.string'">string'">\b'string'
Bracket building function; ignored by mandoc(1).name'">name'">\C'name'
Special Characters with names of arbitrary length.\c
When encountered at the end of an input text line, the next input text line is considered to continue that line, even if there are request or macro lines in between. No whitespace is inserted.string'">string'">\D'string'
Draw graphics function; ignored by mandoc(1).\e
Backslash special character.name]">name]">\F[name]
Switch font family (groff extension); ignored by mandoc(1). For short names, there are variants\F
c and \F(
cc.name]">name]">\f[name]
Switch to the font name, see Text Decoration. For short names, there are variants\f
c and \f(
cc.name]">name]">\g[name]
Interpolate the format of a number register; ignored by mandoc(1). For short names, there are variants\g
c and \g(
cc.+|-]number'">+|-]number'">\H'[+|-]number'
Set the height of the current font; ignored by mandoc(1).number'">number'">\h'number'
Horizontal motion; ignored by mandoc(1).name]">name]">\k[name]
Mark horizontal input place in register; ignored by mandoc(1). For short names, there are variants\k
c and \k(
cc.number[c]'">number[c]'">\L'number[c]'
Vertical line drawing function; ignored by mandoc(1).number[c]'">number[c]'">\l'number[c]'
Horizontal line drawing function; ignored by mandoc(1).name]">name]">\M[name]
Set fill (background) color (groff extension); ignored by mandoc(1). For short names, there are variants\M
c and \M(
cc.name]">name]">\m[name]
Set glyph drawing color (groff extension); ignored by mandoc(1). For short names, there are variants\m
c and \m(
cc.number'">number'">\N'number'
Character number on the current font.name]">name]">\n[name]
Interpolate the number register name. For short names, there are variants\n
c and \n(
cc.string'">string'">\o'string'
Overstrike, writing all the characters contained in the string to the same output position. In terminal and HTML output modes, only the last one of the characters is visible.name-[+|-]number'">name-[+|-]number'">\R'name [+|-]number'
Set number register; ignored by mandoc(1).number'">number'">\S'number'
Slant output; ignored by mandoc(1).+|-]number'">+|-]number'">\s'[+|-]number'
Change point size; ignored by mandoc(1). Alternative forms \s
[+|-]n, \s
[+|-]'number', \s
[[+|-]number], and \s
[+|-][number] are also parsed and ignored.name]">name]">\V[name]
Interpolate an environment variable; ignored by mandoc(1). For short names, there are variants\V
c and \V(
cc.number'">number'">\v'number'
Vertical motion; ignored by mandoc(1).string'">string'">\w'string'
Interpolate the width of the string. The mandoc(1) implementation assumes that after expansion of user-defined strings, the string only contains normal characters, no escape sequences, and that each character has a width of 24 basic units.string'">string'">\X'string'
Output string as device control function; ignored in nroff mode and by mandoc(1).number'">number'">\x'number'
Extra line space function; ignored by mandoc(1).name]">name]">\Y[name]
Output a string as a device control function; ignored in nroff mode and by mandoc(1). For short names, there are variants\Y
c and \Y(
cc.string'">string'">\Z'string'
Print string with zero width and height; ignored by mandoc(1).COMPATIBILITY
The mandoc(1) implementation of the roff language is intentionally incomplete. Unimplemented features include:- For security reasons, mandoc(1) never reads or writes external files except via so requests with safe relative paths.
- There is no automatic hyphenation, no adjustment to the right margin, and no centering; the output is always set flush-left.
- Support for setting tabulator positions and tabulator and leader characters is missing, and support for manually changing indentation is limited.
- The ‘u’ scaling unit is the default terminal unit. In traditional troff systems, this unit changes depending on the output media.
- Width measurements are implemented in a crude way and often yield wrong results. Explicit movement requests and escapes are ignored.
- There is no concept of output pages, no support for floats, graphics drawing, and picture inclusion; terminal output is always continuous.
- Requests regarding color, font families, and glyph manipulation are ignored. Font support is very limited. Kerning is not implemented, and no ligatures are produced.
- The “'” macro control character does not suppress output line breaks.
- Diversions are not implemented, and support for traps is very incomplete.
- While recursion is supported, while loops are not.