xref: /illumos-gate/usr/src/man/man1/mandoc.1 (revision e07d85f87c3920e032adb855fdc500e4616c7718)
1.\"	$Id: mandoc.1,v 1.174 2017/02/10 15:45:28 schwarze Exp $
2.\"
3.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4.\" Copyright (c) 2012, 2014-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: February 10 2017 $
19.Dt MANDOC 1
20.Os
21.Sh NAME
22.Nm mandoc
23.Nd format and display UNIX manuals
24.Sh SYNOPSIS
25.Nm mandoc
26.Op Fl acfhkl
27.Op Fl I Cm os Ns = Ns Ar name
28.Op Fl K Ar encoding
29.Op Fl m Ns Ar format
30.Op Fl O Ar option
31.Op Fl T Ar output
32.Op Fl W Ar level
33.Op Ar
34.Sh DESCRIPTION
35The
36.Nm
37utility formats
38.Ux
39manual pages for display.
40.Pp
41By default,
42.Nm
43reads
44.Xr mdoc 5
45or
46.Xr man 5
47text from stdin, implying
48.Fl m Ns Cm andoc ,
49and produces
50.Fl T Cm locale
51output.
52.Pp
53The options are as follows:
54.Bl -tag -width Ds
55.It Fl a
56If the standard output is a terminal device and
57.Fl c
58is not specified, use
59.Xr more 1
60to paginate the output, just like
61.Xr man 1
62would.
63.It Fl c
64Copy the formatted manual pages to the standard output without using
65.Xr more 1
66to paginate them.
67This is the default.
68It can be specified to override
69.Fl a .
70.It Fl f
71A synonym for
72.Xr whatis 1 .
73This overrides any earlier
74.Fl k
75and
76.Fl l
77options.
78.It Fl h
79Display only the SYNOPSIS lines.
80Implies
81.Fl c .
82.It Fl I Cm os Ns = Ns Ar name
83Override the default operating system
84.Ar name
85for the
86.Xr mdoc 5
87.Sq \&Os
88and for the
89.Xr man 5
90.Sq \&TH
91macro.
92.It Fl K Ar encoding
93Specify the input encoding.
94The supported
95.Ar encoding
96arguments are
97.Cm us-ascii ,
98.Cm iso-8859-1 ,
99and
100.Cm utf-8 .
101If not specified, autodetection uses the first match:
102.Bl -tag -width iso-8859-1
103.It Cm utf-8
104if the first three bytes of the input file
105are the UTF-8 byte order mark (BOM, 0xefbbbf)
106.It Ar encoding
107if the first or second line of the input file matches the
108.Sy emacs
109mode line format
110.Pp
111.D1 .\e" -*- Oo ...; Oc coding: Ar encoding ; No -*-
112.It Cm utf-8
113if the first non-ASCII byte in the file introduces a valid UTF-8 sequence
114.It Cm iso-8859-1
115otherwise
116.El
117.It Fl l
118A synonym for
119.Fl a .
120.It Fl m Ns Ar format
121Input format.
122See
123.Sx Input Formats
124for available formats.
125Defaults to
126.Fl m Ns Cm andoc .
127.It Fl O Ar option
128Comma-separated output options.
129.It Fl T Ar output
130Output format.
131See
132.Sx Output Formats
133for available formats.
134Defaults to
135.Fl T Cm locale .
136.It Fl W Ar level
137Specify the minimum message
138.Ar level
139to be reported on the standard error output and to affect the exit status.
140The
141.Ar level
142can be
143.Cm warning ,
144.Cm error ,
145or
146.Cm unsupp ;
147.Cm all
148is an alias for
149.Cm warning .
150By default,
151.Nm
152is silent.
153See
154.Sx EXIT STATUS
155and
156.Sx DIAGNOSTICS
157for details.
158.Pp
159The special option
160.Fl W Cm stop
161tells
162.Nm
163to exit after parsing a file that causes warnings or errors of at least
164the requested level.
165No formatted output will be produced from that file.
166If both a
167.Ar level
168and
169.Cm stop
170are requested, they can be joined with a comma, for example
171.Fl W Cm error , Ns Cm stop .
172.It Ar file
173Read input from zero or more files.
174If unspecified, reads from stdin.
175If multiple files are specified,
176.Nm
177will halt with the first failed parse.
178.El
179.Ss Input Formats
180The
181.Nm
182utility accepts
183.Xr mdoc 5
184and
185.Xr man 5
186input with
187.Fl m Ns Cm doc
188and
189.Fl m Ns Cm an ,
190respectively.
191The
192.Xr mdoc 5
193format is
194.Em strongly
195recommended;
196.Xr man 5
197should only be used for legacy manuals.
198.Pp
199A third option,
200.Fl m Ns Cm andoc ,
201which is also the default, determines encoding on-the-fly: if the first
202non-comment macro is
203.Sq \&Dd
204or
205.Sq \&Dt ,
206the
207.Xr mdoc 5
208parser is used; otherwise, the
209.Xr man 5
210parser is used.
211.Pp
212If multiple
213files are specified with
214.Fl m Ns Cm andoc ,
215each has its file-type determined this way.
216If multiple files are
217specified and
218.Fl m Ns Cm doc
219or
220.Fl m Ns Cm an
221is specified, then this format is used exclusively.
222.Ss Output Formats
223The
224.Nm
225utility accepts the following
226.Fl T
227arguments, which correspond to output modes:
228.Bl -tag -width "-T locale"
229.It Fl T Cm ascii
230Produce 7-bit ASCII output.
231See
232.Sx ASCII Output .
233.It Fl T Cm html
234Produce HTML5, CSS1, and MathML output.
235See
236.Sx HTML Output .
237.It Fl T Ns Cm lint
238Parse only: produce no output.
239Implies
240.Fl W Cm warning .
241.It Fl T Cm locale
242Encode output using the current locale.
243This is the default.
244See
245.Sx Locale Output .
246.It Fl T Cm man
247Produce
248.Xr man 5
249format output.
250See
251.Sx Man Output .
252.It Fl T Cm pdf
253Produce PDF output.
254See
255.Sx PDF Output .
256.It Fl T Cm ps
257Produce PostScript output.
258See
259.Sx PostScript Output .
260.It Fl T Cm tree
261Produce an indented parse tree.
262.It Fl T Cm utf8
263Encode output in the UTF\-8 multi-byte format.
264See
265.Sx UTF\-8 Output .
266.It Fl T Cm xhtml
267This is a synonym for
268.Fl T Cm html .
269.El
270.Pp
271If multiple input files are specified, these will be processed by the
272corresponding filter in-order.
273.Ss ASCII Output
274Output produced by
275.Fl T Cm ascii
276is rendered in standard 7-bit ASCII documented in
277.Xr ascii 5 .
278.Pp
279Font styles are applied by using back-spaced encoding such that an
280underlined character
281.Sq c
282is rendered as
283.Sq _ Ns \e[bs] Ns c ,
284where
285.Sq \e[bs]
286is the back-space character number 8.
287Emboldened characters are rendered as
288.Sq c Ns \e[bs] Ns c .
289.Pp
290The special characters documented in
291.Xr mandoc_char 5
292are rendered best-effort in an ASCII equivalent.
293.Pp
294Output width is limited to 78 visible columns unless literal input lines
295exceed this limit.
296.Pp
297The following
298.Fl O
299arguments are accepted:
300.Bl -tag -width Ds
301.It Cm indent Ns = Ns Ar indent
302The left margin for normal text is set to
303.Ar indent
304blank characters instead of the default of five for
305.Xr mdoc 5
306and seven for
307.Xr man 5 .
308Increasing this is not recommended; it may result in degraded formatting,
309for example overfull lines or ugly line breaks.
310.It Cm width Ns = Ns Ar width
311The output width is set to
312.Ar width ,
313which will normalise to \(>=58.
314.El
315.Ss HTML Output
316Output produced by
317.Fl T Cm html
318conforms to HTML5 using optional self-closing tags.
319Default styles use only CSS1.
320Equations rendered from
321.Xr eqn 5
322blocks use MathML.
323.Pp
324The
325.Pa mandoc.css
326file documents style-sheet classes available for customising output.
327If a style-sheet is not specified with
328.Fl O Cm style ,
329.Fl T Cm html
330defaults to simple output (via an embedded style-sheet)
331readable in any graphical or text-based web
332browser.
333.Pp
334Special characters are rendered in decimal-encoded UTF\-8.
335.Pp
336The following
337.Fl O
338arguments are accepted:
339.Bl -tag -width Ds
340.It Cm fragment
341Omit the <!DOCTYPE> declaration and the <html>, <head>, and <body>
342elements and only emit the subtree below the <body> element.
343The
344.Cm style
345argument will be ignored.
346This is useful when embedding manual content within existing documents.
347.It Cm includes Ns = Ns Ar fmt
348The string
349.Ar fmt ,
350for example,
351.Ar ../src/%I.html ,
352is used as a template for linked header files (usually via the
353.Sq \&In
354macro).
355Instances of
356.Sq \&%I
357are replaced with the include filename.
358The default is not to present a
359hyperlink.
360.It Cm man Ns = Ns Ar fmt
361The string
362.Ar fmt ,
363for example,
364.Ar ../html%S/%N.%S.html ,
365is used as a template for linked manuals (usually via the
366.Sq \&Xr
367macro).
368Instances of
369.Sq \&%N
370and
371.Sq %S
372are replaced with the linked manual's name and section, respectively.
373If no section is included, section 1 is assumed.
374The default is not to
375present a hyperlink.
376.It Cm style Ns = Ns Ar style.css
377The file
378.Ar style.css
379is used for an external style-sheet.
380This must be a valid absolute or
381relative URI.
382.El
383.Ss Locale Output
384Locale-depending output encoding is triggered with
385.Fl T Cm locale .
386This is the default.
387.Ss Man Output
388Translate input format into
389.Xr man 5
390output format.
391This is useful for distributing manual sources to legacy systems
392lacking
393.Xr mdoc 5
394formatters.
395.Pp
396If
397.Xr mdoc 5
398is passed as input, it is translated into
399.Xr man 5 .
400If the input format is
401.Xr man 5 ,
402the input is copied to the output, expanding any
403.Xr mandoc_roff 5
404.Sq so
405requests.
406The parser is also run, and as usual, the
407.Fl W
408level controls which
409.Sx DIAGNOSTICS
410are displayed before copying the input to the output.
411.Ss PDF Output
412PDF-1.1 output may be generated by
413.Fl T Cm pdf .
414See
415.Sx PostScript Output
416for
417.Fl O
418arguments and defaults.
419.Ss PostScript Output
420PostScript
421.Qq Adobe-3.0
422Level-2 pages may be generated by
423.Fl T Cm ps .
424Output pages default to letter sized and are rendered in the Times font
425family, 11-point.
426Margins are calculated as 1/9 the page length and width.
427Line-height is 1.4m.
428.Pp
429Special characters are rendered as in
430.Sx ASCII Output .
431.Pp
432The following
433.Fl O
434arguments are accepted:
435.Bl -tag -width Ds
436.It Cm paper Ns = Ns Ar name
437The paper size
438.Ar name
439may be one of
440.Ar a3 ,
441.Ar a4 ,
442.Ar a5 ,
443.Ar legal ,
444or
445.Ar letter .
446You may also manually specify dimensions as
447.Ar NNxNN ,
448width by height in millimetres.
449If an unknown value is encountered,
450.Ar letter
451is used.
452.El
453.Ss UTF\-8 Output
454Use
455.Fl T Cm utf8
456to force a UTF\-8 locale.
457See
458.Sx Locale Output
459for details and options.
460.Ss Syntax tree output
461Use
462.Fl T Cm tree
463to show a human readable representation of the syntax tree.
464It is useful for debugging the source code of manual pages.
465The exact format is subject to change, so don't write parsers for it.
466.Pp
467The first paragraph shows meta data found in the
468.Xr mdoc 5
469prologue, on the
470.Xr man 5
471.Ic \&TH
472line, or the fallbacks used.
473.Pp
474In the tree dump, each output line shows one syntax tree node.
475Child nodes are indented with respect to their parent node.
476The columns are:
477.Pp
478.Bl -enum -compact
479.It
480For macro nodes, the macro name; for text and
481.Xr tbl 5
482nodes, the content.
483There is a special format for
484.Xr eqn 5
485nodes.
486.It
487Node type (text, elem, block, head, body, body-end, tail, tbl, eqn).
488.It
489Flags:
490.Bl -dash -compact
491.It
492An opening parenthesis if the node is an opening delimiter.
493.It
494An asterisk if the node starts a new input line.
495.It
496The input line number (starting at one).
497.It
498A colon.
499.It
500The input column number (starting at one).
501.It
502A closing parenthesis if the node is a closing delimiter.
503.It
504A full stop if the node ends a sentence.
505.It
506BROKEN if the node is a block broken by another block.
507.It
508NOSRC if the node is not in the input file,
509but automatically generated from macros.
510.It
511NOPRT if the node is not supposed to generate output
512for any output format.
513.El
514.El
515.Pp
516The following
517.Fl O
518argument is accepted:
519.Bl -tag -width Ds
520.It Cm noval
521Skip validation and show the unvalidated syntax tree.
522This can help to find out whether a given behaviour is caused by
523the parser or by the validator.
524Meta data is not available in this case.
525.El
526.Sh EXIT STATUS
527The
528.Nm
529utility exits with one of the following values, controlled by the message
530.Ar level
531associated with the
532.Fl W
533option:
534.Pp
535.Bl -tag -width Ds -compact
536.It 0
537No warnings or errors occurred, or those that did were ignored because
538they were lower than the requested
539.Ar level .
540.It 2
541At least one warning occurred, but no error, and
542.Fl W Cm warning
543was specified.
544.It 3
545At least one parsing error occurred,
546but no unsupported feature was encountered, and
547.Fl W Cm error
548or
549.Fl W Cm warning
550was specified.
551.It 4
552At least one unsupported feature was encountered, and
553.Fl W Cm unsupp ,
554.Fl W Cm error
555or
556.Fl W Cm warning
557was specified.
558.It 5
559Invalid command line arguments were specified.
560No input files have been read.
561.It 6
562An operating system error occurred, for example exhaustion
563of memory, file descriptors, or process table entries.
564Such errors cause
565.Nm
566to exit at once, possibly in the middle of parsing or formatting a file.
567.El
568.Pp
569Note that selecting
570.Fl T Cm lint
571output mode implies
572.Fl W Cm warning .
573.Sh EXAMPLES
574To page manuals to the terminal:
575.Pp
576.Dl $ mandoc \-W all,stop mandoc.1 2\*(Gt&1 | less
577.Dl $ mandoc mandoc.1 mdoc.3 mdoc.5 | less
578.Pp
579To produce HTML manuals with
580.Pa mandoc.css
581as the style-sheet:
582.Pp
583.Dl $ mandoc \-T html -Ostyle=mandoc.css mdoc.5 \*(Gt mdoc.5.html
584.Pp
585To check over a large set of manuals:
586.Pp
587.Dl $ mandoc \-T lint \(gafind /usr/src -name \e*\e.[1-9]\(ga
588.Pp
589To produce a series of PostScript manuals for A4 paper:
590.Pp
591.Dl $ mandoc \-T ps \-O paper=a4 mdoc.5 man.5 \*(Gt manuals.ps
592.Pp
593Convert a modern
594.Xr mdoc 5
595manual to the older
596.Xr man 5
597format, for use on systems lacking an
598.Xr mdoc 5
599parser:
600.Pp
601.Dl $ mandoc \-T man foo.mdoc \*(Gt foo.man
602.Sh DIAGNOSTICS
603Messages displayed by
604.Nm
605follow this format:
606.Pp
607.D1 Nm Ns : Ar file : Ns Ar line : Ns Ar column : level : message : macro args
608.Pp
609Line and column numbers start at 1.
610Both are omitted for messages referring to an input file as a whole.
611Macro names and arguments are omitted where meaningless.
612Fatal messages about invalid command line arguments
613or operating system errors, for example when memory is exhausted,
614may also omit the
615.Ar file
616and
617.Ar level
618fields.
619.Pp
620Message levels have the following meanings:
621.Bl -tag -width "warning"
622.It Cm unsupp
623An input file uses unsupported low-level
624.Xr mandoc_roff 5
625features.
626The output may be incomplete and/or misformatted,
627so using GNU troff instead of
628.Nm
629to process the file may be preferable.
630.It Cm error
631An input file contains invalid syntax that cannot be safely interpreted.
632By discarding part of the input or inserting missing tokens,
633the parser is able to continue, and the error does not prevent
634generation of formatted output, but typically, preparing that
635output involves information loss, broken document structure
636or unintended formatting, no matter whether
637.Nm
638or GNU troff is used.
639In many cases, the output of
640.Nm
641and GNU troff is identical, but in some,
642.Nm
643is more resilient than GNU troff with respect to malformed input.
644.Pp
645Non-existent or unreadable input files are also reported on the
646.Cm error
647level.
648In that case, the parser cannot even be started and no output
649is produced from those input files.
650.It Cm warning
651An input file uses obsolete, discouraged or non-portable syntax.
652All the same, the meaning of the input is unambiguous and a correct
653rendering can be produced.
654Documents causing warnings may render poorly when using other
655formatting tools instead of
656.Nm .
657.El
658.Pp
659Messages of the
660.Cm warning ,
661.Cm error ,
662and
663.Cm unsupp
664levels except those about non-existent or unreadable input files
665are hidden unless their level, or a lower level, is requested using a
666.Fl W
667option or
668.Fl T Cm lint
669output mode.
670.Ss Warnings related to the document prologue
671.Bl -ohang
672.It Sy "missing manual title, using UNTITLED"
673.Pq mdoc
674A
675.Ic \&Dt
676macro has no arguments, or there is no
677.Ic \&Dt
678macro before the first non-prologue macro.
679.It Sy "missing manual title, using \(dq\(dq"
680.Pq man
681There is no
682.Ic \&TH
683macro, or it has no arguments.
684.It Sy "lower case character in document title"
685.Pq mdoc , man
686The title is still used as given in the
687.Ic \&Dt
688or
689.Ic \&TH
690macro.
691.It Sy "missing manual section, using \(dq\(dq"
692.Pq mdoc , man
693A
694.Ic \&Dt
695or
696.Ic \&TH
697macro lacks the mandatory section argument.
698.It Sy "unknown manual section"
699.Pq mdoc
700The section number in a
701.Ic \&Dt
702line is invalid, but still used.
703.It Sy "missing date, using today's date"
704.Pq mdoc, man
705The document was parsed as
706.Xr mdoc 5
707and it has no
708.Ic \&Dd
709macro, or the
710.Ic \&Dd
711macro has no arguments or only empty arguments;
712or the document was parsed as
713.Xr man 5
714and it has no
715.Ic \&TH
716macro, or the
717.Ic \&TH
718macro has less than three arguments or its third argument is empty.
719.It Sy "cannot parse date, using it verbatim"
720.Pq mdoc , man
721The date given in a
722.Ic \&Dd
723or
724.Ic \&TH
725macro does not follow the conventional format.
726.It Sy "missing Os macro, using \(dq\(dq"
727.Pq mdoc
728The default or current system is not shown in this case.
729.It Sy "duplicate prologue macro"
730.Pq mdoc
731One of the prologue macros occurs more than once.
732The last instance overrides all previous ones.
733.It Sy "late prologue macro"
734.Pq mdoc
735A
736.Ic \&Dd
737or
738.Ic \&Os
739macro occurs after some non-prologue macro, but still takes effect.
740.It Sy "skipping late title macro"
741.Pq mdoc
742The
743.Ic \&Dt
744macro appears after the first non-prologue macro.
745Traditional formatters cannot handle this because
746they write the page header before parsing the document body.
747Even though this technical restriction does not apply to
748.Nm ,
749traditional semantics is preserved.
750The late macro is discarded including its arguments.
751.It Sy "prologue macros out of order"
752.Pq mdoc
753The prologue macros are not given in the conventional order
754.Ic \&Dd ,
755.Ic \&Dt ,
756.Ic \&Os .
757All three macros are used even when given in another order.
758.El
759.Ss Warnings regarding document structure
760.Bl -ohang
761.It Sy ".so is fragile, better use ln(1)"
762.Pq roff
763Including files only works when the parser program runs with the correct
764current working directory.
765.It Sy "no document body"
766.Pq mdoc , man
767The document body contains neither text nor macros.
768An empty document is shown, consisting only of a header and a footer line.
769.It Sy "content before first section header"
770.Pq mdoc , man
771Some macros or text precede the first
772.Ic \&Sh
773or
774.Ic \&SH
775section header.
776The offending macros and text are parsed and added to the top level
777of the syntax tree, outside any section block.
778.It Sy "first section is not NAME"
779.Pq mdoc
780The argument of the first
781.Ic \&Sh
782macro is not
783.Sq NAME .
784This may confuse
785.Xr makewhatis 8
786and
787.Xr apropos 1 .
788.It Sy "NAME section without Nm before Nd"
789.Pq mdoc
790The NAME section does not contain any
791.Ic \&Nm
792child macro before the first
793.Ic \&Nd
794macro.
795.It Sy "NAME section without description"
796.Pq mdoc
797The NAME section lacks the mandatory
798.Ic \&Nd
799child macro.
800.It Sy "description not at the end of NAME"
801.Pq mdoc
802The NAME section does contain an
803.Ic \&Nd
804child macro, but other content follows it.
805.It Sy "bad NAME section content"
806.Pq mdoc
807The NAME section contains plain text or macros other than
808.Ic \&Nm
809and
810.Ic \&Nd .
811.It Sy "missing comma before name"
812.Pq mdoc
813The NAME section contains an
814.Ic \&Nm
815macro that is neither the first one nor preceded by a comma.
816.It Sy "missing description line, using \(dq\(dq"
817.Pq mdoc
818The
819.Ic \&Nd
820macro lacks the required argument.
821The title line of the manual will end after the dash.
822.It Sy "sections out of conventional order"
823.Pq mdoc
824A standard section occurs after another section it usually precedes.
825All section titles are used as given,
826and the order of sections is not changed.
827.It Sy "duplicate section title"
828.Pq mdoc
829The same standard section title occurs more than once.
830.It Sy "unexpected section"
831.Pq mdoc
832A standard section header occurs in a section of the manual
833where it normally isn't useful.
834.It Sy "unusual Xr order"
835.Pq mdoc
836In the SEE ALSO section, an
837.Ic \&Xr
838macro with a lower section number follows one with a higher number,
839or two
840.Ic \&Xr
841macros referring to the same section are out of alphabetical order.
842.It Sy "unusual Xr punctuation"
843.Pq mdoc
844In the SEE ALSO section, punctuation between two
845.Ic \&Xr
846macros differs from a single comma, or there is trailing punctuation
847after the last
848.Ic \&Xr
849macro.
850.It Sy "AUTHORS section without An macro"
851.Pq mdoc
852An AUTHORS sections contains no
853.Ic \&An
854macros, or only empty ones.
855Probably, there are author names lacking markup.
856.El
857.Ss "Warnings related to macros and nesting"
858.Bl -ohang
859.It Sy "obsolete macro"
860.Pq mdoc
861See the
862.Xr mdoc 5
863manual for replacements.
864.It Sy "macro neither callable nor escaped"
865.Pq mdoc
866The name of a macro that is not callable appears on a macro line.
867It is printed verbatim.
868If the intention is to call it, move it to its own input line;
869otherwise, escape it by prepending
870.Sq \e& .
871.It Sy "skipping paragraph macro"
872In
873.Xr mdoc 5
874documents, this happens
875.Bl -dash -compact
876.It
877at the beginning and end of sections and subsections
878.It
879right before non-compact lists and displays
880.It
881at the end of items in non-column, non-compact lists
882.It
883and for multiple consecutive paragraph macros.
884.El
885In
886.Xr man 5
887documents, it happens
888.Bl -dash -compact
889.It
890for empty
891.Ic \&P ,
892.Ic \&PP ,
893and
894.Ic \&LP
895macros
896.It
897for
898.Ic \&IP
899macros having neither head nor body arguments
900.It
901for
902.Ic \&br
903or
904.Ic \&sp
905right after
906.Ic \&SH
907or
908.Ic \&SS
909.El
910.It Sy "moving paragraph macro out of list"
911.Pq mdoc
912A list item in a
913.Ic \&Bl
914list contains a trailing paragraph macro.
915The paragraph macro is moved after the end of the list.
916.It Sy "skipping no-space macro"
917.Pq mdoc
918An input line begins with an
919.Ic \&Ns
920macro.
921The macro is ignored.
922.It Sy "blocks badly nested"
923.Pq mdoc
924If two blocks intersect, one should completely contain the other.
925Otherwise, rendered output is likely to look strange in any output
926format, and rendering in SGML-based output formats is likely to be
927outright wrong because such languages do not support badly nested
928blocks at all.
929Typical examples of badly nested blocks are
930.Qq Ic \&Ao \&Bo \&Ac \&Bc
931and
932.Qq Ic \&Ao \&Bq \&Ac .
933In these examples,
934.Ic \&Ac
935breaks
936.Ic \&Bo
937and
938.Ic \&Bq ,
939respectively.
940.It Sy "nested displays are not portable"
941.Pq mdoc
942A
943.Ic \&Bd ,
944.Ic \&D1 ,
945or
946.Ic \&Dl
947display occurs nested inside another
948.Ic \&Bd
949display.
950This works with
951.Nm ,
952but fails with most other implementations.
953.It Sy "moving content out of list"
954.Pq mdoc
955A
956.Ic \&Bl
957list block contains text or macros before the first
958.Ic \&It
959macro.
960The offending children are moved before the beginning of the list.
961.It Sy "fill mode already enabled, skipping"
962.Pq man
963A
964.Ic \&fi
965request occurs even though the document is still in fill mode,
966or already switched back to fill mode.
967It has no effect.
968.It Sy "fill mode already disabled, skipping"
969.Pq man
970An
971.Ic \&nf
972request occurs even though the document already switched to no-fill mode
973and did not switch back to fill mode yet.
974It has no effect.
975.It Sy "line scope broken"
976.Pq man
977While parsing the next-line scope of the previous macro,
978another macro is found that prematurely terminates the previous one.
979The previous, interrupted macro is deleted from the parse tree.
980.El
981.Ss "Warnings related to missing arguments"
982.Bl -ohang
983.It Sy "skipping empty request"
984.Pq roff , eqn
985The macro name is missing from a macro definition request,
986or an
987.Xr eqn 5
988control statement or operation keyword lacks its required argument.
989.It Sy "conditional request controls empty scope"
990.Pq roff
991A conditional request is only useful if any of the following
992follows it on the same logical input line:
993.Bl -dash -compact
994.It
995The
996.Sq \e{
997keyword to open a multi-line scope.
998.It
999A request or macro or some text, resulting in a single-line scope.
1000.It
1001The immediate end of the logical line without any intervening whitespace,
1002resulting in next-line scope.
1003.El
1004Here, a conditional request is followed by trailing whitespace only,
1005and there is no other content on its logical input line.
1006Note that it doesn't matter whether the logical input line is split
1007across multiple physical input lines using
1008.Sq \e
1009line continuation characters.
1010This is one of the rare cases
1011where trailing whitespace is syntactically significant.
1012The conditional request controls a scope containing whitespace only,
1013so it is unlikely to have a significant effect,
1014except that it may control a following
1015.Ic \&el
1016clause.
1017.It Sy "skipping empty macro"
1018.Pq mdoc
1019The indicated macro has no arguments and hence no effect.
1020.It Sy "empty block"
1021.Pq mdoc , man
1022A
1023.Ic \&Bd ,
1024.Ic \&Bk ,
1025.Ic \&Bl ,
1026.Ic \&D1 ,
1027.Ic \&Dl ,
1028.Ic \&RS ,
1029or
1030.Ic \&UR
1031block contains nothing in its body and will produce no output.
1032.It Sy "empty argument, using 0n"
1033.Pq mdoc
1034The required width is missing after
1035.Ic \&Bd
1036or
1037.Ic \&Bl
1038.Fl offset
1039or
1040.Fl width.
1041.It Sy "missing display type, using -ragged"
1042.Pq mdoc
1043The
1044.Ic \&Bd
1045macro is invoked without the required display type.
1046.It Sy "list type is not the first argument"
1047.Pq mdoc
1048In a
1049.Ic \&Bl
1050macro, at least one other argument precedes the type argument.
1051The
1052.Nm
1053utility copes with any argument order, but some other
1054.Xr mdoc 5
1055implementations do not.
1056.It Sy "missing -width in -tag list, using 8n"
1057.Pq mdoc
1058Every
1059.Ic \&Bl
1060macro having the
1061.Fl tag
1062argument requires
1063.Fl width ,
1064too.
1065.It Sy "missing utility name, using \(dq\(dq"
1066.Pq mdoc
1067The
1068.Ic \&Ex Fl std
1069macro is called without an argument before
1070.Ic \&Nm
1071has first been called with an argument.
1072.It Sy "missing function name, using \(dq\(dq"
1073.Pq mdoc
1074The
1075.Ic \&Fo
1076macro is called without an argument.
1077No function name is printed.
1078.It Sy "empty head in list item"
1079.Pq mdoc
1080In a
1081.Ic \&Bl
1082.Fl diag ,
1083.Fl hang ,
1084.Fl inset ,
1085.Fl ohang ,
1086or
1087.Fl tag
1088list, an
1089.Ic \&It
1090macro lacks the required argument.
1091The item head is left empty.
1092.It Sy "empty list item"
1093.Pq mdoc
1094In a
1095.Ic \&Bl
1096.Fl bullet ,
1097.Fl dash ,
1098.Fl enum ,
1099or
1100.Fl hyphen
1101list, an
1102.Ic \&It
1103block is empty.
1104An empty list item is shown.
1105.It Sy "missing font type, using \efR"
1106.Pq mdoc
1107A
1108.Ic \&Bf
1109macro has no argument.
1110It switches to the default font.
1111.It Sy "unknown font type, using \efR"
1112.Pq mdoc
1113The
1114.Ic \&Bf
1115argument is invalid.
1116The default font is used instead.
1117.It Sy "nothing follows prefix"
1118.Pq mdoc
1119A
1120.Ic \&Pf
1121macro has no argument, or only one argument and no macro follows
1122on the same input line.
1123This defeats its purpose; in particular, spacing is not suppressed
1124before the text or macros following on the next input line.
1125.It Sy "empty reference block"
1126.Pq mdoc
1127An
1128.Ic \&Rs
1129macro is immediately followed by an
1130.Ic \&Re
1131macro on the next input line.
1132Such an empty block does not produce any output.
1133.It Sy "missing section argument"
1134.Pq mdoc
1135An
1136.Ic \&Xr
1137macro lacks its second, section number argument.
1138The first argument, i.e. the name, is printed, but without subsequent
1139parentheses.
1140.It Sy "missing -std argument, adding it"
1141.Pq mdoc
1142An
1143.Ic \&Ex
1144or
1145.Ic \&Rv
1146macro lacks the required
1147.Fl std
1148argument.
1149The
1150.Nm
1151utility assumes
1152.Fl std
1153even when it is not specified, but other implementations may not.
1154.It Sy "missing option string, using \(dq\(dq"
1155.Pq man
1156The
1157.Ic \&OP
1158macro is invoked without any argument.
1159An empty pair of square brackets is shown.
1160.It Sy "missing resource identifier, using \(dq\(dq"
1161.Pq man
1162The
1163.Ic \&UR
1164macro is invoked without any argument.
1165An empty pair of angle brackets is shown.
1166.It Sy "missing eqn box, using \(dq\(dq"
1167.Pq eqn
1168A diacritic mark or a binary operator is found,
1169but there is nothing to the left of it.
1170An empty box is inserted.
1171.El
1172.Ss "Warnings related to bad macro arguments"
1173.Bl -ohang
1174.It Sy "unterminated quoted argument"
1175.Pq roff
1176Macro arguments can be enclosed in double quote characters
1177such that space characters and macro names contained in the quoted
1178argument need not be escaped.
1179The closing quote of the last argument of a macro can be omitted.
1180However, omitting it is not recommended because it makes the code
1181harder to read.
1182.It Sy "duplicate argument"
1183.Pq mdoc
1184A
1185.Ic \&Bd
1186or
1187.Ic \&Bl
1188macro has more than one
1189.Fl compact ,
1190more than one
1191.Fl offset ,
1192or more than one
1193.Fl width
1194argument.
1195All but the last instances of these arguments are ignored.
1196.It Sy "skipping duplicate argument"
1197.Pq mdoc
1198An
1199.Ic \&An
1200macro has more than one
1201.Fl split
1202or
1203.Fl nosplit
1204argument.
1205All but the first of these arguments are ignored.
1206.It Sy "skipping duplicate display type"
1207.Pq mdoc
1208A
1209.Ic \&Bd
1210macro has more than one type argument; the first one is used.
1211.It Sy "skipping duplicate list type"
1212.Pq mdoc
1213A
1214.Ic \&Bl
1215macro has more than one type argument; the first one is used.
1216.It Sy "skipping -width argument"
1217.Pq mdoc
1218A
1219.Ic \&Bl
1220.Fl column ,
1221.Fl diag ,
1222.Fl ohang ,
1223.Fl inset ,
1224or
1225.Fl item
1226list has a
1227.Fl width
1228argument.
1229That has no effect.
1230.It Sy "wrong number of cells"
1231In a line of a
1232.Ic \&Bl Fl column
1233list, the number of tabs or
1234.Ic \&Ta
1235macros is less than the number expected from the list header line
1236or exceeds the expected number by more than one.
1237Missing cells remain empty, and all cells exceeding the number of
1238columns are joined into one single cell.
1239.It Sy "unknown AT&T UNIX version"
1240.Pq mdoc
1241An
1242.Ic \&At
1243macro has an invalid argument.
1244It is used verbatim, with
1245.Qq "AT&T UNIX "
1246prefixed to it.
1247.It Sy "comma in function argument"
1248.Pq mdoc
1249An argument of an
1250.Ic \&Fa
1251or
1252.Ic \&Fn
1253macro contains a comma; it should probably be split into two arguments.
1254.It Sy "parenthesis in function name"
1255.Pq mdoc
1256The first argument of an
1257.Ic \&Fc
1258or
1259.Ic \&Fn
1260macro contains an opening or closing parenthesis; that's probably wrong,
1261parentheses are added automatically.
1262.It Sy "invalid content in Rs block"
1263.Pq mdoc
1264An
1265.Ic \&Rs
1266block contains plain text or non-% macros.
1267The bogus content is left in the syntax tree.
1268Formatting may be poor.
1269.It Sy "invalid Boolean argument"
1270.Pq mdoc
1271An
1272.Ic \&Sm
1273macro has an argument other than
1274.Cm on
1275or
1276.Cm off .
1277The invalid argument is moved out of the macro, which leaves the macro
1278empty, causing it to toggle the spacing mode.
1279.It Sy "unknown font, skipping request"
1280.Pq man , tbl
1281A
1282.Xr mandoc_roff 5
1283.Ic \&ft
1284request or a
1285.Xr tbl 5
1286.Ic \&f
1287layout modifier has an unknown
1288.Ar font
1289argument.
1290.It Sy "odd number of characters in request"
1291.Pq roff
1292A
1293.Ic \&tr
1294request contains an odd number of characters.
1295The last character is mapped to the blank character.
1296.El
1297.Ss "Warnings related to plain text"
1298.Bl -ohang
1299.It Sy "blank line in fill mode, using .sp"
1300.Pq mdoc
1301The meaning of blank input lines is only well-defined in non-fill mode:
1302In fill mode, line breaks of text input lines are not supposed to be
1303significant.
1304However, for compatibility with groff, blank lines in fill mode
1305are replaced with
1306.Ic \&sp
1307requests.
1308.It Sy "tab in filled text"
1309.Pq mdoc , man
1310The meaning of tab characters is only well-defined in non-fill mode:
1311In fill mode, whitespace is not supposed to be significant
1312on text input lines.
1313As an implementation dependent choice, tab characters on text lines
1314are passed through to the formatters in any case.
1315Given that the text before the tab character will be filled,
1316it is hard to predict which tab stop position the tab will advance to.
1317.It Sy "whitespace at end of input line"
1318.Pq mdoc , man , roff
1319Whitespace at the end of input lines is almost never semantically
1320significant \(em but in the odd case where it might be, it is
1321extremely confusing when reviewing and maintaining documents.
1322.It Sy "new sentence, new line"
1323.Pq mdoc
1324A new sentence starts in the middle of a text line.
1325Start it on a new input line to help formatters produce correct spacing.
1326.It Sy "bad comment style"
1327.Pq roff
1328Comment lines start with a dot, a backslash, and a double-quote character.
1329The
1330.Nm
1331utility treats the line as a comment line even without the backslash,
1332but leaving out the backslash might not be portable.
1333.It Sy "invalid escape sequence"
1334.Pq roff
1335An escape sequence has an invalid opening argument delimiter, lacks the
1336closing argument delimiter, or the argument has too few characters.
1337If the argument is incomplete,
1338.Ic \e*
1339and
1340.Ic \en
1341expand to an empty string,
1342.Ic \eB
1343to the digit
1344.Sq 0 ,
1345and
1346.Ic \ew
1347to the length of the incomplete argument.
1348All other invalid escape sequences are ignored.
1349.It Sy "undefined string, using \(dq\(dq"
1350.Pq roff
1351If a string is used without being defined before,
1352its value is implicitly set to the empty string.
1353However, defining strings explicitly before use
1354keeps the code more readable.
1355.El
1356.Ss "Warnings related to tables"
1357.Bl -ohang
1358.It Sy "tbl line starts with span"
1359.Pq tbl
1360The first cell in a table layout line is a horizontal span
1361.Pq Sq Cm s .
1362Data provided for this cell is ignored, and nothing is printed in the cell.
1363.It Sy "tbl column starts with span"
1364.Pq tbl
1365The first line of a table layout specification
1366requests a vertical span
1367.Pq Sq Cm ^ .
1368Data provided for this cell is ignored, and nothing is printed in the cell.
1369.It Sy "skipping vertical bar in tbl layout"
1370.Pq tbl
1371A table layout specification contains more than two consecutive vertical bars.
1372A double bar is printed, all additional bars are discarded.
1373.El
1374.Ss "Errors related to tables"
1375.Bl -ohang
1376.It Sy "non-alphabetic character in tbl options"
1377.Pq tbl
1378The table options line contains a character other than a letter,
1379blank, or comma where the beginning of an option name is expected.
1380The character is ignored.
1381.It Sy "skipping unknown tbl option"
1382.Pq tbl
1383The table options line contains a string of letters that does not
1384match any known option name.
1385The word is ignored.
1386.It Sy "missing tbl option argument"
1387.Pq tbl
1388A table option that requires an argument is not followed by an
1389opening parenthesis, or the opening parenthesis is immediately
1390followed by a closing parenthesis.
1391The option is ignored.
1392.It Sy "wrong tbl option argument size"
1393.Pq tbl
1394A table option argument contains an invalid number of characters.
1395Both the option and the argument are ignored.
1396.It Sy "empty tbl layout"
1397.Pq tbl
1398A table layout specification is completely empty,
1399specifying zero lines and zero columns.
1400As a fallback, a single left-justified column is used.
1401.It Sy "invalid character in tbl layout"
1402.Pq tbl
1403A table layout specification contains a character that can neither
1404be interpreted as a layout key character nor as a layout modifier,
1405or a modifier precedes the first key.
1406The invalid character is discarded.
1407.It Sy "unmatched parenthesis in tbl layout"
1408.Pq tbl
1409A table layout specification contains an opening parenthesis,
1410but no matching closing parenthesis.
1411The rest of the input line, starting from the parenthesis, has no effect.
1412.It Sy "tbl without any data cells"
1413.Pq tbl
1414A table does not contain any data cells.
1415It will probably produce no output.
1416.It Sy "ignoring data in spanned tbl cell"
1417.Pq tbl
1418A table cell is marked as a horizontal span
1419.Pq Sq Cm s
1420or vertical span
1421.Pq Sq Cm ^
1422in the table layout, but it contains data.
1423The data is ignored.
1424.It Sy "ignoring extra tbl data cells"
1425.Pq tbl
1426A data line contains more cells than the corresponding layout line.
1427The data in the extra cells is ignored.
1428.It Sy "data block open at end of tbl"
1429.Pq tbl
1430A data block is opened with
1431.Cm T{ ,
1432but never closed with a matching
1433.Cm T} .
1434The remaining data lines of the table are all put into one cell,
1435and any remaining cells stay empty.
1436.El
1437.Ss "Errors related to roff, mdoc, and man code"
1438.Bl -ohang
1439.It Sy "input stack limit exceeded, infinite loop?"
1440.Pq roff
1441Explicit recursion limits are implemented for the following features,
1442in order to prevent infinite loops:
1443.Bl -dash -compact
1444.It
1445expansion of nested escape sequences
1446including expansion of strings and number registers,
1447.It
1448expansion of nested user-defined macros,
1449.It
1450and
1451.Ic \&so
1452file inclusion.
1453.El
1454When a limit is hit, the output is incorrect, typically losing
1455some content, but the parser can continue.
1456.It Sy "skipping bad character"
1457.Pq mdoc , man , roff
1458The input file contains a byte that is not a printable
1459.Xr ascii 5
1460character.
1461The message mentions the character number.
1462The offending byte is replaced with a question mark
1463.Pq Sq \&? .
1464Consider editing the input file to replace the byte with an ASCII
1465transliteration of the intended character.
1466.It Sy "skipping unknown macro"
1467.Pq mdoc , man , roff
1468The first identifier on a request or macro line is neither recognized as a
1469.Xr mandoc_roff 5
1470request, nor as a user-defined macro, nor, respectively, as an
1471.Xr mdoc 5
1472or
1473.Xr man 5
1474macro.
1475It may be mistyped or unsupported.
1476The request or macro is discarded including its arguments.
1477.It Sy "skipping insecure request"
1478.Pq roff
1479An input file attempted to run a shell command
1480or to read or write an external file.
1481Such attempts are denied for security reasons.
1482.It Sy "skipping item outside list"
1483.Pq mdoc , eqn
1484An
1485.Ic \&It
1486macro occurs outside any
1487.Ic \&Bl
1488list, or an
1489.Xr eqn 5
1490.Ic above
1491delimiter occurs outside any pile.
1492It is discarded including its arguments.
1493.It Sy "skipping column outside column list"
1494.Pq mdoc
1495A
1496.Ic \&Ta
1497macro occurs outside any
1498.Ic \&Bl Fl column
1499block.
1500It is discarded including its arguments.
1501.It Sy "skipping end of block that is not open"
1502.Pq mdoc , man , eqn , tbl , roff
1503Various syntax elements can only be used to explicitly close blocks
1504that have previously been opened.
1505An
1506.Xr mdoc 5
1507block closing macro, a
1508.Xr man 5
1509.Ic \&RE
1510or
1511.Ic \&UE
1512macro, an
1513.Xr eqn 5
1514right delimiter or closing brace, or the end of an equation, table, or
1515.Xr mandoc_roff 5
1516conditional request is encountered but no matching block is open.
1517The offending request or macro is discarded.
1518.It Sy "fewer RS blocks open, skipping"
1519.Pq man
1520The
1521.Ic \&RE
1522macro is invoked with an argument, but less than the specified number of
1523.Ic \&RS
1524blocks is open.
1525The
1526.Ic \&RE
1527macro is discarded.
1528.It Sy "inserting missing end of block"
1529.Pq mdoc , tbl
1530Various
1531.Xr mdoc 5
1532macros as well as tables require explicit closing by dedicated macros.
1533A block that doesn't support bad nesting
1534ends before all of its children are properly closed.
1535The open child nodes are closed implicitly.
1536.It Sy "appending missing end of block"
1537.Pq mdoc , man , eqn , tbl , roff
1538At the end of the document, an explicit
1539.Xr mdoc 5
1540block, a
1541.Xr man 5
1542next-line scope or
1543.Ic \&RS
1544or
1545.Ic \&UR
1546block, an equation, table, or
1547.Xr mandoc_roff 5
1548conditional or ignore block is still open.
1549The open block is closed implicitly.
1550.It Sy "escaped character not allowed in a name"
1551.Pq roff
1552Macro, string and register identifiers consist of printable,
1553non-whitespace ASCII characters.
1554Escape sequences and characters and strings expressed in terms of them
1555cannot form part of a name.
1556The first argument of an
1557.Ic \&am ,
1558.Ic \&as ,
1559.Ic \&de ,
1560.Ic \&ds ,
1561.Ic \&nr ,
1562or
1563.Ic \&rr
1564request, or any argument of an
1565.Ic \&rm
1566request, or the name of a request or user defined macro being called,
1567is terminated by an escape sequence.
1568In the cases of
1569.Ic \&as ,
1570.Ic \&ds ,
1571and
1572.Ic \&nr ,
1573the request has no effect at all.
1574In the cases of
1575.Ic \&am ,
1576.Ic \&de ,
1577.Ic \&rr ,
1578and
1579.Ic \&rm ,
1580what was parsed up to this point is used as the arguments to the request,
1581and the rest of the input line is discarded including the escape sequence.
1582When parsing for a request or a user-defined macro name to be called,
1583only the escape sequence is discarded.
1584The characters preceding it are used as the request or macro name,
1585the characters following it are used as the arguments to the request or macro.
1586.It Sy "NOT IMPLEMENTED: Bd -file"
1587.Pq mdoc
1588For security reasons, the
1589.Ic \&Bd
1590macro does not support the
1591.Fl file
1592argument.
1593By requesting the inclusion of a sensitive file, a malicious document
1594might otherwise trick a privileged user into inadvertently displaying
1595the file on the screen, revealing the file content to bystanders.
1596The argument is ignored including the file name following it.
1597.It Sy "skipping display without arguments"
1598.Pq mdoc
1599A
1600.Ic \&Bd
1601block macro does not have any arguments.
1602The block is discarded, and the block content is displayed in
1603whatever mode was active before the block.
1604.It Sy "missing list type, using -item"
1605.Pq mdoc
1606A
1607.Ic \&Bl
1608macro fails to specify the list type.
1609.It Sy "missing manual name, using \(dq\(dq"
1610.Pq mdoc
1611The first call to
1612.Ic \&Nm ,
1613or any call in the NAME section, lacks the required argument.
1614.It Sy "uname(3) system call failed, using UNKNOWN"
1615.Pq mdoc
1616The
1617.Ic \&Os
1618macro is called without arguments, and the
1619.Xr uname 3
1620system call failed.
1621As a workaround,
1622.Nm
1623can be compiled with
1624.Sm off
1625.Fl D Cm OSNAME=\(dq\e\(dq Ar string Cm \e\(dq\(dq .
1626.Sm on
1627.It Sy "unknown standard specifier"
1628.Pq mdoc
1629An
1630.Ic \&St
1631macro has an unknown argument and is discarded.
1632.It Sy "skipping request without numeric argument"
1633.Pq roff , eqn
1634An
1635.Ic \&it
1636request or an
1637.Xr eqn 5
1638.Ic \&size
1639or
1640.Ic \&gsize
1641statement has a non-numeric or negative argument or no argument at all.
1642The invalid request or statement is ignored.
1643.It Sy "NOT IMPLEMENTED: .so with absolute path or \(dq..\(dq"
1644.Pq roff
1645For security reasons,
1646.Nm
1647allows
1648.Ic \&so
1649file inclusion requests only with relative paths
1650and only without ascending to any parent directory.
1651By requesting the inclusion of a sensitive file, a malicious document
1652might otherwise trick a privileged user into inadvertently displaying
1653the file on the screen, revealing the file content to bystanders.
1654.Nm
1655only shows the path as it appears behind
1656.Ic \&so .
1657.It Sy ".so request failed"
1658.Pq roff
1659Servicing a
1660.Ic \&so
1661request requires reading an external file, but the file could not be
1662opened.
1663.Nm
1664only shows the path as it appears behind
1665.Ic \&so .
1666.It Sy "skipping all arguments"
1667.Pq mdoc , man , eqn , roff
1668An
1669.Xr mdoc 5
1670.Ic \&Bt ,
1671.Ic \&Ed ,
1672.Ic \&Ef ,
1673.Ic \&Ek ,
1674.Ic \&El ,
1675.Ic \&Lp ,
1676.Ic \&Pp ,
1677.Ic \&Re ,
1678.Ic \&Rs ,
1679or
1680.Ic \&Ud
1681macro, an
1682.Ic \&It
1683macro in a list that don't support item heads, a
1684.Xr man 5
1685.Ic \&LP ,
1686.Ic \&P ,
1687or
1688.Ic \&PP
1689macro, an
1690.Xr eqn 5
1691.Ic \&EQ
1692or
1693.Ic \&EN
1694macro, or a
1695.Xr mandoc_roff 5
1696.Ic \&br ,
1697.Ic \&fi ,
1698or
1699.Ic \&nf
1700request or
1701.Sq \&..
1702block closing request is invoked with at least one argument.
1703All arguments are ignored.
1704.It Sy "skipping excess arguments"
1705.Pq mdoc , man , roff
1706A macro or request is invoked with too many arguments:
1707.Bl -dash -offset 2n -width 2n -compact
1708.It
1709.Ic \&Fo ,
1710.Ic \&PD ,
1711.Ic \&RS ,
1712.Ic \&UR ,
1713.Ic \&ft ,
1714or
1715.Ic \&sp
1716with more than one argument
1717.It
1718.Ic \&An
1719with another argument after
1720.Fl split
1721or
1722.Fl nosplit
1723.It
1724.Ic \&RE
1725with more than one argument or with a non-integer argument
1726.It
1727.Ic \&OP
1728or a request of the
1729.Ic \&de
1730family with more than two arguments
1731.It
1732.Ic \&Dt
1733with more than three arguments
1734.It
1735.Ic \&TH
1736with more than five arguments
1737.It
1738.Ic \&Bd ,
1739.Ic \&Bk ,
1740or
1741.Ic \&Bl
1742with invalid arguments
1743.El
1744The excess arguments are ignored.
1745.El
1746.Ss Unsupported features
1747.Bl -ohang
1748.It Sy "input too large"
1749.Pq mdoc , man
1750Currently,
1751.Nm
1752cannot handle input files larger than its arbitrary size limit
1753of 2^31 bytes (2 Gigabytes).
1754Since useful manuals are always small, this is not a problem in practice.
1755Parsing is aborted as soon as the condition is detected.
1756.It Sy "unsupported control character"
1757.Pq roff
1758An ASCII control character supported by other
1759.Xr mandoc_roff 5
1760implementations but not by
1761.Nm
1762was found in an input file.
1763It is replaced by a question mark.
1764.It Sy "unsupported roff request"
1765.Pq roff
1766An input file contains a
1767.Xr mandoc_roff 5
1768request supported by GNU troff or Heirloom troff but not by
1769.Nm ,
1770and it is likely that this will cause information loss
1771or considerable misformatting.
1772.It Sy "eqn delim option in tbl"
1773.Pq eqn , tbl
1774The options line of a table defines equation delimiters.
1775Any equation source code contained in the table will be printed unformatted.
1776.It Sy "unsupported table layout modifier"
1777.Pq tbl
1778A table layout specification contains an
1779.Sq Cm m
1780modifier.
1781The modifier is discarded.
1782.It Sy "ignoring macro in table"
1783.Pq tbl , mdoc , man
1784A table contains an invocation of an
1785.Xr mdoc 5
1786or
1787.Xr man 5
1788macro or of an undefined macro.
1789The macro is ignored, and its arguments are handled
1790as if they were a text line.
1791.El
1792.Sh SEE ALSO
1793.Xr eqn 5 ,
1794.Xr man 5 ,
1795.Xr mandoc_char 5 ,
1796.Xr mandoc_roff 5 ,
1797.Xr mdoc 5 ,
1798.Xr tbl 5
1799.Sh HISTORY
1800The
1801.Nm
1802utility first appeared in
1803.Ox 4.8 .
1804The option
1805.Fl I
1806appeared in
1807.Ox 5.2 ,
1808and
1809.Fl aCcfhKklMSsw
1810in
1811.Ox 5.7 .
1812.Sh AUTHORS
1813.An -nosplit
1814The
1815.Nm
1816utility was written by
1817.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
1818and is maintained by
1819.An Ingo Schwarze Aq Mt schwarze@openbsd.org .
1820