xref: /illumos-gate/usr/src/man/man7/mandoc_roff.7 (revision 0ccfe5834c3b867c1b6c273cae02ec8922bc0fd2)
1.\"	$Id: roff.7,v 1.116 2021/09/18 12:23:06 schwarze Exp $
2.\"
3.\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
4.\" Copyright (c) 2010-2019 Ingo Schwarze <schwarze@openbsd.org>
5.\"
6.\" Permission to use, copy, modify, and distribute this software for any
7.\" purpose with or without fee is hereby granted, provided that the above
8.\" copyright notice and this permission notice appear in all copies.
9.\"
10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17.\"
18.Dd $Mdocdate: September 18 2021 $
19.Dt ROFF 7
20.Os
21.Sh NAME
22.Nm roff
23.Nd roff language reference for mandoc
24.Sh DESCRIPTION
25The
26.Nm roff
27language is a general purpose text formatting language.
28Since traditional implementations of the
29.Xr mdoc 7
30and
31.Xr man 7
32manual formatting languages are based on it,
33many real-world manuals use small numbers of
34.Nm
35requests and escape sequences intermixed with their
36.Xr mdoc 7
37or
38.Xr man 7
39code.
40To properly format such manuals, the
41.Xr mandoc 1
42utility supports a subset of
43.Nm
44requests and escapes.
45Even though this manual page lists all
46.Nm
47requests and escape sequences, it only contains partial information
48about requests not supported by
49.Xr mandoc 1
50and about language features that do not matter for manual pages.
51For complete
52.Nm
53manuals, consult the
54.Sx SEE ALSO
55section.
56.Pp
57Input lines beginning with the control character
58.Sq \&.
59are parsed for requests and macros.
60Such lines are called
61.Dq request lines
62or
63.Dq macro lines ,
64respectively.
65Requests change the processing state and manipulate the formatting;
66some macros also define the document structure and produce formatted
67output.
68The single quote
69.Pq Qq \(aq
70is accepted as an alternative control character,
71treated by
72.Xr mandoc 1
73just like
74.Ql \&.
75.Pp
76Lines not beginning with control characters are called
77.Dq text lines .
78They provide free-form text to be printed; the formatting of the text
79depends on the respective processing context.
80.Sh LANGUAGE SYNTAX
81.Nm
82documents may contain only graphable 7-bit ASCII characters, the space
83character, and, in certain circumstances, the tab character.
84The backslash character
85.Sq \e
86indicates the start of an escape sequence, used for example for
87.Sx Comments
88and
89.Sx Special Characters .
90For a complete listing of escape sequences, consult the
91.Sx ESCAPE SEQUENCE REFERENCE
92below.
93.Ss Comments
94Text following an escaped double-quote
95.Sq \e\(dq ,
96whether in a request, macro, or text line, is ignored to the end of the line.
97A request line beginning with a control character and comment escape
98.Sq \&.\e\(dq
99is also ignored.
100Furthermore, request lines with only a control character and optional
101trailing whitespace are stripped from input.
102.Pp
103Examples:
104.Bd -literal -offset indent -compact
105\&.\e\(dq This is a comment line.
106\&.\e\(dq The next line is ignored:
107\&.
108\&.Sh EXAMPLES \e\(dq This is a comment, too.
109\&example text \e\(dq And so is this.
110.Ed
111.Ss Special Characters
112Special characters are used to encode special glyphs and are rendered
113differently across output media.
114They may occur in request, macro, and text lines.
115Sequences begin with the escape character
116.Sq \e
117followed by either an open-parenthesis
118.Sq \&(
119for two-character sequences; an open-bracket
120.Sq \&[
121for n-character sequences (terminated at a close-bracket
122.Sq \&] ) ;
123or a single one character sequence.
124.Pp
125Examples:
126.Bl -tag -width Ds -offset indent -compact
127.It Li \e(em
128Two-letter em dash escape.
129.It Li \ee
130One-letter backslash escape.
131.El
132.Pp
133See
134.Xr mandoc_char 7
135for a complete list.
136.Ss Font Selection
137In
138.Xr mdoc 7
139and
140.Xr man 7
141documents, fonts are usually selected with macros.
142The
143.Ic \ef
144escape sequence and the
145.Ic \&ft
146request can be used to manually change the font,
147but this is not recommended in
148.Xr mdoc 7
149documents.
150Such manual font changes are overridden by many subsequent macros.
151.Pp
152The following fonts are supported:
153.Pp
154.Bl -tag -width CW -offset indent -compact
155.It Cm B
156Bold font.
157.It Cm BI
158A font that is both bold and italic.
159.It Cm CB
160Bold constant width font.
161Same as
162.Cm B
163in terminal output.
164.It Cm CI
165Italic constant width font.
166Same as
167.Cm I
168in terminal output.
169.It Cm CR
170Regular constant width font.
171Same as
172.Cm R
173in terminal output.
174.It Cm CW
175An alias for
176.Cm CR .
177.It Cm I
178Italic font.
179.It Cm P
180Return to the previous font.
181If a macro caused a font change since the last
182.Ic \ef
183eascape sequence or
184.Ic \&ft
185request, this returns to the font before the last font change in
186the macro rather than to the font before the last manual font change.
187.It Cm R
188Roman font.
189This is the default font.
190.It Cm 1
191An alias for
192.Cm R .
193.It Cm 2
194An alias for
195.Cm I .
196.It Cm 3
197An alias for
198.Cm B .
199.It Cm 4
200An alias for
201.Cm BI .
202.El
203.Pp
204Examples:
205.Bl -tag -width Ds -offset indent -compact
206.It Li \efBbold\efR
207Write in \fBbold\fP, then switch to regular font mode.
208.It Li \efIitalic\efP
209Write in \fIitalic\fP, then return to previous font mode.
210.It Li \ef(BIbold italic\efP
211Write in \f(BIbold italic\fP, then return to previous font mode.
212.El
213.Ss Whitespace
214Whitespace consists of the space character.
215In text lines, whitespace is preserved within a line.
216In request and macro lines, whitespace delimits arguments and is discarded.
217.Pp
218Unescaped trailing spaces are stripped from text line input unless in a
219literal context.
220In general, trailing whitespace on any input line is discouraged for
221reasons of portability.
222In the rare case that a space character is needed at the end of an
223input line, it may be forced by
224.Sq \e\ \e& .
225.Pp
226Literal space characters can be produced in the output
227using escape sequences.
228In macro lines, they can also be included in arguments using quotation; see
229.Sx MACRO SYNTAX
230for details.
231.Pp
232Blank text lines, which may include whitespace, are only permitted
233within literal contexts.
234If the first character of a text line is a space, that line is printed
235with a leading newline.
236.Ss Scaling Widths
237Many requests and macros support scaled widths for their arguments.
238The syntax for a scaled width is
239.Sq Li [+-]?[0-9]*.[0-9]*[:unit:] ,
240where a decimal must be preceded or followed by at least one digit.
241.Pp
242The following scaling units are accepted:
243.Pp
244.Bl -tag -width Ds -offset indent -compact
245.It c
246centimetre
247.It i
248inch
249.It P
250pica (1/6 inch)
251.It p
252point (1/72 inch)
253.It f
254scale
255.Sq u
256by 65536
257.It v
258default vertical span
259.It m
260width of rendered
261.Sq m
262.Pq em
263character
264.It n
265width of rendered
266.Sq n
267.Pq en
268character
269.It u
270default horizontal span for the terminal
271.It M
272mini-em (1/100 em)
273.El
274.Pp
275Using anything other than
276.Sq m ,
277.Sq n ,
278or
279.Sq v
280is necessarily non-portable across output media.
281See
282.Sx COMPATIBILITY .
283.Pp
284If a scaling unit is not provided, the numerical value is interpreted
285under the default rules of
286.Sq v
287for vertical spaces and
288.Sq u
289for horizontal ones.
290.Pp
291Examples:
292.Bl -tag -width ".Bl -tag -width 2i" -offset indent -compact
293.It Li \&.Bl -tag -width 2i
294two-inch tagged list indentation in
295.Xr mdoc 7
296.It Li \&.HP 2i
297two-inch tagged list indentation in
298.Xr man 7
299.It Li \&.sp 2v
300two vertical spaces
301.El
302.Ss Sentence Spacing
303Each sentence should terminate at the end of an input line.
304By doing this, a formatter will be able to apply the proper amount of
305spacing after the end of sentence (unescaped) period, exclamation mark,
306or question mark followed by zero or more non-sentence closing
307delimiters
308.Po
309.Sq \&) ,
310.Sq \&] ,
311.Sq \&' ,
312.Sq \&"
313.Pc .
314.Pp
315The proper spacing is also intelligently preserved if a sentence ends at
316the boundary of a macro line.
317.Pp
318If an input line happens to end with a period, exclamation or question
319mark that isn't the end of a sentence, append a zero-width space
320.Pq Sq \e& .
321.Pp
322Examples:
323.Bd -literal -offset indent -compact
324Do not end sentences mid-line like this.  Instead,
325end a sentence like this.
326A macro would end like this:
327\&.Xr mandoc 1 \&.
328An abbreviation at the end of an input line needs escaping, e.g.\e&
329like this.
330.Ed
331.Sh REQUEST SYNTAX
332A request or macro line consists of:
333.Pp
334.Bl -enum -compact
335.It
336the control character
337.Sq \&.
338or
339.Sq \(aq
340at the beginning of the line,
341.It
342optionally an arbitrary amount of whitespace,
343.It
344the name of the request or the macro, which is one word of arbitrary
345length, terminated by whitespace,
346.It
347and zero or more arguments delimited by whitespace.
348.El
349.Pp
350Thus, the following request lines are all equivalent:
351.Bd -literal -offset indent
352\&.ig end
353\&.ig    end
354\&.   ig end
355.Ed
356.Sh MACRO SYNTAX
357Macros are provided by the
358.Xr mdoc 7
359and
360.Xr man 7
361languages and can be defined by the
362.Ic \&de
363request.
364When called, they follow the same syntax as requests, except that
365macro arguments may optionally be quoted by enclosing them
366in double quote characters
367.Pq Sq \(dq .
368Quoted text, even if it contains whitespace or would cause
369a macro invocation when unquoted, is always considered literal text.
370Inside quoted text, pairs of double quote characters
371.Pq Sq Qq
372resolve to single double quote characters.
373.Pp
374To be recognised as the beginning of a quoted argument, the opening
375quote character must be preceded by a space character.
376A quoted argument extends to the next double quote character that is not
377part of a pair, or to the end of the input line, whichever comes earlier.
378Leaving out the terminating double quote character at the end of the line
379is discouraged.
380For clarity, if more arguments follow on the same input line,
381it is recommended to follow the terminating double quote character
382by a space character; in case the next character after the terminating
383double quote character is anything else, it is regarded as the beginning
384of the next, unquoted argument.
385.Pp
386Both in quoted and unquoted arguments, pairs of backslashes
387.Pq Sq \e\e
388resolve to single backslashes.
389In unquoted arguments, space characters can alternatively be included
390by preceding them with a backslash
391.Pq Sq \e\~ ,
392but quoting is usually better for clarity.
393.Pp
394Examples:
395.Bl -tag -width Ds -offset indent -compact
396.It Li .Fn strlen \(dqconst char *s\(dq
397Group arguments
398.Qq const char *s
399into one function argument.
400If unspecified,
401.Qq const ,
402.Qq char ,
403and
404.Qq *s
405would be considered separate arguments.
406.It Li .Op \(dqFl a\(dq
407Consider
408.Qq \&Fl a
409as literal text instead of a flag macro.
410.El
411.Sh REQUEST REFERENCE
412The
413.Xr mandoc 1
414.Nm
415parser recognises the following requests.
416For requests marked as "ignored" or "unsupported", any arguments are
417ignored, and the number of arguments is not checked.
418.Bl -tag -width Ds
419.It Ic \&ab Op Ar message
420Abort processing.
421Currently unsupported.
422.It Ic \&ad Op Cm b | c | l | n | r
423Set line adjustment mode for subsequent text.
424Currently ignored.
425.It Ic \&af Ar registername format
426Assign an output format to a number register.
427Currently ignored.
428.It Ic \&aln Ar newname oldname
429Create an alias for a number register.
430Currently unsupported.
431.It Ic \&als Ar newname oldname
432Create an alias for a request, string, macro, or diversion.
433.It Ic \&am Ar macroname Op Ar endmacro
434Append to a macro definition.
435The syntax of this request is the same as that of
436.Ic \&de .
437.It Ic \&am1 Ar macroname Op Ar endmacro
438Append to a macro definition, switching roff compatibility mode off
439during macro execution (groff extension).
440The syntax of this request is the same as that of
441.Ic \&de1 .
442Since
443.Xr mandoc 1
444does not implement
445.Nm
446compatibility mode at all, it handles this request as an alias for
447.Ic \&am .
448.It Ic \&ami Ar macrostring Op Ar endstring
449Append to a macro definition, specifying the macro name indirectly
450(groff extension).
451The syntax of this request is the same as that of
452.Ic \&dei .
453.It Ic \&ami1 Ar macrostring Op Ar endstring
454Append to a macro definition, specifying the macro name indirectly
455and switching roff compatibility mode off during macro execution
456(groff extension).
457The syntax of this request is the same as that of
458.Ic \&dei1 .
459Since
460.Xr mandoc 1
461does not implement
462.Nm
463compatibility mode at all, it handles this request as an alias for
464.Ic \&ami .
465.It Ic \&as Ar stringname Op Ar string
466Append to a user-defined string.
467The syntax of this request is the same as that of
468.Ic \&ds .
469If a user-defined string with the specified name does not yet exist,
470it is set to the empty string before appending.
471.It Ic \&as1 Ar stringname Op Ar string
472Append to a user-defined string, switching roff compatibility mode off
473during macro execution (groff extension).
474The syntax of this request is the same as that of
475.Ic \&ds1 .
476Since
477.Xr mandoc 1
478does not implement
479.Nm
480compatibility mode at all, it handles this request as an alias for
481.Ic \&as .
482.It Ic \&asciify Ar divname
483Fully unformat a diversion.
484Currently unsupported.
485.It Ic \&backtrace
486Print a backtrace of the input stack.
487This is a groff extension and currently ignored.
488.It Ic \&bd Ar font Oo Ar curfont Oc Op Ar offset
489Artificially embolden by repeated printing with small shifts.
490Currently ignored.
491.It Ic \&bleedat Ar left top width height
492Set the BleedBox page parameter for PDF generation.
493This is a Heirloom extension and currently ignored.
494.It Ic \&blm Ar macroname
495Set a blank line trap.
496Currently unsupported.
497.It Ic \&box Ar divname
498Begin a diversion without including a partially filled line.
499Currently unsupported.
500.It Ic \&boxa Ar divname
501Add to a diversion without including a partially filled line.
502Currently unsupported.
503.It Ic \&bp Oo Cm + Ns | Ns Cm - Oc Ns Ar pagenumber
504Begin a new page.
505Currently ignored.
506.It Ic \&BP Ar source height width position offset flags label
507Define a frame and place a picture in it.
508This is a Heirloom extension and currently unsupported.
509.It Ic \&br
510Break the output line.
511.It Ic \&break
512Break out of the innermost
513.Ic \&while
514loop.
515.It Ic \&breakchar Ar char ...
516Optional line break characters.
517This is a Heirloom extension and currently ignored.
518.It Ic \&brnl Ar N
519Break output line after the next
520.Ar N
521input lines.
522This is a Heirloom extension and currently ignored.
523.It Ic \&brp
524Break and spread output line.
525Currently, this is implemented as an alias for
526.Ic \&br .
527.It Ic \&brpnl Ar N
528Break and spread output line after the next
529.Ar N
530input lines.
531This is a Heirloom extension and currently ignored.
532.It Ic \&c2 Op Ar char
533Change the no-break control character.
534Currently unsupported.
535.It Ic \&cc Op Ar char
536Change the control character.
537If
538.Ar char
539is not specified, the control character is reset to
540.Sq \&. .
541Trailing characters are ignored.
542.It Ic \&ce Op Ar N
543Center the next
544.Ar N
545input lines without filling.
546.Ar N
547defaults to 1.
548An argument of 0 or less ends centering.
549Currently, high level macros abort centering.
550.It Ic \&cf Ar filename
551Output the contents of a file.
552Ignored because insecure.
553.It Ic \&cflags Ar flags char ...
554Set character flags.
555This is a groff extension and currently ignored.
556.It Ic \&ch Ar macroname Op Ar dist
557Change a trap location.
558Currently ignored.
559.It Ic \&char Ar glyph Op Ar string
560Define or redefine the ASCII character or character escape sequence
561.Ar glyph
562to be rendered as
563.Ar string ,
564which can be empty.
565Only partially supported in
566.Xr mandoc 1 ;
567may interact incorrectly with
568.Ic \&tr .
569.It Ic \&chop Ar stringname
570Remove the last character from a macro, string, or diversion.
571Currently unsupported.
572.It Ic \&class Ar classname char ...
573Define a character class.
574This is a groff extension and currently ignored.
575.It Ic \&close Ar streamname
576Close an open file.
577Ignored because insecure.
578.It Ic \&CL Ar color text
579Print text in color.
580This is a Heirloom extension and currently unsupported.
581.It Ic \&color Op Cm 1 | 0
582Activate or deactivate colors.
583This is a groff extension and currently ignored.
584.It Ic \&composite Ar from to
585Define a name component for composite glyph names.
586This is a groff extension and currently unsupported.
587.It Ic \&continue
588Immediately start the next iteration of a
589.Ic \&while
590loop.
591Currently unsupported.
592.It Ic \&cp Op Cm 1 | 0
593Switch
594.Nm
595compatibility mode on or off.
596Currently ignored.
597.It Ic \&cropat Ar left top width height
598Set the CropBox page parameter for PDF generation.
599This is a Heirloom extension and currently ignored.
600.It Ic \&cs Ar font Op Ar width Op Ar emsize
601Constant character spacing mode.
602Currently ignored.
603.It Ic \&cu Op Ar N
604Underline next
605.Ar N
606input lines including whitespace.
607Currently ignored.
608.It Ic \&da Ar divname
609Append to a diversion.
610Currently unsupported.
611.It Ic \&dch Ar macroname Op Ar dist
612Change a trap location in the current diversion.
613This is a Heirloom extension and currently unsupported.
614.It Ic \&de Ar macroname Op Ar endmacro
615Define a
616.Nm
617macro.
618Its syntax can be either
619.Bd -literal -offset indent
620.Pf . Ic \&de Ar macroname
621.Ar definition
622\&..
623.Ed
624.Pp
625or
626.Bd -literal -offset indent
627.Pf . Ic \&de Ar macroname endmacro
628.Ar definition
629.Pf . Ar endmacro
630.Ed
631.Pp
632Both forms define or redefine the macro
633.Ar macroname
634to represent the
635.Ar definition ,
636which may consist of one or more input lines, including the newline
637characters terminating each line, optionally containing calls to
638.Nm
639requests,
640.Nm
641macros or high-level macros like
642.Xr man 7
643or
644.Xr mdoc 7
645macros, whichever applies to the document in question.
646.Pp
647Specifying a custom
648.Ar endmacro
649works in the same way as for
650.Ic \&ig ;
651namely, the call to
652.Sq Pf . Ar endmacro
653first ends the
654.Ar definition ,
655and after that, it is also evaluated as a
656.Nm
657request or
658.Nm
659macro, but not as a high-level macro.
660.Pp
661The macro can be invoked later using the syntax
662.Pp
663.D1 Pf . Ar macroname Op Ar argument Op Ar argument ...
664.Pp
665Regarding argument parsing, see
666.Sx MACRO SYNTAX
667above.
668.Pp
669The line invoking the macro will be replaced
670in the input stream by the
671.Ar definition ,
672replacing all occurrences of
673.No \e\e$ Ns Ar N ,
674where
675.Ar N
676is a digit, by the
677.Ar N Ns th Ar argument .
678For example,
679.Bd -literal -offset indent
680\&.de ZN
681\efI\e^\e\e$1\e^\efP\e\e$2
682\&..
683\&.ZN XtFree .
684.Ed
685.Pp
686produces
687.Pp
688.D1 \efI\e^XtFree\e^\efP.
689.Pp
690in the input stream, and thus in the output: \fI\^XtFree\^\fP.
691Each occurrence of \e\e$* is replaced with all the arguments,
692joined together with single space characters.
693The variant \e\e$@ is similar, except that each argument is
694individually quoted.
695.Pp
696Since macros and user-defined strings share a common string table,
697defining a macro
698.Ar macroname
699clobbers the user-defined string
700.Ar macroname ,
701and the
702.Ar definition
703can also be printed using the
704.Sq \e*
705string interpolation syntax described below
706.Ic ds ,
707but this is rarely useful because every macro definition contains at least
708one explicit newline character.
709.Pp
710In order to prevent endless recursion, both groff and
711.Xr mandoc 1
712limit the stack depth for expanding macros and strings
713to a large, but finite number, and
714.Xr mandoc 1
715also limits the length of the expanded input line.
716Do not rely on the exact values of these limits.
717.It Ic \&de1 Ar macroname Op Ar endmacro
718Define a
719.Nm
720macro that will be executed with
721.Nm
722compatibility mode switched off during macro execution.
723This is a groff extension.
724Since
725.Xr mandoc 1
726does not implement
727.Nm
728compatibility mode at all, it handles this request as an alias for
729.Ic \&de .
730.It Ic \&defcolor Ar newname scheme component ...
731Define a color name.
732This is a groff extension and currently ignored.
733.It Ic \&dei Ar macrostring Op Ar endstring
734Define a
735.Nm
736macro, specifying the macro name indirectly (groff extension).
737The syntax of this request is the same as that of
738.Ic \&de .
739The effect is the same as:
740.Pp
741.D1 Pf . Cm \&de No \e* Ns Bo Ar macrostring Bc Op \e* Ns Bq Ar endstring
742.It Ic \&dei1 Ar macrostring Op Ar endstring
743Define a
744.Nm
745macro that will be executed with
746.Nm
747compatibility mode switched off during macro execution,
748specifying the macro name indirectly (groff extension).
749Since
750.Xr mandoc 1
751does not implement
752.Nm
753compatibility mode at all, it handles this request as an alias for
754.Ic \&dei .
755.It Ic \&device Ar string ...
756.It Ic \&devicem Ar stringname
757These two requests only make sense with the groff-specific intermediate
758output format and are unsupported.
759.It Ic \&di Ar divname
760Begin a diversion.
761Currently unsupported.
762.It Ic \&do Ar command Op Ar argument ...
763Execute
764.Nm
765request or macro line with compatibility mode disabled.
766Currently unsupported.
767.It Ic \&ds Ar stringname Op Oo \(dq Oc Ns Ar string
768Define a user-defined string.
769The
770.Ar stringname
771and
772.Ar string
773arguments are space-separated.
774If the
775.Ar string
776begins with a double-quote character, that character will not be part
777of the string.
778All remaining characters on the input line form the
779.Ar string ,
780including whitespace and double-quote characters, even trailing ones.
781.Pp
782The
783.Ar string
784can be interpolated into subsequent text by using
785.No \e* Ns Bq Ar stringname
786for a
787.Ar stringname
788of arbitrary length, or \e*(NN or \e*N if the length of
789.Ar stringname
790is two or one characters, respectively.
791Interpolation can be prevented by escaping the leading backslash;
792that is, an asterisk preceded by an even number of backslashes
793does not trigger string interpolation.
794.Pp
795Since user-defined strings and macros share a common string table,
796defining a string
797.Ar stringname
798clobbers the macro
799.Ar stringname ,
800and the
801.Ar stringname
802used for defining a string can also be invoked as a macro,
803in which case the following input line will be appended to the
804.Ar string ,
805forming a new input line passed to the
806.Nm
807parser.
808For example,
809.Bd -literal -offset indent
810\&.ds badidea .S
811\&.badidea
812H SYNOPSIS
813.Ed
814.Pp
815invokes the
816.Ic SH
817macro when used in a
818.Xr man 7
819document.
820Such abuse is of course strongly discouraged.
821.It Ic \&ds1 Ar stringname Op Oo \(dq Oc Ns Ar string
822Define a user-defined string that will be expanded with
823.Nm
824compatibility mode switched off during string expansion.
825This is a groff extension.
826Since
827.Xr mandoc 1
828does not implement
829.Nm
830compatibility mode at all, it handles this request as an alias for
831.Ic \&ds .
832.It Ic \&dwh Ar dist macroname
833Set a location trap in the current diversion.
834This is a Heirloom extension and currently unsupported.
835.It Ic \&dt Op Ar dist macroname
836Set a trap within a diversion.
837Currently unsupported.
838.It Ic \&ec Op Ar char
839Enable the escape mechanism and change the escape character.
840The
841.Ar char
842argument defaults to the backslash
843.Pq Sq \e .
844.It Ic \&ecr
845Restore the escape character.
846Currently unsupported.
847.It Ic \&ecs
848Save the escape character.
849Currently unsupported.
850.It Ic \&el Ar body
851The
852.Dq else
853half of an if/else conditional.
854Pops a result off the stack of conditional evaluations pushed by
855.Ic \&ie
856and uses it as its conditional.
857If no stack entries are present (e.g., due to no prior
858.Ic \&ie
859calls)
860then false is assumed.
861The syntax of this request is similar to
862.Ic \&if
863except that the conditional is missing.
864.It Ic \&em Ar macroname
865Set a trap at the end of input.
866Currently unsupported.
867.It Ic \&EN
868End an equation block.
869See
870.Ic \&EQ .
871.It Ic \&eo
872Disable the escape mechanism completely.
873.It Ic \&EP
874End a picture started by
875.Ic \&BP .
876This is a Heirloom extension and currently unsupported.
877.It Ic \&EQ
878Begin an equation block.
879See
880.Xr eqn 7
881for a description of the equation language.
882.It Ic \&errprint Ar message
883Print a string like an error message.
884This is a Heirloom extension and currently ignored.
885.It Ic \&ev Op Ar envname
886Switch to another environment.
887Currently unsupported.
888.It Ic \&evc Op Ar envname
889Copy an environment into the current environment.
890Currently unsupported.
891.It Ic \&ex
892Abort processing and exit.
893Currently unsupported.
894.It Ic \&fallback Ar curfont font ...
895Select the fallback sequence for a font.
896This is a Heirloom extension and currently ignored.
897.It Ic \&fam Op Ar familyname
898Change the font family.
899This is a groff extension and currently ignored.
900.It Ic \&fc Op Ar delimchar Op Ar padchar
901Define a delimiting and a padding character for fields.
902Currently unsupported.
903.It Ic \&fchar Ar glyphname Op Ar string
904Define a fallback glyph.
905Currently unsupported.
906.It Ic \&fcolor Ar colorname
907Set the fill color for \eD objects.
908This is a groff extension and currently ignored.
909.It Ic \&fdeferlig Ar font string ...
910Defer ligature building.
911This is a Heirloom extension and currently ignored.
912.It Ic \&feature Cm + Ns | Ns Cm - Ns Ar name
913Enable or disable an OpenType feature.
914This is a Heirloom extension and currently ignored.
915.It Ic \&fi
916Break the output line and switch to fill mode,
917which is active by default but can be ended with the
918.Ic \&nf
919request.
920In fill mode, input from subsequent input lines is added to
921the same output line until the next word no longer fits,
922at which point the output line is broken.
923This request is implied by the
924.Xr mdoc 7
925.Ic \&Sh
926macro and by the
927.Xr man 7
928.Ic \&SH ,
929.Ic \&SS ,
930and
931.Ic \&EE
932macros.
933.It Ic \&fkern Ar font minkern
934Control the use of kerning tables for a font.
935This is a Heirloom extension and currently ignored.
936.It Ic \&fl
937Flush output.
938Currently ignored.
939.It Ic \&flig Ar font string char ...
940Define ligatures.
941This is a Heirloom extension and currently ignored.
942.It Ic \&fp Ar position font Op Ar filename
943Assign font position.
944Currently ignored.
945.It Ic \&fps Ar mapname ...
946Mount a font with a special character map.
947This is a Heirloom extension and currently ignored.
948.It Ic \&fschar Ar font glyphname Op Ar string
949Define a font-specific fallback glyph.
950This is a groff extension and currently unsupported.
951.It Ic \&fspacewidth Ar font Op Ar afmunits
952Set a font-specific width for the space character.
953This is a Heirloom extension and currently ignored.
954.It Ic \&fspecial Ar curfont Op Ar font ...
955Conditionally define a special font.
956This is a groff extension and currently ignored.
957.It Ic \&ft Op Ar font
958Change the font; see
959.Sx Font Selection .
960The
961.Ar font
962argument defaults to
963.Cm P .
964.It Ic \&ftr Ar newname Op Ar oldname
965Translate font name.
966This is a groff extension and currently ignored.
967.It Ic \&fzoom Ar font Op Ar permille
968Zoom font size.
969Currently ignored.
970.It Ic \&gcolor Op Ar colorname
971Set glyph color.
972This is a groff extension and currently ignored.
973.It Ic \&hc Op Ar char
974Set the hyphenation character.
975Currently ignored.
976.It Ic \&hcode Ar char code ...
977Set hyphenation codes of characters.
978Currently ignored.
979.It Ic \&hidechar Ar font char ...
980Hide characters in a font.
981This is a Heirloom extension and currently ignored.
982.It Ic \&hla Ar language
983Set hyphenation language.
984This is a groff extension and currently ignored.
985.It Ic \&hlm Op Ar number
986Set maximum number of consecutive hyphenated lines.
987Currently ignored.
988.It Ic \&hpf Ar filename
989Load hyphenation pattern file.
990This is a groff extension and currently ignored.
991.It Ic \&hpfa Ar filename
992Load hyphenation pattern file, appending to the current patterns.
993This is a groff extension and currently ignored.
994.It Ic \&hpfcode Ar code code ...
995Define mapping values for character codes in hyphenation patterns.
996This is a groff extension and currently ignored.
997.It Ic \&hw Ar word ...
998Specify hyphenation points in words.
999Currently ignored.
1000.It Ic \&hy Op Ar mode
1001Set automatic hyphenation mode.
1002Currently ignored.
1003.It Ic \&hylang Ar language
1004Set hyphenation language.
1005This is a Heirloom extension and currently ignored.
1006.It Ic \&hylen Ar nchar
1007Minimum word length for hyphenation.
1008This is a Heirloom extension and currently ignored.
1009.It Ic \&hym Op Ar length
1010Set hyphenation margin.
1011This is a groff extension and currently ignored.
1012.It Ic \&hypp Ar penalty ...
1013Define hyphenation penalties.
1014This is a Heirloom extension and currently ignored.
1015.It Ic \&hys Op Ar length
1016Set hyphenation space.
1017This is a groff extension and currently ignored.
1018.It Ic \&ie Ar condition body
1019The
1020.Dq if
1021half of an if/else conditional.
1022The result of the conditional is pushed into a stack used by subsequent
1023invocations of
1024.Ic \&el ,
1025which may be separated by any intervening input (or not exist at all).
1026Its syntax is equivalent to
1027.Ic \&if .
1028.It Ic \&if Ar condition body
1029Begin a conditional.
1030This request can also be written as follows:
1031.Bd -unfilled -offset indent
1032.Pf . Ic \&if Ar condition No \e{ Ns Ar body
1033.Ar body ... Ns \e}
1034.Ed
1035.Bd -unfilled -offset indent
1036.Pf . Ic \&if Ar condition No \e{\e
1037.Ar body ...
1038.Pf . No \e}
1039.Ed
1040.Pp
1041The
1042.Ar condition
1043is a boolean expression.
1044Currently,
1045.Xr mandoc 1
1046supports the following subset of roff conditionals:
1047.Bl -bullet
1048.It
1049If
1050.Sq \&!
1051is prefixed to
1052.Ar condition ,
1053it is logically inverted.
1054.It
1055If the first character of
1056.Ar condition
1057is
1058.Sq n
1059.Pq nroff mode
1060or
1061.Sq o
1062.Pq odd page ,
1063it evaluates to true, and the
1064.Ar body
1065starts with the next character.
1066.It
1067If the first character of
1068.Ar condition
1069is
1070.Sq e
1071.Pq even page ,
1072.Sq t
1073.Pq troff mode ,
1074or
1075.Sq v
1076.Pq vroff mode ,
1077it evaluates to false, and the
1078.Ar body
1079starts with the next character.
1080.It
1081If the first character of
1082.Ar condition
1083is
1084.Sq c
1085.Pq character available ,
1086it evaluates to true if the following character is an ASCII character
1087or a valid character escape sequence, or to false otherwise.
1088The
1089.Ar body
1090starts with the character following that next character.
1091.It
1092If the first character of
1093.Ar condition
1094is
1095.Sq d ,
1096it evaluates to true if the rest of
1097.Ar condition
1098is the name of an existing user defined macro or string;
1099otherwise, it evaluates to false.
1100.It
1101If the first character of
1102.Ar condition
1103is
1104.Sq r ,
1105it evaluates to true if the rest of
1106.Ar condition
1107is the name of an existing number register;
1108otherwise, it evaluates to false.
1109.It
1110If the
1111.Ar condition
1112starts with a parenthesis or with an optionally signed
1113integer number, it is evaluated according to the rules of
1114.Sx Numerical expressions
1115explained below.
1116It evaluates to true if the result is positive,
1117or to false if the result is zero or negative.
1118.It
1119Otherwise, the first character of
1120.Ar condition
1121is regarded as a delimiter and it evaluates to true if the string
1122extending from its first to its second occurrence is equal to the
1123string extending from its second to its third occurrence.
1124.It
1125If
1126.Ar condition
1127cannot be parsed, it evaluates to false.
1128.El
1129.Pp
1130If a conditional is false, its children are not processed, but are
1131syntactically interpreted to preserve the integrity of the input
1132document.
1133Thus,
1134.Pp
1135.D1 \&.if t .ig
1136.Pp
1137will discard the
1138.Sq \&.ig ,
1139which may lead to interesting results, but
1140.Pp
1141.D1 \&.if t .if t \e{\e
1142.Pp
1143will continue to syntactically interpret to the block close of the final
1144conditional.
1145Sub-conditionals, in this case, obviously inherit the truth value of
1146the parent.
1147.Pp
1148If the
1149.Ar body
1150section is begun by an escaped brace
1151.Sq \e{ ,
1152scope continues until the end of the input line containing the
1153matching closing-brace escape sequence
1154.Sq \e} .
1155If the
1156.Ar body
1157is not enclosed in braces, scope continues until the end of the line.
1158If the
1159.Ar condition
1160is followed by a
1161.Ar body
1162on the same line, whether after a brace or not, then requests and macros
1163.Em must
1164begin with a control character.
1165It is generally more intuitive, in this case, to write
1166.Bd -unfilled -offset indent
1167.Pf . Ic \&if Ar condition No \e{\e
1168.Pf . Ar request
1169.Pf . No \e}
1170.Ed
1171.Pp
1172than having the request or macro follow as
1173.Pp
1174.D1 Pf . Ic \&if Ar condition Pf \e{. Ar request
1175.Pp
1176The scope of a conditional is always parsed, but only executed if the
1177conditional evaluates to true.
1178.Pp
1179Note that the
1180.Sq \e}
1181is converted into a zero-width escape sequence if not passed as a
1182standalone macro
1183.Sq \&.\e} .
1184For example,
1185.Pp
1186.D1 \&.Fl a \e} b
1187.Pp
1188will result in
1189.Sq \e}
1190being considered an argument of the
1191.Sq \&Fl
1192macro.
1193.It Ic \&ig Op Ar endmacro
1194Ignore input.
1195Its syntax can be either
1196.Bd -literal -offset indent
1197.Pf . Cm \&ig
1198.Ar ignored text
1199\&..
1200.Ed
1201.Pp
1202or
1203.Bd -literal -offset indent
1204.Pf . Cm \&ig Ar endmacro
1205.Ar ignored text
1206.Pf . Ar endmacro
1207.Ed
1208.Pp
1209In the first case, input is ignored until a
1210.Sq \&..
1211request is encountered on its own line.
1212In the second case, input is ignored until the specified
1213.Sq Pf . Ar endmacro
1214is encountered.
1215Do not use the escape character
1216.Sq \e
1217anywhere in the definition of
1218.Ar endmacro ;
1219it would cause very strange behaviour.
1220.Pp
1221When the
1222.Ar endmacro
1223is a roff request or a roff macro, like in
1224.Pp
1225.D1 \&.ig if
1226.Pp
1227the subsequent invocation of
1228.Ic \&if
1229will first terminate the
1230.Ar ignored text ,
1231then be invoked as usual.
1232Otherwise, it only terminates the
1233.Ar ignored text ,
1234and arguments following it or the
1235.Sq \&..
1236request are discarded.
1237.It Ic \&in Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1238Change indentation.
1239See
1240.Xr man 7 .
1241Ignored in
1242.Xr mdoc 7 .
1243.It Ic \&index Ar register stringname substring
1244Find a substring in a string.
1245This is a Heirloom extension and currently unsupported.
1246.It Ic \&it Ar expression macro
1247Set an input line trap.
1248The named
1249.Ar macro
1250will be invoked after processing the number of input text lines
1251specified by the numerical
1252.Ar expression .
1253While evaluating the
1254.Ar expression ,
1255the unit suffixes described below
1256.Sx Scaling Widths
1257are ignored.
1258.It Ic \&itc Ar expression macro
1259Set an input line trap, not counting lines ending with \ec.
1260Currently unsupported.
1261.It Ic \&IX Ar class keystring
1262To support the generation of a table of contents,
1263.Xr pod2man 1
1264emits this user-defined macro, usually without defining it.
1265To avoid reporting large numbers of spurious errors,
1266.Xr mandoc 1
1267ignores it.
1268.It Ic \&kern Op Cm 1 | 0
1269Switch kerning on or off.
1270Currently ignored.
1271.It Ic \&kernafter Ar font char ... afmunits ...
1272Increase kerning after some characters.
1273This is a Heirloom extension and currently ignored.
1274.It Ic \&kernbefore Ar font char ... afmunits ...
1275Increase kerning before some characters.
1276This is a Heirloom extension and currently ignored.
1277.It Ic \&kernpair Ar font char ... font char ... afmunits
1278Add a kerning pair to the kerning table.
1279This is a Heirloom extension and currently ignored.
1280.It Ic \&lc Op Ar glyph
1281Define a leader repetition character.
1282Currently unsupported.
1283.It Ic \&lc_ctype Ar localename
1284Set the
1285.Dv LC_CTYPE
1286locale.
1287This is a Heirloom extension and currently unsupported.
1288.It Ic \&lds Ar macroname string
1289Define a local string.
1290This is a Heirloom extension and currently unsupported.
1291.It Ic \&length Ar register string
1292Count the number of input characters in a string.
1293Currently unsupported.
1294.It Ic \&letadj Ar lspmin lshmin letss lspmax lshmax
1295Dynamic letter spacing and reshaping.
1296This is a Heirloom extension and currently ignored.
1297.It Ic \&lf Ar lineno Op Ar filename
1298Change the line number for error messages.
1299Ignored because insecure.
1300.It Ic \&lg Op Cm 1 | 0
1301Switch the ligature mechanism on or off.
1302Currently ignored.
1303.It Ic \&lhang Ar font char ... afmunits
1304Hang characters at left margin.
1305This is a Heirloom extension and currently ignored.
1306.It Ic \&linetabs Op Cm 1 | 0
1307Enable or disable line-tabs mode.
1308This is a groff extension and currently unsupported.
1309.It Ic \&ll Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1310Change the output line length.
1311If the
1312.Ar width
1313argument is omitted, the line length is reset to its previous value.
1314The default setting for terminal output is 78n.
1315If a sign is given, the line length is added to or subtracted from;
1316otherwise, it is set to the provided value.
1317Using this request in new manuals is discouraged for several reasons,
1318among others because it overrides the
1319.Xr mandoc 1
1320.Fl O Cm width
1321command line option.
1322.It Ic \&lnr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1323Set local number register.
1324This is a Heirloom extension and currently unsupported.
1325.It Ic \&lnrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar value Op Ar increment
1326Set local floating-point register.
1327This is a Heirloom extension and currently unsupported.
1328.It Ic \&lpfx Ar string
1329Set a line prefix.
1330This is a Heirloom extension and currently unsupported.
1331.It Ic \&ls Op Ar factor
1332Set line spacing.
1333It takes one integer argument specifying the vertical distance of
1334subsequent output text lines measured in v units.
1335Currently ignored.
1336.It Ic \&lsm Ar macroname
1337Set a leading spaces trap.
1338This is a groff extension and currently unsupported.
1339.It Ic \&lt Op Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1340Set title line length.
1341Currently ignored.
1342.It Ic \&mc Ar glyph Op Ar dist
1343Print margin character in the right margin.
1344The
1345.Ar dist
1346is currently ignored; instead, 1n is used.
1347.It Ic \&mediasize Ar media
1348Set the device media size.
1349This is a Heirloom extension and currently ignored.
1350.It Ic \&minss Ar width
1351Set minimum word space.
1352This is a Heirloom extension and currently ignored.
1353.It Ic \&mk Op Ar register
1354Mark vertical position.
1355Currently ignored.
1356.It Ic \&mso Ar filename
1357Load a macro file using the search path.
1358Ignored because insecure.
1359.It Ic \&na
1360Disable adjusting without changing the adjustment mode.
1361Currently ignored.
1362.It Ic \&ne Op Ar height
1363Declare the need for the specified minimum vertical space
1364before the next trap or the bottom of the page.
1365Currently ignored.
1366.It Ic \&nf
1367Break the output line and switch to no-fill mode.
1368Subsequent input lines are kept together on the same output line
1369even when exceeding the right margin,
1370and line breaks in subsequent input cause output line breaks.
1371This request is implied by the
1372.Xr mdoc 7
1373.Ic \&Bd Fl unfilled
1374and
1375.Ic \&Bd Fl literal
1376macros and by the
1377.Xr man 7
1378.Ic \&EX
1379macro.
1380The
1381.Ic \&fi
1382request switches back to the default fill mode.
1383.It Ic \&nh
1384Turn off automatic hyphenation mode.
1385Currently ignored.
1386.It Ic \&nhychar Ar char ...
1387Define hyphenation-inhibiting characters.
1388This is a Heirloom extension and currently ignored.
1389.It Ic \&nm Op Ar start Op Ar inc Op Ar space Op Ar indent
1390Print line numbers.
1391Currently unsupported.
1392.It Ic \&nn Op Ar number
1393Temporarily turn off line numbering.
1394Currently unsupported.
1395.It Ic \&nop Ar body
1396Execute the rest of the input line as a request, macro, or text line,
1397skipping the
1398.Ic \&nop
1399request and any space characters immediately following it.
1400This is mostly used to indent text lines inside macro definitions.
1401.It Ic \&nr Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression Op Ar stepsize
1402Define or change a register.
1403A register is an arbitrary string value that defines some sort of state,
1404which influences parsing and/or formatting.
1405For the syntax of
1406.Ar expression ,
1407see
1408.Sx Numerical expressions
1409below.
1410If it is prefixed by a sign, the register will be
1411incremented or decremented instead of assigned to.
1412.Pp
1413The
1414.Ar stepsize
1415is used by the
1416.Ic \en+
1417auto-increment feature.
1418It remains unchanged when omitted while changing an existing register,
1419and it defaults to 0 when defining a new register.
1420.Pp
1421The following
1422.Ar register
1423is handled specially:
1424.Bl -tag -width Ds
1425.It Cm nS
1426If set to a positive integer value, certain
1427.Xr mdoc 7
1428macros will behave in the same way as in the
1429.Em SYNOPSIS
1430section.
1431If set to 0, these macros will behave in the same way as outside the
1432.Em SYNOPSIS
1433section, even when called within the
1434.Em SYNOPSIS
1435section itself.
1436Note that starting a new
1437.Xr mdoc 7
1438section with the
1439.Ic \&Sh
1440macro will reset this register.
1441.El
1442.It Xo
1443.Ic \&nrf Ar register Oo Cm + Ns | Ns Cm - Oc Ns Ar expression
1444.Op Ar increment
1445.Xc
1446Define or change a floating-point register.
1447This is a Heirloom extension and currently unsupported.
1448.It Ic \&nroff
1449Force nroff mode.
1450This is a groff extension and currently ignored.
1451.It Ic \&ns
1452Turn on no-space mode.
1453Currently ignored.
1454.It Ic \&nx Op Ar filename
1455Abort processing of the current input file and process another one.
1456Ignored because insecure.
1457.It Ic \&open Ar stream file
1458Open a file for writing.
1459Ignored because insecure.
1460.It Ic \&opena Ar stream file
1461Open a file for appending.
1462Ignored because insecure.
1463.It Ic \&os
1464Output saved vertical space.
1465Currently ignored.
1466.It Ic \&output Ar string
1467Output directly to intermediate output.
1468Not supported.
1469.It Ic \&padj Op Cm 1 | 0
1470Globally control paragraph-at-once adjustment.
1471This is a Heirloom extension and currently ignored.
1472.It Ic \&papersize Ar media
1473Set the paper size.
1474This is a Heirloom extension and currently ignored.
1475.It Ic \&pc Op Ar char
1476Change the page number character.
1477Currently ignored.
1478.It Ic \&pev
1479Print environments.
1480This is a groff extension and currently ignored.
1481.It Ic \&pi Ar command
1482Pipe output to a shell command.
1483Ignored because insecure.
1484.It Ic \&PI
1485Low-level request used by
1486.Ic \&BP .
1487This is a Heirloom extension and currently unsupported.
1488.It Ic \&pl Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1489Change page length.
1490Currently ignored.
1491.It Ic \&pm
1492Print names and sizes of macros, strings, and diversions
1493to standard error output.
1494Currently ignored.
1495.It Ic \&pn Oo Cm + Ns | Ns Cm - Oc Ns Ar number
1496Change the page number of the next page.
1497Currently ignored.
1498.It Ic \&pnr
1499Print all number registers on standard error output.
1500Currently ignored.
1501.It Ic \&po Op Oo Cm + Ns | Ns Cm - Oc Ns Ar offset
1502Set a horizontal page offset.
1503If no argument is specified, the page offset is reverted to its
1504previous value.
1505If a sign is specified, the new page offset is calculated relative
1506to the current one; otherwise, it is absolute.
1507The argument follows the syntax of
1508.Sx Scaling Widths
1509and the default scaling unit is
1510.Cm m .
1511.It Ic \&ps Op Oo Cm + Ns | Ns Cm - Oc Ns size
1512Change point size.
1513Currently ignored.
1514.It Ic \&psbb Ar filename
1515Retrieve the bounding box of a PostScript file.
1516Currently unsupported.
1517.It Ic \&pshape Ar indent length ...
1518Set a special shape for the current paragraph.
1519This is a Heirloom extension and currently unsupported.
1520.It Ic \&pso Ar command
1521Include output of a shell command.
1522Ignored because insecure.
1523.It Ic \&ptr
1524Print the names and positions of all traps on standard error output.
1525This is a groff extension and currently ignored.
1526.It Ic \&pvs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1527Change post-vertical spacing.
1528This is a groff extension and currently ignored.
1529.It Ic \&rchar Ar glyph ...
1530Remove glyph definitions.
1531Currently unsupported.
1532.It Ic \&rd Op Ar prompt Op Ar argument ...
1533Read from standard input.
1534Currently ignored.
1535.It Ic \&recursionlimit Ar maxrec maxtail
1536Set the maximum stack depth for recursive macros.
1537This is a Heirloom extension and currently ignored.
1538.It Ic \&return Op Ar twice
1539Exit the presently executed macro and return to the caller.
1540The argument is currently ignored.
1541.It Ic \&rfschar Ar font glyph ...
1542Remove font-specific fallback glyph definitions.
1543Currently unsupported.
1544.It Ic \&rhang Ar font char ... afmunits
1545Hang characters at right margin.
1546This is a Heirloom extension and currently ignored.
1547.It Ic \&rj Op Ar N
1548Justify the next
1549.Ar N
1550input lines to the right margin without filling.
1551.Ar N
1552defaults to 1.
1553An argument of 0 or less ends right adjustment.
1554.It Ic \&rm Ar macroname
1555Remove a request, macro or string.
1556.It Ic \&rn Ar oldname newname
1557Rename a request, macro, diversion, or string.
1558In
1559.Xr mandoc 1 ,
1560user-defined macros,
1561.Xr mdoc 7
1562and
1563.Xr man 7
1564macros, and user-defined strings can be renamed, but renaming of
1565predefined strings and of
1566.Nm
1567requests is not supported, and diversions are not implemented at all.
1568.It Ic \&rnn Ar oldname newname
1569Rename a number register.
1570Currently unsupported.
1571.It Ic \&rr Ar register
1572Remove a register.
1573.It Ic \&rs
1574End no-space mode.
1575Currently ignored.
1576.It Ic \&rt Op Ar dist
1577Return to marked vertical position.
1578Currently ignored.
1579.It Ic \&schar Ar glyph Op Ar string
1580Define global fallback glyph.
1581This is a groff extension and currently unsupported.
1582.It Ic \&sentchar Ar char ...
1583Define sentence-ending characters.
1584This is a Heirloom extension and currently ignored.
1585.It Ic \&shc Op Ar glyph
1586Change the soft hyphen character.
1587Currently ignored.
1588.It Ic \&shift Op Ar number
1589Shift macro arguments
1590.Ar number
1591times, by default once: \e\e$i becomes what \e\e$i+number was.
1592Also decrement \en(.$ by
1593.Ar number .
1594.It Ic \&sizes Ar size ...
1595Define permissible point sizes.
1596This is a groff extension and currently ignored.
1597.It Ic \&so Ar filename
1598Include a source file.
1599The file is read and its contents processed as input in place of the
1600.Ic \&so
1601request line.
1602To avoid inadvertent inclusion of unrelated files,
1603.Xr mandoc 1
1604only accepts relative paths not containing the strings
1605.Qq ../
1606and
1607.Qq /.. .
1608.Pp
1609This request requires
1610.Xr man 1
1611to change to the right directory before calling
1612.Xr mandoc 1 ,
1613per convention to the root of the manual tree.
1614Typical usage looks like:
1615.Pp
1616.Dl \&.so man3/Xcursor.3
1617.Pp
1618As the whole concept is rather fragile, the use of
1619.Ic \&so
1620is discouraged.
1621Use
1622.Xr ln 1
1623instead.
1624.It Ic \&sp Op Ar height
1625Break the output line and emit vertical space.
1626The argument follows the syntax of
1627.Sx Scaling Widths
1628and defaults to one blank line
1629.Pq Li 1v .
1630.It Ic \&spacewidth Op Cm 1 | 0
1631Set the space width from the font metrics file.
1632This is a Heirloom extension and currently ignored.
1633.It Ic \&special Op Ar font ...
1634Define a special font.
1635This is a groff extension and currently ignored.
1636.It Ic \&spreadwarn Op Ar width
1637Warn about wide spacing between words.
1638Currently ignored.
1639.It Ic \&ss Ar wordspace Op Ar sentencespace
1640Set space character size.
1641Currently ignored.
1642.It Ic \&sty Ar position style
1643Associate style with a font position.
1644This is a groff extension and currently ignored.
1645.It Ic \&substring Ar stringname startpos Op Ar endpos
1646Replace a user-defined string with a substring.
1647Currently unsupported.
1648.It Ic \&sv Op Ar height
1649Save vertical space.
1650Currently ignored.
1651.It Ic \&sy Ar command
1652Execute shell command.
1653Ignored because insecure.
1654.It Ic \&T&
1655Re-start a table layout, retaining the options of the prior table
1656invocation.
1657See
1658.Ic \&TS .
1659.It Ic \&ta Op Ar width ... Op Cm T Ar width ...
1660Set tab stops.
1661Each
1662.Ar width
1663argument follows the syntax of
1664.Sx Scaling Widths .
1665If prefixed by a plus sign, it is relative to the previous tab stop.
1666The arguments after the
1667.Cm T
1668marker are used repeatedly as often as needed; for each reuse,
1669they are taken relative to the last previously established tab stop.
1670When
1671.Ic \&ta
1672is called without arguments, all tab stops are cleared.
1673.It Ic \&tc Op Ar glyph
1674Change tab repetition character.
1675Currently unsupported.
1676.It Ic \&TE
1677End a table context.
1678See
1679.Ic \&TS .
1680.It Ic \&ti Oo Cm + Ns | Ns Cm - Oc Ns Ar width
1681Break the output line and indent the next output line by
1682.Ar width .
1683If a sign is specified, the temporary indentation is calculated
1684relative to the current indentation; otherwise, it is absolute.
1685The argument follows the syntax of
1686.Sx Scaling Widths
1687and the default scaling unit is
1688.Cm m .
1689.It Ic \&tkf Ar font minps width1 maxps width2
1690Enable track kerning for a font.
1691Currently ignored.
1692.It Ic \&tl No \& Ap Ar left Ap Ar center Ap Ar right Ap
1693Print a title line.
1694Currently unsupported.
1695.It Ic \&tm Ar string
1696Print to standard error output.
1697Currently ignored.
1698.It Ic \&tm1 Ar string
1699Print to standard error output, allowing leading blanks.
1700This is a groff extension and currently ignored.
1701.It Ic \&tmc Ar string
1702Print to standard error output without a trailing newline.
1703This is a groff extension and currently ignored.
1704.It Ic \&tr Ar glyph glyph ...
1705Output character translation.
1706The first glyph in each pair is replaced by the second one.
1707Character escapes can be used; for example,
1708.Pp
1709.Dl tr \e(xx\e(yy
1710.Pp
1711replaces all invocations of \e(xx with \e(yy.
1712.It Ic \&track Ar font minps width1 maxps width2
1713Static letter space tracking.
1714This is a Heirloom extension and currently ignored.
1715.It Ic \&transchar Ar char ...
1716Define transparent characters for sentence-ending.
1717This is a Heirloom extension and currently ignored.
1718.It Ic \&trf Ar filename
1719Output the contents of a file, disallowing invalid characters.
1720This is a groff extension and ignored because insecure.
1721.It Ic \&trimat Ar left top width height
1722Set the TrimBox page parameter for PDF generation.
1723This is a Heirloom extension and currently ignored.
1724.It Ic \&trin Ar glyph glyph ...
1725Output character translation, ignored by
1726.Ic \&asciify .
1727Currently unsupported.
1728.It Ic \&trnt Ar glyph glyph ...
1729Output character translation, ignored by \e!.
1730Currently unsupported.
1731.It Ic \&troff
1732Force troff mode.
1733This is a groff extension and currently ignored.
1734.It Ic \&TS
1735Begin a table, which formats input in aligned rows and columns.
1736See
1737.Xr tbl 7
1738for a description of the tbl language.
1739.It Ic \&uf Ar font
1740Globally set the underline font.
1741Currently ignored.
1742.It Ic \&ul Op Ar N
1743Underline next
1744.Ar N
1745input lines.
1746Currently ignored.
1747.It Ic \&unformat Ar divname
1748Unformat spaces and tabs in a diversion.
1749Currently unsupported.
1750.It Ic \&unwatch Ar macroname
1751Disable notification for string or macro.
1752This is a Heirloom extension and currently ignored.
1753.It Ic \&unwatchn Ar register
1754Disable notification for register.
1755This is a Heirloom extension and currently ignored.
1756.It Ic \&vpt Op Cm 1 | 0
1757Enable or disable vertical position traps.
1758This is a groff extension and currently ignored.
1759.It Ic \&vs Op Oo Cm + Ns | Ns Cm - Oc Ns Ar height
1760Change vertical spacing.
1761Currently ignored.
1762.It Ic \&warn Ar flags
1763Set warning level.
1764Currently ignored.
1765.It Ic \&warnscale Ar si
1766Set the scaling indicator used in warnings.
1767This is a groff extension and currently ignored.
1768.It Ic \&watch Ar macroname
1769Notify on change of string or macro.
1770This is a Heirloom extension and currently ignored.
1771.It Ic \&watchlength Ar maxlength
1772On change, report the contents of macros and strings
1773up to the specified length.
1774This is a Heirloom extension and currently ignored.
1775.It Ic \&watchn Ar register
1776Notify on change of register.
1777This is a Heirloom extension and currently ignored.
1778.It Ic \&wh Ar dist Op Ar macroname
1779Set a page location trap.
1780Currently unsupported.
1781.It Ic \&while Ar condition body
1782Repeated execution while a
1783.Ar condition
1784is true, with syntax similar to
1785.Ic \&if .
1786Currently implemented with two restrictions: cannot nest,
1787and each loop must start and end in the same scope.
1788.It Ic \&write Oo \(dq Oc Ns Ar string
1789Write to an open file.
1790Ignored because insecure.
1791.It Ic \&writec Oo \(dq Oc Ns Ar string
1792Write to an open file without appending a newline.
1793Ignored because insecure.
1794.It Ic \&writem Ar macroname
1795Write macro or string to an open file.
1796Ignored because insecure.
1797.It Ic \&xflag Ar level
1798Set the extension level.
1799This is a Heirloom extension and currently ignored.
1800.El
1801.Ss Numerical expressions
1802The
1803.Ic \&nr ,
1804.Ic \&if ,
1805and
1806.Ic \&ie
1807requests accept integer numerical expressions as arguments.
1808These are always evaluated using the C
1809.Vt int
1810type; integer overflow works the same way as in the C language.
1811Numbers consist of an arbitrary number of digits
1812.Sq 0
1813to
1814.Sq 9
1815prefixed by an optional sign
1816.Sq +
1817or
1818.Sq - .
1819Each number may be followed by one optional scaling unit described below
1820.Sx Scaling Widths .
1821The following equations hold:
1822.Bd -literal -offset indent
18231i = 6v = 6P = 10m = 10n = 72p = 1000M = 240u = 240
1824254c = 100i = 24000u = 24000
18251f = 65536u = 65536
1826.Ed
1827.Pp
1828The following binary operators are implemented.
1829Unless otherwise stated, they behave as in the C language:
1830.Pp
1831.Bl -tag -width 2n -compact
1832.It Ic +
1833addition
1834.It Ic -
1835subtraction
1836.It Ic *
1837multiplication
1838.It Ic /
1839division
1840.It Ic %
1841remainder of division
1842.It Ic <
1843less than
1844.It Ic >
1845greater than
1846.It Ic ==
1847equal to
1848.It Ic =
1849equal to, same effect as
1850.Ic ==
1851(this differs from C)
1852.It Ic <=
1853less than or equal to
1854.It Ic >=
1855greater than or equal to
1856.It Ic <>
1857not equal to (corresponds to C
1858.Ic != ;
1859this one is of limited portability, it is supported by Heirloom roff,
1860but not by groff)
1861.It Ic &
1862logical and (corresponds to C
1863.Ic && )
1864.It Ic \&:
1865logical or (corresponds to C
1866.Ic || )
1867.It Ic <?
1868minimum (not available in C)
1869.It Ic >?
1870maximum (not available in C)
1871.El
1872.Pp
1873There is no concept of precedence; evaluation proceeds from left to right,
1874except when subexpressions are enclosed in parentheses.
1875Inside parentheses, whitespace is ignored.
1876.Sh ESCAPE SEQUENCE REFERENCE
1877The
1878.Xr mandoc 1
1879.Nm
1880parser recognises the following escape sequences.
1881In
1882.Xr mdoc 7
1883and
1884.Xr man 7
1885documents, using escape sequences is discouraged except for those
1886described in the
1887.Sx LANGUAGE SYNTAX
1888section above.
1889.Pp
1890A backslash followed by any character not listed here
1891simply prints that character itself.
1892.Bl -tag -width Ds
1893.It Ic \e<newline>
1894A backslash at the end of an input line can be used to continue the
1895logical input line on the next physical input line, joining the text
1896on both lines together as if it were on a single input line.
1897.It Ic \e<space>
1898The escape sequence backslash-space
1899.Pq Sq \e\ \&
1900is an unpaddable space-sized non-breaking space character; see
1901.Sx Whitespace
1902and
1903.Xr mandoc_char 7 .
1904.It Ic \e!
1905Embed text up to and including the end of the input line into the
1906current diversion or into intermediate output without interpreting
1907requests, macros, and escapes.
1908Currently unsupported.
1909.It Ic \e\(dq
1910The rest of the input line is treated as
1911.Sx Comments .
1912.It Ic \e#
1913Line continuation with comment.
1914Discard the rest of the physical input line and continue the logical
1915input line on the next physical input line, joining the text on
1916both lines together as if it were on a single input line.
1917This is a groff extension.
1918.It Ic \e$ Ns Ar arg
1919Macro argument expansion, see
1920.Ic \&de .
1921.It Ic \e%
1922Hyphenation allowed at this point of the word; ignored by
1923.Xr mandoc 1 .
1924.It Ic \e&
1925Non-printing zero-width character,
1926often used for various kinds of escaping; see
1927.Sx Whitespace ,
1928.Xr mandoc_char 7 ,
1929and the
1930.Dq MACRO SYNTAX
1931and
1932.Dq Delimiters
1933sections in
1934.Xr mdoc 7 .
1935.It Ic \e\(aq
1936Acute accent special character; use
1937.Ic \e(aa
1938instead.
1939.It Ic \e( Ns Ar cc
1940.Sx Special Characters
1941with two-letter names, see
1942.Xr mandoc_char 7 .
1943.It Ic \e)
1944Zero-width space transparent to end-of-sentence detection;
1945ignored by
1946.Xr mandoc 1 .
1947.It Ic \e*[ Ns Ar name Ns Ic \&]
1948Interpolate the string with the
1949.Ar name .
1950For short names, there are variants
1951.Ic \e* Ns Ar c
1952and
1953.Ic \e*( Ns Ar cc .
1954.Pp
1955One string is predefined on the
1956.Nm
1957language level:
1958.Ic \e*(.T
1959expands to the name of the output device,
1960for example ascii, utf8, ps, pdf, html, or markdown.
1961.Pp
1962Macro sets traditionally predefine additional strings which are not
1963portable and differ across implementations.
1964Those supported by
1965.Xr mandoc 1
1966are listed in
1967.Xr mandoc_char 7 .
1968.Pp
1969Strings can be defined, changed, and deleted with the
1970.Ic \&ds ,
1971.Ic \&as ,
1972and
1973.Ic \&rm
1974requests.
1975.It Ic \e,
1976Left italic correction (groff extension); ignored by
1977.Xr mandoc 1 .
1978.It Ic \e-
1979Special character
1980.Dq mathematical minus sign ;
1981see
1982.Xr mandoc_char 7
1983for details.
1984.It Ic \e/
1985Right italic correction (groff extension); ignored by
1986.Xr mandoc 1 .
1987.It Ic \e:
1988Breaking the line is allowed at this point of the word
1989without inserting a hyphen.
1990.It Ic \e?
1991Embed the text up to the next
1992.Ic \e?
1993into the current diversion without interpreting requests, macros,
1994and escapes.
1995This is a groff extension and currently unsupported.
1996.It Ic \e[ Ns Ar name Ns Ic \&]
1997.Sx Special Characters
1998with names of arbitrary length, see
1999.Xr mandoc_char 7 .
2000.It Ic \e^
2001One-twelfth em half-narrow space character, effectively zero-width in
2002.Xr mandoc 1 .
2003.It Ic \e_
2004Underline special character; use
2005.Ic \e(ul
2006instead.
2007.It Ic \e`
2008Grave accent special character; use
2009.Ic \e(ga
2010instead.
2011.It Ic \e{
2012Begin conditional input; see
2013.Ic \&if .
2014.It Ic \e\(ba
2015One-sixth em narrow space character, effectively zero-width in
2016.Xr mandoc 1 .
2017.It Ic \e}
2018End conditional input; see
2019.Ic \&if .
2020.It Ic \e~
2021Paddable non-breaking space character.
2022.It Ic \e0
2023Digit width space character.
2024.It Ic \eA\(aq Ns Ar string Ns Ic \(aq
2025Anchor definition; ignored by
2026.Xr mandoc 1 .
2027.It Ic \ea
2028Leader character; ignored by
2029.Xr mandoc 1 .
2030.It Ic \eB\(aq Ns Ar string Ns Ic \(aq
2031Interpolate
2032.Sq 1
2033if
2034.Ar string
2035conforms to the syntax of
2036.Sx Numerical expressions
2037explained above or
2038.Sq 0
2039otherwise.
2040.It Ic \eb\(aq Ns Ar string Ns Ic \(aq
2041Bracket building function; ignored by
2042.Xr mandoc 1 .
2043.It Ic \eC\(aq Ns Ar name Ns Ic \(aq
2044.Sx Special Characters
2045with names of arbitrary length.
2046.It Ic \ec
2047When encountered at the end of an input text line,
2048the next input text line is considered to continue that line,
2049even if there are request or macro lines in between.
2050No whitespace is inserted.
2051.It Ic \eD\(aq Ns Ar string Ns Ic \(aq
2052Draw graphics function; ignored by
2053.Xr mandoc 1 .
2054.It Ic \ed
2055Move down by half a line; ignored by
2056.Xr mandoc 1 .
2057.It Ic \eE
2058Escape character intended to not be interpreted in copy mode.
2059In
2060.Xr mandoc 1 ,
2061it currently does the same as
2062.Ic \e
2063itself.
2064.It Ic \ee
2065Backslash special character.
2066.It Ic \eF[ Ns Ar name Ns Ic \&]
2067Switch font family (groff extension); ignored by
2068.Xr mandoc 1 .
2069For short names, there are variants
2070.Ic \eF Ns Ar c
2071and
2072.Ic \eF( Ns Ar cc .
2073.It Ic \ef[ Ns Ar name Ns Ic \&]
2074Switch to the font
2075.Ar name ,
2076see
2077.Sx Font Selection .
2078For short names, there are variants
2079.Ic \ef Ns Ar c
2080and
2081.Ic \ef( Ns Ar cc .
2082An empty name
2083.Ic \ef[]
2084defaults to
2085.Ic \efP .
2086.It Ic \eg[ Ns Ar name Ns Ic \&]
2087Interpolate the format of a number register; ignored by
2088.Xr mandoc 1 .
2089For short names, there are variants
2090.Ic \eg Ns Ar c
2091and
2092.Ic \eg( Ns Ar cc .
2093.It Ic \eH\(aq Ns Oo +|- Oc Ns Ar number Ns Ic \(aq
2094Set the height of the current font; ignored by
2095.Xr mandoc 1 .
2096.It Ic \eh\(aq Ns Oo Cm \&| Oc Ns Ar width Ns Ic \(aq
2097Horizontal motion.
2098If the vertical bar is given, the motion is relative to the current
2099indentation.
2100Otherwise, it is relative to the current position.
2101The default scaling unit is
2102.Cm m .
2103.It Ic \ek[ Ns Ar name Ns Ic \&]
2104Mark horizontal input place in register; ignored by
2105.Xr mandoc 1 .
2106For short names, there are variants
2107.Ic \ek Ns Ar c
2108and
2109.Ic \ek( Ns Ar cc .
2110.It Ic \eL\(aq Ns Ar number Ns Oo Ar c Oc Ns Ic \(aq
2111Vertical line drawing function; ignored by
2112.Xr mandoc 1 .
2113.It Ic \el\(aq Ns Ar width Ns Oo Ar c Oc Ns Ic \(aq
2114Draw a horizontal line of
2115.Ar width
2116using the glyph
2117.Ar c .
2118.It Ic \eM[ Ns Ar name Ns Ic \&]
2119Set fill (background) color (groff extension); ignored by
2120.Xr mandoc 1 .
2121For short names, there are variants
2122.Ic \eM Ns Ar c
2123and
2124.Ic \eM( Ns Ar cc .
2125.It Ic \em[ Ns Ar name Ns Ic \&]
2126Set glyph drawing color (groff extension); ignored by
2127.Xr mandoc 1 .
2128For short names, there are variants
2129.Ic \em Ns Ar c
2130and
2131.Ic \em( Ns Ar cc .
2132.It Ic \eN\(aq Ns Ar number Ns Ic \(aq
2133Character
2134.Ar number
2135on the current font.
2136.It Ic \en Ns Oo +|- Oc Ns Ic \&[ Ns Ar name Ns Ic \&]
2137Interpolate the number register
2138.Ar name .
2139For short names, there are variants
2140.Ic \en Ns Ar c
2141and
2142.Ic \en( Ns Ar cc .
2143If the optional sign is specified,
2144the register is first incremented or decremented by the
2145.Ar stepsize
2146that was specified in the relevant
2147.Ic \&nr
2148request, and the changed value is interpolated.
2149.It Ic \eO Ns Ar digit , Ic \eO[5 Ns arguments Ns Ic \&]
2150Suppress output.
2151This is a groff extension and currently unsupported.
2152With an argument of
2153.Ic 1 , 2 , 3 ,
2154or
2155.Ic 4 ,
2156it is ignored.
2157.It Ic \eo\(aq Ns Ar string Ns Ic \(aq
2158Overstrike, writing all the characters contained in the
2159.Ar string
2160to the same output position.
2161In terminal and HTML output modes,
2162only the last one of the characters is visible.
2163.It Ic \ep
2164Break the output line at the end of the current word.
2165.It Ic \eR\(aq Ns Ar name Oo +|- Oc Ns Ar number Ns Ic \(aq
2166Set number register; ignored by
2167.Xr mandoc 1 .
2168.It Ic \er
2169Move up by one line; ignored by
2170.Xr mandoc 1 .
2171.It Ic \eS\(aq Ns Ar number Ns Ic \(aq
2172Slant output; ignored by
2173.Xr mandoc 1 .
2174.It Ic \es\(aq Ns Oo +|- Oc Ns Ar number Ns Ic \(aq
2175Change point size; ignored by
2176.Xr mandoc 1 .
2177Alternative forms
2178.Ic \es Ns Oo +|- Oc Ns Ar n ,
2179.Ic \es Ns Oo +|- Oc Ns Ic \(aq Ns Ar number Ns Ic \(aq ,
2180.Ic \es[ Ns Oo +|- Oc Ns Ar number Ns Ic \&] ,
2181and
2182.Ic \es Ns Oo +|- Oc Ns Ic \&[ Ns Ar number Ns Ic \&]
2183are also parsed and ignored.
2184.It Ic \et
2185Horizontal tab; ignored by
2186.Xr mandoc 1 .
2187.It Ic \eu
2188Move up by half a line; ignored by
2189.Xr mandoc 1 .
2190.It Ic \eV[ Ns Ar name Ns Ic \&]
2191Interpolate an environment variable; ignored by
2192.Xr mandoc 1 .
2193For short names, there are variants
2194.Ic \eV Ns Ar c
2195and
2196.Ic \eV( Ns Ar cc .
2197.It Ic \ev\(aq Ns Ar number Ns Ic \(aq
2198Vertical motion; ignored by
2199.Xr mandoc 1 .
2200.It Ic \ew\(aq Ns Ar string Ns Ic \(aq
2201Interpolate the width of the
2202.Ar string .
2203The
2204.Xr mandoc 1
2205implementation assumes that after expansion of user-defined strings, the
2206.Ar string
2207only contains normal characters, no escape sequences, and that each
2208character has a width of 24 basic units.
2209.It Ic \eX\(aq Ns Ar string Ns Ic \(aq
2210Output
2211.Ar string
2212as device control function; ignored in nroff mode and by
2213.Xr mandoc 1 .
2214.It Ic \ex\(aq Ns Ar number Ns Ic \(aq
2215Extra line space function; ignored by
2216.Xr mandoc 1 .
2217.It Ic \eY[ Ns Ar name Ns Ic \&]
2218Output a string as a device control function; ignored in nroff mode and by
2219.Xr mandoc 1 .
2220For short names, there are variants
2221.Ic \eY Ns Ar c
2222and
2223.Ic \eY( Ns Ar cc .
2224.It Ic \eZ\(aq Ns Ar string Ns Ic \(aq
2225Print
2226.Ar string
2227with zero width and height; ignored by
2228.Xr mandoc 1 .
2229.It Ic \ez
2230Output the next character without advancing the cursor position.
2231.El
2232.Sh COMPATIBILITY
2233The
2234.Xr mandoc 1
2235implementation of the
2236.Nm
2237language is incomplete.
2238Major unimplemented features include:
2239.Pp
2240.Bl -dash -compact
2241.It
2242For security reasons,
2243.Xr mandoc 1
2244never reads or writes external files except via
2245.Ic \&so
2246requests with safe relative paths.
2247.It
2248There is no automatic hyphenation, no adjustment to the right margin,
2249and very limited support for centering; the output is always set flush-left.
2250.It
2251Support for setting tabulator and leader characters is missing,
2252and support for manually changing indentation is limited.
2253.It
2254The
2255.Sq u
2256scaling unit is the default terminal unit.
2257In traditional troff systems, this unit changes depending on the
2258output media.
2259.It
2260Width measurements are implemented in a crude way
2261and often yield wrong results.
2262Support for explicit movement requests and escapes is limited.
2263.It
2264There is no concept of output pages, no support for floats,
2265graphics drawing, and picture inclusion;
2266terminal output is always continuous.
2267.It
2268Requests regarding color, font families, font sizes,
2269and glyph manipulation are ignored.
2270Font support is very limited.
2271Kerning is not implemented, and no ligatures are produced.
2272.It
2273The
2274.Qq \(aq
2275macro control character does not suppress output line breaks.
2276.It
2277Diversions and environments are not implemented,
2278and support for traps is very incomplete.
2279.It
2280Use of macros is not supported inside
2281.Xr tbl 7
2282code.
2283.El
2284.Pp
2285The special semantics of the
2286.Cm nS
2287number register is an idiosyncrasy of
2288.Ox
2289manuals and not supported by other
2290.Xr mdoc 7
2291implementations.
2292.Sh SEE ALSO
2293.Xr mandoc 1 ,
2294.Xr eqn 7 ,
2295.Xr man 7 ,
2296.Xr mandoc_char 7 ,
2297.Xr mdoc 7 ,
2298.Xr tbl 7
2299.Rs
2300.%A Joseph F. Ossanna
2301.%A Brian W. Kernighan
2302.%I AT&T Bell Laboratories
2303.%T Troff User's Manual
2304.%R Computing Science Technical Report
2305.%N 54
2306.%C Murray Hill, New Jersey
2307.%D 1976 and 1992
2308.%U http://www.kohala.com/start/troff/cstr54.ps
2309.Re
2310.Rs
2311.%A Joseph F. Ossanna
2312.%A Brian W. Kernighan
2313.%A Gunnar Ritter
2314.%T Heirloom Documentation Tools Nroff/Troff User's Manual
2315.%D September 17, 2007
2316.%U http://heirloom.sourceforge.net/doctools/troff.pdf
2317.Re
2318.Sh HISTORY
2319The RUNOFF typesetting system, whose input forms the basis for
2320.Nm ,
2321was written in MAD and FAP for the CTSS operating system by Jerome E.
2322Saltzer in 1964.
2323Doug McIlroy rewrote it in BCPL in 1969, renaming it
2324.Nm .
2325Dennis M. Ritchie rewrote McIlroy's
2326.Nm
2327in PDP-11 assembly for
2328.At v1 ,
2329Joseph F. Ossanna improved roff and renamed it nroff
2330for
2331.At v2 ,
2332then ported nroff to C as troff, which Brian W. Kernighan released with
2333.At v7 .
2334In 1989, James Clark re-implemented troff in C++, naming it groff.
2335.Sh AUTHORS
2336.An -nosplit
2337This
2338.Nm
2339reference was written by
2340.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
2341and
2342.An Ingo Schwarze Aq Mt schwarze@openbsd.org .
2343