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