xref: /openbsd-src/usr.bin/mandoc/mandoc.1 (revision 7df849920975b8135d2a931c9b5fee92c14821d8)
1*7df84992Sschwarze.\" $OpenBSD: mandoc.1,v 1.195 2025/01/05 18:52:03 schwarze Exp $
2f73abda9Skristaps.\"
360395358Sschwarze.\" Copyright (c) 2012, 2014-2023, 2025 Ingo Schwarze <schwarze@openbsd.org>
4ee646987Sschwarze.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
5f73abda9Skristaps.\"
6f73abda9Skristaps.\" Permission to use, copy, modify, and distribute this software for any
7a6464425Sschwarze.\" purpose with or without fee is hereby granted, provided that the above
8a6464425Sschwarze.\" copyright notice and this permission notice appear in all copies.
9f73abda9Skristaps.\"
10a6464425Sschwarze.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11a6464425Sschwarze.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12a6464425Sschwarze.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13a6464425Sschwarze.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14a6464425Sschwarze.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15a6464425Sschwarze.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16a6464425Sschwarze.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17f73abda9Skristaps.\"
1860395358Sschwarze.Dd $Mdocdate: January 5 2025 $
193b242468Sderaadt.Dt MANDOC 1
20f73abda9Skristaps.Os
21f73abda9Skristaps.Sh NAME
22f73abda9Skristaps.Nm mandoc
2333971626Sschwarze.Nd format manual pages
24f73abda9Skristaps.Sh SYNOPSIS
25f73abda9Skristaps.Nm mandoc
26dc1f54e8Sschwarze.Op Fl ac
27071e8769Sschwarze.Op Fl I Cm os Ns = Ns Ar name
28071e8769Sschwarze.Op Fl K Ar encoding
2922a95378Sschwarze.Op Fl mdoc | man
30dc1f54e8Sschwarze.Op Fl O Ar options
31071e8769Sschwarze.Op Fl T Ar output
32071e8769Sschwarze.Op Fl W Ar level
336282966fSschwarze.Op Ar
34f73abda9Skristaps.Sh DESCRIPTION
35f73abda9SkristapsThe
36f73abda9Skristaps.Nm
37f59adb4aSschwarzeutility formats manual pages for display.
385a2d92daSschwarze.Pp
395a2d92daSschwarzeBy default,
405a2d92daSschwarze.Nm
415a2d92daSschwarzereads
425a2d92daSschwarze.Xr mdoc 7
435a2d92daSschwarzeor
445a2d92daSschwarze.Xr man 7
4522a95378Sschwarzetext from stdin and produces
46071e8769Sschwarze.Fl T Cm locale
475a2d92daSschwarzeoutput.
485a2d92daSschwarze.Pp
49db8b2ff0SschwarzeThe options are as follows:
50567886aeSschwarze.Bl -tag -width Ds
510f10154cSschwarze.It Fl a
520f10154cSschwarzeIf the standard output is a terminal device and
530f10154cSschwarze.Fl c
540f10154cSschwarzeis not specified, use
55e886970eSschwarze.Xr less 1
560f10154cSschwarzeto paginate the output, just like
570f10154cSschwarze.Xr man 1
580f10154cSschwarzewould.
590f10154cSschwarze.It Fl c
600f10154cSschwarzeCopy the formatted manual pages to the standard output without using
61e886970eSschwarze.Xr less 1
620f10154cSschwarzeto paginate them.
630f10154cSschwarzeThis is the default.
640f10154cSschwarzeIt can be specified to override
650f10154cSschwarze.Fl a .
66071e8769Sschwarze.It Fl I Cm os Ns = Ns Ar name
67353fa9ecSschwarzeOverride the default operating system
68353fa9ecSschwarze.Ar name
69353fa9ecSschwarzefor the
70353fa9ecSschwarze.Xr mdoc 7
7122a95378Sschwarze.Ic \&Os
729ed53694Sschwarzeand for the
739ed53694Sschwarze.Xr man 7
7422a95378Sschwarze.Ic \&TH
75353fa9ecSschwarzemacro.
76071e8769Sschwarze.It Fl K Ar encoding
777232fc26SschwarzeSpecify the input encoding.
787232fc26SschwarzeThe supported
797232fc26Sschwarze.Ar encoding
807232fc26Sschwarzearguments are
817232fc26Sschwarze.Cm us-ascii ,
827232fc26Sschwarze.Cm iso-8859-1 ,
837232fc26Sschwarzeand
847232fc26Sschwarze.Cm utf-8 .
85bcd40364SschwarzeIf not specified, autodetection uses the first match in the following
86bcd40364Sschwarzelist:
87bcd40364Sschwarze.Bl -enum
88bcd40364Sschwarze.It
89bcd40364SschwarzeIf the first three bytes of the input file are the UTF-8 byte order
90bcd40364Sschwarzemark (BOM, 0xefbbbf), input is interpreted as
91bcd40364Sschwarze.Cm utf-8 .
92bcd40364Sschwarze.It
93bcd40364SschwarzeIf the first or second line of the input file matches the
947232fc26Sschwarze.Sy emacs
957232fc26Sschwarzemode line format
967232fc26Sschwarze.Pp
977232fc26Sschwarze.D1 .\e" -*- Oo ...; Oc coding: Ar encoding ; No -*-
98bcd40364Sschwarze.Pp
99bcd40364Sschwarzethen input is interpreted according to
100bcd40364Sschwarze.Ar encoding .
101bcd40364Sschwarze.It
102bcd40364SschwarzeIf the first non-ASCII byte in the file introduces a valid UTF-8
103bcd40364Sschwarzesequence, input is interpreted as
104bcd40364Sschwarze.Cm utf-8 .
105bcd40364Sschwarze.It
106bcd40364SschwarzeOtherwise, input is interpreted as
107bcd40364Sschwarze.Cm iso-8859-1 .
1087232fc26Sschwarze.El
10922a95378Sschwarze.It Fl mdoc | man
11022a95378SschwarzeWith
11122a95378Sschwarze.Fl mdoc ,
11222a95378Sschwarzeall input files are interpreted as
11322a95378Sschwarze.Xr mdoc 7 .
11422a95378SschwarzeWith
11522a95378Sschwarze.Fl man ,
11622a95378Sschwarzeall input files are interpreted as
11722a95378Sschwarze.Xr man 7 .
11822a95378SschwarzeBy default, the input language is automatically detected for each file:
119b17d48a5Sschwarzeif the first macro is
12022a95378Sschwarze.Ic \&Dd
12122a95378Sschwarzeor
12222a95378Sschwarze.Ic \&Dt ,
12322a95378Sschwarzethe
12422a95378Sschwarze.Xr mdoc 7
12522a95378Sschwarzeparser is used; otherwise, the
12622a95378Sschwarze.Xr man 7
12722a95378Sschwarzeparser is used.
12822a95378SschwarzeWith other arguments,
12922a95378Sschwarze.Fl m
13022a95378Sschwarzeis silently ignored.
131dc1f54e8Sschwarze.It Fl O Ar options
132bf4567ddSjmcComma-separated output options.
133f59adb4aSschwarzeSee the descriptions of the individual output formats for supported
134f59adb4aSschwarze.Ar options .
135071e8769Sschwarze.It Fl T Ar output
136f59adb4aSschwarzeSelect the output format.
137f59adb4aSschwarzeSupported values for the
138f59adb4aSschwarze.Ar output
139f59adb4aSschwarzeargument are
140f59adb4aSschwarze.Cm ascii ,
141f59adb4aSschwarze.Cm html ,
142f59adb4aSschwarzethe default of
143f59adb4aSschwarze.Cm locale ,
144f59adb4aSschwarze.Cm man ,
145f59adb4aSschwarze.Cm markdown ,
146f59adb4aSschwarze.Cm pdf ,
147f59adb4aSschwarze.Cm ps ,
148f59adb4aSschwarze.Cm tree ,
149f59adb4aSschwarzeand
150f59adb4aSschwarze.Cm utf8 .
151f59adb4aSschwarze.Pp
152f59adb4aSschwarzeThe special
153f59adb4aSschwarze.Fl T Cm lint
154f59adb4aSschwarzemode only parses the input and produces no output.
155f59adb4aSschwarzeIt implies
156f59adb4aSschwarze.Fl W Cm all
157f59adb4aSschwarzeand redirects parser messages, which usually appear on standard
158f59adb4aSschwarzeerror output, to standard output.
159071e8769Sschwarze.It Fl W Ar level
160cfd2bfaaSschwarzeSpecify the minimum message
161cfd2bfaaSschwarze.Ar level
162cfd2bfaaSschwarzeto be reported on the standard error output and to affect the exit status.
163cfd2bfaaSschwarzeThe
164cfd2bfaaSschwarze.Ar level
165cfd2bfaaSschwarzecan be
166f3476b07Sschwarze.Cm base ,
1670077f574Sschwarze.Cm style ,
168d04ca39fSschwarze.Cm warning ,
169d04ca39fSschwarze.Cm error ,
170cfd2bfaaSschwarzeor
171f3476b07Sschwarze.Cm unsupp .
172f3476b07SschwarzeThe
173f3476b07Sschwarze.Cm base
174f3476b07Sschwarzelevel automatically derives the operating system from the contents of the
175f3476b07Sschwarze.Ic \&Os
176f3476b07Sschwarzemacro, from the
177f3476b07Sschwarze.Fl Ios
178f3476b07Sschwarzecommand line option, or from the
179f3476b07Sschwarze.Xr uname 3
180f3476b07Sschwarzereturn value.
181f3476b07SschwarzeThe levels
182f3476b07Sschwarze.Cm openbsd
183f3476b07Sschwarzeand
184f3476b07Sschwarze.Cm netbsd
185f3476b07Sschwarzeare variants of
186f3476b07Sschwarze.Cm base
187f3476b07Sschwarzethat bypass autodetection and request validation of base system
188f3476b07Sschwarzeconventions for a particular operating system.
189f3476b07SschwarzeThe level
190df927bb6Sschwarze.Cm all
191cfd2bfaaSschwarzeis an alias for
192f3476b07Sschwarze.Cm base .
193df927bb6SschwarzeBy default,
194df927bb6Sschwarze.Nm
195df927bb6Sschwarzeis silent.
196cfd2bfaaSschwarzeSee
197cfd2bfaaSschwarze.Sx EXIT STATUS
198cfd2bfaaSschwarzeand
199cfd2bfaaSschwarze.Sx DIAGNOSTICS
200cfd2bfaaSschwarzefor details.
201cfd2bfaaSschwarze.Pp
202cfd2bfaaSschwarzeThe special option
203071e8769Sschwarze.Fl W Cm stop
204cfd2bfaaSschwarzetells
205cfd2bfaaSschwarze.Nm
206cfd2bfaaSschwarzeto exit after parsing a file that causes warnings or errors of at least
207cfd2bfaaSschwarzethe requested level.
208cfd2bfaaSschwarzeNo formatted output will be produced from that file.
209cfd2bfaaSschwarzeIf both a
210cfd2bfaaSschwarze.Ar level
211cfd2bfaaSschwarzeand
212cfd2bfaaSschwarze.Cm stop
213cfd2bfaaSschwarzeare requested, they can be joined with a comma, for example
214071e8769Sschwarze.Fl W Cm error , Ns Cm stop .
21519b3e82bSjmc.It Ar file
216f59adb4aSschwarzeRead from the given input file.
217f59adb4aSschwarzeIf multiple files are specified, they are processed in the given order.
218f59adb4aSschwarzeIf unspecified,
219f73abda9Skristaps.Nm
220f59adb4aSschwarzereads from standard input.
221f73abda9Skristaps.El
222db8b2ff0Sschwarze.Pp
2237bb47d6eSschwarzeThe options
2247bb47d6eSschwarze.Fl fhklw
225ed9166ddSnaddyare also supported and are documented in
226ed9166ddSnaddy.Xr man 1 .
227db8b2ff0SschwarzeIn
228db8b2ff0Sschwarze.Fl f
229db8b2ff0Sschwarzeand
230db8b2ff0Sschwarze.Fl k
231db8b2ff0Sschwarzemode,
232db8b2ff0Sschwarze.Nm
233db8b2ff0Sschwarzealso supports the options
2347bb47d6eSschwarze.Fl CMmOSs
235db8b2ff0Sschwarzedescribed in the
236db8b2ff0Sschwarze.Xr apropos 1
237db8b2ff0Sschwarzemanual.
238a39759adSschwarzeThe options
239a39759adSschwarze.Fl fkl
240a39759adSschwarzeare mutually exclusive and override each other.
2413e2de047Sschwarze.Ss ASCII Output
242f59adb4aSschwarzeUse
243071e8769Sschwarze.Fl T Cm ascii
244f59adb4aSschwarzeto force text output in 7-bit ASCII character encoding documented in the
245f59adb4aSschwarze.Xr ascii 7
246f59adb4aSschwarzemanual page, ignoring the
247f59adb4aSschwarze.Xr locale 1
248f59adb4aSschwarzeset in the environment.
2493e2de047Sschwarze.Pp
2503e2de047SschwarzeFont styles are applied by using back-spaced encoding such that an
2513e2de047Sschwarzeunderlined character
2523e2de047Sschwarze.Sq c
2533e2de047Sschwarzeis rendered as
2543e2de047Sschwarze.Sq _ Ns \e[bs] Ns c ,
2553e2de047Sschwarzewhere
2563e2de047Sschwarze.Sq \e[bs]
2573e2de047Sschwarzeis the back-space character number 8.
2583e2de047SschwarzeEmboldened characters are rendered as
2593e2de047Sschwarze.Sq c Ns \e[bs] Ns c .
260cb30fb68SteduThis markup is typically converted to appropriate terminal sequences by
261cb30fb68Steduthe pager or
262cb30fb68Stedu.Xr ul 1 .
263cb30fb68SteduTo remove the markup, pipe the output to
264cb30fb68Stedu.Xr col 1
265cb30fb68Stedu.Fl b
266cb30fb68Steduinstead.
2673e2de047Sschwarze.Pp
2683e2de047SschwarzeThe special characters documented in
2693e2de047Sschwarze.Xr mandoc_char 7
2703e2de047Sschwarzeare rendered best-effort in an ASCII equivalent.
2719ac0ef10SschwarzeIn particular, opening and closing
2729ac0ef10Sschwarze.Sq single quotes
2739ac0ef10Sschwarzeare represented as characters number 0x60 and 0x27, respectively,
2749ac0ef10Sschwarzewhich agrees with all ASCII standards from 1965 to the latest
2759ac0ef10Sschwarzerevision (2012) and which matches the traditional way in which
2769ac0ef10Sschwarze.Xr roff 7
2779ac0ef10Sschwarzeformatters represent single quotes in ASCII output.
2789ac0ef10SschwarzeThis correct ASCII rendering may look strange with modern
2799ac0ef10SschwarzeUnicode-compatible fonts because contrary to ASCII, Unicode uses
2809ac0ef10Sschwarzethe code point U+0060 for the grave accent only, never for an opening
2819ac0ef10Sschwarzequote.
2823e2de047Sschwarze.Pp
2833e2de047SschwarzeThe following
28406f7b709Sschwarze.Fl O
2853e2de047Sschwarzearguments are accepted:
2863e2de047Sschwarze.Bl -tag -width Ds
287e12fe158Sschwarze.It Cm indent Ns = Ns Ar indent
288e12fe158SschwarzeThe left margin for normal text is set to
289e12fe158Sschwarze.Ar indent
29084680f53Sschwarzeblank characters instead of the default of five.
291e12fe158SschwarzeIncreasing this is not recommended; it may result in degraded formatting,
292565a36c2Sjmcfor example overfull lines or ugly line breaks.
293cbdb6ce4SschwarzeWhen output is to a pager on a terminal that is less than 66 columns
294cbdb6ce4Sschwarzewide, the default is reduced to three columns.
2956aedff7eSschwarze.It Cm mdoc
2966aedff7eSschwarzeFormat
2976aedff7eSschwarze.Xr man 7
2986aedff7eSschwarzeinput files in
2996aedff7eSschwarze.Xr mdoc 7
3006aedff7eSschwarzeoutput style.
301192c9c52SschwarzeThis prints the operating system name rather than the page title
30284680f53Sschwarzeon the right side of the footer line.
3036aedff7eSschwarzeOne useful application is for checking that
3046aedff7eSschwarze.Fl T Cm man
3056aedff7eSschwarzeoutput formats in the same way as the
3066aedff7eSschwarze.Xr mdoc 7
3076aedff7eSschwarzesource it was generated from.
308d17f6067Sschwarze.It Cm tag Ns Op = Ns Ar term
309d17f6067SschwarzeIf the formatted manual page is opened in a pager,
310d17f6067Sschwarzego to the definition of the
311d17f6067Sschwarze.Ar term
312d17f6067Sschwarzerather than showing the manual page from the beginning.
313d17f6067SschwarzeIf no
314d17f6067Sschwarze.Ar term
315d17f6067Sschwarzeis specified, reuse the first command line argument that is not a
316d17f6067Sschwarze.Ar section
317d17f6067Sschwarzenumber.
318bbeffd04SschwarzeIf that argument is in
319bbeffd04Sschwarze.Xr apropos 1
320bbeffd04Sschwarze.Ar key Ns = Ns Ar val
321bbeffd04Sschwarzeformat, only the
322bbeffd04Sschwarze.Ar val
323bbeffd04Sschwarzeis used rather than the argument as a whole.
324bbeffd04SschwarzeThis is useful for commands like
325bbeffd04Sschwarze.Ql man -akO tag Ic=ulimit
326bbeffd04Sschwarzeto search for a keyword and jump right to its definition
327bbeffd04Sschwarzein the matching manual pages.
3283e2de047Sschwarze.It Cm width Ns = Ns Ar width
3293e2de047SschwarzeThe output width is set to
330cbdb6ce4Sschwarze.Ar width
331cbdb6ce4Sschwarzeinstead of the default of 78.
332cbdb6ce4SschwarzeWhen output is to a pager on a terminal that is less than 79 columns
333cbdb6ce4Sschwarzewide, the default is reduced to one less than the terminal width.
334cbdb6ce4SschwarzeIn any case, lines that are output in literal mode are never wrapped
335cbdb6ce4Sschwarzeand may exceed the output width.
3363e2de047Sschwarze.El
3373e2de047Sschwarze.Ss HTML Output
3383e2de047SschwarzeOutput produced by
339071e8769Sschwarze.Fl T Cm html
340d649d931Sschwarzeconforms to HTML5 using optional self-closing tags.
341231b8eceSschwarzeEquations rendered from
342231b8eceSschwarze.Xr eqn 7
343231b8eceSschwarzeblocks use MathML.
344f59adb4aSschwarzeNon-ASCII characters are rendered
3456a27eb2dSschwarzeas hexadecimal Unicode character references.
3463e2de047Sschwarze.Pp
3473e2de047SschwarzeThe following
3483e2de047Sschwarze.Fl O
3493e2de047Sschwarzearguments are accepted:
3504175bdabSschwarze.Bl -tag -width Ds
351ca0ce676Sschwarze.It Cm fragment
352b8658a81SbentleyOmit the <!DOCTYPE> declaration and the <html>, <head>, and <body>
353b8658a81Sbentleyelements and only emit the subtree below the <body> element.
354ca0ce676SschwarzeThe
355ca0ce676Sschwarze.Cm style
356985093ccSschwarzeargument will be ignored.
357ca0ce676SschwarzeThis is useful when embedding manual content within existing documents.
35806f7b709Sschwarze.It Cm includes Ns = Ns Ar fmt
3594175bdabSschwarzeThe string
3604175bdabSschwarze.Ar fmt ,
3614175bdabSschwarzefor example,
3624175bdabSschwarze.Ar ../src/%I.html ,
3634175bdabSschwarzeis used as a template for linked header files (usually via the
36422a95378Sschwarze.Ic \&In
365bf4567ddSjmcmacro).
366bf4567ddSjmcInstances of
3674175bdabSschwarze.Sq \&%I
368bf4567ddSjmcare replaced with the include filename.
369bf4567ddSjmcThe default is not to present a
3704175bdabSschwarzehyperlink.
3713f160fd1Sschwarze.It Cm man Ns = Ns Ar fmt Ns Op ; Ns Ar fmt
3724175bdabSschwarzeThe string
3734175bdabSschwarze.Ar fmt ,
3744175bdabSschwarzefor example,
3754175bdabSschwarze.Ar ../html%S/%N.%S.html ,
3764175bdabSschwarzeis used as a template for linked manuals (usually via the
37722a95378Sschwarze.Ic \&Xr
378bf4567ddSjmcmacro).
379bf4567ddSjmcInstances of
3804175bdabSschwarze.Sq \&%N
3814175bdabSschwarzeand
3824175bdabSschwarze.Sq %S
3834175bdabSschwarzeare replaced with the linked manual's name and section, respectively.
384bf4567ddSjmcIf no section is included, section 1 is assumed.
385bf4567ddSjmcThe default is not to
3864175bdabSschwarzepresent a hyperlink.
3873f160fd1SschwarzeIf two formats are given and a file
3883f160fd1Sschwarze.Ar %N.%S
3893f160fd1Sschwarzeexists in the current directory, the first format is used;
3903f160fd1Sschwarzeotherwise, the second format is used.
39106f7b709Sschwarze.It Cm style Ns = Ns Ar style.css
39219b3e82bSjmcThe file
39319b3e82bSjmc.Ar style.css
394b379b08bSschwarzeis used as an external stylesheet.
39519b3e82bSjmcThis must be a valid absolute or
39619b3e82bSjmcrelative URI.
397b379b08bSschwarze.Pp
398b379b08bSschwarzeUsing the file
399b379b08bSschwarze.Pa mandoc.css
400b379b08bSschwarzethat is distributed with
401b379b08bSschwarze.Nm
402b379b08bSschwarzeis recommended.
403b379b08bSschwarzeIt provides an appearance similar to terminal output with some additional
404b379b08bSschwarzefeatures specific to
405b379b08bSschwarze.Nm
406b379b08bSschwarzeHTML output, in particular making anchor locations that support
407b379b08bSschwarzedeep linking stand out visually by putting a dotted line under them,
408b379b08bSschwarzeproviding tooltips showing the semantic function of elements (macro
409b379b08bSschwarzenames), providing some simple aspects of responsive web design, and
410b379b08bSschwarzeproviding simple support for users who prefer a dark color scheme.
411b379b08bSschwarze.Pp
412b379b08bSschwarzeUsing a custom CSS file is possible, but writing it requires
413b379b08bSschwarzeproficiency in all of the languages HTML 5, CSS 4, and
414b379b08bSschwarze.Xr mdoc 7
415b379b08bSschwarzeand familiarity with the
416b379b08bSschwarze.Nm Ns -specific
417b379b08bSschwarzeclasses used in
418b379b08bSschwarze.Pa mandoc.css .
419b379b08bSschwarzeBesides, while the file
420b379b08bSschwarze.Pa mandoc.css
421b379b08bSschwarzeis always adapted to the HTML output generated by the
422b379b08bSschwarze.Nm
423b379b08bSschwarzeversion it is distributed with, maintaining a custom CSS file usually
424b379b08bSschwarzerequires adaptations each time
425b379b08bSschwarze.Nm
426b379b08bSschwarzeis upgraded to a new version.
427b379b08bSschwarze.Pp
428b379b08bSschwarzeIf a stylesheet is not specified with
429b379b08bSschwarze.Fl O Cm style ,
430b379b08bSschwarze.Fl T Cm html
431b379b08bSschwarzeembeds a minimal stylesheet into the HTML output, mostly to select
432b379b08bSschwarzeadequate font-style and font-weight attributes for various macros.
433b379b08bSschwarzeThe result is readable in any graphical or text-based web browser,
434b379b08bSschwarzebut does not aim for looking similar to terminal output.
435b379b08bSschwarzeInstead, formatting is mostly left to browser defaults
436b379b08bSschwarzeand to user settings in the browser configuration.
437f32c3515Sschwarze.It Cm tag Ns Op = Ns Ar term
438f32c3515SschwarzeSame syntax and semantics as for
439f32c3515Sschwarze.Sx ASCII Output .
440f32c3515SschwarzeThis is implemented by passing a
441f32c3515Sschwarze.Ic file://
442f32c3515SschwarzeURI ending in a fragment identifier to the pager
443f32c3515Sschwarzerather than passing merely a file name.
444f32c3515SschwarzeWhen using this argument, use a pager supporting such URIs, for example
445f32c3515Sschwarze.Bd -literal -offset 3n
446f32c3515SschwarzeMANPAGER='lynx -force_html' man -T html -O tag=MANPAGER man
447f32c3515SschwarzeMANPAGER='w3m -T text/html' man -T html -O tag=toc mandoc
448f32c3515Sschwarze.Ed
449f32c3515Sschwarze.Pp
4502909699bSschwarzeConsequently, for HTML output, this argument does not work with
451f32c3515Sschwarze.Xr more 1
452f32c3515Sschwarzeor
453f32c3515Sschwarze.Xr less 1 .
4542909699bSschwarzeFor example,
4552909699bSschwarze.Ql MANPAGER=less man -T html -O tag=toc mandoc
4562909699bSschwarzedoes not work because
4572909699bSschwarze.Xr less 1
4582909699bSschwarzedoes not support
4592909699bSschwarze.Ic file://
4602909699bSschwarzeURIs.
4613327fa00Sschwarze.It Cm toc
4623327fa00SschwarzeIf an input file contains at least two non-standard sections,
4633327fa00Sschwarzeprint a table of contents near the beginning of the output.
4644175bdabSschwarze.El
46554f1236dSjmc.Ss Locale Output
466f59adb4aSschwarzeBy default,
467f59adb4aSschwarze.Nm
468f59adb4aSschwarzeautomatically selects UTF-8 or ASCII output according to the current
469f59adb4aSschwarze.Xr locale 1 .
470f59adb4aSschwarzeIf any of the environment variables
471f59adb4aSschwarze.Ev LC_ALL ,
472f59adb4aSschwarze.Ev LC_CTYPE ,
473f59adb4aSschwarzeor
474f59adb4aSschwarze.Ev LANG
475f59adb4aSschwarzeare set and the first one that is set
476f59adb4aSschwarzeselects the UTF-8 character encoding, it produces
477f59adb4aSschwarze.Sx UTF-8 Output ;
478f59adb4aSschwarzeotherwise, it falls back to
479f59adb4aSschwarze.Sx ASCII Output .
480f59adb4aSschwarzeThis output mode can also be selected explicitly with
481071e8769Sschwarze.Fl T Cm locale .
482ca0ce676Sschwarze.Ss Man Output
483f59adb4aSschwarzeUse
484f59adb4aSschwarze.Fl T Cm man
485f59adb4aSschwarzeto translate
486f59adb4aSschwarze.Xr mdoc 7
487f59adb4aSschwarzeinput into
488ca0ce676Sschwarze.Xr man 7
489ca0ce676Sschwarzeoutput format.
4903ecb192bSjmcThis is useful for distributing manual sources to legacy systems
491ca0ce676Sschwarzelacking
492ca0ce676Sschwarze.Xr mdoc 7
493ca0ce676Sschwarzeformatters.
4948affcc51SschwarzeEmbedded
4958affcc51Sschwarze.Xr eqn 7
4968affcc51Sschwarzeand
4978affcc51Sschwarze.Xr tbl 7
4988affcc51Sschwarzecode is not supported.
499ca0ce676Sschwarze.Pp
500f59adb4aSschwarzeIf the input format of a file is
501ca0ce676Sschwarze.Xr man 7 ,
502bad5e71cSschwarzethe input is copied to the output.
503985093ccSschwarzeThe parser is also run, and as usual, the
504985093ccSschwarze.Fl W
505985093ccSschwarzelevel controls which
506985093ccSschwarze.Sx DIAGNOSTICS
507985093ccSschwarzeare displayed before copying the input to the output.
508b3257404Sschwarze.Ss Markdown Output
509f59adb4aSschwarzeUse
510f59adb4aSschwarze.Fl T Cm markdown
511f59adb4aSschwarzeto translate
512b3257404Sschwarze.Xr mdoc 7
513f59adb4aSschwarzeinput to the markdown format conforming to
514d905fc10Sjsg.Lk https://daringfireball.net/projects/markdown/syntax.text\
515b3257404Sschwarze "John Gruber's 2004 specification" .
5167f384ba5SschwarzeThe output also almost conforms to the
517d905fc10Sjsg.Lk https://commonmark.org/ CommonMark
5187f384ba5Sschwarzespecification.
5197f384ba5Sschwarze.Pp
5207f384ba5SschwarzeThe character set used for the markdown output is ASCII.
5217f384ba5SschwarzeNon-ASCII characters are encoded as HTML entities.
5227f384ba5SschwarzeSince that is not possible in literal font contexts, because these
5237f384ba5Sschwarzeare rendered as code spans and code blocks in the markdown output,
5247f384ba5Sschwarzenon-ASCII characters are transliterated to ASCII approximations in
5257f384ba5Sschwarzethese contexts.
526b3257404Sschwarze.Pp
527b3257404SschwarzeMarkdown is a very weak markup language, so all semantic markup is
528b3257404Sschwarzelost, and even part of the presentational markup may be lost.
529b3257404SschwarzeDo not use this as an intermediate step in converting to HTML;
530b3257404Sschwarzeinstead, use
531b3257404Sschwarze.Fl T Cm html
532b3257404Sschwarzedirectly.
533b3257404Sschwarze.Pp
534b3257404SschwarzeThe
535b3257404Sschwarze.Xr man 7 ,
536b3257404Sschwarze.Xr tbl 7 ,
537b3257404Sschwarzeand
538b3257404Sschwarze.Xr eqn 7
539b3257404Sschwarzeinput languages are not supported by
540b3257404Sschwarze.Fl T Cm markdown
541b3257404Sschwarzeoutput mode.
54254f1236dSjmc.Ss PDF Output
54354f1236dSjmcPDF-1.1 output may be generated by
544071e8769Sschwarze.Fl T Cm pdf .
54554f1236dSjmcSee
54654f1236dSjmc.Sx PostScript Output
54754f1236dSjmcfor
54854f1236dSjmc.Fl O
54954f1236dSjmcarguments and defaults.
550f95d589eSschwarze.Ss PostScript Output
55106f7b709SschwarzePostScript
55206f7b709Sschwarze.Qq Adobe-3.0
55306f7b709SschwarzeLevel-2 pages may be generated by
554071e8769Sschwarze.Fl T Cm ps .
555769ee804SschwarzeOutput pages default to letter sized and are rendered in the Times font
556769ee804Sschwarzefamily, 11-point.
557769ee804SschwarzeMargins are calculated as 1/9 the page length and width.
558769ee804SschwarzeLine-height is 1.4m.
5593e2de047Sschwarze.Pp
5603e2de047SschwarzeSpecial characters are rendered as in
5613e2de047Sschwarze.Sx ASCII Output .
5623e2de047Sschwarze.Pp
5633e2de047SschwarzeThe following
5643e2de047Sschwarze.Fl O
5653e2de047Sschwarzearguments are accepted:
5663e2de047Sschwarze.Bl -tag -width Ds
5673e2de047Sschwarze.It Cm paper Ns = Ns Ar name
5683e2de047SschwarzeThe paper size
5693e2de047Sschwarze.Ar name
5703e2de047Sschwarzemay be one of
571769ee804Sschwarze.Ar a3 ,
572769ee804Sschwarze.Ar a4 ,
573769ee804Sschwarze.Ar a5 ,
574769ee804Sschwarze.Ar legal ,
5753e2de047Sschwarzeor
5763e2de047Sschwarze.Ar letter .
577769ee804SschwarzeYou may also manually specify dimensions as
578769ee804Sschwarze.Ar NNxNN ,
579769ee804Sschwarzewidth by height in millimetres.
580769ee804SschwarzeIf an unknown value is encountered,
581769ee804Sschwarze.Ar letter
582769ee804Sschwarzeis used.
5833e2de047Sschwarze.El
584f59adb4aSschwarze.Ss UTF-8 Output
58554f1236dSjmcUse
586071e8769Sschwarze.Fl T Cm utf8
587f59adb4aSschwarzeto force text output in UTF-8 multi-byte character encoding,
588f59adb4aSschwarzeignoring the
589f59adb4aSschwarze.Xr locale 1
590f59adb4aSschwarzesettings in the environment.
591ddce0b0cSschwarzeSee
592f59adb4aSschwarze.Sx ASCII Output
593f59adb4aSschwarzeregarding font styles and
594f59adb4aSschwarze.Fl O
595f59adb4aSschwarzearguments.
596f59adb4aSschwarze.Pp
597f59adb4aSschwarzeOn operating systems lacking locale or wide character support, and
598f59adb4aSschwarzeon those where the internal character representation is not UCS-4,
599f59adb4aSschwarze.Nm
600f59adb4aSschwarzealways falls back to
601f59adb4aSschwarze.Sx ASCII Output .
6022e7f8dbdSschwarze.Ss Syntax tree output
6032e7f8dbdSschwarzeUse
6042e7f8dbdSschwarze.Fl T Cm tree
6052e7f8dbdSschwarzeto show a human readable representation of the syntax tree.
6062e7f8dbdSschwarzeIt is useful for debugging the source code of manual pages.
6072f83faf2SjmcThe exact format is subject to change, so don't write parsers for it.
608d5fe3964Sschwarze.Pp
609d5fe3964SschwarzeThe first paragraph shows meta data found in the
610d5fe3964Sschwarze.Xr mdoc 7
611d5fe3964Sschwarzeprologue, on the
612d5fe3964Sschwarze.Xr man 7
613d5fe3964Sschwarze.Ic \&TH
614d5fe3964Sschwarzeline, or the fallbacks used.
615d5fe3964Sschwarze.Pp
616d5fe3964SschwarzeIn the tree dump, each output line shows one syntax tree node.
6172e7f8dbdSschwarzeChild nodes are indented with respect to their parent node.
6182e7f8dbdSschwarzeThe columns are:
6192e7f8dbdSschwarze.Pp
6202e7f8dbdSschwarze.Bl -enum -compact
6212e7f8dbdSschwarze.It
6222e7f8dbdSschwarzeFor macro nodes, the macro name; for text and
6232e7f8dbdSschwarze.Xr tbl 7
6242f83faf2Sjmcnodes, the content.
6252f83faf2SjmcThere is a special format for
6262e7f8dbdSschwarze.Xr eqn 7
6272e7f8dbdSschwarzenodes.
6282e7f8dbdSschwarze.It
6292e7f8dbdSschwarzeNode type (text, elem, block, head, body, body-end, tail, tbl, eqn).
6302e7f8dbdSschwarze.It
6312e7f8dbdSschwarzeFlags:
6322e7f8dbdSschwarze.Bl -dash -compact
6332e7f8dbdSschwarze.It
6342e7f8dbdSschwarzeAn opening parenthesis if the node is an opening delimiter.
6352e7f8dbdSschwarze.It
6362e7f8dbdSschwarzeAn asterisk if the node starts a new input line.
6372e7f8dbdSschwarze.It
6382e7f8dbdSschwarzeThe input line number (starting at one).
6392e7f8dbdSschwarze.It
6402e7f8dbdSschwarzeA colon.
6412e7f8dbdSschwarze.It
6422e7f8dbdSschwarzeThe input column number (starting at one).
6432e7f8dbdSschwarze.It
6442e7f8dbdSschwarzeA closing parenthesis if the node is a closing delimiter.
6452e7f8dbdSschwarze.It
6462e7f8dbdSschwarzeA full stop if the node ends a sentence.
64743808411Sschwarze.It
648385121c9SschwarzeBROKEN if the node is a block broken by another block.
649385121c9Sschwarze.It
65043808411SschwarzeNOSRC if the node is not in the input file,
65143808411Sschwarzebut automatically generated from macros.
65243808411Sschwarze.It
65343808411SschwarzeNOPRT if the node is not supposed to generate output
65443808411Sschwarzefor any output format.
6552e7f8dbdSschwarze.El
6562e7f8dbdSschwarze.El
657385121c9Sschwarze.Pp
658385121c9SschwarzeThe following
659385121c9Sschwarze.Fl O
660385121c9Sschwarzeargument is accepted:
661385121c9Sschwarze.Bl -tag -width Ds
662385121c9Sschwarze.It Cm noval
663385121c9SschwarzeSkip validation and show the unvalidated syntax tree.
664385121c9SschwarzeThis can help to find out whether a given behaviour is caused by
665385121c9Sschwarzethe parser or by the validator.
666385121c9SschwarzeMeta data is not available in this case.
667385121c9Sschwarze.El
6680f10154cSschwarze.Sh ENVIRONMENT
6690f10154cSschwarze.Bl -tag -width MANPAGER
670f59adb4aSschwarze.It Ev LC_CTYPE
671f59adb4aSschwarzeThe character encoding
672f59adb4aSschwarze.Xr locale 1 .
673f59adb4aSschwarzeWhen
674f59adb4aSschwarze.Sx Locale Output
675f59adb4aSschwarzeis selected, it decides whether to use ASCII or UTF-8 output format.
676f59adb4aSschwarzeIt never affects the interpretation of input files.
6770f10154cSschwarze.It Ev MANPAGER
6780f10154cSschwarzeAny non-empty value of the environment variable
6790f10154cSschwarze.Ev MANPAGER
680af17c515Sschwarzeis used instead of the standard pagination program,
681c9771691Sschwarze.Xr less 1 ;
682af17c515Sschwarzesee
683af17c515Sschwarze.Xr man 1
684af17c515Sschwarzefor details.
685af17c515SschwarzeOnly used if
686af17c515Sschwarze.Fl a
687af17c515Sschwarzeor
688af17c515Sschwarze.Fl l
689af17c515Sschwarzeis specified.
6900f10154cSschwarze.It Ev PAGER
6910f10154cSschwarzeSpecifies the pagination program to use when
6920f10154cSschwarze.Ev MANPAGER
6930f10154cSschwarzeis not defined.
6940f10154cSschwarzeIf neither PAGER nor MANPAGER is defined,
695c9771691Sschwarze.Xr less 1
696af17c515Sschwarzeis used.
697af17c515SschwarzeOnly used if
698af17c515Sschwarze.Fl a
699af17c515Sschwarzeor
700af17c515Sschwarze.Fl l
701af17c515Sschwarzeis specified.
7020f10154cSschwarze.El
703cfd2bfaaSschwarze.Sh EXIT STATUS
704cfd2bfaaSschwarzeThe
705cfd2bfaaSschwarze.Nm
706cfd2bfaaSschwarzeutility exits with one of the following values, controlled by the message
707cfd2bfaaSschwarze.Ar level
708cfd2bfaaSschwarzeassociated with the
709cfd2bfaaSschwarze.Fl W
710cfd2bfaaSschwarzeoption:
711cfd2bfaaSschwarze.Pp
712cfd2bfaaSschwarze.Bl -tag -width Ds -compact
713cfd2bfaaSschwarze.It 0
714f3476b07SschwarzeNo base system convention violations, style suggestions, warnings,
715f3476b07Sschwarzeor errors occurred, or those that did were ignored because they
716f3476b07Sschwarzewere lower than the requested
717cfd2bfaaSschwarze.Ar level .
7180077f574Sschwarze.It 1
719f3476b07SschwarzeAt least one base system convention violation or style suggestion
720f3476b07Sschwarzeoccurred, but no warning or error, and
721f3476b07Sschwarze.Fl W Cm base
722f3476b07Sschwarzeor
7230077f574Sschwarze.Fl W Cm style
7240077f574Sschwarzewas specified.
725cfd2bfaaSschwarze.It 2
726cfd2bfaaSschwarzeAt least one warning occurred, but no error, and
727071e8769Sschwarze.Fl W Cm warning
728f3476b07Sschwarzeor a lower
729f3476b07Sschwarze.Ar level
730f3476b07Sschwarzewas requested.
731cfd2bfaaSschwarze.It 3
732d04ca39fSschwarzeAt least one parsing error occurred,
733d04ca39fSschwarzebut no unsupported feature was encountered, and
734071e8769Sschwarze.Fl W Cm error
7350077f574Sschwarzeor a lower
7360077f574Sschwarze.Ar level
7370077f574Sschwarzewas requested.
738d04ca39fSschwarze.It 4
739befabf7cSjmcAt least one unsupported feature was encountered, and
7400077f574Sschwarze.Fl W Cm unsupp
7410077f574Sschwarzeor a lower
7420077f574Sschwarze.Ar level
7430077f574Sschwarzewas requested.
744cfd2bfaaSschwarze.It 5
745cfd2bfaaSschwarzeInvalid command line arguments were specified.
746cfd2bfaaSschwarzeNo input files have been read.
747cfd2bfaaSschwarze.It 6
748fc1cb77bSschwarzeAn operating system error occurred, for example exhaustion
749fc1cb77bSschwarzeof memory, file descriptors, or process table entries.
750ecd1ed85SschwarzeSuch errors may cause
751cfd2bfaaSschwarze.Nm
752cfd2bfaaSschwarzeto exit at once, possibly in the middle of parsing or formatting a file.
753cfd2bfaaSschwarze.El
754cfd2bfaaSschwarze.Pp
755cfd2bfaaSschwarzeNote that selecting
756071e8769Sschwarze.Fl T Cm lint
757cfd2bfaaSschwarzeoutput mode implies
758f3476b07Sschwarze.Fl W Cm all .
759f73abda9Skristaps.Sh EXAMPLES
760f73abda9SkristapsTo page manuals to the terminal:
761f73abda9Skristaps.Pp
762e2cc53ceSschwarze.Dl $ mandoc -a mandoc.1 man.1 apropos.1 makewhatis.8
763888b3a74Sschwarze.Pp
7644175bdabSschwarzeTo produce HTML manuals with
76508209f2cStedu.Pa /usr/share/misc/mandoc.css
766b379b08bSschwarzeas the stylesheet:
7674175bdabSschwarze.Pp
76808209f2cStedu.Dl $ mandoc \-T html -O style=/usr/share/misc/mandoc.css mdoc.7 > mdoc.7.html
7694175bdabSschwarze.Pp
770888b3a74SschwarzeTo check over a large set of manuals:
771888b3a74Sschwarze.Pp
77285adbebfSbentley.Dl $ mandoc \-T lint \(gafind /usr/src -name \e*\e.[1-9]\(ga
7733e2de047Sschwarze.Pp
7743e2de047SschwarzeTo produce a series of PostScript manuals for A4 paper:
7753e2de047Sschwarze.Pp
77608209f2cStedu.Dl $ mandoc \-T ps \-O paper=a4 mdoc.7 man.7 > manuals.ps
77775d4d0e5Sschwarze.Pp
77875d4d0e5SschwarzeConvert a modern
77975d4d0e5Sschwarze.Xr mdoc 7
78075d4d0e5Sschwarzemanual to the older
78175d4d0e5Sschwarze.Xr man 7
78275d4d0e5Sschwarzeformat, for use on systems lacking an
78375d4d0e5Sschwarze.Xr mdoc 7
78475d4d0e5Sschwarzeparser:
78575d4d0e5Sschwarze.Pp
78608209f2cStedu.Dl $ mandoc \-T man foo.mdoc > foo.man
787cfd2bfaaSschwarze.Sh DIAGNOSTICS
78898a6b86cSschwarzeMessages displayed by
78998a6b86cSschwarze.Nm
79098a6b86cSschwarzefollow this format:
791f3476b07Sschwarze.Bd -ragged -offset indent
7929a8f0651Sschwarze.Nm :
793881f6c5fSkn.Ar file : Ns Ar line : Ns Ar column : level : message : macro argument ...
794f3476b07Sschwarze.Pq Ar os
795f3476b07Sschwarze.Ed
796cfd2bfaaSschwarze.Pp
797044826e4SschwarzeThe first three fields identify the
798044826e4Sschwarze.Ar file
799044826e4Sschwarzename,
800044826e4Sschwarze.Ar line
801044826e4Sschwarzenumber, and
802044826e4Sschwarze.Ar column
803044826e4Sschwarzenumber of the input file where the message was triggered.
804044826e4SschwarzeThe line and column numbers start at 1.
80598a6b86cSschwarzeBoth are omitted for messages referring to an input file as a whole.
806044826e4SschwarzeAll
807044826e4Sschwarze.Ar level
808044826e4Sschwarzeand
809044826e4Sschwarze.Ar message
810044826e4Sschwarzestrings are explained below.
811044826e4SschwarzeThe name of the
812044826e4Sschwarze.Ar macro
813881f6c5fSkntriggering the message and its arguments are omitted where meaningless.
814f3476b07SschwarzeThe
815f3476b07Sschwarze.Ar os
816f3476b07Sschwarzeoperating system specifier is omitted for messages that are relevant
817f3476b07Sschwarzefor all operating systems.
81898a6b86cSschwarzeFatal messages about invalid command line arguments
81998a6b86cSschwarzeor operating system errors, for example when memory is exhausted,
82098a6b86cSschwarzemay also omit the
82198a6b86cSschwarze.Ar file
82243edbcc8Sschwarzeand
82398a6b86cSschwarze.Ar level
82498a6b86cSschwarzefields.
82543edbcc8Sschwarze.Pp
826cfd2bfaaSschwarzeMessage levels have the following meanings:
827cfd2bfaaSschwarze.Bl -tag -width "warning"
828ecd1ed85Sschwarze.It Cm syserr
829ecd1ed85SschwarzeAn operating system error occurred.
830ecd1ed85SschwarzeThere isn't necessarily anything wrong with the input files.
831ecd1ed85SschwarzeOutput may all the same be missing or incomplete.
832ecd1ed85Sschwarze.It Cm badarg
833ecd1ed85SschwarzeInvalid command line arguments were specified.
834ecd1ed85SschwarzeNo input files have been read and no output is produced.
835d04ca39fSschwarze.It Cm unsupp
836d04ca39fSschwarzeAn input file uses unsupported low-level
837d04ca39fSschwarze.Xr roff 7
838d04ca39fSschwarzefeatures.
839d04ca39fSschwarzeThe output may be incomplete and/or misformatted,
840d04ca39fSschwarzeso using GNU troff instead of
841cfd2bfaaSschwarze.Nm
842d04ca39fSschwarzeto process the file may be preferable.
843d04ca39fSschwarze.It Cm error
84457852034SschwarzeIndicates a risk of information loss or severe misformatting,
84557852034Sschwarzein most cases caused by serious syntax errors.
846cfd2bfaaSschwarze.It Cm warning
84757852034SschwarzeIndicates a risk that the information shown or its formatting
84857852034Sschwarzemay mismatch the author's intent in minor ways.
84957852034SschwarzeAdditionally, syntax errors are classified at least as warnings,
85057852034Sschwarzeeven if they do not usually cause misformatting.
8510077f574Sschwarze.It Cm style
8520077f574SschwarzeAn input file uses dubious or discouraged style.
8530077f574SschwarzeThis is not a complaint about the syntax, and probably neither
8540077f574Sschwarzeformatting nor portability are in danger.
8550077f574SschwarzeWhile great care is taken to avoid false positives on the higher
8560077f574Sschwarzemessage levels, the
8570077f574Sschwarze.Cm style
8580077f574Sschwarzelevel tries to reduce the probability that issues go unnoticed,
8590077f574Sschwarzeso it may occasionally issue bogus suggestions.
860a4e61cf2SjsgUse your judgement to decide whether any particular
8610077f574Sschwarze.Cm style
8620077f574Sschwarzesuggestion really justifies a change to the input file.
863f3476b07Sschwarze.It Cm base
864b7ee1dadSdcoppaA convention used in the base system of a specific operating system
865f3476b07Sschwarzeis not adhered to.
866f3476b07SschwarzeThese are not markup mistakes, and neither the quality of formatting
867f3476b07Sschwarzenor portability are in danger.
868dd79b43aSschwarzeMessages of the
869dd79b43aSschwarze.Cm base
870dd79b43aSschwarzelevel are printed with the more intuitive
871dd79b43aSschwarze.Cm style
872dd79b43aSschwarze.Ar level
873dd79b43aSschwarzetag.
874cfd2bfaaSschwarze.El
875cfd2bfaaSschwarze.Pp
876cfd2bfaaSschwarzeMessages of the
877f3476b07Sschwarze.Cm base ,
8780077f574Sschwarze.Cm style ,
879d04ca39fSschwarze.Cm warning ,
880d04ca39fSschwarze.Cm error ,
881cfd2bfaaSschwarzeand
882d04ca39fSschwarze.Cm unsupp
883ecd1ed85Sschwarzelevels are hidden unless their level, or a lower level, is requested using a
884cfd2bfaaSschwarze.Fl W
885cfd2bfaaSschwarzeoption or
886071e8769Sschwarze.Fl T Cm lint
887cfd2bfaaSschwarzeoutput mode.
888f3476b07Sschwarze.Pp
889f3476b07SschwarzeAs indicated below, all
890f3476b07Sschwarze.Cm base
891f3476b07Sschwarzeand some
892f3476b07Sschwarze.Cm style
893f3476b07Sschwarzechecks are only performed if a specific operating system name occurs
894f3476b07Sschwarzein the arguments of the
895f3476b07Sschwarze.Fl W
896f3476b07Sschwarzecommand line option, of the
897ce0ef847Sschwarze.Ic \&Os
898ce0ef847Sschwarzemacro, of the
899ce0ef847Sschwarze.Fl Ios
900ce0ef847Sschwarzecommand line option, or, if neither are present, in the return value
901ce0ef847Sschwarzeof the
902ce0ef847Sschwarze.Xr uname 3
903ce0ef847Sschwarzefunction.
904f3476b07Sschwarze.Ss Conventions for base system manuals
905bc205043Sschwarze.Bl -ohang
906172864f7Sschwarze.It Sy "Mdocdate found"
907172864f7Sschwarze.Pq mdoc , Nx
908172864f7SschwarzeThe
909172864f7Sschwarze.Ic \&Dd
910172864f7Sschwarzemacro uses CVS
911172864f7Sschwarze.Ic Mdocdate
912172864f7Sschwarzekeyword substitution, which is not supported by the
913172864f7Sschwarze.Nx
914172864f7Sschwarzebase system.
915172864f7SschwarzeConsider using the conventional
916172864f7Sschwarze.Dq "Month dd, yyyy"
917172864f7Sschwarzeformat instead.
918172864f7Sschwarze.It Sy "Mdocdate missing"
919172864f7Sschwarze.Pq mdoc , Ox
920172864f7SschwarzeThe
921172864f7Sschwarze.Ic \&Dd
922172864f7Sschwarzemacro does not use CVS
923172864f7Sschwarze.Ic Mdocdate
924172864f7Sschwarzekeyword substitution, but using it is conventionally expected in the
925172864f7Sschwarze.Ox
926172864f7Sschwarzebase system.
927dd0a933bSschwarze.It Sy "unknown architecture"
928dd0a933bSschwarze.Pq mdoc , Ox , Nx
929dd0a933bSschwarzeThe third argument of the
930dd0a933bSschwarze.Ic \&Dt
931dd0a933bSschwarzemacro does not match any of the architectures this operating system
932dd0a933bSschwarzeis running on.
9332f84042eSschwarze.It Sy "operating system explicitly specified"
9342f84042eSschwarze.Pq mdoc , Ox , Nx
9352f84042eSschwarzeThe
9362f84042eSschwarze.Ic \&Os
9372f84042eSschwarzemacro has an argument.
9382f84042eSschwarzeIn the base system, it is conventionally left blank.
939f3476b07Sschwarze.It Sy "RCS id missing"
940f3476b07Sschwarze.Pq Ox , Nx
941f3476b07SschwarzeThe manual page lacks the comment line with the RCS identifier
942f3476b07Sschwarzegenerated by CVS
943f3476b07Sschwarze.Ic OpenBSD
944f3476b07Sschwarzeor
945f3476b07Sschwarze.Ic NetBSD
946f3476b07Sschwarzekeyword substitution as conventionally used in these operating systems.
947f3476b07Sschwarze.El
948f3476b07Sschwarze.Ss Style suggestions
949f3476b07Sschwarze.Bl -ohang
950172864f7Sschwarze.It Sy "legacy man(7) date format"
951172864f7Sschwarze.Pq mdoc
952172864f7SschwarzeThe
953172864f7Sschwarze.Ic \&Dd
954172864f7Sschwarzemacro uses the legacy
955172864f7Sschwarze.Xr man 7
956172864f7Sschwarzedate format
957172864f7Sschwarze.Dq yyyy-dd-mm .
958172864f7SschwarzeConsider using the conventional
959172864f7Sschwarze.Xr mdoc 7
960172864f7Sschwarzedate format
961172864f7Sschwarze.Dq "Month dd, yyyy"
962172864f7Sschwarzeinstead.
9637674a436Sschwarze.It Sy "normalizing date format to" : No ...
9647674a436Sschwarze.Pq mdoc , man
9657674a436SschwarzeThe
9667674a436Sschwarze.Ic \&Dd
9677674a436Sschwarzeor
9687674a436Sschwarze.Ic \&TH
9697674a436Sschwarzemacro provides an abbreviated month name or a day number with a
9707674a436Sschwarzeleading zero.
9717674a436SschwarzeIn the formatted output, the month name is written out in full
9727674a436Sschwarzeand the leading zero is omitted.
973aa4e49ccSschwarze.It Sy "lower case character in document title"
974aa4e49ccSschwarze.Pq mdoc , man
975aa4e49ccSschwarzeThe title is still used as given in the
976aa4e49ccSschwarze.Ic \&Dt
977aa4e49ccSschwarzeor
978aa4e49ccSschwarze.Ic \&TH
979aa4e49ccSschwarzemacro.
98056c2713eSschwarze.It Sy "duplicate RCS id"
98156c2713eSschwarzeA single manual page contains two copies of the RCS identifier for
98256c2713eSschwarzethe same operating system.
98356c2713eSschwarzeConsider deleting the later instance and moving the first one up
98456c2713eSschwarzeto the top of the page.
98580732e73Sjca.It Sy "possible typo in section name"
9864482121fSschwarze.Pq mdoc
9874482121fSschwarzeFuzzy string matching revealed that the argument of an
9884482121fSschwarze.Ic \&Sh
9894482121fSschwarzemacro is similar, but not identical to a standard section name.
990aa4e49ccSschwarze.It Sy "unterminated quoted argument"
991aa4e49ccSschwarze.Pq roff
992aa4e49ccSschwarzeMacro arguments can be enclosed in double quote characters
993aa4e49ccSschwarzesuch that space characters and macro names contained in the quoted
994aa4e49ccSschwarzeargument need not be escaped.
995aa4e49ccSschwarzeThe closing quote of the last argument of a macro can be omitted.
996aa4e49ccSschwarzeHowever, omitting it is not recommended because it makes the code
997aa4e49ccSschwarzeharder to read.
998bc205043Sschwarze.It Sy "useless macro"
999bc205043Sschwarze.Pq mdoc
1000bc205043SschwarzeA
1001bc205043Sschwarze.Ic \&Bt ,
1002bc205043Sschwarze.Ic \&Tn ,
1003bc205043Sschwarzeor
10045ac0fea9Sjmc.Ic \&Ud
1005bc205043Sschwarzemacro was found.
10065ac0fea9SjmcSimply delete it: it serves no useful purpose.
1007f0c18971Sschwarze.It Sy "consider using OS macro"
1008f0c18971Sschwarze.Pq mdoc
1009f0c18971SschwarzeA string was found in plain text or in a
1010f0c18971Sschwarze.Ic \&Bx
1011f0c18971Sschwarzemacro that could be represented using
1012f0c18971Sschwarze.Ic \&Ox ,
1013f0c18971Sschwarze.Ic \&Nx ,
1014f0c18971Sschwarze.Ic \&Fx ,
1015f0c18971Sschwarzeor
1016f0c18971Sschwarze.Ic \&Dx .
1017ce0ef847Sschwarze.It Sy "errnos out of order"
1018ce0ef847Sschwarze.Pq mdoc, Nx
1019ce0ef847SschwarzeThe
1020ce0ef847Sschwarze.Ic \&Er
1021ce0ef847Sschwarzeitems in a
1022ce0ef847Sschwarze.Ic \&Bl
1023ce0ef847Sschwarzelist are not in alphabetical order.
1024ce0ef847Sschwarze.It Sy "duplicate errno"
1025ce0ef847Sschwarze.Pq mdoc, Nx
1026ce0ef847SschwarzeA
1027ce0ef847Sschwarze.Ic \&Bl
1028ce0ef847Sschwarzelist contains two consecutive
1029ce0ef847Sschwarze.Ic \&It
1030ce0ef847Sschwarzeentries describing the same
1031ce0ef847Sschwarze.Ic \&Er
1032ce0ef847Sschwarzenumber.
103328ca454fSschwarze.It Sy "referenced manual not found"
103428ca454fSschwarze.Pq mdoc
103528ca454fSschwarzeAn
103628ca454fSschwarze.Ic \&Xr
103728ca454fSschwarzemacro references a manual page that was not found.
103828ca454fSschwarzeWhen running with
103928ca454fSschwarze.Fl W Cm base ,
104028ca454fSschwarzethe search is restricted to the base system, by default to
104128ca454fSschwarze.Pa /usr/share/man : Ns Pa /usr/X11R6/man .
104228ca454fSschwarzeThis path can be configured at compile time using the
104328ca454fSschwarze.Dv MANPATH_BASE
104428ca454fSschwarzepreprocessor macro.
104528ca454fSschwarzeWhen running with
104628ca454fSschwarze.Fl W Cm style ,
104728ca454fSschwarzethe search is done along the full search path as described in the
104828ca454fSschwarze.Xr man 1
104928ca454fSschwarzemanual page, respecting the
105028ca454fSschwarze.Fl m
105128ca454fSschwarzeand
105228ca454fSschwarze.Fl M
105328ca454fSschwarzecommand line options, the
105428ca454fSschwarze.Ev MANPATH
105528ca454fSschwarzeenvironment variable, the
105628ca454fSschwarze.Xr man.conf 5
105728ca454fSschwarzefile and falling back to the default of
105828ca454fSschwarze.Pa /usr/share/man : Ns Pa /usr/X11R6/man : Ns Pa /usr/local/man ,
105928ca454fSschwarzealso configurable at compile time using the
106028ca454fSschwarze.Dv MANPATH_DEFAULT
106128ca454fSschwarzepreprocessor macro.
1062fe8e59edSschwarze.It Sy "trailing delimiter"
1063648df85bSschwarze.Pq mdoc
1064fe8e59edSschwarzeThe last argument of an
1065fe8e59edSschwarze.Ic \&Ex , \&Fo , \&Nd , \&Nm , \&Os , \&Sh , \&Ss , \&St ,
1066fe8e59edSschwarzeor
1067fe8e59edSschwarze.Ic \&Sx
1068fe8e59edSschwarzemacro ends with a trailing delimiter.
1069fe8e59edSschwarzeThis is usually bad style and often indicates typos.
1070fe8e59edSschwarzeMost likely, the delimiter can be removed.
107104fbb99fSschwarze.It Sy "no blank before trailing delimiter"
107248497dd5Sschwarze.Pq mdoc
107304fbb99fSschwarzeThe last argument of a macro that supports trailing delimiter
107404fbb99fSschwarzearguments is longer than one byte and ends with a trailing delimiter.
107504fbb99fSschwarzeConsider inserting a blank such that the delimiter becomes a separate
107604fbb99fSschwarzeargument, thus moving it out of the scope of the macro.
1077aa4e49ccSschwarze.It Sy "fill mode already enabled, skipping"
1078aa4e49ccSschwarze.Pq man
1079aa4e49ccSschwarzeA
1080aa4e49ccSschwarze.Ic \&fi
1081aa4e49ccSschwarzerequest occurs even though the document is still in fill mode,
1082aa4e49ccSschwarzeor already switched back to fill mode.
1083aa4e49ccSschwarzeIt has no effect.
1084aa4e49ccSschwarze.It Sy "fill mode already disabled, skipping"
1085aa4e49ccSschwarze.Pq man
1086aa4e49ccSschwarzeAn
1087aa4e49ccSschwarze.Ic \&nf
1088aa4e49ccSschwarzerequest occurs even though the document already switched to no-fill mode
1089aa4e49ccSschwarzeand did not switch back to fill mode yet.
1090aa4e49ccSschwarzeIt has no effect.
1091dd9cc97dSschwarze.It Sy "input text line longer than 80 bytes"
1092dd9cc97dSschwarzeConsider breaking the input text line
1093dd9cc97dSschwarzeat one of the blank characters before column 80.
10946dc98fe5Sschwarze.It Sy "verbatim \(dq--\(dq, maybe consider using \e(em"
10956dc98fe5Sschwarze.Pq mdoc
10966dc98fe5SschwarzeEven though the ASCII output device renders an em-dash as
10976dc98fe5Sschwarze.Qq \-\- ,
10986dc98fe5Sschwarzethat is not a good way to write it in an input file
10996dc98fe5Sschwarzebecause it renders poorly on all other output devices.
110048497dd5Sschwarze.It Sy "function name without markup"
110148497dd5Sschwarze.Pq mdoc
110248497dd5SschwarzeA word followed by an empty pair of parentheses occurs on a text line.
110348497dd5SschwarzeConsider using an
110448497dd5Sschwarze.Ic \&Fn
110548497dd5Sschwarzeor
110648497dd5Sschwarze.Ic \&Xr
110748497dd5Sschwarzemacro.
1108aa4e49ccSschwarze.It Sy "whitespace at end of input line"
1109aa4e49ccSschwarze.Pq mdoc , man , roff
1110aa4e49ccSschwarzeWhitespace at the end of input lines is almost never semantically
1111aa4e49ccSschwarzesignificant \(em but in the odd case where it might be, it is
1112aa4e49ccSschwarzeextremely confusing when reviewing and maintaining documents.
1113aa4e49ccSschwarze.It Sy "bad comment style"
1114aa4e49ccSschwarze.Pq roff
1115aa4e49ccSschwarzeComment lines start with a dot, a backslash, and a double-quote character.
1116aa4e49ccSschwarzeThe
1117aa4e49ccSschwarze.Nm
1118aa4e49ccSschwarzeutility treats the line as a comment line even without the backslash,
1119aa4e49ccSschwarzebut leaving out the backslash might not be portable.
1120bc205043Sschwarze.El
11215a3d06daSschwarze.Ss Warnings related to the document prologue
11225a3d06daSschwarze.Bl -ohang
11235a3d06daSschwarze.It Sy "missing manual title, using UNTITLED"
11245a3d06daSschwarze.Pq mdoc
11255a3d06daSschwarzeA
11265a3d06daSschwarze.Ic \&Dt
11275a3d06daSschwarzemacro has no arguments, or there is no
11285a3d06daSschwarze.Ic \&Dt
11295a3d06daSschwarzemacro before the first non-prologue macro.
11305a3d06daSschwarze.It Sy "missing manual title, using \(dq\(dq"
11315a3d06daSschwarze.Pq man
11325a3d06daSschwarzeThere is no
11335a3d06daSschwarze.Ic \&TH
11345a3d06daSschwarzemacro, or it has no arguments.
11355a3d06daSschwarze.It Sy "missing manual section, using \(dq\(dq"
11365a3d06daSschwarze.Pq mdoc , man
11375a3d06daSschwarzeA
11385a3d06daSschwarze.Ic \&Dt
11395a3d06daSschwarzeor
11405a3d06daSschwarze.Ic \&TH
11415a3d06daSschwarzemacro lacks the mandatory section argument.
11425a3d06daSschwarze.It Sy "unknown manual section"
11435a3d06daSschwarze.Pq mdoc
11445a3d06daSschwarzeThe section number in a
11455a3d06daSschwarze.Ic \&Dt
11465a3d06daSschwarzeline is invalid, but still used.
1147ee646987Sschwarze.It Sy "filename/section mismatch"
1148ee646987Sschwarze.Pq mdoc , man
1149ee646987SschwarzeThe name of the input file being processed is known and its file
1150ee646987Sschwarzename extension starts with a non-zero digit, but the
1151ee646987Sschwarze.Ic \&Dt
1152ee646987Sschwarzeor
1153ee646987Sschwarze.Ic \&TH
1154ee646987Sschwarzemacro contains a
1155ee646987Sschwarze.Ar section
1156ee646987Sschwarzeargument that starts with a different non-zero digit.
1157ee646987SschwarzeThe
1158ee646987Sschwarze.Ar section
1159ee646987Sschwarzeargument is used as provided anyway.
1160ee646987SschwarzeConsider checking whether the file name or the argument need a correction.
1161ea5923abSschwarze.It Sy "missing date, using \(dq\(dq"
11625a3d06daSschwarze.Pq mdoc, man
11635a3d06daSschwarzeThe document was parsed as
11645a3d06daSschwarze.Xr mdoc 7
11655a3d06daSschwarzeand it has no
11665a3d06daSschwarze.Ic \&Dd
11675a3d06daSschwarzemacro, or the
11685a3d06daSschwarze.Ic \&Dd
11695a3d06daSschwarzemacro has no arguments or only empty arguments;
11705a3d06daSschwarzeor the document was parsed as
11715a3d06daSschwarze.Xr man 7
11725a3d06daSschwarzeand it has no
11735a3d06daSschwarze.Ic \&TH
11745a3d06daSschwarzemacro, or the
11755a3d06daSschwarze.Ic \&TH
11765a3d06daSschwarzemacro has less than three arguments or its third argument is empty.
11775a3d06daSschwarze.It Sy "cannot parse date, using it verbatim"
11785a3d06daSschwarze.Pq mdoc , man
11795a3d06daSschwarzeThe date given in a
11805a3d06daSschwarze.Ic \&Dd
11815a3d06daSschwarzeor
11825a3d06daSschwarze.Ic \&TH
11835a3d06daSschwarzemacro does not follow the conventional format.
1184e41d5b43Sschwarze.It Sy "date in the future, using it anyway"
1185e41d5b43Sschwarze.Pq mdoc , man
1186e41d5b43SschwarzeThe date given in a
1187e41d5b43Sschwarze.Ic \&Dd
1188e41d5b43Sschwarzeor
1189e41d5b43Sschwarze.Ic \&TH
1190e41d5b43Sschwarzemacro is more than a day ahead of the current system
1191e41d5b43Sschwarze.Xr time 3 .
11925a3d06daSschwarze.It Sy "missing Os macro, using \(dq\(dq"
11935a3d06daSschwarze.Pq mdoc
11945a3d06daSschwarzeThe default or current system is not shown in this case.
11955a3d06daSschwarze.It Sy "late prologue macro"
11965a3d06daSschwarze.Pq mdoc
11975a3d06daSschwarzeA
11985a3d06daSschwarze.Ic \&Dd
11995a3d06daSschwarzeor
12005a3d06daSschwarze.Ic \&Os
12015a3d06daSschwarzemacro occurs after some non-prologue macro, but still takes effect.
12025a3d06daSschwarze.It Sy "prologue macros out of order"
12035a3d06daSschwarze.Pq mdoc
12045a3d06daSschwarzeThe prologue macros are not given in the conventional order
12055a3d06daSschwarze.Ic \&Dd ,
12065a3d06daSschwarze.Ic \&Dt ,
12075a3d06daSschwarze.Ic \&Os .
12085a3d06daSschwarzeAll three macros are used even when given in another order.
12095a3d06daSschwarze.El
12105a3d06daSschwarze.Ss Warnings regarding document structure
12115a3d06daSschwarze.Bl -ohang
12125a3d06daSschwarze.It Sy ".so is fragile, better use ln(1)"
12135a3d06daSschwarze.Pq roff
12145a3d06daSschwarzeIncluding files only works when the parser program runs with the correct
12155a3d06daSschwarzecurrent working directory.
12165a3d06daSschwarze.It Sy "no document body"
12175a3d06daSschwarze.Pq mdoc , man
12185a3d06daSschwarzeThe document body contains neither text nor macros.
12195a3d06daSschwarzeAn empty document is shown, consisting only of a header and a footer line.
12205a3d06daSschwarze.It Sy "content before first section header"
12215a3d06daSschwarze.Pq mdoc , man
12225a3d06daSschwarzeSome macros or text precede the first
12235a3d06daSschwarze.Ic \&Sh
12245a3d06daSschwarzeor
12255a3d06daSschwarze.Ic \&SH
12265a3d06daSschwarzesection header.
12275a3d06daSschwarzeThe offending macros and text are parsed and added to the top level
12285a3d06daSschwarzeof the syntax tree, outside any section block.
12295a3d06daSschwarze.It Sy "first section is not NAME"
12305a3d06daSschwarze.Pq mdoc
12315a3d06daSschwarzeThe argument of the first
12325a3d06daSschwarze.Ic \&Sh
12335a3d06daSschwarzemacro is not
12345a3d06daSschwarze.Sq NAME .
12355a3d06daSschwarzeThis may confuse
12365a3d06daSschwarze.Xr makewhatis 8
12375a3d06daSschwarzeand
12385a3d06daSschwarze.Xr apropos 1 .
1239f27faaccSschwarze.It Sy "NAME section without Nm before Nd"
12405a3d06daSschwarze.Pq mdoc
124120e2cf25SschwarzeThe NAME section does not contain any
124220e2cf25Sschwarze.Ic \&Nm
1243f27faaccSschwarzechild macro before the first
1244f27faaccSschwarze.Ic \&Nd
1245f27faaccSschwarzemacro.
124620e2cf25Sschwarze.It Sy "NAME section without description"
124720e2cf25Sschwarze.Pq mdoc
124820e2cf25SschwarzeThe NAME section lacks the mandatory
12495a3d06daSschwarze.Ic \&Nd
125020e2cf25Sschwarzechild macro.
125120e2cf25Sschwarze.It Sy "description not at the end of NAME"
125220e2cf25Sschwarze.Pq mdoc
125320e2cf25SschwarzeThe NAME section does contain an
125420e2cf25Sschwarze.Ic \&Nd
125520e2cf25Sschwarzechild macro, but other content follows it.
125620e2cf25Sschwarze.It Sy "bad NAME section content"
125720e2cf25Sschwarze.Pq mdoc
125820e2cf25SschwarzeThe NAME section contains plain text or macros other than
125920e2cf25Sschwarze.Ic \&Nm
12605a3d06daSschwarzeand
126120e2cf25Sschwarze.Ic \&Nd .
1262f27faaccSschwarze.It Sy "missing comma before name"
1263f27faaccSschwarze.Pq mdoc
1264f27faaccSschwarzeThe NAME section contains an
1265f27faaccSschwarze.Ic \&Nm
1266f27faaccSschwarzemacro that is neither the first one nor preceded by a comma.
12675a3d06daSschwarze.It Sy "missing description line, using \(dq\(dq"
12685a3d06daSschwarze.Pq mdoc
12695a3d06daSschwarzeThe
12705a3d06daSschwarze.Ic \&Nd
12715a3d06daSschwarzemacro lacks the required argument.
12725a3d06daSschwarzeThe title line of the manual will end after the dash.
127356e9e976Sschwarze.It Sy "description line outside NAME section"
127456e9e976Sschwarze.Pq mdoc
127556e9e976SschwarzeAn
127656e9e976Sschwarze.Ic \&Nd
127756e9e976Sschwarzemacro appears outside the NAME section.
127856e9e976SschwarzeThe arguments are printed anyway and the following text is used for
127956e9e976Sschwarze.Xr apropos 1 ,
128056e9e976Sschwarzebut none of that behaviour is portable.
12815a3d06daSschwarze.It Sy "sections out of conventional order"
12825a3d06daSschwarze.Pq mdoc
12835a3d06daSschwarzeA standard section occurs after another section it usually precedes.
12845a3d06daSschwarzeAll section titles are used as given,
12855a3d06daSschwarzeand the order of sections is not changed.
12865a3d06daSschwarze.It Sy "duplicate section title"
12875a3d06daSschwarze.Pq mdoc
12885a3d06daSschwarzeThe same standard section title occurs more than once.
12895a3d06daSschwarze.It Sy "unexpected section"
12905a3d06daSschwarze.Pq mdoc
12915a3d06daSschwarzeA standard section header occurs in a section of the manual
12925a3d06daSschwarzewhere it normally isn't useful.
129352d11c96Sschwarze.It Sy "cross reference to self"
1294f6697133Sschwarze.Pq mdoc , man
129552d11c96SschwarzeAn
129652d11c96Sschwarze.Ic \&Xr
1297f6697133Sschwarzeor
1298f6697133Sschwarze.Ic \&MR
129952d11c96Sschwarzemacro refers to a name and section matching the section of the present
130052d11c96Sschwarzemanual page and a name mentioned in an
130152d11c96Sschwarze.Ic \&Nm
130252d11c96Sschwarzemacro in the NAME or SYNOPSIS section, or in an
130352d11c96Sschwarze.Ic \&Fn
130452d11c96Sschwarzeor
130552d11c96Sschwarze.Ic \&Fo
130652d11c96Sschwarzemacro in the SYNOPSIS.
130752d11c96SschwarzeConsider using
130852d11c96Sschwarze.Ic \&Nm
130952d11c96Sschwarzeor
131052d11c96Sschwarze.Ic \&Fn
131152d11c96Sschwarzeinstead of
131252d11c96Sschwarze.Ic \&Xr .
13135a3d06daSschwarze.It Sy "unusual Xr order"
13145a3d06daSschwarze.Pq mdoc
13155a3d06daSschwarzeIn the SEE ALSO section, an
13165a3d06daSschwarze.Ic \&Xr
13175a3d06daSschwarzemacro with a lower section number follows one with a higher number,
13185a3d06daSschwarzeor two
13195a3d06daSschwarze.Ic \&Xr
1320028ea36dSjmcmacros referring to the same section are out of alphabetical order.
13215a3d06daSschwarze.It Sy "unusual Xr punctuation"
13225a3d06daSschwarze.Pq mdoc
13235a3d06daSschwarzeIn the SEE ALSO section, punctuation between two
13245a3d06daSschwarze.Ic \&Xr
13255a3d06daSschwarzemacros differs from a single comma, or there is trailing punctuation
13265a3d06daSschwarzeafter the last
13275a3d06daSschwarze.Ic \&Xr
13285a3d06daSschwarzemacro.
13295a3d06daSschwarze.It Sy "AUTHORS section without An macro"
13305a3d06daSschwarze.Pq mdoc
13315a3d06daSschwarzeAn AUTHORS sections contains no
13325a3d06daSschwarze.Ic \&An
13335a3d06daSschwarzemacros, or only empty ones.
13345a3d06daSschwarzeProbably, there are author names lacking markup.
13355a3d06daSschwarze.El
13365a3d06daSschwarze.Ss "Warnings related to macros and nesting"
13375a3d06daSschwarze.Bl -ohang
13385a3d06daSschwarze.It Sy "obsolete macro"
13395a3d06daSschwarze.Pq mdoc
13405a3d06daSschwarzeSee the
13415a3d06daSschwarze.Xr mdoc 7
13425a3d06daSschwarzemanual for replacements.
13435a3d06daSschwarze.It Sy "macro neither callable nor escaped"
13445a3d06daSschwarze.Pq mdoc
13455a3d06daSschwarzeThe name of a macro that is not callable appears on a macro line.
13465a3d06daSschwarzeIt is printed verbatim.
13475a3d06daSschwarzeIf the intention is to call it, move it to its own input line;
13485a3d06daSschwarzeotherwise, escape it by prepending
13495a3d06daSschwarze.Sq \e& .
13505a3d06daSschwarze.It Sy "skipping paragraph macro"
13515a3d06daSschwarzeIn
13525a3d06daSschwarze.Xr mdoc 7
13535a3d06daSschwarzedocuments, this happens
13545a3d06daSschwarze.Bl -dash -compact
13555a3d06daSschwarze.It
13565a3d06daSschwarzeat the beginning and end of sections and subsections
13575a3d06daSschwarze.It
13585a3d06daSschwarzeright before non-compact lists and displays
13595a3d06daSschwarze.It
13605a3d06daSschwarzeat the end of items in non-column, non-compact lists
13615a3d06daSschwarze.It
13625a3d06daSschwarzeand for multiple consecutive paragraph macros.
13635a3d06daSschwarze.El
13645a3d06daSschwarzeIn
13655a3d06daSschwarze.Xr man 7
13665a3d06daSschwarzedocuments, it happens
13675a3d06daSschwarze.Bl -dash -compact
13685a3d06daSschwarze.It
13695a3d06daSschwarzefor empty
13705a3d06daSschwarze.Ic \&P ,
13715a3d06daSschwarze.Ic \&PP ,
13725a3d06daSschwarzeand
13735a3d06daSschwarze.Ic \&LP
13745a3d06daSschwarzemacros
13755a3d06daSschwarze.It
13765a3d06daSschwarzefor
13775a3d06daSschwarze.Ic \&IP
13785a3d06daSschwarzemacros having neither head nor body arguments
13795a3d06daSschwarze.It
13805a3d06daSschwarzefor
13815a3d06daSschwarze.Ic \&br
13825a3d06daSschwarzeor
13835a3d06daSschwarze.Ic \&sp
13845a3d06daSschwarzeright after
13855a3d06daSschwarze.Ic \&SH
13865a3d06daSschwarzeor
13875a3d06daSschwarze.Ic \&SS
13885a3d06daSschwarze.El
13895a3d06daSschwarze.It Sy "moving paragraph macro out of list"
13905a3d06daSschwarze.Pq mdoc
13915a3d06daSschwarzeA list item in a
13925a3d06daSschwarze.Ic \&Bl
13935a3d06daSschwarzelist contains a trailing paragraph macro.
13945a3d06daSschwarzeThe paragraph macro is moved after the end of the list.
13955a3d06daSschwarze.It Sy "skipping no-space macro"
13965a3d06daSschwarze.Pq mdoc
13975a3d06daSschwarzeAn input line begins with an
13985a3d06daSschwarze.Ic \&Ns
1399676013e4Sschwarzemacro, or the next argument after an
1400676013e4Sschwarze.Ic \&Ns
1401676013e4Sschwarzemacro is an isolated closing delimiter.
14025a3d06daSschwarzeThe macro is ignored.
14035a3d06daSschwarze.It Sy "blocks badly nested"
14045a3d06daSschwarze.Pq mdoc
14055a3d06daSschwarzeIf two blocks intersect, one should completely contain the other.
14065a3d06daSschwarzeOtherwise, rendered output is likely to look strange in any output
14075a3d06daSschwarzeformat, and rendering in SGML-based output formats is likely to be
14085a3d06daSschwarzeoutright wrong because such languages do not support badly nested
14095a3d06daSschwarzeblocks at all.
14105a3d06daSschwarzeTypical examples of badly nested blocks are
14115a3d06daSschwarze.Qq Ic \&Ao \&Bo \&Ac \&Bc
14125a3d06daSschwarzeand
14135a3d06daSschwarze.Qq Ic \&Ao \&Bq \&Ac .
14145a3d06daSschwarzeIn these examples,
14155a3d06daSschwarze.Ic \&Ac
14165a3d06daSschwarzebreaks
14175a3d06daSschwarze.Ic \&Bo
14185a3d06daSschwarzeand
14195a3d06daSschwarze.Ic \&Bq ,
14205a3d06daSschwarzerespectively.
14215a3d06daSschwarze.It Sy "nested displays are not portable"
14225a3d06daSschwarze.Pq mdoc
14235a3d06daSschwarzeA
14245a3d06daSschwarze.Ic \&Bd ,
14255a3d06daSschwarze.Ic \&D1 ,
14265a3d06daSschwarzeor
14275a3d06daSschwarze.Ic \&Dl
14285a3d06daSschwarzedisplay occurs nested inside another
14295a3d06daSschwarze.Ic \&Bd
14305a3d06daSschwarzedisplay.
14315a3d06daSschwarzeThis works with
14325a3d06daSschwarze.Nm ,
14335a3d06daSschwarzebut fails with most other implementations.
14345a3d06daSschwarze.It Sy "moving content out of list"
14355a3d06daSschwarze.Pq mdoc
14365a3d06daSschwarzeA
14375a3d06daSschwarze.Ic \&Bl
14385a3d06daSschwarzelist block contains text or macros before the first
14395a3d06daSschwarze.Ic \&It
14405a3d06daSschwarzemacro.
14415a3d06daSschwarzeThe offending children are moved before the beginning of the list.
144280f58981Sschwarze.It Sy "first macro on line"
144380f58981SschwarzeInside a
144480f58981Sschwarze.Ic \&Bl Fl column
144580f58981Sschwarzelist, a
144680f58981Sschwarze.Ic \&Ta
144780f58981Sschwarzemacro occurs as the first macro on a line, which is not portable.
14485a3d06daSschwarze.It Sy "line scope broken"
14495a3d06daSschwarze.Pq man
14505a3d06daSschwarzeWhile parsing the next-line scope of the previous macro,
14515a3d06daSschwarzeanother macro is found that prematurely terminates the previous one.
14525a3d06daSschwarzeThe previous, interrupted macro is deleted from the parse tree.
14535a3d06daSschwarze.El
14545a3d06daSschwarze.Ss "Warnings related to missing arguments"
14555a3d06daSschwarze.Bl -ohang
14565a3d06daSschwarze.It Sy "skipping empty request"
14575a3d06daSschwarze.Pq roff , eqn
14585a3d06daSschwarzeThe macro name is missing from a macro definition request,
14595a3d06daSschwarzeor an
14605a3d06daSschwarze.Xr eqn 7
14615a3d06daSschwarzecontrol statement or operation keyword lacks its required argument.
14625a3d06daSschwarze.It Sy "conditional request controls empty scope"
14635a3d06daSschwarze.Pq roff
14645a3d06daSschwarzeA conditional request is only useful if any of the following
14655a3d06daSschwarzefollows it on the same logical input line:
14665a3d06daSschwarze.Bl -dash -compact
14675a3d06daSschwarze.It
14685a3d06daSschwarzeThe
14695a3d06daSschwarze.Sq \e{
14705a3d06daSschwarzekeyword to open a multi-line scope.
14715a3d06daSschwarze.It
14725a3d06daSschwarzeA request or macro or some text, resulting in a single-line scope.
14735a3d06daSschwarze.It
14745a3d06daSschwarzeThe immediate end of the logical line without any intervening whitespace,
14755a3d06daSschwarzeresulting in next-line scope.
14765a3d06daSschwarze.El
14775a3d06daSschwarzeHere, a conditional request is followed by trailing whitespace only,
14785a3d06daSschwarzeand there is no other content on its logical input line.
14795a3d06daSschwarzeNote that it doesn't matter whether the logical input line is split
14805a3d06daSschwarzeacross multiple physical input lines using
14815a3d06daSschwarze.Sq \e
14825a3d06daSschwarzeline continuation characters.
14835a3d06daSschwarzeThis is one of the rare cases
14845a3d06daSschwarzewhere trailing whitespace is syntactically significant.
14855a3d06daSschwarzeThe conditional request controls a scope containing whitespace only,
14865a3d06daSschwarzeso it is unlikely to have a significant effect,
14875a3d06daSschwarzeexcept that it may control a following
14885a3d06daSschwarze.Ic \&el
14895a3d06daSschwarzeclause.
14905a3d06daSschwarze.It Sy "skipping empty macro"
14915a3d06daSschwarze.Pq mdoc
14925a3d06daSschwarzeThe indicated macro has no arguments and hence no effect.
14935a3d06daSschwarze.It Sy "empty block"
14945a3d06daSschwarze.Pq mdoc , man
14955a3d06daSschwarzeA
14965a3d06daSschwarze.Ic \&Bd ,
14975a3d06daSschwarze.Ic \&Bk ,
14985a3d06daSschwarze.Ic \&Bl ,
14995a3d06daSschwarze.Ic \&D1 ,
15005a3d06daSschwarze.Ic \&Dl ,
15015a3d06daSschwarzeor
1502372f315dSschwarze.Ic \&RS
15035a3d06daSschwarzeblock contains nothing in its body and will produce no output.
15045a3d06daSschwarze.It Sy "empty argument, using 0n"
15055a3d06daSschwarze.Pq mdoc
15065a3d06daSschwarzeThe required width is missing after
15075a3d06daSschwarze.Ic \&Bd
15085a3d06daSschwarzeor
15095a3d06daSschwarze.Ic \&Bl
15105a3d06daSschwarze.Fl offset
15115a3d06daSschwarzeor
15125a3d06daSschwarze.Fl width .
15135a3d06daSschwarze.It Sy "missing display type, using -ragged"
15145a3d06daSschwarze.Pq mdoc
15155a3d06daSschwarzeThe
15165a3d06daSschwarze.Ic \&Bd
15175a3d06daSschwarzemacro is invoked without the required display type.
15185a3d06daSschwarze.It Sy "list type is not the first argument"
15195a3d06daSschwarze.Pq mdoc
15205a3d06daSschwarzeIn a
15215a3d06daSschwarze.Ic \&Bl
15225a3d06daSschwarzemacro, at least one other argument precedes the type argument.
15235a3d06daSschwarzeThe
15245a3d06daSschwarze.Nm
15255a3d06daSschwarzeutility copes with any argument order, but some other
15265a3d06daSschwarze.Xr mdoc 7
15275a3d06daSschwarzeimplementations do not.
15285a3d06daSschwarze.It Sy "missing -width in -tag list, using 8n"
15295a3d06daSschwarze.Pq mdoc
15305a3d06daSschwarzeEvery
15315a3d06daSschwarze.Ic \&Bl
15325a3d06daSschwarzemacro having the
15335a3d06daSschwarze.Fl tag
15345a3d06daSschwarzeargument requires
15355a3d06daSschwarze.Fl width ,
15365a3d06daSschwarzetoo.
15375a3d06daSschwarze.It Sy "missing utility name, using \(dq\(dq"
15385a3d06daSschwarze.Pq mdoc
15395a3d06daSschwarzeThe
15405a3d06daSschwarze.Ic \&Ex Fl std
15415a3d06daSschwarzemacro is called without an argument before
15425a3d06daSschwarze.Ic \&Nm
15435a3d06daSschwarzehas first been called with an argument.
15445a3d06daSschwarze.It Sy "missing function name, using \(dq\(dq"
15455a3d06daSschwarze.Pq mdoc
15465a3d06daSschwarzeThe
15475a3d06daSschwarze.Ic \&Fo
15485a3d06daSschwarzemacro is called without an argument.
15495a3d06daSschwarzeNo function name is printed.
15505a3d06daSschwarze.It Sy "empty head in list item"
15515a3d06daSschwarze.Pq mdoc
15525a3d06daSschwarzeIn a
15535a3d06daSschwarze.Ic \&Bl
15545a3d06daSschwarze.Fl diag ,
15555a3d06daSschwarze.Fl hang ,
15565a3d06daSschwarze.Fl inset ,
15575a3d06daSschwarze.Fl ohang ,
15585a3d06daSschwarzeor
15595a3d06daSschwarze.Fl tag
15605a3d06daSschwarzelist, an
15615a3d06daSschwarze.Ic \&It
15625a3d06daSschwarzemacro lacks the required argument.
15635a3d06daSschwarzeThe item head is left empty.
15645a3d06daSschwarze.It Sy "empty list item"
15655a3d06daSschwarze.Pq mdoc
15665a3d06daSschwarzeIn a
15675a3d06daSschwarze.Ic \&Bl
15685a3d06daSschwarze.Fl bullet ,
15695a3d06daSschwarze.Fl dash ,
15705a3d06daSschwarze.Fl enum ,
15715a3d06daSschwarzeor
15725a3d06daSschwarze.Fl hyphen
15735a3d06daSschwarzelist, an
15745a3d06daSschwarze.Ic \&It
15755a3d06daSschwarzeblock is empty.
15765a3d06daSschwarzeAn empty list item is shown.
157780f58981Sschwarze.It Sy "missing argument, using next line"
157880f58981Sschwarze.Pq mdoc
157980f58981SschwarzeAn
158080f58981Sschwarze.Ic \&It
158180f58981Sschwarzemacro in a
158280f58981Sschwarze.Ic \&Bd Fl column
158380f58981Sschwarzelist has no arguments.
158480f58981SschwarzeWhile
158580f58981Sschwarze.Nm
158680f58981Sschwarzeuses the text or macros of the following line, if any, for the cell,
158780f58981Sschwarzeother formatters may misformat the list.
15885a3d06daSschwarze.It Sy "missing font type, using \efR"
15895a3d06daSschwarze.Pq mdoc
15905a3d06daSschwarzeA
15915a3d06daSschwarze.Ic \&Bf
15925a3d06daSschwarzemacro has no argument.
15935a3d06daSschwarzeIt switches to the default font.
15945a3d06daSschwarze.It Sy "unknown font type, using \efR"
15955a3d06daSschwarze.Pq mdoc
15965a3d06daSschwarzeThe
15975a3d06daSschwarze.Ic \&Bf
15985a3d06daSschwarzeargument is invalid.
15995a3d06daSschwarzeThe default font is used instead.
16005a3d06daSschwarze.It Sy "nothing follows prefix"
16015a3d06daSschwarze.Pq mdoc
16025a3d06daSschwarzeA
16035a3d06daSschwarze.Ic \&Pf
16045a3d06daSschwarzemacro has no argument, or only one argument and no macro follows
16055a3d06daSschwarzeon the same input line.
16065a3d06daSschwarzeThis defeats its purpose; in particular, spacing is not suppressed
16075a3d06daSschwarzebefore the text or macros following on the next input line.
16085a3d06daSschwarze.It Sy "empty reference block"
16095a3d06daSschwarze.Pq mdoc
16105a3d06daSschwarzeAn
16115a3d06daSschwarze.Ic \&Rs
16125a3d06daSschwarzemacro is immediately followed by an
16135a3d06daSschwarze.Ic \&Re
16145a3d06daSschwarzemacro on the next input line.
16155a3d06daSschwarzeSuch an empty block does not produce any output.
16165ae08040Sschwarze.It Sy "missing section argument"
1617f6697133Sschwarze.Pq mdoc , man
16185ae08040SschwarzeAn
16195ae08040Sschwarze.Ic \&Xr
1620f6697133Sschwarzeor
1621f6697133Sschwarze.Ic \&MR
16225ae08040Sschwarzemacro lacks its second, section number argument.
1623f6697133SschwarzeThe first argument, i.e. the name, is printed, but without a section number.
1624f6697133SschwarzeIn the case of
1625f6697133Sschwarze.Ic \&Xr ,
1626f6697133Sschwarzethe parentheses are also omitted.
16275a3d06daSschwarze.It Sy "missing -std argument, adding it"
16285a3d06daSschwarze.Pq mdoc
16295a3d06daSschwarzeAn
16305a3d06daSschwarze.Ic \&Ex
16315a3d06daSschwarzeor
16325a3d06daSschwarze.Ic \&Rv
16335a3d06daSschwarzemacro lacks the required
16345a3d06daSschwarze.Fl std
16355a3d06daSschwarzeargument.
16365a3d06daSschwarzeThe
16375a3d06daSschwarze.Nm
16385a3d06daSschwarzeutility assumes
16395a3d06daSschwarze.Fl std
16405a3d06daSschwarzeeven when it is not specified, but other implementations may not.
16415a3d06daSschwarze.It Sy "missing option string, using \(dq\(dq"
16425a3d06daSschwarze.Pq man
16435a3d06daSschwarzeThe
16445a3d06daSschwarze.Ic \&OP
16455a3d06daSschwarzemacro is invoked without any argument.
16465a3d06daSschwarzeAn empty pair of square brackets is shown.
16475a3d06daSschwarze.It Sy "missing resource identifier, using \(dq\(dq"
16485a3d06daSschwarze.Pq man
16495a3d06daSschwarzeThe
1650df9a9479Sbentley.Ic \&MT
1651df9a9479Sbentleyor
16525a3d06daSschwarze.Ic \&UR
16535a3d06daSschwarzemacro is invoked without any argument.
16545a3d06daSschwarzeAn empty pair of angle brackets is shown.
16555a3d06daSschwarze.It Sy "missing eqn box, using \(dq\(dq"
16565a3d06daSschwarze.Pq eqn
16575a3d06daSschwarzeA diacritic mark or a binary operator is found,
16585a3d06daSschwarzebut there is nothing to the left of it.
16595a3d06daSschwarzeAn empty box is inserted.
16605a3d06daSschwarze.El
16615a3d06daSschwarze.Ss "Warnings related to bad macro arguments"
16625a3d06daSschwarze.Bl -ohang
16635a3d06daSschwarze.It Sy "duplicate argument"
16645a3d06daSschwarze.Pq mdoc
16655a3d06daSschwarzeA
16665a3d06daSschwarze.Ic \&Bd
16675a3d06daSschwarzeor
16685a3d06daSschwarze.Ic \&Bl
16695a3d06daSschwarzemacro has more than one
16705a3d06daSschwarze.Fl compact ,
16715a3d06daSschwarzemore than one
16725a3d06daSschwarze.Fl offset ,
16735a3d06daSschwarzeor more than one
16745a3d06daSschwarze.Fl width
16755a3d06daSschwarzeargument.
16765a3d06daSschwarzeAll but the last instances of these arguments are ignored.
16775a3d06daSschwarze.It Sy "skipping duplicate argument"
16785a3d06daSschwarze.Pq mdoc
16795a3d06daSschwarzeAn
16805a3d06daSschwarze.Ic \&An
16815a3d06daSschwarzemacro has more than one
16825a3d06daSschwarze.Fl split
16835a3d06daSschwarzeor
16845a3d06daSschwarze.Fl nosplit
16855a3d06daSschwarzeargument.
16865a3d06daSschwarzeAll but the first of these arguments are ignored.
16875a3d06daSschwarze.It Sy "skipping duplicate display type"
16885a3d06daSschwarze.Pq mdoc
16895a3d06daSschwarzeA
16905a3d06daSschwarze.Ic \&Bd
16915a3d06daSschwarzemacro has more than one type argument; the first one is used.
16925a3d06daSschwarze.It Sy "skipping duplicate list type"
16935a3d06daSschwarze.Pq mdoc
16945a3d06daSschwarzeA
16955a3d06daSschwarze.Ic \&Bl
16965a3d06daSschwarzemacro has more than one type argument; the first one is used.
16975a3d06daSschwarze.It Sy "skipping -width argument"
16985a3d06daSschwarze.Pq mdoc
16995a3d06daSschwarzeA
17005a3d06daSschwarze.Ic \&Bl
17015a3d06daSschwarze.Fl column ,
17025a3d06daSschwarze.Fl diag ,
17035a3d06daSschwarze.Fl ohang ,
17045a3d06daSschwarze.Fl inset ,
17055a3d06daSschwarzeor
17065a3d06daSschwarze.Fl item
17075a3d06daSschwarzelist has a
17085a3d06daSschwarze.Fl width
17095a3d06daSschwarzeargument.
17105a3d06daSschwarzeThat has no effect.
17115a3d06daSschwarze.It Sy "wrong number of cells"
17125a3d06daSschwarzeIn a line of a
17135a3d06daSschwarze.Ic \&Bl Fl column
17145a3d06daSschwarzelist, the number of tabs or
17155a3d06daSschwarze.Ic \&Ta
17165a3d06daSschwarzemacros is less than the number expected from the list header line
17175a3d06daSschwarzeor exceeds the expected number by more than one.
17185a3d06daSschwarzeMissing cells remain empty, and all cells exceeding the number of
17195a3d06daSschwarzecolumns are joined into one single cell.
17205a3d06daSschwarze.It Sy "unknown AT&T UNIX version"
17215a3d06daSschwarze.Pq mdoc
17225a3d06daSschwarzeAn
17235a3d06daSschwarze.Ic \&At
17245a3d06daSschwarzemacro has an invalid argument.
17255a3d06daSschwarzeIt is used verbatim, with
17265a3d06daSschwarze.Qq "AT&T UNIX "
17275a3d06daSschwarzeprefixed to it.
17285a3d06daSschwarze.It Sy "comma in function argument"
17295a3d06daSschwarze.Pq mdoc
17305a3d06daSschwarzeAn argument of an
17315a3d06daSschwarze.Ic \&Fa
17325a3d06daSschwarzeor
17335a3d06daSschwarze.Ic \&Fn
17345a3d06daSschwarzemacro contains a comma; it should probably be split into two arguments.
17355a3d06daSschwarze.It Sy "parenthesis in function name"
17365a3d06daSschwarze.Pq mdoc
17375a3d06daSschwarzeThe first argument of an
17385a3d06daSschwarze.Ic \&Fc
17395a3d06daSschwarzeor
17405a3d06daSschwarze.Ic \&Fn
17415a3d06daSschwarzemacro contains an opening or closing parenthesis; that's probably wrong,
17425a3d06daSschwarzeparentheses are added automatically.
1743608c4838Sschwarze.It Sy "unknown library name"
1744608c4838Sschwarze.Pq mdoc, not on Ox
1745608c4838SschwarzeAn
1746608c4838Sschwarze.Ic \&Lb
1747608c4838Sschwarzemacro has an unknown name argument and will be rendered as
1748608c4838Sschwarze.Qq library Dq Ar name .
17495a3d06daSschwarze.It Sy "invalid content in Rs block"
17505a3d06daSschwarze.Pq mdoc
17515a3d06daSschwarzeAn
17525a3d06daSschwarze.Ic \&Rs
17535a3d06daSschwarzeblock contains plain text or non-% macros.
17545a3d06daSschwarzeThe bogus content is left in the syntax tree.
17555a3d06daSschwarzeFormatting may be poor.
17565a3d06daSschwarze.It Sy "invalid Boolean argument"
17575a3d06daSschwarze.Pq mdoc
17585a3d06daSschwarzeAn
17595a3d06daSschwarze.Ic \&Sm
17605a3d06daSschwarzemacro has an argument other than
17615a3d06daSschwarze.Cm on
17625a3d06daSschwarzeor
17635a3d06daSschwarze.Cm off .
17645a3d06daSschwarzeThe invalid argument is moved out of the macro, which leaves the macro
17655a3d06daSschwarzeempty, causing it to toggle the spacing mode.
176629fcab3eSschwarze.It Sy "argument contains two font escapes"
176729fcab3eSschwarze.Pq roff
176829fcab3eSschwarzeThe second argument of a
176929fcab3eSschwarze.Ic char
177029fcab3eSschwarzerequest contains more than one font escape sequence.
177129fcab3eSschwarzeA wrong font may remain active after using the character.
17725a3d06daSschwarze.It Sy "unknown font, skipping request"
17735a3d06daSschwarze.Pq man , tbl
17745a3d06daSschwarzeA
17755a3d06daSschwarze.Xr roff 7
17765a3d06daSschwarze.Ic \&ft
17775a3d06daSschwarzerequest or a
17785a3d06daSschwarze.Xr tbl 7
17795a3d06daSschwarze.Ic \&f
17805a3d06daSschwarzelayout modifier has an unknown
17815a3d06daSschwarze.Ar font
17825a3d06daSschwarzeargument.
1783edb0312fSschwarze.It Sy "ignoring distance argument"
1784edb0312fSschwarze.Pq roff
1785edb0312fSschwarzeIn addition to the margin character, an
1786edb0312fSschwarze.Ic \&mc
1787edb0312fSschwarzerequest has a second argument supposed to represent a distance, but the
1788edb0312fSschwarze.Nm
1789edb0312fSschwarzeimplementation of
1790edb0312fSschwarze.Ic \&mc
1791edb0312fSschwarzealways ignores the second argument.
17925a3d06daSschwarze.It Sy "odd number of characters in request"
17935a3d06daSschwarze.Pq roff
17945a3d06daSschwarzeA
17955a3d06daSschwarze.Ic \&tr
17965a3d06daSschwarzerequest contains an odd number of characters.
17975a3d06daSschwarzeThe last character is mapped to the blank character.
17985a3d06daSschwarze.El
17995a3d06daSschwarze.Ss "Warnings related to plain text"
18005a3d06daSschwarze.Bl -ohang
18015a3d06daSschwarze.It Sy "blank line in fill mode, using .sp"
18025a3d06daSschwarze.Pq mdoc
18035a3d06daSschwarzeThe meaning of blank input lines is only well-defined in non-fill mode:
18045a3d06daSschwarzeIn fill mode, line breaks of text input lines are not supposed to be
18055a3d06daSschwarzesignificant.
18065a3d06daSschwarzeHowever, for compatibility with groff, blank lines in fill mode
1807c5bcf560Sschwarzeare formatted like
18085a3d06daSschwarze.Ic \&sp
18095a3d06daSschwarzerequests.
1810c5bcf560SschwarzeTo request a paragraph break, use
1811c5bcf560Sschwarze.Ic \&Pp
1812c5bcf560Sschwarzeinstead of a blank line.
18135a3d06daSschwarze.It Sy "tab in filled text"
18145a3d06daSschwarze.Pq mdoc , man
18155a3d06daSschwarzeThe meaning of tab characters is only well-defined in non-fill mode:
18165a3d06daSschwarzeIn fill mode, whitespace is not supposed to be significant
18175a3d06daSschwarzeon text input lines.
18185a3d06daSschwarzeAs an implementation dependent choice, tab characters on text lines
18195a3d06daSschwarzeare passed through to the formatters in any case.
18205a3d06daSschwarzeGiven that the text before the tab character will be filled,
18215a3d06daSschwarzeit is hard to predict which tab stop position the tab will advance to.
1822df457681Sschwarze.It Sy "new sentence, new line"
1823df457681Sschwarze.Pq mdoc
1824df457681SschwarzeA new sentence starts in the middle of a text line.
1825df457681SschwarzeStart it on a new input line to help formatters produce correct spacing.
182639be06a3Sschwarze.It Sy "invalid escape sequence argument"
18275a3d06daSschwarze.Pq roff
182839be06a3SschwarzeThe argument of an escape sequence is of an invalid form.
1829f8e3b479SschwarzeInvalid escape sequences are ignored.
18306f6722cbSschwarze.It Sy "undefined escape, printing literally"
18316f6722cbSschwarze.Pq roff
18326f6722cbSschwarzeIn an escape sequence, the first character
18336f6722cbSschwarzeright after the leading backslash is invalid.
18346f6722cbSschwarzeThat character is printed literally,
18356f6722cbSschwarzewhich is equivalent to ignoring the backslash.
18365a3d06daSschwarze.It Sy "undefined string, using \(dq\(dq"
18375a3d06daSschwarze.Pq roff
18385a3d06daSschwarzeIf a string is used without being defined before,
18395a3d06daSschwarzeits value is implicitly set to the empty string.
18405a3d06daSschwarzeHowever, defining strings explicitly before use
18415a3d06daSschwarzekeeps the code more readable.
18425a3d06daSschwarze.El
18435a3d06daSschwarze.Ss "Warnings related to tables"
18445a3d06daSschwarze.Bl -ohang
18455a3d06daSschwarze.It Sy "tbl line starts with span"
18465a3d06daSschwarze.Pq tbl
18475a3d06daSschwarzeThe first cell in a table layout line is a horizontal span
18485a3d06daSschwarze.Pq Sq Cm s .
18495a3d06daSschwarzeData provided for this cell is ignored, and nothing is printed in the cell.
18505a3d06daSschwarze.It Sy "tbl column starts with span"
18515a3d06daSschwarze.Pq tbl
18525a3d06daSschwarzeThe first line of a table layout specification
18535a3d06daSschwarzerequests a vertical span
18545a3d06daSschwarze.Pq Sq Cm ^ .
18555a3d06daSschwarzeData provided for this cell is ignored, and nothing is printed in the cell.
18565a3d06daSschwarze.It Sy "skipping vertical bar in tbl layout"
18575a3d06daSschwarze.Pq tbl
18585a3d06daSschwarzeA table layout specification contains more than two consecutive vertical bars.
18595a3d06daSschwarzeA double bar is printed, all additional bars are discarded.
18605a3d06daSschwarze.El
18615a3d06daSschwarze.Ss "Errors related to tables"
18625a3d06daSschwarze.Bl -ohang
18635a3d06daSschwarze.It Sy "non-alphabetic character in tbl options"
18645a3d06daSschwarze.Pq tbl
18655a3d06daSschwarzeThe table options line contains a character other than a letter,
18665a3d06daSschwarzeblank, or comma where the beginning of an option name is expected.
18675a3d06daSschwarzeThe character is ignored.
18685a3d06daSschwarze.It Sy "skipping unknown tbl option"
18695a3d06daSschwarze.Pq tbl
18705a3d06daSschwarzeThe table options line contains a string of letters that does not
18715a3d06daSschwarzematch any known option name.
18725a3d06daSschwarzeThe word is ignored.
18735a3d06daSschwarze.It Sy "missing tbl option argument"
18745a3d06daSschwarze.Pq tbl
18755a3d06daSschwarzeA table option that requires an argument is not followed by an
18765a3d06daSschwarzeopening parenthesis, or the opening parenthesis is immediately
18775a3d06daSschwarzefollowed by a closing parenthesis.
18785a3d06daSschwarzeThe option is ignored.
18795a3d06daSschwarze.It Sy "wrong tbl option argument size"
18805a3d06daSschwarze.Pq tbl
18815a3d06daSschwarzeA table option argument contains an invalid number of characters.
18825a3d06daSschwarzeBoth the option and the argument are ignored.
18835a3d06daSschwarze.It Sy "empty tbl layout"
18845a3d06daSschwarze.Pq tbl
18855a3d06daSschwarzeA table layout specification is completely empty,
18865a3d06daSschwarzespecifying zero lines and zero columns.
18875a3d06daSschwarzeAs a fallback, a single left-justified column is used.
18885a3d06daSschwarze.It Sy "invalid character in tbl layout"
18895a3d06daSschwarze.Pq tbl
18905a3d06daSschwarzeA table layout specification contains a character that can neither
18915a3d06daSschwarzebe interpreted as a layout key character nor as a layout modifier,
18925a3d06daSschwarzeor a modifier precedes the first key.
18935a3d06daSschwarzeThe invalid character is discarded.
18945a3d06daSschwarze.It Sy "unmatched parenthesis in tbl layout"
18955a3d06daSschwarze.Pq tbl
18965a3d06daSschwarzeA table layout specification contains an opening parenthesis,
18975a3d06daSschwarzebut no matching closing parenthesis.
18985a3d06daSschwarzeThe rest of the input line, starting from the parenthesis, has no effect.
189960395358Sschwarze.It Sy "ignoring invalid column width in tbl layout"
190060395358Sschwarze.Pq tbl
190160395358SschwarzeA column width specifier in a table layout is empty, zero, or not a valid
190260395358Sschwarzenumerical expression.
190360395358SschwarzeThe width specifier is ignored and the column is made wide enough
1904*7df84992Sschwarzeto accommodate all its data cells.
1905c107dca7Sschwarze.It Sy "ignoring excessive spacing in tbl layout"
1906c107dca7Sschwarze.Pq tbl
1907c107dca7SschwarzeA spacing modifier in a table layout is unreasonably large.
1908c107dca7SschwarzeThe default spacing of 3n is used instead.
19095a3d06daSschwarze.It Sy "tbl without any data cells"
19105a3d06daSschwarze.Pq tbl
19115a3d06daSschwarzeA table does not contain any data cells.
19125a3d06daSschwarzeIt will probably produce no output.
19135a3d06daSschwarze.It Sy "ignoring data in spanned tbl cell"
19145a3d06daSschwarze.Pq tbl
19155a3d06daSschwarzeA table cell is marked as a horizontal span
19165a3d06daSschwarze.Pq Sq Cm s
19175a3d06daSschwarzeor vertical span
19185a3d06daSschwarze.Pq Sq Cm ^
19195a3d06daSschwarzein the table layout, but it contains data.
19205a3d06daSschwarzeThe data is ignored.
19215a3d06daSschwarze.It Sy "ignoring extra tbl data cells"
19225a3d06daSschwarze.Pq tbl
19235a3d06daSschwarzeA data line contains more cells than the corresponding layout line.
19245a3d06daSschwarzeThe data in the extra cells is ignored.
19255a3d06daSschwarze.It Sy "data block open at end of tbl"
19265a3d06daSschwarze.Pq tbl
19275a3d06daSschwarzeA data block is opened with
19285a3d06daSschwarze.Cm T{ ,
19295a3d06daSschwarzebut never closed with a matching
19305a3d06daSschwarze.Cm T} .
19315a3d06daSschwarzeThe remaining data lines of the table are all put into one cell,
19325a3d06daSschwarzeand any remaining cells stay empty.
19335a3d06daSschwarze.El
19345a3d06daSschwarze.Ss "Errors related to roff, mdoc, and man code"
19355a3d06daSschwarze.Bl -ohang
1936aa4e49ccSschwarze.It Sy "duplicate prologue macro"
1937aa4e49ccSschwarze.Pq mdoc
1938aa4e49ccSschwarzeOne of the prologue macros occurs more than once.
1939aa4e49ccSschwarzeThe last instance overrides all previous ones.
1940aa4e49ccSschwarze.It Sy "skipping late title macro"
1941aa4e49ccSschwarze.Pq mdoc
1942aa4e49ccSschwarzeThe
1943aa4e49ccSschwarze.Ic \&Dt
1944aa4e49ccSschwarzemacro appears after the first non-prologue macro.
1945aa4e49ccSschwarzeTraditional formatters cannot handle this because
1946aa4e49ccSschwarzethey write the page header before parsing the document body.
1947aa4e49ccSschwarzeEven though this technical restriction does not apply to
1948aa4e49ccSschwarze.Nm ,
1949aa4e49ccSschwarzetraditional semantics is preserved.
1950aa4e49ccSschwarzeThe late macro is discarded including its arguments.
19515a3d06daSschwarze.It Sy "input stack limit exceeded, infinite loop?"
19525a3d06daSschwarze.Pq roff
19535a3d06daSschwarzeExplicit recursion limits are implemented for the following features,
19545a3d06daSschwarzein order to prevent infinite loops:
19555a3d06daSschwarze.Bl -dash -compact
19565a3d06daSschwarze.It
19575a3d06daSschwarzeexpansion of nested escape sequences
19585a3d06daSschwarzeincluding expansion of strings and number registers,
19595a3d06daSschwarze.It
19605a3d06daSschwarzeexpansion of nested user-defined macros,
19615a3d06daSschwarze.It
19625a3d06daSschwarzeand
19635a3d06daSschwarze.Ic \&so
19645a3d06daSschwarzefile inclusion.
19655a3d06daSschwarze.El
19665a3d06daSschwarzeWhen a limit is hit, the output is incorrect, typically losing
19675a3d06daSschwarzesome content, but the parser can continue.
19685a3d06daSschwarze.It Sy "skipping bad character"
19695a3d06daSschwarze.Pq mdoc , man , roff
19705a3d06daSschwarzeThe input file contains a byte that is not a printable
19715a3d06daSschwarze.Xr ascii 7
19725a3d06daSschwarzecharacter.
19735a3d06daSschwarzeThe message mentions the character number.
19745a3d06daSschwarzeThe offending byte is replaced with a question mark
19755a3d06daSschwarze.Pq Sq \&? .
19765a3d06daSschwarzeConsider editing the input file to replace the byte with an ASCII
19775a3d06daSschwarzetransliteration of the intended character.
19785a3d06daSschwarze.It Sy "skipping unknown macro"
19795a3d06daSschwarze.Pq mdoc , man , roff
19805a3d06daSschwarzeThe first identifier on a request or macro line is neither recognized as a
19815a3d06daSschwarze.Xr roff 7
19825a3d06daSschwarzerequest, nor as a user-defined macro, nor, respectively, as an
19835a3d06daSschwarze.Xr mdoc 7
19845a3d06daSschwarzeor
19855a3d06daSschwarze.Xr man 7
19865a3d06daSschwarzemacro.
19875a3d06daSschwarzeIt may be mistyped or unsupported.
19885a3d06daSschwarzeThe request or macro is discarded including its arguments.
19893dc5225dSschwarze.It Sy "skipping request outside macro"
19903dc5225dSschwarze.Pq roff
19913dc5225dSschwarzeA
19923dc5225dSschwarze.Ic shift
19933dc5225dSschwarzeor
19943dc5225dSschwarze.Ic return
19953dc5225dSschwarzerequest occurs outside any macro definition and has no effect.
19965a3d06daSschwarze.It Sy "skipping insecure request"
19975a3d06daSschwarze.Pq roff
19985a3d06daSschwarzeAn input file attempted to run a shell command
19995a3d06daSschwarzeor to read or write an external file.
20005a3d06daSschwarzeSuch attempts are denied for security reasons.
20015a3d06daSschwarze.It Sy "skipping item outside list"
20025a3d06daSschwarze.Pq mdoc , eqn
20035a3d06daSschwarzeAn
20045a3d06daSschwarze.Ic \&It
20055a3d06daSschwarzemacro occurs outside any
20065a3d06daSschwarze.Ic \&Bl
20075a3d06daSschwarzelist, or an
20085a3d06daSschwarze.Xr eqn 7
20095a3d06daSschwarze.Ic above
20105a3d06daSschwarzedelimiter occurs outside any pile.
20115a3d06daSschwarzeIt is discarded including its arguments.
20125a3d06daSschwarze.It Sy "skipping column outside column list"
20135a3d06daSschwarze.Pq mdoc
20145a3d06daSschwarzeA
20155a3d06daSschwarze.Ic \&Ta
20165a3d06daSschwarzemacro occurs outside any
20175a3d06daSschwarze.Ic \&Bl Fl column
20185a3d06daSschwarzeblock.
20195a3d06daSschwarzeIt is discarded including its arguments.
20205a3d06daSschwarze.It Sy "skipping end of block that is not open"
20215a3d06daSschwarze.Pq mdoc , man , eqn , tbl , roff
20225a3d06daSschwarzeVarious syntax elements can only be used to explicitly close blocks
20235a3d06daSschwarzethat have previously been opened.
20245a3d06daSschwarzeAn
20255a3d06daSschwarze.Xr mdoc 7
20265a3d06daSschwarzeblock closing macro, a
20275a3d06daSschwarze.Xr man 7
2028df9a9479Sbentley.Ic \&ME , \&RE
20295a3d06daSschwarzeor
20305a3d06daSschwarze.Ic \&UE
20315a3d06daSschwarzemacro, an
20325a3d06daSschwarze.Xr eqn 7
20335a3d06daSschwarzeright delimiter or closing brace, or the end of an equation, table, or
20345a3d06daSschwarze.Xr roff 7
20355a3d06daSschwarzeconditional request is encountered but no matching block is open.
20365a3d06daSschwarzeThe offending request or macro is discarded.
20375a3d06daSschwarze.It Sy "fewer RS blocks open, skipping"
20385a3d06daSschwarze.Pq man
20395a3d06daSschwarzeThe
20405a3d06daSschwarze.Ic \&RE
20415a3d06daSschwarzemacro is invoked with an argument, but less than the specified number of
20425a3d06daSschwarze.Ic \&RS
20435a3d06daSschwarzeblocks is open.
20445a3d06daSschwarzeThe
20455a3d06daSschwarze.Ic \&RE
20465a3d06daSschwarzemacro is discarded.
20475a3d06daSschwarze.It Sy "inserting missing end of block"
20485a3d06daSschwarze.Pq mdoc , tbl
20495a3d06daSschwarzeVarious
20505a3d06daSschwarze.Xr mdoc 7
20515a3d06daSschwarzemacros as well as tables require explicit closing by dedicated macros.
20525a3d06daSschwarzeA block that doesn't support bad nesting
20535a3d06daSschwarzeends before all of its children are properly closed.
20545a3d06daSschwarzeThe open child nodes are closed implicitly.
20555a3d06daSschwarze.It Sy "appending missing end of block"
20565a3d06daSschwarze.Pq mdoc , man , eqn , tbl , roff
20575a3d06daSschwarzeAt the end of the document, an explicit
20585a3d06daSschwarze.Xr mdoc 7
20595a3d06daSschwarzeblock, a
20605a3d06daSschwarze.Xr man 7
20615a3d06daSschwarzenext-line scope or
2062df9a9479Sbentley.Ic \&MT , \&RS
20635a3d06daSschwarzeor
20645a3d06daSschwarze.Ic \&UR
20655a3d06daSschwarzeblock, an equation, table, or
20665a3d06daSschwarze.Xr roff 7
20675a3d06daSschwarzeconditional or ignore block is still open.
20685a3d06daSschwarzeThe open block is closed implicitly.
20695a3d06daSschwarze.It Sy "escaped character not allowed in a name"
20705a3d06daSschwarze.Pq roff
20715a3d06daSschwarzeMacro, string and register identifiers consist of printable,
20725a3d06daSschwarzenon-whitespace ASCII characters.
20735a3d06daSschwarzeEscape sequences and characters and strings expressed in terms of them
20745a3d06daSschwarzecannot form part of a name.
20755a3d06daSschwarzeThe first argument of an
20765a3d06daSschwarze.Ic \&am ,
20775a3d06daSschwarze.Ic \&as ,
20785a3d06daSschwarze.Ic \&de ,
20795a3d06daSschwarze.Ic \&ds ,
20805a3d06daSschwarze.Ic \&nr ,
20815a3d06daSschwarzeor
20825a3d06daSschwarze.Ic \&rr
20835a3d06daSschwarzerequest, or any argument of an
20845a3d06daSschwarze.Ic \&rm
20855a3d06daSschwarzerequest, or the name of a request or user defined macro being called,
20865a3d06daSschwarzeis terminated by an escape sequence.
20875a3d06daSschwarzeIn the cases of
20885a3d06daSschwarze.Ic \&as ,
20895a3d06daSschwarze.Ic \&ds ,
20905a3d06daSschwarzeand
20915a3d06daSschwarze.Ic \&nr ,
20925a3d06daSschwarzethe request has no effect at all.
20935a3d06daSschwarzeIn the cases of
20945a3d06daSschwarze.Ic \&am ,
20955a3d06daSschwarze.Ic \&de ,
20965a3d06daSschwarze.Ic \&rr ,
20975a3d06daSschwarzeand
20985a3d06daSschwarze.Ic \&rm ,
20995a3d06daSschwarzewhat was parsed up to this point is used as the arguments to the request,
21005a3d06daSschwarzeand the rest of the input line is discarded including the escape sequence.
21015a3d06daSschwarzeWhen parsing for a request or a user-defined macro name to be called,
21025a3d06daSschwarzeonly the escape sequence is discarded.
21035a3d06daSschwarzeThe characters preceding it are used as the request or macro name,
21045a3d06daSschwarzethe characters following it are used as the arguments to the request or macro.
21053dc5225dSschwarze.It Sy "using macro argument outside macro"
21063dc5225dSschwarze.Pq roff
21073dc5225dSschwarzeThe escape sequence \e$ occurs outside any macro definition
21083dc5225dSschwarzeand expands to the empty string.
21093dc5225dSschwarze.It Sy "argument number is not numeric"
21103dc5225dSschwarze.Pq roff
21113dc5225dSschwarzeThe argument of the escape sequence \e$ is not a digit;
21123dc5225dSschwarzethe escape sequence expands to the empty string.
2113c1a68d52Sschwarze.It Sy "negative argument, using 0"
2114c1a68d52Sschwarze.Pq roff
2115c1a68d52SschwarzeA
2116c1a68d52Sschwarze.Ic \&shift
2117c1a68d52Sschwarzerequest has a negative argument
2118c1a68d52Sschwarzeor an argument that is negative due to integer overflow.
2119c1a68d52SschwarzeMacro argument numbering remains unchanged.
21205a3d06daSschwarze.It Sy "NOT IMPLEMENTED: Bd -file"
21215a3d06daSschwarze.Pq mdoc
21225a3d06daSschwarzeFor security reasons, the
21235a3d06daSschwarze.Ic \&Bd
21245a3d06daSschwarzemacro does not support the
21255a3d06daSschwarze.Fl file
21265a3d06daSschwarzeargument.
21275a3d06daSschwarzeBy requesting the inclusion of a sensitive file, a malicious document
21285a3d06daSschwarzemight otherwise trick a privileged user into inadvertently displaying
21295a3d06daSschwarzethe file on the screen, revealing the file content to bystanders.
21305a3d06daSschwarzeThe argument is ignored including the file name following it.
2131a43e24e2Sschwarze.It Sy "skipping display without arguments"
2132a43e24e2Sschwarze.Pq mdoc
2133a43e24e2SschwarzeA
2134a43e24e2Sschwarze.Ic \&Bd
2135a43e24e2Sschwarzeblock macro does not have any arguments.
2136a43e24e2SschwarzeThe block is discarded, and the block content is displayed in
2137a43e24e2Sschwarzewhatever mode was active before the block.
21385a3d06daSschwarze.It Sy "missing list type, using -item"
21395a3d06daSschwarze.Pq mdoc
21405a3d06daSschwarzeA
21415a3d06daSschwarze.Ic \&Bl
21425a3d06daSschwarzemacro fails to specify the list type.
2143e13b4195Sschwarze.It Sy "argument is not numeric, using 1"
2144e13b4195Sschwarze.Pq roff
2145e13b4195SschwarzeThe argument of a
2146e13b4195Sschwarze.Ic \&ce
2147e13b4195Sschwarzerequest is not a number.
214829fcab3eSschwarze.It Sy "argument is not a character"
214929fcab3eSschwarze.Pq roff
215029fcab3eSschwarzeThe first argument of a
215129fcab3eSschwarze.Ic char
215229fcab3eSschwarzerequest is neither a single ASCII character
215329fcab3eSschwarzenor a single character escape sequence.
215429fcab3eSschwarzeThe request is ignored including all its arguments.
2155edb0312fSschwarze.It Sy "skipping unusable escape sequence"
2156edb0312fSschwarze.Pq roff
2157edb0312fSschwarzeThe first argument of an
2158edb0312fSschwarze.Ic mc
2159edb0312fSschwarzerequest is neither a single ASCII character
2160edb0312fSschwarzenor a single character escape sequence.
2161edb0312fSschwarzeAll arguments are ignored and printing of a margin character is disabled.
21625a3d06daSschwarze.It Sy "missing manual name, using \(dq\(dq"
2163f6697133Sschwarze.Pq mdoc , man
21645a3d06daSschwarzeThe first call to
2165f27faaccSschwarze.Ic \&Nm ,
2166f6697133Sschwarzeor any call in the NAME section, lacks the required argument, or
2167f6697133Sschwarze.Ic \&MR
2168f6697133Sschwarzeis called without any argument.
21695a3d06daSschwarze.It Sy "uname(3) system call failed, using UNKNOWN"
21705a3d06daSschwarze.Pq mdoc
21715a3d06daSschwarzeThe
21725a3d06daSschwarze.Ic \&Os
21735a3d06daSschwarzemacro is called without arguments, and the
21745a3d06daSschwarze.Xr uname 3
21755a3d06daSschwarzesystem call failed.
21765a3d06daSschwarzeAs a workaround,
21775a3d06daSschwarze.Nm
21785a3d06daSschwarzecan be compiled with
21795a3d06daSschwarze.Sm off
21805a3d06daSschwarze.Fl D Cm OSNAME=\(dq\e\(dq Ar string Cm \e\(dq\(dq .
21815a3d06daSschwarze.Sm on
21825a3d06daSschwarze.It Sy "unknown standard specifier"
21835a3d06daSschwarze.Pq mdoc
21845a3d06daSschwarzeAn
21855a3d06daSschwarze.Ic \&St
21865a3d06daSschwarzemacro has an unknown argument and is discarded.
21875a3d06daSschwarze.It Sy "skipping request without numeric argument"
21885a3d06daSschwarze.Pq roff , eqn
21895a3d06daSschwarzeAn
21905a3d06daSschwarze.Ic \&it
21915a3d06daSschwarzerequest or an
21925a3d06daSschwarze.Xr eqn 7
21935a3d06daSschwarze.Ic \&size
21945a3d06daSschwarzeor
21955a3d06daSschwarze.Ic \&gsize
21965a3d06daSschwarzestatement has a non-numeric or negative argument or no argument at all.
21975a3d06daSschwarzeThe invalid request or statement is ignored.
21983dc5225dSschwarze.It Sy "excessive shift"
21993dc5225dSschwarze.Pq roff
22003dc5225dSschwarzeThe argument of a
22013dc5225dSschwarze.Ic shift
22023dc5225dSschwarzerequest is larger than the number of arguments of the macro that is
22033dc5225dSschwarzecurrently being executed.
22043dc5225dSschwarzeAll macro arguments are deleted and \en(.$ is set to zero.
22055a3d06daSschwarze.It Sy "NOT IMPLEMENTED: .so with absolute path or \(dq..\(dq"
22065a3d06daSschwarze.Pq roff
22075a3d06daSschwarzeFor security reasons,
22085a3d06daSschwarze.Nm
22095a3d06daSschwarzeallows
22105a3d06daSschwarze.Ic \&so
22115a3d06daSschwarzefile inclusion requests only with relative paths
22125a3d06daSschwarzeand only without ascending to any parent directory.
22135a3d06daSschwarzeBy requesting the inclusion of a sensitive file, a malicious document
22145a3d06daSschwarzemight otherwise trick a privileged user into inadvertently displaying
22155a3d06daSschwarzethe file on the screen, revealing the file content to bystanders.
22165a3d06daSschwarze.Nm
22175a3d06daSschwarzeonly shows the path as it appears behind
22185a3d06daSschwarze.Ic \&so .
22195a3d06daSschwarze.It Sy ".so request failed"
22205a3d06daSschwarze.Pq roff
22215a3d06daSschwarzeServicing a
22225a3d06daSschwarze.Ic \&so
22235a3d06daSschwarzerequest requires reading an external file, but the file could not be
22245a3d06daSschwarzeopened.
22255a3d06daSschwarze.Nm
22265a3d06daSschwarzeonly shows the path as it appears behind
22275a3d06daSschwarze.Ic \&so .
22285a3d06daSschwarze.It Sy "skipping all arguments"
22295a3d06daSschwarze.Pq mdoc , man , eqn , roff
22305a3d06daSschwarzeAn
22315a3d06daSschwarze.Xr mdoc 7
22325a3d06daSschwarze.Ic \&Bt ,
22335a3d06daSschwarze.Ic \&Ed ,
22345a3d06daSschwarze.Ic \&Ef ,
22355a3d06daSschwarze.Ic \&Ek ,
22365a3d06daSschwarze.Ic \&El ,
22375a3d06daSschwarze.Ic \&Lp ,
22385a3d06daSschwarze.Ic \&Pp ,
22395a3d06daSschwarze.Ic \&Re ,
22405a3d06daSschwarze.Ic \&Rs ,
22415a3d06daSschwarzeor
22425a3d06daSschwarze.Ic \&Ud
22435a3d06daSschwarzemacro, an
22445a3d06daSschwarze.Ic \&It
22455a3d06daSschwarzemacro in a list that don't support item heads, a
22465a3d06daSschwarze.Xr man 7
22475a3d06daSschwarze.Ic \&LP ,
22485a3d06daSschwarze.Ic \&P ,
22495a3d06daSschwarzeor
22505a3d06daSschwarze.Ic \&PP
22515a3d06daSschwarzemacro, an
22525a3d06daSschwarze.Xr eqn 7
22535a3d06daSschwarze.Ic \&EQ
22545a3d06daSschwarzeor
22555a3d06daSschwarze.Ic \&EN
22565a3d06daSschwarzemacro, or a
22575a3d06daSschwarze.Xr roff 7
22585a3d06daSschwarze.Ic \&br ,
22595a3d06daSschwarze.Ic \&fi ,
22605a3d06daSschwarzeor
22615a3d06daSschwarze.Ic \&nf
22625a3d06daSschwarzerequest or
22635a3d06daSschwarze.Sq \&..
22645a3d06daSschwarzeblock closing request is invoked with at least one argument.
22655a3d06daSschwarzeAll arguments are ignored.
22665a3d06daSschwarze.It Sy "skipping excess arguments"
22675a3d06daSschwarze.Pq mdoc , man , roff
22685a3d06daSschwarzeA macro or request is invoked with too many arguments:
22695a3d06daSschwarze.Bl -dash -offset 2n -width 2n -compact
22705a3d06daSschwarze.It
22715a3d06daSschwarze.Ic \&Fo ,
2272df9a9479Sbentley.Ic \&MT ,
22735a3d06daSschwarze.Ic \&PD ,
22745a3d06daSschwarze.Ic \&RS ,
22755a3d06daSschwarze.Ic \&UR ,
22765a3d06daSschwarze.Ic \&ft ,
22775a3d06daSschwarzeor
22785a3d06daSschwarze.Ic \&sp
22795a3d06daSschwarzewith more than one argument
22805a3d06daSschwarze.It
22815a3d06daSschwarze.Ic \&An
22825a3d06daSschwarzewith another argument after
22835a3d06daSschwarze.Fl split
22845a3d06daSschwarzeor
22855a3d06daSschwarze.Fl nosplit
22865a3d06daSschwarze.It
22875a3d06daSschwarze.Ic \&RE
22885a3d06daSschwarzewith more than one argument or with a non-integer argument
22895a3d06daSschwarze.It
22905a3d06daSschwarze.Ic \&OP
22915a3d06daSschwarzeor a request of the
22925a3d06daSschwarze.Ic \&de
22935a3d06daSschwarzefamily with more than two arguments
22945a3d06daSschwarze.It
22959a928a59Sschwarze.Ic \&Dt
2296f6697133Sschwarzeor
2297f6697133Sschwarze.Ic \&MR
22989a928a59Sschwarzewith more than three arguments
22999a928a59Sschwarze.It
23005a3d06daSschwarze.Ic \&TH
23015a3d06daSschwarzewith more than five arguments
23025a3d06daSschwarze.It
23035a3d06daSschwarze.Ic \&Bd ,
23045a3d06daSschwarze.Ic \&Bk ,
23055a3d06daSschwarzeor
23065a3d06daSschwarze.Ic \&Bl
23075a3d06daSschwarzewith invalid arguments
23085a3d06daSschwarze.El
23095a3d06daSschwarzeThe excess arguments are ignored.
23105a3d06daSschwarze.El
2311f8e3b479Sschwarze.Ss "Errors related to escape sequences"
2312f8e3b479Sschwarze.Bl -ohang
2313f8e3b479Sschwarze.It Sy "incomplete escape sequence"
2314f8e3b479Sschwarze.Pq roff
2315f8e3b479SschwarzeThe end of the input line is encountered
2316f8e3b479Sschwarzewhile parsing the argument of an escape sequence.
2317f8e3b479SschwarzeIn this case,
2318f8e3b479Sschwarze.Ic \e*
2319f8e3b479Sschwarzeand
2320f8e3b479Sschwarze.Ic \en
2321f8e3b479Sschwarzeexpand to an empty string,
2322f8e3b479Sschwarze.Ic \eB
2323f8e3b479Sschwarzeto the digit
2324f8e3b479Sschwarze.Sq 0 ,
2325f8e3b479Sschwarzeand
2326f8e3b479Sschwarze.Ic \ew
2327f8e3b479Sschwarzeto the length of the incomplete argument.
2328f8e3b479SschwarzeAll other incomplete escape sequences are ignored.
2329f8e3b479Sschwarze.It Sy "invalid special character"
2330f8e3b479Sschwarze.Pq roff
2331f8e3b479SschwarzeA special character escape sequence is invalid,
2332f8e3b479Sschwarzefor example a Unicode sequence pointing to a surrogate
2333f8e3b479Sschwarzeor beyond the Unicode range, a \e[char...] escape sequence
2334f8e3b479Sschwarzerepresenting a control character or pointing beyond the
2335f8e3b479Sschwarze.Vt unsigned char
2336f8e3b479Sschwarzerange, or an invalid variable-length form
2337f8e3b479Sschwarzeof a single-byte character escape sequence, for example writing
2338f8e3b479Sschwarze.Qq \e[e]
2339f8e3b479Sschwarzeor
2340f8e3b479Sschwarze.Qq \e[~]
2341f8e3b479Sschwarzeinstead of
2342f8e3b479Sschwarze.Qq \ee
2343f8e3b479Sschwarzeor
2344f8e3b479Sschwarze.Qq \e~ ,
2345f8e3b479Sschwarzerespectively.
2346f8e3b479SschwarzeThe escape sequence is ignored.
2347f8e3b479Sschwarze.It Sy "unknown special character"
2348f8e3b479Sschwarze.Pq roff
2349f8e3b479SschwarzeThe name given in a special character escape sequence is not known to
2350f8e3b479Sschwarze.Nm .
2351f8e3b479SschwarzeThe escape sequence is ignored.
235239be06a3Sschwarze.It Sy "invalid escape argument delimiter"
235339be06a3Sschwarze.Pq roff
235439be06a3SschwarzeAn escape sequence that expects a numerical argument
235539be06a3Sschwarzeattempts to employ one of the characters
235639be06a3Sschwarze.Qq " %&()*+-./0123456789:<=>"
235739be06a3Sschwarzeas an argument delimiter.
235839be06a3SschwarzeThe escape sequence is ignored including the invalid opening delimiter
235939be06a3Sschwarzeand the rest of the argument may appear as output text.
236032a1818aSjsgWhile various characters can be used as argument delimiters,
236139be06a3Sschwarzeusing the apostrophe-quote character
236239be06a3Sschwarze.Pq Sq \(aq
236339be06a3Sschwarzeis recommended for readability and robustness.
2364f8e3b479Sschwarze.El
23655a3d06daSschwarze.Ss Unsupported features
23665a3d06daSschwarze.Bl -ohang
23675a3d06daSschwarze.It Sy "input too large"
23685a3d06daSschwarze.Pq mdoc , man
23695a3d06daSschwarzeCurrently,
23705a3d06daSschwarze.Nm
23715a3d06daSschwarzecannot handle input files larger than its arbitrary size limit
23725a3d06daSschwarzeof 2^31 bytes (2 Gigabytes).
23735a3d06daSschwarzeSince useful manuals are always small, this is not a problem in practice.
23745a3d06daSschwarzeParsing is aborted as soon as the condition is detected.
23755a3d06daSschwarze.It Sy "unsupported control character"
23765a3d06daSschwarze.Pq roff
23775a3d06daSschwarzeAn ASCII control character supported by other
23785a3d06daSschwarze.Xr roff 7
23795a3d06daSschwarzeimplementations but not by
23805a3d06daSschwarze.Nm
23815a3d06daSschwarzewas found in an input file.
23825a3d06daSschwarzeIt is replaced by a question mark.
23836f6722cbSschwarze.It Sy "unsupported escape sequence"
23846f6722cbSschwarze.Pq roff
23856f6722cbSschwarzeAn input file contains an escape sequence supported by GNU troff
23866f6722cbSschwarzeor Heirloom troff but not by
23876f6722cbSschwarze.Nm ,
23886f6722cbSschwarzeand it is likely that this will cause information loss
23896f6722cbSschwarzeor considerable misformatting.
23905a3d06daSschwarze.It Sy "unsupported roff request"
23915a3d06daSschwarze.Pq roff
23925a3d06daSschwarzeAn input file contains a
23935a3d06daSschwarze.Xr roff 7
23945a3d06daSschwarzerequest supported by GNU troff or Heirloom troff but not by
23955a3d06daSschwarze.Nm ,
23965a3d06daSschwarzeand it is likely that this will cause information loss
23975a3d06daSschwarzeor considerable misformatting.
23985a3d06daSschwarze.It Sy "eqn delim option in tbl"
23995a3d06daSschwarze.Pq eqn , tbl
24005a3d06daSschwarzeThe options line of a table defines equation delimiters.
24015a3d06daSschwarzeAny equation source code contained in the table will be printed unformatted.
24025a3d06daSschwarze.It Sy "unsupported table layout modifier"
24035a3d06daSschwarze.Pq tbl
24045a3d06daSschwarzeA table layout specification contains an
24055a3d06daSschwarze.Sq Cm m
24065a3d06daSschwarzemodifier.
24075a3d06daSschwarzeThe modifier is discarded.
24085a3d06daSschwarze.It Sy "ignoring macro in table"
24095a3d06daSschwarze.Pq tbl , mdoc , man
24105a3d06daSschwarzeA table contains an invocation of an
24115a3d06daSschwarze.Xr mdoc 7
24125a3d06daSschwarzeor
24135a3d06daSschwarze.Xr man 7
24145a3d06daSschwarzemacro or of an undefined macro.
24155a3d06daSschwarzeThe macro is ignored, and its arguments are handled
24165a3d06daSschwarzeas if they were a text line.
2417c96b4f2bSschwarze.It Sy "skipping tbl in -Tman mode"
2418c96b4f2bSschwarze.Pq mdoc , tbl
2419c96b4f2bSschwarzeAn input file contains the
2420c96b4f2bSschwarze.Ic \&TS
2421c96b4f2bSschwarzemacro.
2422c96b4f2bSschwarzeThis message is only generated in
2423c96b4f2bSschwarze.Fl T Cm man
2424c96b4f2bSschwarzeoutput mode, where
2425c96b4f2bSschwarze.Xr tbl 7
2426c96b4f2bSschwarzeinput is not supported.
2427c96b4f2bSschwarze.It Sy "skipping eqn in -Tman mode"
2428c96b4f2bSschwarze.Pq mdoc , eqn
2429c96b4f2bSschwarzeAn input file contains the
2430c96b4f2bSschwarze.Ic \&EQ
2431c96b4f2bSschwarzemacro.
2432c96b4f2bSschwarzeThis message is only generated in
2433c96b4f2bSschwarze.Fl T Cm man
2434c96b4f2bSschwarzeoutput mode, where
2435c96b4f2bSschwarze.Xr eqn 7
2436c96b4f2bSschwarzeinput is not supported.
24375a3d06daSschwarze.El
2438ecd1ed85Sschwarze.Ss Bad command line arguments
2439ecd1ed85Sschwarze.Bl -ohang
2440ecd1ed85Sschwarze.It Sy "bad command line argument"
2441ecd1ed85SschwarzeThe argument following one of the
2442ecd1ed85Sschwarze.Fl IKMmOTW
2443ecd1ed85Sschwarzecommand line options is invalid, or a
2444ecd1ed85Sschwarze.Ar file
2445ecd1ed85Sschwarzegiven as a command line argument cannot be opened.
2446ecd1ed85Sschwarze.It Sy "duplicate command line argument"
2447ecd1ed85SschwarzeThe
2448ecd1ed85Sschwarze.Fl I
2449ecd1ed85Sschwarzecommand line option was specified twice.
2450ecd1ed85Sschwarze.It Sy "option has a superfluous value"
2451ecd1ed85SschwarzeAn argument to the
2452ecd1ed85Sschwarze.Fl O
2453ecd1ed85Sschwarzeoption has a value but does not accept one.
2454ecd1ed85Sschwarze.It Sy "missing option value"
2455ecd1ed85SschwarzeAn argument to the
2456ecd1ed85Sschwarze.Fl O
2457ecd1ed85Sschwarzeoption has no argument but requires one.
2458ecd1ed85Sschwarze.It Sy "bad option value"
2459ecd1ed85SschwarzeAn argument to the
2460ecd1ed85Sschwarze.Fl O
2461ecd1ed85Sschwarze.Cm indent
2462ecd1ed85Sschwarzeor
2463ecd1ed85Sschwarze.Cm width
2464ecd1ed85Sschwarzeoption has an invalid value.
2465ecd1ed85Sschwarze.It Sy "duplicate option value"
2466ecd1ed85SschwarzeThe same
2467ecd1ed85Sschwarze.Fl O
2468ecd1ed85Sschwarzeoption is specified more than once.
2469ecd1ed85Sschwarze.It Sy "no such tag"
2470ecd1ed85SschwarzeThe
2471ecd1ed85Sschwarze.Fl O Cm tag
2472ecd1ed85Sschwarzeoption was specified but the tag was not found in any of the displayed
2473ecd1ed85Sschwarzemanual pages.
2474a28ef4e8Sschwarze.It Sy "\-Tmarkdown unsupported for man(7) input"
2475a28ef4e8Sschwarze.Pq man
2476a28ef4e8SschwarzeThe
2477a28ef4e8Sschwarze.Fl T Cm markdown
2478a28ef4e8Sschwarzeoption was specified but an input file uses the
2479a28ef4e8Sschwarze.Xr man 7
2480a28ef4e8Sschwarzelanguage.
2481a28ef4e8SschwarzeNo output is produced for that input file.
2482ecd1ed85Sschwarze.El
2483f73abda9Skristaps.Sh SEE ALSO
2484a497dac9Sschwarze.Xr apropos 1 ,
2485a497dac9Sschwarze.Xr man 1 ,
2486f8618d99Sschwarze.Xr eqn 7 ,
2487bf4567ddSjmc.Xr man 7 ,
2488f73abda9Skristaps.Xr mandoc_char 7 ,
24892683b1e5Sschwarze.Xr mdoc 7 ,
24902683b1e5Sschwarze.Xr roff 7 ,
24912683b1e5Sschwarze.Xr tbl 7
249280a8b6fbSschwarze.Sh HISTORY
249380a8b6fbSschwarzeThe
249480a8b6fbSschwarze.Nm
249580a8b6fbSschwarzeutility first appeared in
249680a8b6fbSschwarze.Ox 4.8 .
249780a8b6fbSschwarzeThe option
249880a8b6fbSschwarze.Fl I
249980a8b6fbSschwarzeappeared in
250080a8b6fbSschwarze.Ox 5.2 ,
250180a8b6fbSschwarzeand
250280a8b6fbSschwarze.Fl aCcfhKklMSsw
250380a8b6fbSschwarzein
250480a8b6fbSschwarze.Ox 5.7 .
2505f73abda9Skristaps.Sh AUTHORS
2506071e8769Sschwarze.An -nosplit
2507f73abda9SkristapsThe
2508f73abda9Skristaps.Nm
2509f73abda9Skristapsutility was written by
2510a497dac9Sschwarze.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv
2511a497dac9Sschwarzeand is maintained by
2512a497dac9Sschwarze.An Ingo Schwarze Aq Mt schwarze@openbsd.org .
2513