1*544c191cSchristos.\" Id: mandoc.1,v 1.237 2019/02/23 18:53:54 schwarze Exp 24154958bSjoerg.\" 3c5f73b34Sjoerg.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> 4c9bcef03Schristos.\" Copyright (c) 2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org> 54154958bSjoerg.\" 64154958bSjoerg.\" Permission to use, copy, modify, and distribute this software for any 74154958bSjoerg.\" purpose with or without fee is hereby granted, provided that the above 84154958bSjoerg.\" copyright notice and this permission notice appear in all copies. 94154958bSjoerg.\" 104154958bSjoerg.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 114154958bSjoerg.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 124154958bSjoerg.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 134154958bSjoerg.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 144154958bSjoerg.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 154154958bSjoerg.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 164154958bSjoerg.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 174154958bSjoerg.\" 18*544c191cSchristos.Dd February 23, 2019 194154958bSjoerg.Dt MANDOC 1 204154958bSjoerg.Os 214154958bSjoerg.Sh NAME 224154958bSjoerg.Nm mandoc 23c9bcef03Schristos.Nd format manual pages 244154958bSjoerg.Sh SYNOPSIS 254154958bSjoerg.Nm mandoc 26c9bcef03Schristos.Op Fl ac 279ff1f2acSchristos.Op Fl I Cm os Ns = Ns Ar name 289ff1f2acSchristos.Op Fl K Ar encoding 29c9bcef03Schristos.Op Fl mdoc | man 30c9bcef03Schristos.Op Fl O Ar options 319ff1f2acSchristos.Op Fl T Ar output 329ff1f2acSchristos.Op Fl W Ar level 33c5f73b34Sjoerg.Op Ar 344154958bSjoerg.Sh DESCRIPTION 354154958bSjoergThe 364154958bSjoerg.Nm 37c9bcef03Schristosutility formats manual pages for display. 38cf816816Sjoerg.Pp 39cf816816SjoergBy default, 40cf816816Sjoerg.Nm 41cf816816Sjoergreads 42cf816816Sjoerg.Xr mdoc 7 43cf816816Sjoergor 44cf816816Sjoerg.Xr man 7 45c9bcef03Schristostext from stdin and produces 469ff1f2acSchristos.Fl T Cm locale 47cf816816Sjoergoutput. 48cf816816Sjoerg.Pp 49fec65c98SchristosThe options are as follows: 504154958bSjoerg.Bl -tag -width Ds 51fec65c98Schristos.It Fl a 52fec65c98SchristosIf the standard output is a terminal device and 53fec65c98Schristos.Fl c 54fec65c98Schristosis not specified, use 55fec65c98Schristos.Xr more 1 56fec65c98Schristosto paginate the output, just like 57fec65c98Schristos.Xr man 1 58fec65c98Schristoswould. 59fec65c98Schristos.It Fl c 60fec65c98SchristosCopy the formatted manual pages to the standard output without using 61fec65c98Schristos.Xr more 1 62fec65c98Schristosto paginate them. 63fec65c98SchristosThis is the default. 64fec65c98SchristosIt can be specified to override 65fec65c98Schristos.Fl a . 669ff1f2acSchristos.It Fl I Cm os Ns = Ns Ar name 6770f041f9SjoergOverride the default operating system 6870f041f9Sjoerg.Ar name 6970f041f9Sjoergfor the 7070f041f9Sjoerg.Xr mdoc 7 71c9bcef03Schristos.Ic \&Os 72fec65c98Schristosand for the 73fec65c98Schristos.Xr man 7 74c9bcef03Schristos.Ic \&TH 7570f041f9Sjoergmacro. 769ff1f2acSchristos.It Fl K Ar encoding 77fec65c98SchristosSpecify the input encoding. 78fec65c98SchristosThe supported 79fec65c98Schristos.Ar encoding 80fec65c98Schristosarguments are 81fec65c98Schristos.Cm us-ascii , 82fec65c98Schristos.Cm iso-8859-1 , 83fec65c98Schristosand 84fec65c98Schristos.Cm utf-8 . 85c9bcef03SchristosIf not specified, autodetection uses the first match in the following 86c9bcef03Schristoslist: 87c9bcef03Schristos.Bl -enum 88c9bcef03Schristos.It 89c9bcef03SchristosIf the first three bytes of the input file are the UTF-8 byte order 90c9bcef03Schristosmark (BOM, 0xefbbbf), input is interpreted as 91c9bcef03Schristos.Cm utf-8 . 92c9bcef03Schristos.It 93c9bcef03SchristosIf the first or second line of the input file matches the 94fec65c98Schristos.Sy emacs 95fec65c98Schristosmode line format 96fec65c98Schristos.Pp 97fec65c98Schristos.D1 .\e" -*- Oo ...; Oc coding: Ar encoding ; No -*- 98c9bcef03Schristos.Pp 99c9bcef03Schristosthen input is interpreted according to 100c9bcef03Schristos.Ar encoding . 101c9bcef03Schristos.It 102c9bcef03SchristosIf the first non-ASCII byte in the file introduces a valid UTF-8 103c9bcef03Schristossequence, input is interpreted as 104c9bcef03Schristos.Cm utf-8 . 105c9bcef03Schristos.It 106c9bcef03SchristosOtherwise, input is interpreted as 107c9bcef03Schristos.Cm iso-8859-1 . 108fec65c98Schristos.El 109c9bcef03Schristos.It Fl mdoc | man 110c9bcef03SchristosWith 111c9bcef03Schristos.Fl mdoc , 112c9bcef03Schristosall input files are interpreted as 113c9bcef03Schristos.Xr mdoc 7 . 114c9bcef03SchristosWith 115c9bcef03Schristos.Fl man , 116c9bcef03Schristosall input files are interpreted as 117c9bcef03Schristos.Xr man 7 . 118c9bcef03SchristosBy default, the input language is automatically detected for each file: 119c9bcef03Schristosif the first macro is 120c9bcef03Schristos.Ic \&Dd 121c9bcef03Schristosor 122c9bcef03Schristos.Ic \&Dt , 123c9bcef03Schristosthe 124c9bcef03Schristos.Xr mdoc 7 125c9bcef03Schristosparser is used; otherwise, the 126c9bcef03Schristos.Xr man 7 127c9bcef03Schristosparser is used. 128c9bcef03SchristosWith other arguments, 129c9bcef03Schristos.Fl m 130c9bcef03Schristosis silently ignored. 131c9bcef03Schristos.It Fl O Ar options 1320a84adc5SjoergComma-separated output options. 133c9bcef03SchristosSee the descriptions of the individual output formats for supported 134c9bcef03Schristos.Ar options . 1359ff1f2acSchristos.It Fl T Ar output 136c9bcef03SchristosSelect the output format. 137c9bcef03SchristosSupported values for the 138c9bcef03Schristos.Ar output 139c9bcef03Schristosargument are 140c9bcef03Schristos.Cm ascii , 141c9bcef03Schristos.Cm html , 142c9bcef03Schristosthe default of 143c9bcef03Schristos.Cm locale , 144c9bcef03Schristos.Cm man , 145c9bcef03Schristos.Cm markdown , 146c9bcef03Schristos.Cm pdf , 147c9bcef03Schristos.Cm ps , 148c9bcef03Schristos.Cm tree , 149c9bcef03Schristosand 150c9bcef03Schristos.Cm utf8 . 151c9bcef03Schristos.Pp 152c9bcef03SchristosThe special 153c9bcef03Schristos.Fl T Cm lint 154c9bcef03Schristosmode only parses the input and produces no output. 155c9bcef03SchristosIt implies 156c9bcef03Schristos.Fl W Cm all 157c9bcef03Schristosand redirects parser messages, which usually appear on standard 158c9bcef03Schristoserror output, to standard output. 1599ff1f2acSchristos.It Fl W Ar level 160c0d9444aSjoergSpecify the minimum message 161c0d9444aSjoerg.Ar level 162c0d9444aSjoergto be reported on the standard error output and to affect the exit status. 163c0d9444aSjoergThe 164c0d9444aSjoerg.Ar level 165c0d9444aSjoergcan be 166c9bcef03Schristos.Cm base , 167c9bcef03Schristos.Cm style , 168c0d9444aSjoerg.Cm warning , 169c0d9444aSjoerg.Cm error , 170c0d9444aSjoergor 171c9bcef03Schristos.Cm unsupp . 172c9bcef03SchristosThe 173c9bcef03Schristos.Cm base 174c9bcef03Schristoslevel automatically derives the operating system from the contents of the 175c9bcef03Schristos.Ic \&Os 176c9bcef03Schristosmacro, from the 177c9bcef03Schristos.Fl Ios 178c9bcef03Schristoscommand line option, or from the 179c9bcef03Schristos.Xr uname 3 180c9bcef03Schristosreturn value. 181c9bcef03SchristosThe levels 182c9bcef03Schristos.Cm openbsd 183c9bcef03Schristosand 184c9bcef03Schristos.Cm netbsd 185c9bcef03Schristosare variants of 186c9bcef03Schristos.Cm base 187c9bcef03Schristosthat bypass autodetection and request validation of base system 188c9bcef03Schristosconventions for a particular operating system. 189c9bcef03SchristosThe level 190fec65c98Schristos.Cm all 191c0d9444aSjoergis an alias for 192c9bcef03Schristos.Cm base . 193fec65c98SchristosBy default, 194fec65c98Schristos.Nm 195fec65c98Schristosis silent. 196c0d9444aSjoergSee 197c0d9444aSjoerg.Sx EXIT STATUS 198c0d9444aSjoergand 199c0d9444aSjoerg.Sx DIAGNOSTICS 200c0d9444aSjoergfor details. 201c0d9444aSjoerg.Pp 202c0d9444aSjoergThe special option 2039ff1f2acSchristos.Fl W Cm stop 204c0d9444aSjoergtells 205c0d9444aSjoerg.Nm 206c0d9444aSjoergto exit after parsing a file that causes warnings or errors of at least 207c0d9444aSjoergthe requested level. 208c0d9444aSjoergNo formatted output will be produced from that file. 209c0d9444aSjoergIf both a 210c0d9444aSjoerg.Ar level 211c0d9444aSjoergand 212c0d9444aSjoerg.Cm stop 213c0d9444aSjoergare requested, they can be joined with a comma, for example 2149ff1f2acSchristos.Fl W Cm error , Ns Cm stop . 2150a84adc5Sjoerg.It Ar file 216c9bcef03SchristosRead from the given input file. 217c9bcef03SchristosIf multiple files are specified, they are processed in the given order. 218c9bcef03SchristosIf unspecified, 2194154958bSjoerg.Nm 220c9bcef03Schristosreads from standard input. 2214154958bSjoerg.El 222fec65c98Schristos.Pp 223c9bcef03SchristosThe options 224c9bcef03Schristos.Fl fhklw 225c9bcef03Schristosare also supported and are documented in man(1). 226fec65c98SchristosIn 227fec65c98Schristos.Fl f 228fec65c98Schristosand 229fec65c98Schristos.Fl k 230fec65c98Schristosmode, 231fec65c98Schristos.Nm 232fec65c98Schristosalso supports the options 233c9bcef03Schristos.Fl CMmOSs 234fec65c98Schristosdescribed in the 235fec65c98Schristos.Xr apropos 1 236fec65c98Schristosmanual. 237c9bcef03SchristosThe options 238c9bcef03Schristos.Fl fkl 239c9bcef03Schristosare mutually exclusive and override each other. 2407d71a621Sjoerg.Ss ASCII Output 241c9bcef03SchristosUse 2429ff1f2acSchristos.Fl T Cm ascii 243c9bcef03Schristosto force text output in 7-bit ASCII character encoding documented in the 244c9bcef03Schristos.Xr ascii 7 245c9bcef03Schristosmanual page, ignoring the 246c9bcef03Schristos.Xr locale 1 247c9bcef03Schristosset in the environment. 2487d71a621Sjoerg.Pp 2497d71a621SjoergFont styles are applied by using back-spaced encoding such that an 2507d71a621Sjoergunderlined character 2517d71a621Sjoerg.Sq c 2527d71a621Sjoergis rendered as 2537d71a621Sjoerg.Sq _ Ns \e[bs] Ns c , 2547d71a621Sjoergwhere 2557d71a621Sjoerg.Sq \e[bs] 2560a84adc5Sjoergis the back-space character number 8. 2570a84adc5SjoergEmboldened characters are rendered as 2587d71a621Sjoerg.Sq c Ns \e[bs] Ns c . 259*544c191cSchristosThis markup is typically converted to appropriate terminal sequences by 260*544c191cSchristosthe pager or 261*544c191cSchristos.Xr ul 1 . 262*544c191cSchristosTo remove the markup, pipe the output to 263*544c191cSchristos.Xr col 1 264*544c191cSchristos.Fl b 265*544c191cSchristosinstead. 2667d71a621Sjoerg.Pp 2677d71a621SjoergThe special characters documented in 2687d71a621Sjoerg.Xr mandoc_char 7 2697d71a621Sjoergare rendered best-effort in an ASCII equivalent. 270*544c191cSchristosIn particular, opening and closing 271*544c191cSchristos.Sq single quotes 272*544c191cSchristosare represented as characters number 0x60 and 0x27, respectively, 273*544c191cSchristoswhich agrees with all ASCII standards from 1965 to the latest 274*544c191cSchristosrevision (2012) and which matches the traditional way in which 275*544c191cSchristos.Xr roff 7 276*544c191cSchristosformatters represent single quotes in ASCII output. 277*544c191cSchristosThis correct ASCII rendering may look strange with modern 278*544c191cSchristosUnicode-compatible fonts because contrary to ASCII, Unicode uses 279*544c191cSchristosthe code point U+0060 for the grave accent only, never for an opening 280*544c191cSchristosquote. 2817d71a621Sjoerg.Pp 28282361f10SjoergThe following 28382361f10Sjoerg.Fl O 28482361f10Sjoergarguments are accepted: 28582361f10Sjoerg.Bl -tag -width Ds 286cf816816Sjoerg.It Cm indent Ns = Ns Ar indent 287cf816816SjoergThe left margin for normal text is set to 288cf816816Sjoerg.Ar indent 289cf816816Sjoergblank characters instead of the default of five for 290cf816816Sjoerg.Xr mdoc 7 291cf816816Sjoergand seven for 292cf816816Sjoerg.Xr man 7 . 293cf816816SjoergIncreasing this is not recommended; it may result in degraded formatting, 294cf816816Sjoergfor example overfull lines or ugly line breaks. 295c9bcef03SchristosWhen output is to a pager on a terminal that is less than 66 columns 296c9bcef03Schristoswide, the default is reduced to three columns. 297c9bcef03Schristos.It Cm mdoc 298c9bcef03SchristosFormat 299c9bcef03Schristos.Xr man 7 300c9bcef03Schristosinput files in 301c9bcef03Schristos.Xr mdoc 7 302c9bcef03Schristosoutput style. 303c9bcef03SchristosSpecifically, this suppresses the two additional blank lines near the 304c9bcef03Schristostop and the bottom of each page, and it implies 305c9bcef03Schristos.Fl O Cm indent Ns =5 . 306c9bcef03SchristosOne useful application is for checking that 307c9bcef03Schristos.Fl T Cm man 308c9bcef03Schristosoutput formats in the same way as the 309c9bcef03Schristos.Xr mdoc 7 310c9bcef03Schristossource it was generated from. 311*544c191cSchristos.It Cm tag Ns Op = Ns Ar term 312*544c191cSchristosIf the formatted manual page is opened in a pager, 313*544c191cSchristosgo to the definition of the 314*544c191cSchristos.Ar term 315*544c191cSchristosrather than showing the manual page from the beginning. 316*544c191cSchristosIf no 317*544c191cSchristos.Ar term 318*544c191cSchristosis specified, reuse the first command line argument that is not a 319*544c191cSchristos.Ar section 320*544c191cSchristosnumber. 321*544c191cSchristosIf that argument is in 322*544c191cSchristos.Xr apropos 1 323*544c191cSchristos.Ar key Ns = Ns Ar val 324*544c191cSchristosformat, only the 325*544c191cSchristos.Ar val 326*544c191cSchristosis used rather than the argument as a whole. 327*544c191cSchristosThis is useful for commands like 328*544c191cSchristos.Ql man -akO tag Ic=ulimit 329*544c191cSchristosto search for a keyword and jump right to its definition 330*544c191cSchristosin the matching manual pages. 33182361f10Sjoerg.It Cm width Ns = Ns Ar width 33282361f10SjoergThe output width is set to 333c9bcef03Schristos.Ar width 334c9bcef03Schristosinstead of the default of 78. 335c9bcef03SchristosWhen output is to a pager on a terminal that is less than 79 columns 336c9bcef03Schristoswide, the default is reduced to one less than the terminal width. 337c9bcef03SchristosIn any case, lines that are output in literal mode are never wrapped 338c9bcef03Schristosand may exceed the output width. 33982361f10Sjoerg.El 3407d71a621Sjoerg.Ss HTML Output 3417d71a621SjoergOutput produced by 3429ff1f2acSchristos.Fl T Cm html 343fec65c98Schristosconforms to HTML5 using optional self-closing tags. 344fec65c98SchristosDefault styles use only CSS1. 345fec65c98SchristosEquations rendered from 346fec65c98Schristos.Xr eqn 7 347fec65c98Schristosblocks use MathML. 3487d71a621Sjoerg.Pp 349*544c191cSchristosThe file 350*544c191cSchristos.Pa /usr/share/misc/mandoc.css 351*544c191cSchristosdocuments style-sheet classes available for customising output. 352c0d9444aSjoergIf a style-sheet is not specified with 3539ff1f2acSchristos.Fl O Cm style , 3549ff1f2acSchristos.Fl T Cm html 355fec65c98Schristosdefaults to simple output (via an embedded style-sheet) 356fec65c98Schristosreadable in any graphical or text-based web 357c0d9444aSjoergbrowser. 3587d71a621Sjoerg.Pp 359c9bcef03SchristosNon-ASCII characters are rendered 360c9bcef03Schristosas hexadecimal Unicode character references. 36182361f10Sjoerg.Pp 36282361f10SjoergThe following 36382361f10Sjoerg.Fl O 36482361f10Sjoergarguments are accepted: 36582361f10Sjoerg.Bl -tag -width Ds 366c5f73b34Sjoerg.It Cm fragment 367fec65c98SchristosOmit the <!DOCTYPE> declaration and the <html>, <head>, and <body> 368fec65c98Schristoselements and only emit the subtree below the <body> element. 369c5f73b34SjoergThe 370c5f73b34Sjoerg.Cm style 371cf816816Sjoergargument will be ignored. 372c5f73b34SjoergThis is useful when embedding manual content within existing documents. 37382361f10Sjoerg.It Cm includes Ns = Ns Ar fmt 37482361f10SjoergThe string 37582361f10Sjoerg.Ar fmt , 37682361f10Sjoergfor example, 37782361f10Sjoerg.Ar ../src/%I.html , 37882361f10Sjoergis used as a template for linked header files (usually via the 379c9bcef03Schristos.Ic \&In 38082361f10Sjoergmacro). 38182361f10SjoergInstances of 38282361f10Sjoerg.Sq \&%I 38382361f10Sjoergare replaced with the include filename. 38482361f10SjoergThe default is not to present a 38582361f10Sjoerghyperlink. 386*544c191cSchristos.It Cm man Ns = Ns Ar fmt Ns Op ; Ns Ar fmt 38782361f10SjoergThe string 38882361f10Sjoerg.Ar fmt , 38982361f10Sjoergfor example, 39082361f10Sjoerg.Ar ../html%S/%N.%S.html , 39182361f10Sjoergis used as a template for linked manuals (usually via the 392c9bcef03Schristos.Ic \&Xr 39382361f10Sjoergmacro). 39482361f10SjoergInstances of 39582361f10Sjoerg.Sq \&%N 39682361f10Sjoergand 39782361f10Sjoerg.Sq %S 39882361f10Sjoergare replaced with the linked manual's name and section, respectively. 39982361f10SjoergIf no section is included, section 1 is assumed. 40082361f10SjoergThe default is not to 40182361f10Sjoergpresent a hyperlink. 402*544c191cSchristosIf two formats are given and a file 403*544c191cSchristos.Ar %N.%S 404*544c191cSchristosexists in the current directory, the first format is used; 405*544c191cSchristosotherwise, the second format is used. 40682361f10Sjoerg.It Cm style Ns = Ns Ar style.css 40782361f10SjoergThe file 40882361f10Sjoerg.Ar style.css 40982361f10Sjoergis used for an external style-sheet. 41082361f10SjoergThis must be a valid absolute or 41182361f10Sjoergrelative URI. 412*544c191cSchristos.It Cm toc 413*544c191cSchristosIf an input file contains at least two non-standard sections, 414*544c191cSchristosprint a table of contents near the beginning of the output. 41582361f10Sjoerg.El 416c5f73b34Sjoerg.Ss Locale Output 417c9bcef03SchristosBy default, 418c9bcef03Schristos.Nm 419c9bcef03Schristosautomatically selects UTF-8 or ASCII output according to the current 420c9bcef03Schristos.Xr locale 1 . 421c9bcef03SchristosIf any of the environment variables 422c9bcef03Schristos.Ev LC_ALL , 423c9bcef03Schristos.Ev LC_CTYPE , 424c9bcef03Schristosor 425c9bcef03Schristos.Ev LANG 426c9bcef03Schristosare set and the first one that is set 427c9bcef03Schristosselects the UTF-8 character encoding, it produces 428c9bcef03Schristos.Sx UTF-8 Output ; 429c9bcef03Schristosotherwise, it falls back to 430c9bcef03Schristos.Sx ASCII Output . 431c9bcef03SchristosThis output mode can also be selected explicitly with 4329ff1f2acSchristos.Fl T Cm locale . 433c5f73b34Sjoerg.Ss Man Output 434c9bcef03SchristosUse 435c9bcef03Schristos.Fl T Cm man 436c9bcef03Schristosto translate 437c9bcef03Schristos.Xr mdoc 7 438c9bcef03Schristosinput into 439c5f73b34Sjoerg.Xr man 7 440c5f73b34Sjoergoutput format. 44170f041f9SjoergThis is useful for distributing manual sources to legacy systems 442c5f73b34Sjoerglacking 443c5f73b34Sjoerg.Xr mdoc 7 444c5f73b34Sjoergformatters. 445c5f73b34Sjoerg.Pp 446c9bcef03SchristosIf the input format of a file is 447c5f73b34Sjoerg.Xr man 7 , 448cf816816Sjoergthe input is copied to the output, expanding any 449c5f73b34Sjoerg.Xr roff 7 450c9bcef03Schristos.Ic so 451cf816816Sjoergrequests. 452cf816816SjoergThe parser is also run, and as usual, the 453cf816816Sjoerg.Fl W 454cf816816Sjoerglevel controls which 455cf816816Sjoerg.Sx DIAGNOSTICS 456cf816816Sjoergare displayed before copying the input to the output. 457c9bcef03Schristos.Ss Markdown Output 458c9bcef03SchristosUse 459c9bcef03Schristos.Fl T Cm markdown 460c9bcef03Schristosto translate 461c9bcef03Schristos.Xr mdoc 7 462c9bcef03Schristosinput to the markdown format conforming to 463c9bcef03Schristos.Lk http://daringfireball.net/projects/markdown/syntax.text\ 464c9bcef03Schristos "John Gruber's 2004 specification" . 465c9bcef03SchristosThe output also almost conforms to the 466c9bcef03Schristos.Lk http://commonmark.org/ CommonMark 467c9bcef03Schristosspecification. 468c9bcef03Schristos.Pp 469c9bcef03SchristosThe character set used for the markdown output is ASCII. 470c9bcef03SchristosNon-ASCII characters are encoded as HTML entities. 471c9bcef03SchristosSince that is not possible in literal font contexts, because these 472c9bcef03Schristosare rendered as code spans and code blocks in the markdown output, 473c9bcef03Schristosnon-ASCII characters are transliterated to ASCII approximations in 474c9bcef03Schristosthese contexts. 475c9bcef03Schristos.Pp 476c9bcef03SchristosMarkdown is a very weak markup language, so all semantic markup is 477c9bcef03Schristoslost, and even part of the presentational markup may be lost. 478c9bcef03SchristosDo not use this as an intermediate step in converting to HTML; 479c9bcef03Schristosinstead, use 480c9bcef03Schristos.Fl T Cm html 481c9bcef03Schristosdirectly. 482c9bcef03Schristos.Pp 483c9bcef03SchristosThe 484c9bcef03Schristos.Xr man 7 , 485c9bcef03Schristos.Xr tbl 7 , 486c9bcef03Schristosand 487c9bcef03Schristos.Xr eqn 7 488c9bcef03Schristosinput languages are not supported by 489c9bcef03Schristos.Fl T Cm markdown 490c9bcef03Schristosoutput mode. 491c5f73b34Sjoerg.Ss PDF Output 492c5f73b34SjoergPDF-1.1 output may be generated by 4939ff1f2acSchristos.Fl T Cm pdf . 494c5f73b34SjoergSee 495c5f73b34Sjoerg.Sx PostScript Output 496c5f73b34Sjoergfor 497c5f73b34Sjoerg.Fl O 498c5f73b34Sjoergarguments and defaults. 4997574e07eSjoerg.Ss PostScript Output 50082361f10SjoergPostScript 50182361f10Sjoerg.Qq Adobe-3.0 50282361f10SjoergLevel-2 pages may be generated by 5039ff1f2acSchristos.Fl T Cm ps . 50482361f10SjoergOutput pages default to letter sized and are rendered in the Times font 50582361f10Sjoergfamily, 11-point. 50682361f10SjoergMargins are calculated as 1/9 the page length and width. 50782361f10SjoergLine-height is 1.4m. 50882361f10Sjoerg.Pp 50982361f10SjoergSpecial characters are rendered as in 51082361f10Sjoerg.Sx ASCII Output . 51182361f10Sjoerg.Pp 51282361f10SjoergThe following 51382361f10Sjoerg.Fl O 51482361f10Sjoergarguments are accepted: 51582361f10Sjoerg.Bl -tag -width Ds 51682361f10Sjoerg.It Cm paper Ns = Ns Ar name 51782361f10SjoergThe paper size 51882361f10Sjoerg.Ar name 51982361f10Sjoergmay be one of 52082361f10Sjoerg.Ar a3 , 52182361f10Sjoerg.Ar a4 , 52282361f10Sjoerg.Ar a5 , 52382361f10Sjoerg.Ar legal , 52482361f10Sjoergor 52582361f10Sjoerg.Ar letter . 52682361f10SjoergYou may also manually specify dimensions as 52782361f10Sjoerg.Ar NNxNN , 52882361f10Sjoergwidth by height in millimetres. 52982361f10SjoergIf an unknown value is encountered, 53082361f10Sjoerg.Ar letter 53182361f10Sjoergis used. 53282361f10Sjoerg.El 533c9bcef03Schristos.Ss UTF-8 Output 534c5f73b34SjoergUse 5359ff1f2acSchristos.Fl T Cm utf8 536c9bcef03Schristosto force text output in UTF-8 multi-byte character encoding, 537c9bcef03Schristosignoring the 538c9bcef03Schristos.Xr locale 1 539c9bcef03Schristossettings in the environment. 5407da9b934SjoergSee 541c9bcef03Schristos.Sx ASCII Output 542c9bcef03Schristosregarding font styles and 543c9bcef03Schristos.Fl O 544c9bcef03Schristosarguments. 545c9bcef03Schristos.Pp 546c9bcef03SchristosOn operating systems lacking locale or wide character support, and 547c9bcef03Schristoson those where the internal character representation is not UCS-4, 548c9bcef03Schristos.Nm 549c9bcef03Schristosalways falls back to 550c9bcef03Schristos.Sx ASCII Output . 5519ff1f2acSchristos.Ss Syntax tree output 5529ff1f2acSchristosUse 5539ff1f2acSchristos.Fl T Cm tree 5549ff1f2acSchristosto show a human readable representation of the syntax tree. 5559ff1f2acSchristosIt is useful for debugging the source code of manual pages. 5569ff1f2acSchristosThe exact format is subject to change, so don't write parsers for it. 5579508192eSchristos.Pp 5589508192eSchristosThe first paragraph shows meta data found in the 5599508192eSchristos.Xr mdoc 7 5609508192eSchristosprologue, on the 5619508192eSchristos.Xr man 7 5629508192eSchristos.Ic \&TH 5639508192eSchristosline, or the fallbacks used. 5649508192eSchristos.Pp 5659508192eSchristosIn the tree dump, each output line shows one syntax tree node. 5669ff1f2acSchristosChild nodes are indented with respect to their parent node. 5679ff1f2acSchristosThe columns are: 5689ff1f2acSchristos.Pp 5699ff1f2acSchristos.Bl -enum -compact 5709ff1f2acSchristos.It 5719ff1f2acSchristosFor macro nodes, the macro name; for text and 5729ff1f2acSchristos.Xr tbl 7 5739ff1f2acSchristosnodes, the content. 5749ff1f2acSchristosThere is a special format for 5759ff1f2acSchristos.Xr eqn 7 5769ff1f2acSchristosnodes. 5779ff1f2acSchristos.It 5789ff1f2acSchristosNode type (text, elem, block, head, body, body-end, tail, tbl, eqn). 5799ff1f2acSchristos.It 5809ff1f2acSchristosFlags: 5819ff1f2acSchristos.Bl -dash -compact 5829ff1f2acSchristos.It 5839ff1f2acSchristosAn opening parenthesis if the node is an opening delimiter. 5849ff1f2acSchristos.It 5859ff1f2acSchristosAn asterisk if the node starts a new input line. 5869ff1f2acSchristos.It 5879ff1f2acSchristosThe input line number (starting at one). 5889ff1f2acSchristos.It 5899ff1f2acSchristosA colon. 5909ff1f2acSchristos.It 5919ff1f2acSchristosThe input column number (starting at one). 5929ff1f2acSchristos.It 5939ff1f2acSchristosA closing parenthesis if the node is a closing delimiter. 5949ff1f2acSchristos.It 5959ff1f2acSchristosA full stop if the node ends a sentence. 5969508192eSchristos.It 5979508192eSchristosBROKEN if the node is a block broken by another block. 5989508192eSchristos.It 5999508192eSchristosNOSRC if the node is not in the input file, 6009508192eSchristosbut automatically generated from macros. 6019508192eSchristos.It 6029508192eSchristosNOPRT if the node is not supposed to generate output 6039508192eSchristosfor any output format. 6049ff1f2acSchristos.El 6059ff1f2acSchristos.El 6069508192eSchristos.Pp 6079508192eSchristosThe following 6089508192eSchristos.Fl O 6099508192eSchristosargument is accepted: 6109508192eSchristos.Bl -tag -width Ds 6119508192eSchristos.It Cm noval 6129508192eSchristosSkip validation and show the unvalidated syntax tree. 6139508192eSchristosThis can help to find out whether a given behaviour is caused by 6149508192eSchristosthe parser or by the validator. 6159508192eSchristosMeta data is not available in this case. 6169508192eSchristos.El 617fec65c98Schristos.Sh ENVIRONMENT 618fec65c98Schristos.Bl -tag -width MANPAGER 619c9bcef03Schristos.It Ev LC_CTYPE 620c9bcef03SchristosThe character encoding 621c9bcef03Schristos.Xr locale 1 . 622c9bcef03SchristosWhen 623c9bcef03Schristos.Sx Locale Output 624c9bcef03Schristosis selected, it decides whether to use ASCII or UTF-8 output format. 625c9bcef03SchristosIt never affects the interpretation of input files. 626fec65c98Schristos.It Ev MANPAGER 627fec65c98SchristosAny non-empty value of the environment variable 628fec65c98Schristos.Ev MANPAGER 629c9bcef03Schristosis used instead of the standard pagination program, 630c9bcef03Schristos.Xr more 1 ; 631c9bcef03Schristossee 632c9bcef03Schristos.Xr man 1 633c9bcef03Schristosfor details. 634c9bcef03SchristosOnly used if 635c9bcef03Schristos.Fl a 636c9bcef03Schristosor 637c9bcef03Schristos.Fl l 638c9bcef03Schristosis specified. 639fec65c98Schristos.It Ev PAGER 640fec65c98SchristosSpecifies the pagination program to use when 641fec65c98Schristos.Ev MANPAGER 642fec65c98Schristosis not defined. 643fec65c98SchristosIf neither PAGER nor MANPAGER is defined, 6449ff1f2acSchristos.Xr more 1 6459ff1f2acSchristos.Fl s 646c9bcef03Schristosis used. 647c9bcef03SchristosOnly used if 648c9bcef03Schristos.Fl a 649c9bcef03Schristosor 650c9bcef03Schristos.Fl l 651c9bcef03Schristosis specified. 652fec65c98Schristos.El 653c0d9444aSjoerg.Sh EXIT STATUS 654c0d9444aSjoergThe 655c0d9444aSjoerg.Nm 656c0d9444aSjoergutility exits with one of the following values, controlled by the message 657c0d9444aSjoerg.Ar level 658c0d9444aSjoergassociated with the 659c0d9444aSjoerg.Fl W 660c0d9444aSjoergoption: 661c0d9444aSjoerg.Pp 662c0d9444aSjoerg.Bl -tag -width Ds -compact 663c0d9444aSjoerg.It 0 664c9bcef03SchristosNo base system convention violations, style suggestions, warnings, 665c9bcef03Schristosor errors occurred, or those that did were ignored because they 666c9bcef03Schristoswere lower than the requested 667c0d9444aSjoerg.Ar level . 668c9bcef03Schristos.It 1 669c9bcef03SchristosAt least one base system convention violation or style suggestion 670c9bcef03Schristosoccurred, but no warning or error, and 671c9bcef03Schristos.Fl W Cm base 672c9bcef03Schristosor 673c9bcef03Schristos.Fl W Cm style 674c9bcef03Schristoswas specified. 675c0d9444aSjoerg.It 2 676c0d9444aSjoergAt least one warning occurred, but no error, and 6779ff1f2acSchristos.Fl W Cm warning 678c9bcef03Schristosor a lower 679c9bcef03Schristos.Ar level 680c9bcef03Schristoswas requested. 681c0d9444aSjoerg.It 3 682fec65c98SchristosAt least one parsing error occurred, 683fec65c98Schristosbut no unsupported feature was encountered, and 6849ff1f2acSchristos.Fl W Cm error 685c9bcef03Schristosor a lower 686c9bcef03Schristos.Ar level 687c9bcef03Schristoswas requested. 688c0d9444aSjoerg.It 4 689fec65c98SchristosAt least one unsupported feature was encountered, and 690c9bcef03Schristos.Fl W Cm unsupp 691c9bcef03Schristosor a lower 692c9bcef03Schristos.Ar level 693c9bcef03Schristoswas requested. 694c0d9444aSjoerg.It 5 695c0d9444aSjoergInvalid command line arguments were specified. 696c0d9444aSjoergNo input files have been read. 697c0d9444aSjoerg.It 6 698fec65c98SchristosAn operating system error occurred, for example exhaustion 699fec65c98Schristosof memory, file descriptors, or process table entries. 700c0d9444aSjoergSuch errors cause 701c0d9444aSjoerg.Nm 702c0d9444aSjoergto exit at once, possibly in the middle of parsing or formatting a file. 703c0d9444aSjoerg.El 704c0d9444aSjoerg.Pp 705c0d9444aSjoergNote that selecting 7069ff1f2acSchristos.Fl T Cm lint 707c0d9444aSjoergoutput mode implies 708c9bcef03Schristos.Fl W Cm all . 7094154958bSjoerg.Sh EXAMPLES 7104154958bSjoergTo page manuals to the terminal: 7114154958bSjoerg.Pp 712c9bcef03Schristos.Dl $ mandoc -l mandoc.1 man.1 apropos.1 makewhatis.8 7134154958bSjoerg.Pp 7144154958bSjoergTo produce HTML manuals with 715*544c191cSchristos.Pa /usr/share/misc/mandoc.css 7164154958bSjoergas the style-sheet: 7174154958bSjoerg.Pp 718*544c191cSchristos.Dl $ mandoc \-T html -O style=/usr/share/misc/mandoc.css mdoc.7 > mdoc.7.html 7194154958bSjoerg.Pp 7204154958bSjoergTo check over a large set of manuals: 7214154958bSjoerg.Pp 7229ff1f2acSchristos.Dl $ mandoc \-T lint \(gafind /usr/src -name \e*\e.[1-9]\(ga 72382361f10Sjoerg.Pp 72482361f10SjoergTo produce a series of PostScript manuals for A4 paper: 72582361f10Sjoerg.Pp 726*544c191cSchristos.Dl $ mandoc \-T ps \-O paper=a4 mdoc.7 man.7 > manuals.ps 727c5f73b34Sjoerg.Pp 728c5f73b34SjoergConvert a modern 729c5f73b34Sjoerg.Xr mdoc 7 730c5f73b34Sjoergmanual to the older 731c5f73b34Sjoerg.Xr man 7 732c5f73b34Sjoergformat, for use on systems lacking an 733c5f73b34Sjoerg.Xr mdoc 7 734c5f73b34Sjoergparser: 735c5f73b34Sjoerg.Pp 736*544c191cSchristos.Dl $ mandoc \-T man foo.mdoc > foo.man 737c0d9444aSjoerg.Sh DIAGNOSTICS 738fec65c98SchristosMessages displayed by 739fec65c98Schristos.Nm 740fec65c98Schristosfollow this format: 741c9bcef03Schristos.Bd -ragged -offset indent 742c9bcef03Schristos.Nm : 743*544c191cSchristos.Ar file : Ns Ar line : Ns Ar column : level : message : macro arguments 744c9bcef03Schristos.Pq Ar os 745c9bcef03Schristos.Ed 746c0d9444aSjoerg.Pp 747*544c191cSchristosThe first three fields identify the 748*544c191cSchristos.Ar file 749*544c191cSchristosname, 750*544c191cSchristos.Ar line 751*544c191cSchristosnumber, and 752*544c191cSchristos.Ar column 753*544c191cSchristosnumber of the input file where the message was triggered. 754*544c191cSchristosThe line and column numbers start at 1. 755fec65c98SchristosBoth are omitted for messages referring to an input file as a whole. 756*544c191cSchristosAll 757*544c191cSchristos.Ar level 758*544c191cSchristosand 759*544c191cSchristos.Ar message 760*544c191cSchristosstrings are explained below. 761*544c191cSchristosThe name of the 762*544c191cSchristos.Ar macro 763*544c191cSchristostriggering the message and its 764*544c191cSchristos.Ar arguments 765*544c191cSchristosare omitted where meaningless. 766c9bcef03SchristosThe 767c9bcef03Schristos.Ar os 768c9bcef03Schristosoperating system specifier is omitted for messages that are relevant 769c9bcef03Schristosfor all operating systems. 770fec65c98SchristosFatal messages about invalid command line arguments 771fec65c98Schristosor operating system errors, for example when memory is exhausted, 772fec65c98Schristosmay also omit the 773fec65c98Schristos.Ar file 774fec65c98Schristosand 775fec65c98Schristos.Ar level 776fec65c98Schristosfields. 777c0d9444aSjoerg.Pp 778c0d9444aSjoergMessage levels have the following meanings: 779c0d9444aSjoerg.Bl -tag -width "warning" 780fec65c98Schristos.It Cm unsupp 781fec65c98SchristosAn input file uses unsupported low-level 782fec65c98Schristos.Xr roff 7 783fec65c98Schristosfeatures. 784fec65c98SchristosThe output may be incomplete and/or misformatted, 785fec65c98Schristosso using GNU troff instead of 786c0d9444aSjoerg.Nm 787fec65c98Schristosto process the file may be preferable. 788fec65c98Schristos.It Cm error 789c9bcef03SchristosIndicates a risk of information loss or severe misformatting, 790c9bcef03Schristosin most cases caused by serious syntax errors. 791c0d9444aSjoerg.It Cm warning 792c9bcef03SchristosIndicates a risk that the information shown or its formatting 793c9bcef03Schristosmay mismatch the author's intent in minor ways. 794c9bcef03SchristosAdditionally, syntax errors are classified at least as warnings, 795c9bcef03Schristoseven if they do not usually cause misformatting. 796c9bcef03Schristos.It Cm style 797c9bcef03SchristosAn input file uses dubious or discouraged style. 798c9bcef03SchristosThis is not a complaint about the syntax, and probably neither 799c9bcef03Schristosformatting nor portability are in danger. 800c9bcef03SchristosWhile great care is taken to avoid false positives on the higher 801c9bcef03Schristosmessage levels, the 802c9bcef03Schristos.Cm style 803c9bcef03Schristoslevel tries to reduce the probability that issues go unnoticed, 804c9bcef03Schristosso it may occasionally issue bogus suggestions. 805c9bcef03SchristosPlease use your good judgement to decide whether any particular 806c9bcef03Schristos.Cm style 807c9bcef03Schristossuggestion really justifies a change to the input file. 808c9bcef03Schristos.It Cm base 809c9bcef03SchristosA convention used in the base system of a specific operating system 810c9bcef03Schristosis not adhered to. 811c9bcef03SchristosThese are not markup mistakes, and neither the quality of formatting 812c9bcef03Schristosnor portability are in danger. 813c9bcef03SchristosMessages of the 814c9bcef03Schristos.Cm base 815c9bcef03Schristoslevel are printed with the more intuitive 816c9bcef03Schristos.Cm style 817c9bcef03Schristos.Ar level 818c9bcef03Schristostag. 819c0d9444aSjoerg.El 820c0d9444aSjoerg.Pp 821c0d9444aSjoergMessages of the 822c9bcef03Schristos.Cm base , 823c9bcef03Schristos.Cm style , 824fec65c98Schristos.Cm warning , 825fec65c98Schristos.Cm error , 826c0d9444aSjoergand 827fec65c98Schristos.Cm unsupp 828fec65c98Schristoslevels except those about non-existent or unreadable input files 829fec65c98Schristosare hidden unless their level, or a lower level, is requested using a 830c0d9444aSjoerg.Fl W 831c0d9444aSjoergoption or 8329ff1f2acSchristos.Fl T Cm lint 833c0d9444aSjoergoutput mode. 834c9bcef03Schristos.Pp 835c9bcef03SchristosAs indicated below, all 836c9bcef03Schristos.Cm base 837c9bcef03Schristosand some 838c9bcef03Schristos.Cm style 839c9bcef03Schristoschecks are only performed if a specific operating system name occurs 840c9bcef03Schristosin the arguments of the 841c9bcef03Schristos.Fl W 842c9bcef03Schristoscommand line option, of the 843c9bcef03Schristos.Ic \&Os 844c9bcef03Schristosmacro, of the 845c9bcef03Schristos.Fl Ios 846c9bcef03Schristoscommand line option, or, if neither are present, in the return value 847c9bcef03Schristosof the 848c9bcef03Schristos.Xr uname 3 849c9bcef03Schristosfunction. 850c9bcef03Schristos.Ss Conventions for base system manuals 851c9bcef03Schristos.Bl -ohang 852c9bcef03Schristos.It Sy "Mdocdate found" 853c9bcef03Schristos.Pq mdoc , Nx 854c9bcef03SchristosThe 855c9bcef03Schristos.Ic \&Dd 856c9bcef03Schristosmacro uses CVS 857c9bcef03Schristos.Ic Mdocdate 858c9bcef03Schristoskeyword substitution, which is not supported by the 859c9bcef03Schristos.Nx 860c9bcef03Schristosbase system. 861c9bcef03SchristosConsider using the conventional 862c9bcef03Schristos.Dq "Month dd, yyyy" 863c9bcef03Schristosformat instead. 864c9bcef03Schristos.It Sy "Mdocdate missing" 865c9bcef03Schristos.Pq mdoc , Ox 866c9bcef03SchristosThe 867c9bcef03Schristos.Ic \&Dd 868c9bcef03Schristosmacro does not use CVS 869c9bcef03Schristos.Ic Mdocdate 870c9bcef03Schristoskeyword substitution, but using it is conventionally expected in the 871c9bcef03Schristos.Ox 872c9bcef03Schristosbase system. 873c9bcef03Schristos.It Sy "unknown architecture" 874c9bcef03Schristos.Pq mdoc , Ox , Nx 875c9bcef03SchristosThe third argument of the 876c9bcef03Schristos.Ic \&Dt 877c9bcef03Schristosmacro does not match any of the architectures this operating system 878c9bcef03Schristosis running on. 879c9bcef03Schristos.It Sy "operating system explicitly specified" 880c9bcef03Schristos.Pq mdoc , Ox , Nx 881c9bcef03SchristosThe 882c9bcef03Schristos.Ic \&Os 883c9bcef03Schristosmacro has an argument. 884c9bcef03SchristosIn the base system, it is conventionally left blank. 885c9bcef03Schristos.It Sy "RCS id missing" 886c9bcef03Schristos.Pq Ox , Nx 887c9bcef03SchristosThe manual page lacks the comment line with the RCS identifier 888c9bcef03Schristosgenerated by CVS 889c9bcef03Schristos.Ic OpenBSD 890c9bcef03Schristosor 891c9bcef03Schristos.Ic NetBSD 892c9bcef03Schristoskeyword substitution as conventionally used in these operating systems. 893c9bcef03Schristos.It Sy "referenced manual not found" 894c9bcef03Schristos.Pq mdoc 895c9bcef03SchristosAn 896c9bcef03Schristos.Ic \&Xr 897c9bcef03Schristosmacro references a manual page that is not found in the base system. 898c9bcef03SchristosThe path to look for base system manuals is configurable at compile 899c9bcef03Schristostime and defaults to 900c9bcef03Schristos.Pa /usr/share/man : /usr/X11R6/man . 901c9bcef03Schristos.El 902c9bcef03Schristos.Ss Style suggestions 903c9bcef03Schristos.Bl -ohang 904c9bcef03Schristos.It Sy "legacy man(7) date format" 905c9bcef03Schristos.Pq mdoc 906c9bcef03SchristosThe 907c9bcef03Schristos.Ic \&Dd 908c9bcef03Schristosmacro uses the legacy 909c9bcef03Schristos.Xr man 7 910c9bcef03Schristosdate format 911c9bcef03Schristos.Dq yyyy-dd-mm . 912c9bcef03SchristosConsider using the conventional 913c9bcef03Schristos.Xr mdoc 7 914c9bcef03Schristosdate format 915c9bcef03Schristos.Dq "Month dd, yyyy" 916c9bcef03Schristosinstead. 917c9bcef03Schristos.It Sy "normalizing date format to" : No ... 918c9bcef03Schristos.Pq mdoc , man 919c9bcef03SchristosThe 920c9bcef03Schristos.Ic \&Dd 921c9bcef03Schristosor 922c9bcef03Schristos.Ic \&TH 923c9bcef03Schristosmacro provides an abbreviated month name or a day number with a 924c9bcef03Schristosleading zero. 925c9bcef03SchristosIn the formatted output, the month name is written out in full 926c9bcef03Schristosand the leading zero is omitted. 927c9bcef03Schristos.It Sy "lower case character in document title" 928c9bcef03Schristos.Pq mdoc , man 929c9bcef03SchristosThe title is still used as given in the 930c9bcef03Schristos.Ic \&Dt 931c9bcef03Schristosor 932c9bcef03Schristos.Ic \&TH 933c9bcef03Schristosmacro. 934c9bcef03Schristos.It Sy "duplicate RCS id" 935c9bcef03SchristosA single manual page contains two copies of the RCS identifier for 936c9bcef03Schristosthe same operating system. 937c9bcef03SchristosConsider deleting the later instance and moving the first one up 938c9bcef03Schristosto the top of the page. 939c9bcef03Schristos.It Sy "possible typo in section name" 940c9bcef03Schristos.Pq mdoc 941c9bcef03SchristosFuzzy string matching revealed that the argument of an 942c9bcef03Schristos.Ic \&Sh 943c9bcef03Schristosmacro is similar, but not identical to a standard section name. 944c9bcef03Schristos.It Sy "unterminated quoted argument" 945c9bcef03Schristos.Pq roff 946c9bcef03SchristosMacro arguments can be enclosed in double quote characters 947c9bcef03Schristossuch that space characters and macro names contained in the quoted 948c9bcef03Schristosargument need not be escaped. 949c9bcef03SchristosThe closing quote of the last argument of a macro can be omitted. 950c9bcef03SchristosHowever, omitting it is not recommended because it makes the code 951c9bcef03Schristosharder to read. 952c9bcef03Schristos.It Sy "useless macro" 953c9bcef03Schristos.Pq mdoc 954c9bcef03SchristosA 955c9bcef03Schristos.Ic \&Bt , 956c9bcef03Schristos.Ic \&Tn , 957c9bcef03Schristosor 958c9bcef03Schristos.Ic \&Ud 959c9bcef03Schristosmacro was found. 960c9bcef03SchristosSimply delete it: it serves no useful purpose. 961c9bcef03Schristos.It Sy "consider using OS macro" 962c9bcef03Schristos.Pq mdoc 963c9bcef03SchristosA string was found in plain text or in a 964c9bcef03Schristos.Ic \&Bx 965c9bcef03Schristosmacro that could be represented using 966c9bcef03Schristos.Ic \&Ox , 967c9bcef03Schristos.Ic \&Nx , 968c9bcef03Schristos.Ic \&Fx , 969c9bcef03Schristosor 970c9bcef03Schristos.Ic \&Dx . 971c9bcef03Schristos.It Sy "errnos out of order" 972c9bcef03Schristos.Pq mdoc, Nx 973c9bcef03SchristosThe 974c9bcef03Schristos.Ic \&Er 975c9bcef03Schristositems in a 976c9bcef03Schristos.Ic \&Bl 977c9bcef03Schristoslist are not in alphabetical order. 978c9bcef03Schristos.It Sy "duplicate errno" 979c9bcef03Schristos.Pq mdoc, Nx 980c9bcef03SchristosA 981c9bcef03Schristos.Ic \&Bl 982c9bcef03Schristoslist contains two consecutive 983c9bcef03Schristos.Ic \&It 984c9bcef03Schristosentries describing the same 985c9bcef03Schristos.Ic \&Er 986c9bcef03Schristosnumber. 987c9bcef03Schristos.It Sy "trailing delimiter" 988c9bcef03Schristos.Pq mdoc 989c9bcef03SchristosThe last argument of an 990c9bcef03Schristos.Ic \&Ex , \&Fo , \&Nd , \&Nm , \&Os , \&Sh , \&Ss , \&St , 991c9bcef03Schristosor 992c9bcef03Schristos.Ic \&Sx 993c9bcef03Schristosmacro ends with a trailing delimiter. 994c9bcef03SchristosThis is usually bad style and often indicates typos. 995c9bcef03SchristosMost likely, the delimiter can be removed. 996c9bcef03Schristos.It Sy "no blank before trailing delimiter" 997c9bcef03Schristos.Pq mdoc 998c9bcef03SchristosThe last argument of a macro that supports trailing delimiter 999c9bcef03Schristosarguments is longer than one byte and ends with a trailing delimiter. 1000c9bcef03SchristosConsider inserting a blank such that the delimiter becomes a separate 1001c9bcef03Schristosargument, thus moving it out of the scope of the macro. 1002c9bcef03Schristos.It Sy "fill mode already enabled, skipping" 1003c9bcef03Schristos.Pq man 1004c9bcef03SchristosA 1005c9bcef03Schristos.Ic \&fi 1006c9bcef03Schristosrequest occurs even though the document is still in fill mode, 1007c9bcef03Schristosor already switched back to fill mode. 1008c9bcef03SchristosIt has no effect. 1009c9bcef03Schristos.It Sy "fill mode already disabled, skipping" 1010c9bcef03Schristos.Pq man 1011c9bcef03SchristosAn 1012c9bcef03Schristos.Ic \&nf 1013c9bcef03Schristosrequest occurs even though the document already switched to no-fill mode 1014c9bcef03Schristosand did not switch back to fill mode yet. 1015c9bcef03SchristosIt has no effect. 1016c9bcef03Schristos.It Sy "verbatim \(dq--\(dq, maybe consider using \e(em" 1017c9bcef03Schristos.Pq mdoc 1018c9bcef03SchristosEven though the ASCII output device renders an em-dash as 1019c9bcef03Schristos.Qq \-\- , 1020c9bcef03Schristosthat is not a good way to write it in an input file 1021c9bcef03Schristosbecause it renders poorly on all other output devices. 1022c9bcef03Schristos.It Sy "function name without markup" 1023c9bcef03Schristos.Pq mdoc 1024c9bcef03SchristosA word followed by an empty pair of parentheses occurs on a text line. 1025c9bcef03SchristosConsider using an 1026c9bcef03Schristos.Ic \&Fn 1027c9bcef03Schristosor 1028c9bcef03Schristos.Ic \&Xr 1029c9bcef03Schristosmacro. 1030c9bcef03Schristos.It Sy "whitespace at end of input line" 1031c9bcef03Schristos.Pq mdoc , man , roff 1032c9bcef03SchristosWhitespace at the end of input lines is almost never semantically 1033c9bcef03Schristossignificant \(em but in the odd case where it might be, it is 1034c9bcef03Schristosextremely confusing when reviewing and maintaining documents. 1035c9bcef03Schristos.It Sy "bad comment style" 1036c9bcef03Schristos.Pq roff 1037c9bcef03SchristosComment lines start with a dot, a backslash, and a double-quote character. 1038c9bcef03SchristosThe 1039c9bcef03Schristos.Nm 1040c9bcef03Schristosutility treats the line as a comment line even without the backslash, 1041c9bcef03Schristosbut leaving out the backslash might not be portable. 1042c9bcef03Schristos.El 1043fec65c98Schristos.Ss Warnings related to the document prologue 1044fec65c98Schristos.Bl -ohang 1045fec65c98Schristos.It Sy "missing manual title, using UNTITLED" 1046fec65c98Schristos.Pq mdoc 1047fec65c98SchristosA 1048fec65c98Schristos.Ic \&Dt 1049fec65c98Schristosmacro has no arguments, or there is no 1050fec65c98Schristos.Ic \&Dt 1051fec65c98Schristosmacro before the first non-prologue macro. 1052fec65c98Schristos.It Sy "missing manual title, using \(dq\(dq" 1053fec65c98Schristos.Pq man 1054fec65c98SchristosThere is no 1055fec65c98Schristos.Ic \&TH 1056fec65c98Schristosmacro, or it has no arguments. 1057fec65c98Schristos.It Sy "missing manual section, using \(dq\(dq" 1058fec65c98Schristos.Pq mdoc , man 1059fec65c98SchristosA 1060fec65c98Schristos.Ic \&Dt 1061fec65c98Schristosor 1062fec65c98Schristos.Ic \&TH 1063fec65c98Schristosmacro lacks the mandatory section argument. 1064fec65c98Schristos.It Sy "unknown manual section" 1065fec65c98Schristos.Pq mdoc 1066fec65c98SchristosThe section number in a 1067fec65c98Schristos.Ic \&Dt 1068fec65c98Schristosline is invalid, but still used. 1069fec65c98Schristos.It Sy "missing date, using today's date" 1070fec65c98Schristos.Pq mdoc, man 1071fec65c98SchristosThe document was parsed as 10724154958bSjoerg.Xr mdoc 7 1073fec65c98Schristosand it has no 1074fec65c98Schristos.Ic \&Dd 1075fec65c98Schristosmacro, or the 1076fec65c98Schristos.Ic \&Dd 1077fec65c98Schristosmacro has no arguments or only empty arguments; 1078fec65c98Schristosor the document was parsed as 10794154958bSjoerg.Xr man 7 1080fec65c98Schristosand it has no 1081fec65c98Schristos.Ic \&TH 1082fec65c98Schristosmacro, or the 1083fec65c98Schristos.Ic \&TH 1084fec65c98Schristosmacro has less than three arguments or its third argument is empty. 1085fec65c98Schristos.It Sy "cannot parse date, using it verbatim" 1086fec65c98Schristos.Pq mdoc , man 1087fec65c98SchristosThe date given in a 1088fec65c98Schristos.Ic \&Dd 1089fec65c98Schristosor 1090fec65c98Schristos.Ic \&TH 1091fec65c98Schristosmacro does not follow the conventional format. 1092c9bcef03Schristos.It Sy "date in the future, using it anyway" 1093c9bcef03Schristos.Pq mdoc , man 1094c9bcef03SchristosThe date given in a 1095c9bcef03Schristos.Ic \&Dd 1096c9bcef03Schristosor 1097c9bcef03Schristos.Ic \&TH 1098c9bcef03Schristosmacro is more than a day ahead of the current system 1099c9bcef03Schristos.Xr time 3 . 1100fec65c98Schristos.It Sy "missing Os macro, using \(dq\(dq" 1101fec65c98Schristos.Pq mdoc 1102fec65c98SchristosThe default or current system is not shown in this case. 1103fec65c98Schristos.It Sy "late prologue macro" 1104fec65c98Schristos.Pq mdoc 1105fec65c98SchristosA 1106fec65c98Schristos.Ic \&Dd 1107fec65c98Schristosor 1108fec65c98Schristos.Ic \&Os 1109fec65c98Schristosmacro occurs after some non-prologue macro, but still takes effect. 1110fec65c98Schristos.It Sy "prologue macros out of order" 1111fec65c98Schristos.Pq mdoc 1112fec65c98SchristosThe prologue macros are not given in the conventional order 1113fec65c98Schristos.Ic \&Dd , 1114fec65c98Schristos.Ic \&Dt , 1115fec65c98Schristos.Ic \&Os . 1116fec65c98SchristosAll three macros are used even when given in another order. 11174154958bSjoerg.El 1118fec65c98Schristos.Ss Warnings regarding document structure 1119fec65c98Schristos.Bl -ohang 1120fec65c98Schristos.It Sy ".so is fragile, better use ln(1)" 1121fec65c98Schristos.Pq roff 1122fec65c98SchristosIncluding files only works when the parser program runs with the correct 1123fec65c98Schristoscurrent working directory. 1124fec65c98Schristos.It Sy "no document body" 1125fec65c98Schristos.Pq mdoc , man 1126fec65c98SchristosThe document body contains neither text nor macros. 1127fec65c98SchristosAn empty document is shown, consisting only of a header and a footer line. 1128fec65c98Schristos.It Sy "content before first section header" 1129fec65c98Schristos.Pq mdoc , man 1130fec65c98SchristosSome macros or text precede the first 1131fec65c98Schristos.Ic \&Sh 1132fec65c98Schristosor 1133fec65c98Schristos.Ic \&SH 1134fec65c98Schristossection header. 1135fec65c98SchristosThe offending macros and text are parsed and added to the top level 1136fec65c98Schristosof the syntax tree, outside any section block. 1137fec65c98Schristos.It Sy "first section is not NAME" 1138fec65c98Schristos.Pq mdoc 1139fec65c98SchristosThe argument of the first 1140fec65c98Schristos.Ic \&Sh 1141fec65c98Schristosmacro is not 1142fec65c98Schristos.Sq NAME . 1143fec65c98SchristosThis may confuse 1144fec65c98Schristos.Xr makewhatis 8 1145fec65c98Schristosand 1146fec65c98Schristos.Xr apropos 1 . 11479508192eSchristos.It Sy "NAME section without Nm before Nd" 1148fec65c98Schristos.Pq mdoc 1149fec65c98SchristosThe NAME section does not contain any 1150fec65c98Schristos.Ic \&Nm 11519508192eSchristoschild macro before the first 11529508192eSchristos.Ic \&Nd 11539508192eSchristosmacro. 1154fec65c98Schristos.It Sy "NAME section without description" 1155fec65c98Schristos.Pq mdoc 1156fec65c98SchristosThe NAME section lacks the mandatory 1157fec65c98Schristos.Ic \&Nd 1158fec65c98Schristoschild macro. 1159fec65c98Schristos.It Sy "description not at the end of NAME" 1160fec65c98Schristos.Pq mdoc 1161fec65c98SchristosThe NAME section does contain an 1162fec65c98Schristos.Ic \&Nd 1163fec65c98Schristoschild macro, but other content follows it. 1164fec65c98Schristos.It Sy "bad NAME section content" 1165fec65c98Schristos.Pq mdoc 1166fec65c98SchristosThe NAME section contains plain text or macros other than 1167fec65c98Schristos.Ic \&Nm 1168fec65c98Schristosand 1169fec65c98Schristos.Ic \&Nd . 11709508192eSchristos.It Sy "missing comma before name" 11719508192eSchristos.Pq mdoc 11729508192eSchristosThe NAME section contains an 11739508192eSchristos.Ic \&Nm 11749508192eSchristosmacro that is neither the first one nor preceded by a comma. 1175fec65c98Schristos.It Sy "missing description line, using \(dq\(dq" 1176fec65c98Schristos.Pq mdoc 11774154958bSjoergThe 1178fec65c98Schristos.Ic \&Nd 1179fec65c98Schristosmacro lacks the required argument. 1180fec65c98SchristosThe title line of the manual will end after the dash. 1181c9bcef03Schristos.It Sy "description line outside NAME section" 1182c9bcef03Schristos.Pq mdoc 1183c9bcef03SchristosAn 1184c9bcef03Schristos.Ic \&Nd 1185c9bcef03Schristosmacro appears outside the NAME section. 1186c9bcef03SchristosThe arguments are printed anyway and the following text is used for 1187c9bcef03Schristos.Xr apropos 1 , 1188c9bcef03Schristosbut none of that behaviour is portable. 1189fec65c98Schristos.It Sy "sections out of conventional order" 1190fec65c98Schristos.Pq mdoc 1191fec65c98SchristosA standard section occurs after another section it usually precedes. 1192fec65c98SchristosAll section titles are used as given, 1193fec65c98Schristosand the order of sections is not changed. 1194fec65c98Schristos.It Sy "duplicate section title" 1195fec65c98Schristos.Pq mdoc 1196fec65c98SchristosThe same standard section title occurs more than once. 1197fec65c98Schristos.It Sy "unexpected section" 1198fec65c98Schristos.Pq mdoc 1199fec65c98SchristosA standard section header occurs in a section of the manual 1200fec65c98Schristoswhere it normally isn't useful. 1201c9bcef03Schristos.It Sy "cross reference to self" 1202c9bcef03Schristos.Pq mdoc 1203c9bcef03SchristosAn 1204c9bcef03Schristos.Ic \&Xr 1205c9bcef03Schristosmacro refers to a name and section matching the section of the present 1206c9bcef03Schristosmanual page and a name mentioned in an 1207c9bcef03Schristos.Ic \&Nm 1208c9bcef03Schristosmacro in the NAME or SYNOPSIS section, or in an 1209c9bcef03Schristos.Ic \&Fn 1210c9bcef03Schristosor 1211c9bcef03Schristos.Ic \&Fo 1212c9bcef03Schristosmacro in the SYNOPSIS. 1213c9bcef03SchristosConsider using 1214c9bcef03Schristos.Ic \&Nm 1215c9bcef03Schristosor 1216c9bcef03Schristos.Ic \&Fn 1217c9bcef03Schristosinstead of 1218c9bcef03Schristos.Ic \&Xr . 1219fec65c98Schristos.It Sy "unusual Xr order" 1220fec65c98Schristos.Pq mdoc 1221fec65c98SchristosIn the SEE ALSO section, an 1222fec65c98Schristos.Ic \&Xr 1223fec65c98Schristosmacro with a lower section number follows one with a higher number, 1224fec65c98Schristosor two 1225fec65c98Schristos.Ic \&Xr 12269ff1f2acSchristosmacros referring to the same section are out of alphabetical order. 1227fec65c98Schristos.It Sy "unusual Xr punctuation" 1228fec65c98Schristos.Pq mdoc 1229fec65c98SchristosIn the SEE ALSO section, punctuation between two 1230fec65c98Schristos.Ic \&Xr 1231fec65c98Schristosmacros differs from a single comma, or there is trailing punctuation 1232fec65c98Schristosafter the last 1233fec65c98Schristos.Ic \&Xr 1234fec65c98Schristosmacro. 1235fec65c98Schristos.It Sy "AUTHORS section without An macro" 1236fec65c98Schristos.Pq mdoc 1237fec65c98SchristosAn AUTHORS sections contains no 1238fec65c98Schristos.Ic \&An 1239fec65c98Schristosmacros, or only empty ones. 1240fec65c98SchristosProbably, there are author names lacking markup. 1241fec65c98Schristos.El 1242fec65c98Schristos.Ss "Warnings related to macros and nesting" 1243fec65c98Schristos.Bl -ohang 1244fec65c98Schristos.It Sy "obsolete macro" 1245fec65c98Schristos.Pq mdoc 1246fec65c98SchristosSee the 12474154958bSjoerg.Xr mdoc 7 1248fec65c98Schristosmanual for replacements. 1249fec65c98Schristos.It Sy "macro neither callable nor escaped" 1250fec65c98Schristos.Pq mdoc 1251fec65c98SchristosThe name of a macro that is not callable appears on a macro line. 1252fec65c98SchristosIt is printed verbatim. 1253fec65c98SchristosIf the intention is to call it, move it to its own input line; 1254fec65c98Schristosotherwise, escape it by prepending 1255fec65c98Schristos.Sq \e& . 1256fec65c98Schristos.It Sy "skipping paragraph macro" 1257fec65c98SchristosIn 1258fec65c98Schristos.Xr mdoc 7 1259fec65c98Schristosdocuments, this happens 1260fec65c98Schristos.Bl -dash -compact 1261fec65c98Schristos.It 1262fec65c98Schristosat the beginning and end of sections and subsections 1263fec65c98Schristos.It 1264fec65c98Schristosright before non-compact lists and displays 1265fec65c98Schristos.It 1266fec65c98Schristosat the end of items in non-column, non-compact lists 1267fec65c98Schristos.It 1268fec65c98Schristosand for multiple consecutive paragraph macros. 1269fec65c98Schristos.El 1270fec65c98SchristosIn 1271fec65c98Schristos.Xr man 7 1272fec65c98Schristosdocuments, it happens 1273fec65c98Schristos.Bl -dash -compact 1274fec65c98Schristos.It 1275fec65c98Schristosfor empty 1276fec65c98Schristos.Ic \&P , 1277fec65c98Schristos.Ic \&PP , 12784154958bSjoergand 1279fec65c98Schristos.Ic \&LP 1280fec65c98Schristosmacros 1281fec65c98Schristos.It 1282fec65c98Schristosfor 1283fec65c98Schristos.Ic \&IP 1284fec65c98Schristosmacros having neither head nor body arguments 1285fec65c98Schristos.It 1286fec65c98Schristosfor 1287fec65c98Schristos.Ic \&br 1288fec65c98Schristosor 1289fec65c98Schristos.Ic \&sp 1290fec65c98Schristosright after 1291fec65c98Schristos.Ic \&SH 1292fec65c98Schristosor 1293fec65c98Schristos.Ic \&SS 1294fec65c98Schristos.El 1295fec65c98Schristos.It Sy "moving paragraph macro out of list" 1296fec65c98Schristos.Pq mdoc 1297fec65c98SchristosA list item in a 1298fec65c98Schristos.Ic \&Bl 1299fec65c98Schristoslist contains a trailing paragraph macro. 1300fec65c98SchristosThe paragraph macro is moved after the end of the list. 1301fec65c98Schristos.It Sy "skipping no-space macro" 1302fec65c98Schristos.Pq mdoc 1303fec65c98SchristosAn input line begins with an 1304fec65c98Schristos.Ic \&Ns 1305c9bcef03Schristosmacro, or the next argument after an 1306c9bcef03Schristos.Ic \&Ns 1307c9bcef03Schristosmacro is an isolated closing delimiter. 1308fec65c98SchristosThe macro is ignored. 1309fec65c98Schristos.It Sy "blocks badly nested" 1310fec65c98Schristos.Pq mdoc 1311fec65c98SchristosIf two blocks intersect, one should completely contain the other. 1312fec65c98SchristosOtherwise, rendered output is likely to look strange in any output 1313fec65c98Schristosformat, and rendering in SGML-based output formats is likely to be 1314fec65c98Schristosoutright wrong because such languages do not support badly nested 1315fec65c98Schristosblocks at all. 1316fec65c98SchristosTypical examples of badly nested blocks are 1317fec65c98Schristos.Qq Ic \&Ao \&Bo \&Ac \&Bc 1318fec65c98Schristosand 1319fec65c98Schristos.Qq Ic \&Ao \&Bq \&Ac . 1320fec65c98SchristosIn these examples, 1321fec65c98Schristos.Ic \&Ac 1322fec65c98Schristosbreaks 1323fec65c98Schristos.Ic \&Bo 1324fec65c98Schristosand 1325fec65c98Schristos.Ic \&Bq , 1326fec65c98Schristosrespectively. 1327fec65c98Schristos.It Sy "nested displays are not portable" 1328fec65c98Schristos.Pq mdoc 1329fec65c98SchristosA 1330fec65c98Schristos.Ic \&Bd , 1331fec65c98Schristos.Ic \&D1 , 1332fec65c98Schristosor 1333fec65c98Schristos.Ic \&Dl 1334fec65c98Schristosdisplay occurs nested inside another 1335fec65c98Schristos.Ic \&Bd 1336fec65c98Schristosdisplay. 1337fec65c98SchristosThis works with 1338fec65c98Schristos.Nm , 1339fec65c98Schristosbut fails with most other implementations. 1340fec65c98Schristos.It Sy "moving content out of list" 1341fec65c98Schristos.Pq mdoc 1342fec65c98SchristosA 1343fec65c98Schristos.Ic \&Bl 1344fec65c98Schristoslist block contains text or macros before the first 1345fec65c98Schristos.Ic \&It 1346fec65c98Schristosmacro. 1347fec65c98SchristosThe offending children are moved before the beginning of the list. 1348c9bcef03Schristos.It Sy "first macro on line" 1349c9bcef03SchristosInside a 1350c9bcef03Schristos.Ic \&Bl Fl column 1351c9bcef03Schristoslist, a 1352c9bcef03Schristos.Ic \&Ta 1353c9bcef03Schristosmacro occurs as the first macro on a line, which is not portable. 1354fec65c98Schristos.It Sy "line scope broken" 1355fec65c98Schristos.Pq man 1356fec65c98SchristosWhile parsing the next-line scope of the previous macro, 1357fec65c98Schristosanother macro is found that prematurely terminates the previous one. 1358fec65c98SchristosThe previous, interrupted macro is deleted from the parse tree. 1359fec65c98Schristos.El 1360fec65c98Schristos.Ss "Warnings related to missing arguments" 1361fec65c98Schristos.Bl -ohang 1362fec65c98Schristos.It Sy "skipping empty request" 1363fec65c98Schristos.Pq roff , eqn 1364fec65c98SchristosThe macro name is missing from a macro definition request, 1365fec65c98Schristosor an 1366fec65c98Schristos.Xr eqn 7 1367fec65c98Schristoscontrol statement or operation keyword lacks its required argument. 1368fec65c98Schristos.It Sy "conditional request controls empty scope" 1369fec65c98Schristos.Pq roff 1370fec65c98SchristosA conditional request is only useful if any of the following 1371fec65c98Schristosfollows it on the same logical input line: 1372fec65c98Schristos.Bl -dash -compact 13734154958bSjoerg.It 13744154958bSjoergThe 1375fec65c98Schristos.Sq \e{ 1376fec65c98Schristoskeyword to open a multi-line scope. 1377fec65c98Schristos.It 1378fec65c98SchristosA request or macro or some text, resulting in a single-line scope. 1379fec65c98Schristos.It 1380fec65c98SchristosThe immediate end of the logical line without any intervening whitespace, 1381fec65c98Schristosresulting in next-line scope. 1382fec65c98Schristos.El 1383fec65c98SchristosHere, a conditional request is followed by trailing whitespace only, 1384fec65c98Schristosand there is no other content on its logical input line. 1385fec65c98SchristosNote that it doesn't matter whether the logical input line is split 1386fec65c98Schristosacross multiple physical input lines using 1387fec65c98Schristos.Sq \e 1388fec65c98Schristosline continuation characters. 1389fec65c98SchristosThis is one of the rare cases 1390fec65c98Schristoswhere trailing whitespace is syntactically significant. 1391fec65c98SchristosThe conditional request controls a scope containing whitespace only, 1392fec65c98Schristosso it is unlikely to have a significant effect, 1393fec65c98Schristosexcept that it may control a following 1394fec65c98Schristos.Ic \&el 1395fec65c98Schristosclause. 1396fec65c98Schristos.It Sy "skipping empty macro" 1397fec65c98Schristos.Pq mdoc 1398fec65c98SchristosThe indicated macro has no arguments and hence no effect. 1399fec65c98Schristos.It Sy "empty block" 1400fec65c98Schristos.Pq mdoc , man 1401fec65c98SchristosA 1402fec65c98Schristos.Ic \&Bd , 1403fec65c98Schristos.Ic \&Bk , 1404fec65c98Schristos.Ic \&Bl , 1405fec65c98Schristos.Ic \&D1 , 1406fec65c98Schristos.Ic \&Dl , 1407c9bcef03Schristos.Ic \&MT , 1408fec65c98Schristos.Ic \&RS , 1409fec65c98Schristosor 1410fec65c98Schristos.Ic \&UR 1411fec65c98Schristosblock contains nothing in its body and will produce no output. 1412fec65c98Schristos.It Sy "empty argument, using 0n" 1413fec65c98Schristos.Pq mdoc 1414fec65c98SchristosThe required width is missing after 1415fec65c98Schristos.Ic \&Bd 1416fec65c98Schristosor 1417fec65c98Schristos.Ic \&Bl 1418fec65c98Schristos.Fl offset 1419fec65c98Schristosor 1420fec65c98Schristos.Fl width . 1421fec65c98Schristos.It Sy "missing display type, using -ragged" 1422fec65c98Schristos.Pq mdoc 1423fec65c98SchristosThe 1424fec65c98Schristos.Ic \&Bd 1425fec65c98Schristosmacro is invoked without the required display type. 1426fec65c98Schristos.It Sy "list type is not the first argument" 1427fec65c98Schristos.Pq mdoc 1428fec65c98SchristosIn a 1429fec65c98Schristos.Ic \&Bl 1430fec65c98Schristosmacro, at least one other argument precedes the type argument. 1431fec65c98SchristosThe 1432fec65c98Schristos.Nm 1433fec65c98Schristosutility copes with any argument order, but some other 1434fec65c98Schristos.Xr mdoc 7 1435fec65c98Schristosimplementations do not. 1436fec65c98Schristos.It Sy "missing -width in -tag list, using 8n" 1437fec65c98Schristos.Pq mdoc 1438fec65c98SchristosEvery 1439fec65c98Schristos.Ic \&Bl 1440fec65c98Schristosmacro having the 1441fec65c98Schristos.Fl tag 1442fec65c98Schristosargument requires 1443fec65c98Schristos.Fl width , 1444fec65c98Schristostoo. 1445fec65c98Schristos.It Sy "missing utility name, using \(dq\(dq" 1446fec65c98Schristos.Pq mdoc 1447fec65c98SchristosThe 1448fec65c98Schristos.Ic \&Ex Fl std 1449fec65c98Schristosmacro is called without an argument before 1450fec65c98Schristos.Ic \&Nm 1451fec65c98Schristoshas first been called with an argument. 1452fec65c98Schristos.It Sy "missing function name, using \(dq\(dq" 1453fec65c98Schristos.Pq mdoc 1454fec65c98SchristosThe 1455fec65c98Schristos.Ic \&Fo 1456fec65c98Schristosmacro is called without an argument. 1457fec65c98SchristosNo function name is printed. 1458fec65c98Schristos.It Sy "empty head in list item" 1459fec65c98Schristos.Pq mdoc 1460fec65c98SchristosIn a 1461fec65c98Schristos.Ic \&Bl 1462fec65c98Schristos.Fl diag , 1463fec65c98Schristos.Fl hang , 1464fec65c98Schristos.Fl inset , 1465fec65c98Schristos.Fl ohang , 1466fec65c98Schristosor 1467fec65c98Schristos.Fl tag 1468fec65c98Schristoslist, an 1469fec65c98Schristos.Ic \&It 1470fec65c98Schristosmacro lacks the required argument. 1471fec65c98SchristosThe item head is left empty. 1472fec65c98Schristos.It Sy "empty list item" 1473fec65c98Schristos.Pq mdoc 1474fec65c98SchristosIn a 1475fec65c98Schristos.Ic \&Bl 1476fec65c98Schristos.Fl bullet , 1477fec65c98Schristos.Fl dash , 1478fec65c98Schristos.Fl enum , 1479fec65c98Schristosor 1480fec65c98Schristos.Fl hyphen 1481fec65c98Schristoslist, an 1482fec65c98Schristos.Ic \&It 1483fec65c98Schristosblock is empty. 1484fec65c98SchristosAn empty list item is shown. 1485c9bcef03Schristos.It Sy "missing argument, using next line" 1486c9bcef03Schristos.Pq mdoc 1487c9bcef03SchristosAn 1488c9bcef03Schristos.Ic \&It 1489c9bcef03Schristosmacro in a 1490c9bcef03Schristos.Ic \&Bd Fl column 1491c9bcef03Schristoslist has no arguments. 1492c9bcef03SchristosWhile 1493c9bcef03Schristos.Nm 1494c9bcef03Schristosuses the text or macros of the following line, if any, for the cell, 1495c9bcef03Schristosother formatters may misformat the list. 1496fec65c98Schristos.It Sy "missing font type, using \efR" 1497fec65c98Schristos.Pq mdoc 1498fec65c98SchristosA 1499fec65c98Schristos.Ic \&Bf 1500fec65c98Schristosmacro has no argument. 1501fec65c98SchristosIt switches to the default font. 1502fec65c98Schristos.It Sy "unknown font type, using \efR" 1503fec65c98Schristos.Pq mdoc 1504fec65c98SchristosThe 1505fec65c98Schristos.Ic \&Bf 1506fec65c98Schristosargument is invalid. 1507fec65c98SchristosThe default font is used instead. 1508fec65c98Schristos.It Sy "nothing follows prefix" 1509fec65c98Schristos.Pq mdoc 1510fec65c98SchristosA 1511fec65c98Schristos.Ic \&Pf 1512fec65c98Schristosmacro has no argument, or only one argument and no macro follows 1513fec65c98Schristoson the same input line. 1514fec65c98SchristosThis defeats its purpose; in particular, spacing is not suppressed 1515fec65c98Schristosbefore the text or macros following on the next input line. 1516fec65c98Schristos.It Sy "empty reference block" 1517fec65c98Schristos.Pq mdoc 1518fec65c98SchristosAn 1519fec65c98Schristos.Ic \&Rs 1520fec65c98Schristosmacro is immediately followed by an 1521fec65c98Schristos.Ic \&Re 1522fec65c98Schristosmacro on the next input line. 1523fec65c98SchristosSuch an empty block does not produce any output. 15249508192eSchristos.It Sy "missing section argument" 15259508192eSchristos.Pq mdoc 15269508192eSchristosAn 15279508192eSchristos.Ic \&Xr 15289508192eSchristosmacro lacks its second, section number argument. 15299508192eSchristosThe first argument, i.e. the name, is printed, but without subsequent 15309508192eSchristosparentheses. 1531fec65c98Schristos.It Sy "missing -std argument, adding it" 1532fec65c98Schristos.Pq mdoc 1533fec65c98SchristosAn 1534fec65c98Schristos.Ic \&Ex 1535fec65c98Schristosor 1536fec65c98Schristos.Ic \&Rv 1537fec65c98Schristosmacro lacks the required 1538fec65c98Schristos.Fl std 1539fec65c98Schristosargument. 1540fec65c98SchristosThe 1541fec65c98Schristos.Nm 1542fec65c98Schristosutility assumes 1543fec65c98Schristos.Fl std 1544fec65c98Schristoseven when it is not specified, but other implementations may not. 1545fec65c98Schristos.It Sy "missing option string, using \(dq\(dq" 1546fec65c98Schristos.Pq man 1547fec65c98SchristosThe 1548fec65c98Schristos.Ic \&OP 1549fec65c98Schristosmacro is invoked without any argument. 1550fec65c98SchristosAn empty pair of square brackets is shown. 1551fec65c98Schristos.It Sy "missing resource identifier, using \(dq\(dq" 1552fec65c98Schristos.Pq man 1553fec65c98SchristosThe 1554c9bcef03Schristos.Ic \&MT 1555c9bcef03Schristosor 1556fec65c98Schristos.Ic \&UR 1557fec65c98Schristosmacro is invoked without any argument. 1558fec65c98SchristosAn empty pair of angle brackets is shown. 1559fec65c98Schristos.It Sy "missing eqn box, using \(dq\(dq" 1560fec65c98Schristos.Pq eqn 1561fec65c98SchristosA diacritic mark or a binary operator is found, 1562fec65c98Schristosbut there is nothing to the left of it. 1563fec65c98SchristosAn empty box is inserted. 1564fec65c98Schristos.El 1565fec65c98Schristos.Ss "Warnings related to bad macro arguments" 1566fec65c98Schristos.Bl -ohang 1567fec65c98Schristos.It Sy "duplicate argument" 1568fec65c98Schristos.Pq mdoc 1569fec65c98SchristosA 1570fec65c98Schristos.Ic \&Bd 1571fec65c98Schristosor 1572fec65c98Schristos.Ic \&Bl 1573fec65c98Schristosmacro has more than one 1574fec65c98Schristos.Fl compact , 1575fec65c98Schristosmore than one 1576fec65c98Schristos.Fl offset , 1577fec65c98Schristosor more than one 1578fec65c98Schristos.Fl width 1579fec65c98Schristosargument. 1580fec65c98SchristosAll but the last instances of these arguments are ignored. 1581fec65c98Schristos.It Sy "skipping duplicate argument" 1582fec65c98Schristos.Pq mdoc 1583fec65c98SchristosAn 1584fec65c98Schristos.Ic \&An 1585fec65c98Schristosmacro has more than one 1586fec65c98Schristos.Fl split 1587fec65c98Schristosor 1588fec65c98Schristos.Fl nosplit 1589fec65c98Schristosargument. 1590fec65c98SchristosAll but the first of these arguments are ignored. 1591fec65c98Schristos.It Sy "skipping duplicate display type" 1592fec65c98Schristos.Pq mdoc 1593fec65c98SchristosA 1594fec65c98Schristos.Ic \&Bd 1595fec65c98Schristosmacro has more than one type argument; the first one is used. 1596fec65c98Schristos.It Sy "skipping duplicate list type" 1597fec65c98Schristos.Pq mdoc 1598fec65c98SchristosA 1599fec65c98Schristos.Ic \&Bl 1600fec65c98Schristosmacro has more than one type argument; the first one is used. 1601fec65c98Schristos.It Sy "skipping -width argument" 1602fec65c98Schristos.Pq mdoc 1603fec65c98SchristosA 1604fec65c98Schristos.Ic \&Bl 1605fec65c98Schristos.Fl column , 1606fec65c98Schristos.Fl diag , 1607fec65c98Schristos.Fl ohang , 1608fec65c98Schristos.Fl inset , 1609fec65c98Schristosor 1610fec65c98Schristos.Fl item 1611fec65c98Schristoslist has a 1612fec65c98Schristos.Fl width 1613fec65c98Schristosargument. 1614fec65c98SchristosThat has no effect. 1615fec65c98Schristos.It Sy "wrong number of cells" 1616fec65c98SchristosIn a line of a 1617fec65c98Schristos.Ic \&Bl Fl column 1618fec65c98Schristoslist, the number of tabs or 1619fec65c98Schristos.Ic \&Ta 1620fec65c98Schristosmacros is less than the number expected from the list header line 1621fec65c98Schristosor exceeds the expected number by more than one. 1622fec65c98SchristosMissing cells remain empty, and all cells exceeding the number of 1623fec65c98Schristoscolumns are joined into one single cell. 1624fec65c98Schristos.It Sy "unknown AT&T UNIX version" 1625fec65c98Schristos.Pq mdoc 1626fec65c98SchristosAn 1627fec65c98Schristos.Ic \&At 1628fec65c98Schristosmacro has an invalid argument. 1629fec65c98SchristosIt is used verbatim, with 1630fec65c98Schristos.Qq "AT&T UNIX " 1631fec65c98Schristosprefixed to it. 1632fec65c98Schristos.It Sy "comma in function argument" 1633fec65c98Schristos.Pq mdoc 1634fec65c98SchristosAn argument of an 1635fec65c98Schristos.Ic \&Fa 1636fec65c98Schristosor 1637fec65c98Schristos.Ic \&Fn 1638fec65c98Schristosmacro contains a comma; it should probably be split into two arguments. 1639fec65c98Schristos.It Sy "parenthesis in function name" 1640fec65c98Schristos.Pq mdoc 1641fec65c98SchristosThe first argument of an 1642fec65c98Schristos.Ic \&Fc 1643fec65c98Schristosor 1644fec65c98Schristos.Ic \&Fn 1645fec65c98Schristosmacro contains an opening or closing parenthesis; that's probably wrong, 1646fec65c98Schristosparentheses are added automatically. 1647c9bcef03Schristos.It Sy "unknown library name" 1648c9bcef03Schristos.Pq mdoc, not on Ox 1649c9bcef03SchristosAn 1650c9bcef03Schristos.Ic \&Lb 1651c9bcef03Schristosmacro has an unknown name argument and will be rendered as 1652c9bcef03Schristos.Qq library Dq Ar name . 1653fec65c98Schristos.It Sy "invalid content in Rs block" 1654fec65c98Schristos.Pq mdoc 1655fec65c98SchristosAn 1656fec65c98Schristos.Ic \&Rs 1657fec65c98Schristosblock contains plain text or non-% macros. 1658fec65c98SchristosThe bogus content is left in the syntax tree. 1659fec65c98SchristosFormatting may be poor. 1660fec65c98Schristos.It Sy "invalid Boolean argument" 1661fec65c98Schristos.Pq mdoc 1662fec65c98SchristosAn 1663fec65c98Schristos.Ic \&Sm 1664fec65c98Schristosmacro has an argument other than 1665fec65c98Schristos.Cm on 1666fec65c98Schristosor 1667fec65c98Schristos.Cm off . 1668fec65c98SchristosThe invalid argument is moved out of the macro, which leaves the macro 1669fec65c98Schristosempty, causing it to toggle the spacing mode. 1670*544c191cSchristos.It Sy "argument contains two font escapes" 1671*544c191cSchristos.Pq roff 1672*544c191cSchristosThe second argument of a 1673*544c191cSchristos.Ic char 1674*544c191cSchristosrequest contains more than one font escape sequence. 1675*544c191cSchristosA wrong font may remain active after using the character. 1676fec65c98Schristos.It Sy "unknown font, skipping request" 1677fec65c98Schristos.Pq man , tbl 1678fec65c98SchristosA 1679fec65c98Schristos.Xr roff 7 1680fec65c98Schristos.Ic \&ft 1681fec65c98Schristosrequest or a 1682fec65c98Schristos.Xr tbl 7 1683fec65c98Schristos.Ic \&f 1684fec65c98Schristoslayout modifier has an unknown 1685fec65c98Schristos.Ar font 1686fec65c98Schristosargument. 1687fec65c98Schristos.It Sy "odd number of characters in request" 1688fec65c98Schristos.Pq roff 1689fec65c98SchristosA 1690fec65c98Schristos.Ic \&tr 1691fec65c98Schristosrequest contains an odd number of characters. 1692fec65c98SchristosThe last character is mapped to the blank character. 1693fec65c98Schristos.El 1694fec65c98Schristos.Ss "Warnings related to plain text" 1695fec65c98Schristos.Bl -ohang 1696fec65c98Schristos.It Sy "blank line in fill mode, using .sp" 1697fec65c98Schristos.Pq mdoc 1698fec65c98SchristosThe meaning of blank input lines is only well-defined in non-fill mode: 1699fec65c98SchristosIn fill mode, line breaks of text input lines are not supposed to be 1700fec65c98Schristossignificant. 1701fec65c98SchristosHowever, for compatibility with groff, blank lines in fill mode 1702fec65c98Schristosare replaced with 1703fec65c98Schristos.Ic \&sp 1704fec65c98Schristosrequests. 1705fec65c98Schristos.It Sy "tab in filled text" 1706fec65c98Schristos.Pq mdoc , man 1707fec65c98SchristosThe meaning of tab characters is only well-defined in non-fill mode: 1708fec65c98SchristosIn fill mode, whitespace is not supposed to be significant 1709fec65c98Schristoson text input lines. 1710fec65c98SchristosAs an implementation dependent choice, tab characters on text lines 1711fec65c98Schristosare passed through to the formatters in any case. 1712fec65c98SchristosGiven that the text before the tab character will be filled, 1713fec65c98Schristosit is hard to predict which tab stop position the tab will advance to. 17149508192eSchristos.It Sy "new sentence, new line" 17159508192eSchristos.Pq mdoc 17169508192eSchristosA new sentence starts in the middle of a text line. 17179508192eSchristosStart it on a new input line to help formatters produce correct spacing. 1718fec65c98Schristos.It Sy "invalid escape sequence" 1719fec65c98Schristos.Pq roff 1720fec65c98SchristosAn escape sequence has an invalid opening argument delimiter, lacks the 1721*544c191cSchristosclosing argument delimiter, the argument is of an invalid form, or it is 1722*544c191cSchristosa character escape sequence with an invalid name. 1723fec65c98SchristosIf the argument is incomplete, 1724fec65c98Schristos.Ic \e* 17254154958bSjoergand 1726fec65c98Schristos.Ic \en 1727fec65c98Schristosexpand to an empty string, 1728fec65c98Schristos.Ic \eB 1729fec65c98Schristosto the digit 1730fec65c98Schristos.Sq 0 , 1731fec65c98Schristosand 1732fec65c98Schristos.Ic \ew 1733fec65c98Schristosto the length of the incomplete argument. 1734fec65c98SchristosAll other invalid escape sequences are ignored. 1735*544c191cSchristos.It Sy "undefined escape, printing literally" 1736*544c191cSchristos.Pq roff 1737*544c191cSchristosIn an escape sequence, the first character 1738*544c191cSchristosright after the leading backslash is invalid. 1739*544c191cSchristosThat character is printed literally, 1740*544c191cSchristoswhich is equivalent to ignoring the backslash. 1741fec65c98Schristos.It Sy "undefined string, using \(dq\(dq" 1742fec65c98Schristos.Pq roff 1743fec65c98SchristosIf a string is used without being defined before, 1744fec65c98Schristosits value is implicitly set to the empty string. 1745fec65c98SchristosHowever, defining strings explicitly before use 1746fec65c98Schristoskeeps the code more readable. 1747fec65c98Schristos.El 1748fec65c98Schristos.Ss "Warnings related to tables" 1749fec65c98Schristos.Bl -ohang 1750fec65c98Schristos.It Sy "tbl line starts with span" 1751fec65c98Schristos.Pq tbl 1752fec65c98SchristosThe first cell in a table layout line is a horizontal span 1753fec65c98Schristos.Pq Sq Cm s . 1754fec65c98SchristosData provided for this cell is ignored, and nothing is printed in the cell. 1755fec65c98Schristos.It Sy "tbl column starts with span" 1756fec65c98Schristos.Pq tbl 1757fec65c98SchristosThe first line of a table layout specification 1758fec65c98Schristosrequests a vertical span 1759fec65c98Schristos.Pq Sq Cm ^ . 1760fec65c98SchristosData provided for this cell is ignored, and nothing is printed in the cell. 1761fec65c98Schristos.It Sy "skipping vertical bar in tbl layout" 1762fec65c98Schristos.Pq tbl 1763fec65c98SchristosA table layout specification contains more than two consecutive vertical bars. 1764fec65c98SchristosA double bar is printed, all additional bars are discarded. 1765fec65c98Schristos.El 1766fec65c98Schristos.Ss "Errors related to tables" 1767fec65c98Schristos.Bl -ohang 1768fec65c98Schristos.It Sy "non-alphabetic character in tbl options" 1769fec65c98Schristos.Pq tbl 1770fec65c98SchristosThe table options line contains a character other than a letter, 1771fec65c98Schristosblank, or comma where the beginning of an option name is expected. 1772fec65c98SchristosThe character is ignored. 1773fec65c98Schristos.It Sy "skipping unknown tbl option" 1774fec65c98Schristos.Pq tbl 1775fec65c98SchristosThe table options line contains a string of letters that does not 1776fec65c98Schristosmatch any known option name. 1777fec65c98SchristosThe word is ignored. 1778fec65c98Schristos.It Sy "missing tbl option argument" 1779fec65c98Schristos.Pq tbl 1780fec65c98SchristosA table option that requires an argument is not followed by an 1781fec65c98Schristosopening parenthesis, or the opening parenthesis is immediately 1782fec65c98Schristosfollowed by a closing parenthesis. 1783fec65c98SchristosThe option is ignored. 1784fec65c98Schristos.It Sy "wrong tbl option argument size" 1785fec65c98Schristos.Pq tbl 1786fec65c98SchristosA table option argument contains an invalid number of characters. 1787fec65c98SchristosBoth the option and the argument are ignored. 1788fec65c98Schristos.It Sy "empty tbl layout" 1789fec65c98Schristos.Pq tbl 1790fec65c98SchristosA table layout specification is completely empty, 1791fec65c98Schristosspecifying zero lines and zero columns. 1792fec65c98SchristosAs a fallback, a single left-justified column is used. 1793fec65c98Schristos.It Sy "invalid character in tbl layout" 1794fec65c98Schristos.Pq tbl 1795fec65c98SchristosA table layout specification contains a character that can neither 1796fec65c98Schristosbe interpreted as a layout key character nor as a layout modifier, 1797fec65c98Schristosor a modifier precedes the first key. 1798fec65c98SchristosThe invalid character is discarded. 1799fec65c98Schristos.It Sy "unmatched parenthesis in tbl layout" 1800fec65c98Schristos.Pq tbl 1801fec65c98SchristosA table layout specification contains an opening parenthesis, 1802fec65c98Schristosbut no matching closing parenthesis. 1803fec65c98SchristosThe rest of the input line, starting from the parenthesis, has no effect. 1804fec65c98Schristos.It Sy "tbl without any data cells" 1805fec65c98Schristos.Pq tbl 1806fec65c98SchristosA table does not contain any data cells. 1807fec65c98SchristosIt will probably produce no output. 1808fec65c98Schristos.It Sy "ignoring data in spanned tbl cell" 1809fec65c98Schristos.Pq tbl 1810fec65c98SchristosA table cell is marked as a horizontal span 1811fec65c98Schristos.Pq Sq Cm s 1812fec65c98Schristosor vertical span 1813fec65c98Schristos.Pq Sq Cm ^ 1814fec65c98Schristosin the table layout, but it contains data. 1815fec65c98SchristosThe data is ignored. 1816fec65c98Schristos.It Sy "ignoring extra tbl data cells" 1817fec65c98Schristos.Pq tbl 1818fec65c98SchristosA data line contains more cells than the corresponding layout line. 1819fec65c98SchristosThe data in the extra cells is ignored. 1820fec65c98Schristos.It Sy "data block open at end of tbl" 1821fec65c98Schristos.Pq tbl 1822fec65c98SchristosA data block is opened with 1823fec65c98Schristos.Cm T{ , 1824fec65c98Schristosbut never closed with a matching 1825fec65c98Schristos.Cm T} . 1826fec65c98SchristosThe remaining data lines of the table are all put into one cell, 1827fec65c98Schristosand any remaining cells stay empty. 1828fec65c98Schristos.El 1829fec65c98Schristos.Ss "Errors related to roff, mdoc, and man code" 1830fec65c98Schristos.Bl -ohang 1831c9bcef03Schristos.It Sy "duplicate prologue macro" 1832c9bcef03Schristos.Pq mdoc 1833c9bcef03SchristosOne of the prologue macros occurs more than once. 1834c9bcef03SchristosThe last instance overrides all previous ones. 1835c9bcef03Schristos.It Sy "skipping late title macro" 1836c9bcef03Schristos.Pq mdoc 1837c9bcef03SchristosThe 1838c9bcef03Schristos.Ic \&Dt 1839c9bcef03Schristosmacro appears after the first non-prologue macro. 1840c9bcef03SchristosTraditional formatters cannot handle this because 1841c9bcef03Schristosthey write the page header before parsing the document body. 1842c9bcef03SchristosEven though this technical restriction does not apply to 1843c9bcef03Schristos.Nm , 1844c9bcef03Schristostraditional semantics is preserved. 1845c9bcef03SchristosThe late macro is discarded including its arguments. 1846fec65c98Schristos.It Sy "input stack limit exceeded, infinite loop?" 1847fec65c98Schristos.Pq roff 1848fec65c98SchristosExplicit recursion limits are implemented for the following features, 1849fec65c98Schristosin order to prevent infinite loops: 1850fec65c98Schristos.Bl -dash -compact 1851fec65c98Schristos.It 1852fec65c98Schristosexpansion of nested escape sequences 1853fec65c98Schristosincluding expansion of strings and number registers, 1854fec65c98Schristos.It 1855fec65c98Schristosexpansion of nested user-defined macros, 1856fec65c98Schristos.It 1857fec65c98Schristosand 1858fec65c98Schristos.Ic \&so 1859fec65c98Schristosfile inclusion. 1860fec65c98Schristos.El 1861fec65c98SchristosWhen a limit is hit, the output is incorrect, typically losing 1862fec65c98Schristossome content, but the parser can continue. 1863fec65c98Schristos.It Sy "skipping bad character" 1864fec65c98Schristos.Pq mdoc , man , roff 1865fec65c98SchristosThe input file contains a byte that is not a printable 1866fec65c98Schristos.Xr ascii 7 1867fec65c98Schristoscharacter. 1868fec65c98SchristosThe message mentions the character number. 1869fec65c98SchristosThe offending byte is replaced with a question mark 1870fec65c98Schristos.Pq Sq \&? . 1871fec65c98SchristosConsider editing the input file to replace the byte with an ASCII 1872fec65c98Schristostransliteration of the intended character. 1873fec65c98Schristos.It Sy "skipping unknown macro" 1874fec65c98Schristos.Pq mdoc , man , roff 1875fec65c98SchristosThe first identifier on a request or macro line is neither recognized as a 1876fec65c98Schristos.Xr roff 7 1877fec65c98Schristosrequest, nor as a user-defined macro, nor, respectively, as an 1878fec65c98Schristos.Xr mdoc 7 1879fec65c98Schristosor 1880fec65c98Schristos.Xr man 7 1881fec65c98Schristosmacro. 1882fec65c98SchristosIt may be mistyped or unsupported. 1883fec65c98SchristosThe request or macro is discarded including its arguments. 1884*544c191cSchristos.It Sy "skipping request outside macro" 1885*544c191cSchristos.Pq roff 1886*544c191cSchristosA 1887*544c191cSchristos.Ic shift 1888*544c191cSchristosor 1889*544c191cSchristos.Ic return 1890*544c191cSchristosrequest occurs outside any macro definition and has no effect. 1891fec65c98Schristos.It Sy "skipping insecure request" 1892fec65c98Schristos.Pq roff 1893fec65c98SchristosAn input file attempted to run a shell command 1894fec65c98Schristosor to read or write an external file. 1895fec65c98SchristosSuch attempts are denied for security reasons. 1896fec65c98Schristos.It Sy "skipping item outside list" 1897fec65c98Schristos.Pq mdoc , eqn 1898fec65c98SchristosAn 1899fec65c98Schristos.Ic \&It 1900fec65c98Schristosmacro occurs outside any 1901fec65c98Schristos.Ic \&Bl 1902fec65c98Schristoslist, or an 1903fec65c98Schristos.Xr eqn 7 1904fec65c98Schristos.Ic above 1905fec65c98Schristosdelimiter occurs outside any pile. 1906fec65c98SchristosIt is discarded including its arguments. 1907fec65c98Schristos.It Sy "skipping column outside column list" 1908fec65c98Schristos.Pq mdoc 1909fec65c98SchristosA 1910fec65c98Schristos.Ic \&Ta 1911fec65c98Schristosmacro occurs outside any 1912fec65c98Schristos.Ic \&Bl Fl column 1913fec65c98Schristosblock. 1914fec65c98SchristosIt is discarded including its arguments. 1915fec65c98Schristos.It Sy "skipping end of block that is not open" 1916fec65c98Schristos.Pq mdoc , man , eqn , tbl , roff 1917fec65c98SchristosVarious syntax elements can only be used to explicitly close blocks 1918fec65c98Schristosthat have previously been opened. 1919fec65c98SchristosAn 1920fec65c98Schristos.Xr mdoc 7 1921fec65c98Schristosblock closing macro, a 1922fec65c98Schristos.Xr man 7 1923c9bcef03Schristos.Ic \&ME , \&RE 1924fec65c98Schristosor 1925fec65c98Schristos.Ic \&UE 1926fec65c98Schristosmacro, an 1927fec65c98Schristos.Xr eqn 7 1928fec65c98Schristosright delimiter or closing brace, or the end of an equation, table, or 1929fec65c98Schristos.Xr roff 7 1930fec65c98Schristosconditional request is encountered but no matching block is open. 1931fec65c98SchristosThe offending request or macro is discarded. 1932fec65c98Schristos.It Sy "fewer RS blocks open, skipping" 1933fec65c98Schristos.Pq man 1934fec65c98SchristosThe 1935fec65c98Schristos.Ic \&RE 1936fec65c98Schristosmacro is invoked with an argument, but less than the specified number of 1937fec65c98Schristos.Ic \&RS 1938fec65c98Schristosblocks is open. 1939fec65c98SchristosThe 1940fec65c98Schristos.Ic \&RE 1941fec65c98Schristosmacro is discarded. 1942fec65c98Schristos.It Sy "inserting missing end of block" 1943fec65c98Schristos.Pq mdoc , tbl 1944fec65c98SchristosVarious 1945fec65c98Schristos.Xr mdoc 7 1946fec65c98Schristosmacros as well as tables require explicit closing by dedicated macros. 1947fec65c98SchristosA block that doesn't support bad nesting 1948fec65c98Schristosends before all of its children are properly closed. 1949fec65c98SchristosThe open child nodes are closed implicitly. 1950fec65c98Schristos.It Sy "appending missing end of block" 1951fec65c98Schristos.Pq mdoc , man , eqn , tbl , roff 1952fec65c98SchristosAt the end of the document, an explicit 1953fec65c98Schristos.Xr mdoc 7 1954fec65c98Schristosblock, a 1955fec65c98Schristos.Xr man 7 1956fec65c98Schristosnext-line scope or 1957c9bcef03Schristos.Ic \&MT , \&RS 1958fec65c98Schristosor 1959fec65c98Schristos.Ic \&UR 1960fec65c98Schristosblock, an equation, table, or 1961fec65c98Schristos.Xr roff 7 1962fec65c98Schristosconditional or ignore block is still open. 1963fec65c98SchristosThe open block is closed implicitly. 1964fec65c98Schristos.It Sy "escaped character not allowed in a name" 1965fec65c98Schristos.Pq roff 1966fec65c98SchristosMacro, string and register identifiers consist of printable, 1967fec65c98Schristosnon-whitespace ASCII characters. 1968fec65c98SchristosEscape sequences and characters and strings expressed in terms of them 1969fec65c98Schristoscannot form part of a name. 1970fec65c98SchristosThe first argument of an 1971fec65c98Schristos.Ic \&am , 1972fec65c98Schristos.Ic \&as , 1973fec65c98Schristos.Ic \&de , 1974fec65c98Schristos.Ic \&ds , 1975fec65c98Schristos.Ic \&nr , 1976fec65c98Schristosor 1977fec65c98Schristos.Ic \&rr 1978fec65c98Schristosrequest, or any argument of an 1979fec65c98Schristos.Ic \&rm 1980fec65c98Schristosrequest, or the name of a request or user defined macro being called, 1981fec65c98Schristosis terminated by an escape sequence. 1982fec65c98SchristosIn the cases of 1983fec65c98Schristos.Ic \&as , 1984fec65c98Schristos.Ic \&ds , 1985fec65c98Schristosand 1986fec65c98Schristos.Ic \&nr , 1987fec65c98Schristosthe request has no effect at all. 1988fec65c98SchristosIn the cases of 1989fec65c98Schristos.Ic \&am , 1990fec65c98Schristos.Ic \&de , 1991fec65c98Schristos.Ic \&rr , 1992fec65c98Schristosand 1993fec65c98Schristos.Ic \&rm , 1994fec65c98Schristoswhat was parsed up to this point is used as the arguments to the request, 1995fec65c98Schristosand the rest of the input line is discarded including the escape sequence. 1996fec65c98SchristosWhen parsing for a request or a user-defined macro name to be called, 1997fec65c98Schristosonly the escape sequence is discarded. 1998fec65c98SchristosThe characters preceding it are used as the request or macro name, 1999fec65c98Schristosthe characters following it are used as the arguments to the request or macro. 2000*544c191cSchristos.It Sy "using macro argument outside macro" 2001*544c191cSchristos.Pq roff 2002*544c191cSchristosThe escape sequence \e$ occurs outside any macro definition 2003*544c191cSchristosand expands to the empty string. 2004*544c191cSchristos.It Sy "argument number is not numeric" 2005*544c191cSchristos.Pq roff 2006*544c191cSchristosThe argument of the escape sequence \e$ is not a digit; 2007*544c191cSchristosthe escape sequence expands to the empty string. 2008fec65c98Schristos.It Sy "NOT IMPLEMENTED: Bd -file" 2009fec65c98Schristos.Pq mdoc 2010fec65c98SchristosFor security reasons, the 2011fec65c98Schristos.Ic \&Bd 2012fec65c98Schristosmacro does not support the 2013fec65c98Schristos.Fl file 2014fec65c98Schristosargument. 2015fec65c98SchristosBy requesting the inclusion of a sensitive file, a malicious document 2016fec65c98Schristosmight otherwise trick a privileged user into inadvertently displaying 2017fec65c98Schristosthe file on the screen, revealing the file content to bystanders. 2018fec65c98SchristosThe argument is ignored including the file name following it. 20199ff1f2acSchristos.It Sy "skipping display without arguments" 20209ff1f2acSchristos.Pq mdoc 20219ff1f2acSchristosA 20229ff1f2acSchristos.Ic \&Bd 20239ff1f2acSchristosblock macro does not have any arguments. 20249ff1f2acSchristosThe block is discarded, and the block content is displayed in 20259ff1f2acSchristoswhatever mode was active before the block. 2026fec65c98Schristos.It Sy "missing list type, using -item" 2027fec65c98Schristos.Pq mdoc 2028fec65c98SchristosA 2029fec65c98Schristos.Ic \&Bl 2030fec65c98Schristosmacro fails to specify the list type. 2031c9bcef03Schristos.It Sy "argument is not numeric, using 1" 2032c9bcef03Schristos.Pq roff 2033c9bcef03SchristosThe argument of a 2034c9bcef03Schristos.Ic \&ce 2035c9bcef03Schristosrequest is not a number. 2036*544c191cSchristos.It Sy "argument is not a character" 2037*544c191cSchristos.Pq roff 2038*544c191cSchristosThe first argument of a 2039*544c191cSchristos.Ic char 2040*544c191cSchristosrequest is neither a single ASCII character 2041*544c191cSchristosnor a single character escape sequence. 2042*544c191cSchristosThe request is ignored including all its arguments. 2043fec65c98Schristos.It Sy "missing manual name, using \(dq\(dq" 2044fec65c98Schristos.Pq mdoc 2045fec65c98SchristosThe first call to 20469508192eSchristos.Ic \&Nm , 20479508192eSchristosor any call in the NAME section, lacks the required argument. 2048fec65c98Schristos.It Sy "uname(3) system call failed, using UNKNOWN" 2049fec65c98Schristos.Pq mdoc 2050fec65c98SchristosThe 2051fec65c98Schristos.Ic \&Os 2052fec65c98Schristosmacro is called without arguments, and the 2053fec65c98Schristos.Xr uname 3 2054fec65c98Schristossystem call failed. 2055fec65c98SchristosAs a workaround, 2056fec65c98Schristos.Nm 2057fec65c98Schristoscan be compiled with 2058fec65c98Schristos.Sm off 2059fec65c98Schristos.Fl D Cm OSNAME=\(dq\e\(dq Ar string Cm \e\(dq\(dq . 2060fec65c98Schristos.Sm on 2061fec65c98Schristos.It Sy "unknown standard specifier" 2062fec65c98Schristos.Pq mdoc 2063fec65c98SchristosAn 2064fec65c98Schristos.Ic \&St 2065fec65c98Schristosmacro has an unknown argument and is discarded. 2066fec65c98Schristos.It Sy "skipping request without numeric argument" 2067fec65c98Schristos.Pq roff , eqn 2068fec65c98SchristosAn 2069fec65c98Schristos.Ic \&it 2070fec65c98Schristosrequest or an 2071fec65c98Schristos.Xr eqn 7 2072fec65c98Schristos.Ic \&size 2073fec65c98Schristosor 2074fec65c98Schristos.Ic \&gsize 2075fec65c98Schristosstatement has a non-numeric or negative argument or no argument at all. 2076fec65c98SchristosThe invalid request or statement is ignored. 2077*544c191cSchristos.It Sy "excessive shift" 2078*544c191cSchristos.Pq roff 2079*544c191cSchristosThe argument of a 2080*544c191cSchristos.Ic shift 2081*544c191cSchristosrequest is larger than the number of arguments of the macro that is 2082*544c191cSchristoscurrently being executed. 2083*544c191cSchristosAll macro arguments are deleted and \en(.$ is set to zero. 2084fec65c98Schristos.It Sy "NOT IMPLEMENTED: .so with absolute path or \(dq..\(dq" 2085fec65c98Schristos.Pq roff 2086fec65c98SchristosFor security reasons, 2087fec65c98Schristos.Nm 2088fec65c98Schristosallows 2089fec65c98Schristos.Ic \&so 2090fec65c98Schristosfile inclusion requests only with relative paths 2091fec65c98Schristosand only without ascending to any parent directory. 2092fec65c98SchristosBy requesting the inclusion of a sensitive file, a malicious document 2093fec65c98Schristosmight otherwise trick a privileged user into inadvertently displaying 2094fec65c98Schristosthe file on the screen, revealing the file content to bystanders. 2095fec65c98Schristos.Nm 2096fec65c98Schristosonly shows the path as it appears behind 2097fec65c98Schristos.Ic \&so . 2098fec65c98Schristos.It Sy ".so request failed" 2099fec65c98Schristos.Pq roff 2100fec65c98SchristosServicing a 2101fec65c98Schristos.Ic \&so 2102fec65c98Schristosrequest requires reading an external file, but the file could not be 2103fec65c98Schristosopened. 2104fec65c98Schristos.Nm 2105fec65c98Schristosonly shows the path as it appears behind 2106fec65c98Schristos.Ic \&so . 2107fec65c98Schristos.It Sy "skipping all arguments" 2108fec65c98Schristos.Pq mdoc , man , eqn , roff 2109fec65c98SchristosAn 2110fec65c98Schristos.Xr mdoc 7 2111fec65c98Schristos.Ic \&Bt , 2112fec65c98Schristos.Ic \&Ed , 2113fec65c98Schristos.Ic \&Ef , 2114fec65c98Schristos.Ic \&Ek , 2115fec65c98Schristos.Ic \&El , 2116fec65c98Schristos.Ic \&Lp , 2117fec65c98Schristos.Ic \&Pp , 2118fec65c98Schristos.Ic \&Re , 2119fec65c98Schristos.Ic \&Rs , 2120fec65c98Schristosor 2121fec65c98Schristos.Ic \&Ud 2122fec65c98Schristosmacro, an 2123fec65c98Schristos.Ic \&It 2124fec65c98Schristosmacro in a list that don't support item heads, a 2125fec65c98Schristos.Xr man 7 2126fec65c98Schristos.Ic \&LP , 2127fec65c98Schristos.Ic \&P , 2128fec65c98Schristosor 2129fec65c98Schristos.Ic \&PP 2130fec65c98Schristosmacro, an 2131fec65c98Schristos.Xr eqn 7 2132fec65c98Schristos.Ic \&EQ 2133fec65c98Schristosor 2134fec65c98Schristos.Ic \&EN 2135fec65c98Schristosmacro, or a 2136fec65c98Schristos.Xr roff 7 2137fec65c98Schristos.Ic \&br , 2138fec65c98Schristos.Ic \&fi , 2139fec65c98Schristosor 2140fec65c98Schristos.Ic \&nf 2141fec65c98Schristosrequest or 2142fec65c98Schristos.Sq \&.. 2143fec65c98Schristosblock closing request is invoked with at least one argument. 2144fec65c98SchristosAll arguments are ignored. 2145fec65c98Schristos.It Sy "skipping excess arguments" 2146fec65c98Schristos.Pq mdoc , man , roff 2147fec65c98SchristosA macro or request is invoked with too many arguments: 2148fec65c98Schristos.Bl -dash -offset 2n -width 2n -compact 2149fec65c98Schristos.It 2150fec65c98Schristos.Ic \&Fo , 2151c9bcef03Schristos.Ic \&MT , 2152fec65c98Schristos.Ic \&PD , 2153fec65c98Schristos.Ic \&RS , 2154fec65c98Schristos.Ic \&UR , 2155fec65c98Schristos.Ic \&ft , 2156fec65c98Schristosor 2157fec65c98Schristos.Ic \&sp 2158fec65c98Schristoswith more than one argument 2159fec65c98Schristos.It 2160fec65c98Schristos.Ic \&An 2161fec65c98Schristoswith another argument after 2162fec65c98Schristos.Fl split 2163fec65c98Schristosor 2164fec65c98Schristos.Fl nosplit 2165fec65c98Schristos.It 2166fec65c98Schristos.Ic \&RE 2167fec65c98Schristoswith more than one argument or with a non-integer argument 2168fec65c98Schristos.It 2169fec65c98Schristos.Ic \&OP 2170fec65c98Schristosor a request of the 2171fec65c98Schristos.Ic \&de 2172fec65c98Schristosfamily with more than two arguments 2173fec65c98Schristos.It 2174fec65c98Schristos.Ic \&Dt 2175fec65c98Schristoswith more than three arguments 2176fec65c98Schristos.It 2177fec65c98Schristos.Ic \&TH 2178fec65c98Schristoswith more than five arguments 2179fec65c98Schristos.It 2180fec65c98Schristos.Ic \&Bd , 2181fec65c98Schristos.Ic \&Bk , 2182fec65c98Schristosor 2183fec65c98Schristos.Ic \&Bl 2184fec65c98Schristoswith invalid arguments 2185fec65c98Schristos.El 2186fec65c98SchristosThe excess arguments are ignored. 2187fec65c98Schristos.El 2188fec65c98Schristos.Ss Unsupported features 2189fec65c98Schristos.Bl -ohang 2190fec65c98Schristos.It Sy "input too large" 2191fec65c98Schristos.Pq mdoc , man 2192fec65c98SchristosCurrently, 2193fec65c98Schristos.Nm 2194fec65c98Schristoscannot handle input files larger than its arbitrary size limit 2195fec65c98Schristosof 2^31 bytes (2 Gigabytes). 2196fec65c98SchristosSince useful manuals are always small, this is not a problem in practice. 2197fec65c98SchristosParsing is aborted as soon as the condition is detected. 2198fec65c98Schristos.It Sy "unsupported control character" 2199fec65c98Schristos.Pq roff 2200fec65c98SchristosAn ASCII control character supported by other 2201fec65c98Schristos.Xr roff 7 2202fec65c98Schristosimplementations but not by 2203fec65c98Schristos.Nm 2204fec65c98Schristoswas found in an input file. 2205fec65c98SchristosIt is replaced by a question mark. 2206*544c191cSchristos.It Sy "unsupported escape sequence" 2207*544c191cSchristos.Pq roff 2208*544c191cSchristosAn input file contains an escape sequence supported by GNU troff 2209*544c191cSchristosor Heirloom troff but not by 2210*544c191cSchristos.Nm , 2211*544c191cSchristosand it is likely that this will cause information loss 2212*544c191cSchristosor considerable misformatting. 2213fec65c98Schristos.It Sy "unsupported roff request" 2214fec65c98Schristos.Pq roff 2215fec65c98SchristosAn input file contains a 2216fec65c98Schristos.Xr roff 7 2217fec65c98Schristosrequest supported by GNU troff or Heirloom troff but not by 2218fec65c98Schristos.Nm , 2219fec65c98Schristosand it is likely that this will cause information loss 2220fec65c98Schristosor considerable misformatting. 2221fec65c98Schristos.It Sy "eqn delim option in tbl" 2222fec65c98Schristos.Pq eqn , tbl 2223fec65c98SchristosThe options line of a table defines equation delimiters. 2224fec65c98SchristosAny equation source code contained in the table will be printed unformatted. 2225fec65c98Schristos.It Sy "unsupported table layout modifier" 2226fec65c98Schristos.Pq tbl 2227fec65c98SchristosA table layout specification contains an 2228fec65c98Schristos.Sq Cm m 2229fec65c98Schristosmodifier. 2230fec65c98SchristosThe modifier is discarded. 2231fec65c98Schristos.It Sy "ignoring macro in table" 2232fec65c98Schristos.Pq tbl , mdoc , man 2233fec65c98SchristosA table contains an invocation of an 2234fec65c98Schristos.Xr mdoc 7 2235fec65c98Schristosor 2236fec65c98Schristos.Xr man 7 2237fec65c98Schristosmacro or of an undefined macro. 2238fec65c98SchristosThe macro is ignored, and its arguments are handled 2239fec65c98Schristosas if they were a text line. 22404154958bSjoerg.El 22414154958bSjoerg.Sh SEE ALSO 2242fec65c98Schristos.Xr apropos 1 , 2243fec65c98Schristos.Xr man 1 , 224448741257Sjoerg.Xr eqn 7 , 22450a84adc5Sjoerg.Xr man 7 , 22464154958bSjoerg.Xr mandoc_char 7 , 2247c0d9444aSjoerg.Xr mdoc 7 , 2248c0d9444aSjoerg.Xr roff 7 , 2249c0d9444aSjoerg.Xr tbl 7 22509508192eSchristos.Sh HISTORY 22519508192eSchristosThe 22529508192eSchristos.Nm 22539508192eSchristosutility first appeared in 22549508192eSchristos.Ox 4.8 . 22559508192eSchristosThe option 22569508192eSchristos.Fl I 22579508192eSchristosappeared in 22589508192eSchristos.Ox 5.2 , 22599508192eSchristosand 22609508192eSchristos.Fl aCcfhKklMSsw 22619508192eSchristosin 22629508192eSchristos.Ox 5.7 . 22634154958bSjoerg.Sh AUTHORS 22649ff1f2acSchristos.An -nosplit 22654154958bSjoergThe 22664154958bSjoerg.Nm 22674154958bSjoergutility was written by 2268fec65c98Schristos.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv 2269fec65c98Schristosand is maintained by 2270fec65c98Schristos.An Ingo Schwarze Aq Mt schwarze@openbsd.org . 2271