1*95c635efSGarrett D'Amore.\" 2*95c635efSGarrett D'Amore.\" Permission to use, copy, modify, and distribute this software for any 3*95c635efSGarrett D'Amore.\" purpose with or without fee is hereby granted, provided that the above 4*95c635efSGarrett D'Amore.\" copyright notice and this permission notice appear in all copies. 5*95c635efSGarrett D'Amore.\" 6*95c635efSGarrett D'Amore.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 7*95c635efSGarrett D'Amore.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 8*95c635efSGarrett D'Amore.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 9*95c635efSGarrett D'Amore.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 10*95c635efSGarrett D'Amore.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 11*95c635efSGarrett D'Amore.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 12*95c635efSGarrett D'Amore.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 13*95c635efSGarrett D'Amore.\" 14*95c635efSGarrett D'Amore.\" 15*95c635efSGarrett D'Amore.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> 16*95c635efSGarrett D'Amore.\" Copyright 2012 Nexenta Systems, Inc. All rights reserved. 17*95c635efSGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org> 18*95c635efSGarrett D'Amore.\" 19*95c635efSGarrett D'Amore.Dd Jul 16, 2014 20*95c635efSGarrett D'Amore.Dt MANDOC 1 21*95c635efSGarrett D'Amore.Os 22*95c635efSGarrett D'Amore.Sh NAME 23*95c635efSGarrett D'Amore.Nm mandoc 24*95c635efSGarrett D'Amore.Nd format and display UNIX manuals 25*95c635efSGarrett D'Amore.Sh SYNOPSIS 26*95c635efSGarrett D'Amore.Nm mandoc 27*95c635efSGarrett D'Amore.Op Fl V 28*95c635efSGarrett D'Amore.Op Fl m Ns Ar format 29*95c635efSGarrett D'Amore.Op Fl O Ns Ar option 30*95c635efSGarrett D'Amore.Op Fl T Ns Ar output 31*95c635efSGarrett D'Amore.Op Fl W Ns Ar level 32*95c635efSGarrett D'Amore.Op Ar 33*95c635efSGarrett D'Amore.Sh DESCRIPTION 34*95c635efSGarrett D'AmoreThe 35*95c635efSGarrett D'Amore.Nm 36*95c635efSGarrett D'Amoreutility formats 37*95c635efSGarrett D'Amore.Ux 38*95c635efSGarrett D'Amoremanual pages for display. 39*95c635efSGarrett D'Amore.Pp 40*95c635efSGarrett D'AmoreBy default, 41*95c635efSGarrett D'Amore.Nm 42*95c635efSGarrett D'Amorereads 43*95c635efSGarrett D'Amore.Xr mdoc 5 44*95c635efSGarrett D'Amoreor 45*95c635efSGarrett D'Amore.Xr man 5 46*95c635efSGarrett D'Amoretext from stdin, implying 47*95c635efSGarrett D'Amore.Fl m Ns Cm andoc , 48*95c635efSGarrett D'Amoreand produces 49*95c635efSGarrett D'Amore.Fl T Ns Cm ascii 50*95c635efSGarrett D'Amoreoutput. 51*95c635efSGarrett D'Amore.Pp 52*95c635efSGarrett D'AmoreThe arguments are as follows: 53*95c635efSGarrett D'Amore.Bl -tag -width Ds 54*95c635efSGarrett D'Amore.It Fl m Ns Ar format 55*95c635efSGarrett D'AmoreInput format. 56*95c635efSGarrett D'AmoreSee 57*95c635efSGarrett D'Amore.Sx Input Formats 58*95c635efSGarrett D'Amorefor available formats. 59*95c635efSGarrett D'AmoreDefaults to 60*95c635efSGarrett D'Amore.Fl m Ns Cm andoc . 61*95c635efSGarrett D'Amore.It Fl O Ns Ar option 62*95c635efSGarrett D'AmoreComma-separated output options. 63*95c635efSGarrett D'Amore.It Fl T Ns Ar output 64*95c635efSGarrett D'AmoreOutput format. 65*95c635efSGarrett D'AmoreSee 66*95c635efSGarrett D'Amore.Sx Output Formats 67*95c635efSGarrett D'Amorefor available formats. 68*95c635efSGarrett D'AmoreDefaults to 69*95c635efSGarrett D'Amore.Fl T Ns Cm ascii . 70*95c635efSGarrett D'Amore.It Fl V 71*95c635efSGarrett D'AmorePrint version and exit. 72*95c635efSGarrett D'Amore.It Fl W Ns Ar level 73*95c635efSGarrett D'AmoreSpecify the minimum message 74*95c635efSGarrett D'Amore.Ar level 75*95c635efSGarrett D'Amoreto be reported on the standard error output and to affect the exit status. 76*95c635efSGarrett D'AmoreThe 77*95c635efSGarrett D'Amore.Ar level 78*95c635efSGarrett D'Amorecan be 79*95c635efSGarrett D'Amore.Cm warning , 80*95c635efSGarrett D'Amore.Cm error , 81*95c635efSGarrett D'Amoreor 82*95c635efSGarrett D'Amore.Cm fatal . 83*95c635efSGarrett D'AmoreThe default is 84*95c635efSGarrett D'Amore.Fl W Ns Cm fatal ; 85*95c635efSGarrett D'Amore.Fl W Ns Cm all 86*95c635efSGarrett D'Amoreis an alias for 87*95c635efSGarrett D'Amore.Fl W Ns Cm warning . 88*95c635efSGarrett D'AmoreSee 89*95c635efSGarrett D'Amore.Sx EXIT STATUS 90*95c635efSGarrett D'Amoreand 91*95c635efSGarrett D'Amore.Sx DIAGNOSTICS 92*95c635efSGarrett D'Amorefor details. 93*95c635efSGarrett D'Amore.Pp 94*95c635efSGarrett D'AmoreThe special option 95*95c635efSGarrett D'Amore.Fl W Ns Cm stop 96*95c635efSGarrett D'Amoretells 97*95c635efSGarrett D'Amore.Nm 98*95c635efSGarrett D'Amoreto exit after parsing a file that causes warnings or errors of at least 99*95c635efSGarrett D'Amorethe requested level. 100*95c635efSGarrett D'AmoreNo formatted output will be produced from that file. 101*95c635efSGarrett D'AmoreIf both a 102*95c635efSGarrett D'Amore.Ar level 103*95c635efSGarrett D'Amoreand 104*95c635efSGarrett D'Amore.Cm stop 105*95c635efSGarrett D'Amoreare requested, they can be joined with a comma, for example 106*95c635efSGarrett D'Amore.Fl W Ns Cm error , Ns Cm stop . 107*95c635efSGarrett D'Amore.It Ar file 108*95c635efSGarrett D'AmoreRead input from zero or more files. 109*95c635efSGarrett D'AmoreIf unspecified, reads from stdin. 110*95c635efSGarrett D'AmoreIf multiple files are specified, 111*95c635efSGarrett D'Amore.Nm 112*95c635efSGarrett D'Amorewill halt with the first failed parse. 113*95c635efSGarrett D'Amore.El 114*95c635efSGarrett D'Amore.Ss Input Formats 115*95c635efSGarrett D'AmoreThe 116*95c635efSGarrett D'Amore.Nm 117*95c635efSGarrett D'Amoreutility accepts 118*95c635efSGarrett D'Amore.Xr mdoc 5 119*95c635efSGarrett D'Amoreand 120*95c635efSGarrett D'Amore.Xr man 5 121*95c635efSGarrett D'Amoreinput with 122*95c635efSGarrett D'Amore.Fl m Ns Cm doc 123*95c635efSGarrett D'Amoreand 124*95c635efSGarrett D'Amore.Fl m Ns Cm an , 125*95c635efSGarrett D'Amorerespectively. 126*95c635efSGarrett D'AmoreThe 127*95c635efSGarrett D'Amore.Xr mdoc 5 128*95c635efSGarrett D'Amoreformat is 129*95c635efSGarrett D'Amore.Em strongly 130*95c635efSGarrett D'Amorerecommended; 131*95c635efSGarrett D'Amore.Xr man 5 132*95c635efSGarrett D'Amoreshould only be used for legacy manuals. 133*95c635efSGarrett D'Amore.Pp 134*95c635efSGarrett D'AmoreA third option, 135*95c635efSGarrett D'Amore.Fl m Ns Cm andoc , 136*95c635efSGarrett D'Amorewhich is also the default, determines encoding on-the-fly: if the first 137*95c635efSGarrett D'Amorenon-comment macro is 138*95c635efSGarrett D'Amore.Sq \&Dd 139*95c635efSGarrett D'Amoreor 140*95c635efSGarrett D'Amore.Sq \&Dt , 141*95c635efSGarrett D'Amorethe 142*95c635efSGarrett D'Amore.Xr mdoc 5 143*95c635efSGarrett D'Amoreparser is used; otherwise, the 144*95c635efSGarrett D'Amore.Xr man 5 145*95c635efSGarrett D'Amoreparser is used. 146*95c635efSGarrett D'Amore.Pp 147*95c635efSGarrett D'AmoreIf multiple 148*95c635efSGarrett D'Amorefiles are specified with 149*95c635efSGarrett D'Amore.Fl m Ns Cm andoc , 150*95c635efSGarrett D'Amoreeach has its file-type determined this way. 151*95c635efSGarrett D'AmoreIf multiple files are 152*95c635efSGarrett D'Amorespecified and 153*95c635efSGarrett D'Amore.Fl m Ns Cm doc 154*95c635efSGarrett D'Amoreor 155*95c635efSGarrett D'Amore.Fl m Ns Cm an 156*95c635efSGarrett D'Amoreis specified, then this format is used exclusively. 157*95c635efSGarrett D'Amore.Ss Output Formats 158*95c635efSGarrett D'AmoreThe 159*95c635efSGarrett D'Amore.Nm 160*95c635efSGarrett D'Amoreutility accepts the following 161*95c635efSGarrett D'Amore.Fl T 162*95c635efSGarrett D'Amorearguments, which correspond to output modes: 163*95c635efSGarrett D'Amore.Bl -tag -width "-Tlocale" 164*95c635efSGarrett D'Amore.It Fl T Ns Cm ascii 165*95c635efSGarrett D'AmoreProduce 7-bit ASCII output. 166*95c635efSGarrett D'AmoreThis is the default. 167*95c635efSGarrett D'AmoreSee 168*95c635efSGarrett D'Amore.Sx ASCII Output . 169*95c635efSGarrett D'Amore.It Fl T Ns Cm html 170*95c635efSGarrett D'AmoreProduce strict CSS1/HTML-4.01 output. 171*95c635efSGarrett D'AmoreSee 172*95c635efSGarrett D'Amore.Sx HTML Output . 173*95c635efSGarrett D'Amore.It Fl T Ns Cm lint 174*95c635efSGarrett D'AmoreParse only: produce no output. 175*95c635efSGarrett D'AmoreImplies 176*95c635efSGarrett D'Amore.Fl W Ns Cm warning . 177*95c635efSGarrett D'Amore.It Fl T Ns Cm locale 178*95c635efSGarrett D'AmoreEncode output using the current locale. 179*95c635efSGarrett D'AmoreSee 180*95c635efSGarrett D'Amore.Sx Locale Output . 181*95c635efSGarrett D'Amore.It Fl T Ns Cm man 182*95c635efSGarrett D'AmoreProduce 183*95c635efSGarrett D'Amore.Xr man 5 184*95c635efSGarrett D'Amoreformat output. 185*95c635efSGarrett D'AmoreSee 186*95c635efSGarrett D'Amore.Sx Man Output . 187*95c635efSGarrett D'Amore.It Fl T Ns Cm pdf 188*95c635efSGarrett D'AmoreProduce PDF output. 189*95c635efSGarrett D'AmoreSee 190*95c635efSGarrett D'Amore.Sx PDF Output . 191*95c635efSGarrett D'Amore.It Fl T Ns Cm ps 192*95c635efSGarrett D'AmoreProduce PostScript output. 193*95c635efSGarrett D'AmoreSee 194*95c635efSGarrett D'Amore.Sx PostScript Output . 195*95c635efSGarrett D'Amore.It Fl T Ns Cm tree 196*95c635efSGarrett D'AmoreProduce an indented parse tree. 197*95c635efSGarrett D'Amore.It Fl T Ns Cm utf8 198*95c635efSGarrett D'AmoreEncode output in the UTF\-8 multi-byte format. 199*95c635efSGarrett D'AmoreSee 200*95c635efSGarrett D'Amore.Sx UTF\-8 Output . 201*95c635efSGarrett D'Amore.It Fl T Ns Cm xhtml 202*95c635efSGarrett D'AmoreProduce strict CSS1/XHTML-1.0 output. 203*95c635efSGarrett D'AmoreSee 204*95c635efSGarrett D'Amore.Sx XHTML Output . 205*95c635efSGarrett D'Amore.El 206*95c635efSGarrett D'Amore.Pp 207*95c635efSGarrett D'AmoreIf multiple input files are specified, these will be processed by the 208*95c635efSGarrett D'Amorecorresponding filter in-order. 209*95c635efSGarrett D'Amore.Ss ASCII Output 210*95c635efSGarrett D'AmoreOutput produced by 211*95c635efSGarrett D'Amore.Fl T Ns Cm ascii , 212*95c635efSGarrett D'Amorewhich is the default, is rendered in standard 7-bit ASCII documented in 213*95c635efSGarrett D'Amore.Xr ascii 5 . 214*95c635efSGarrett D'Amore.Pp 215*95c635efSGarrett D'AmoreFont styles are applied by using back-spaced encoding such that an 216*95c635efSGarrett D'Amoreunderlined character 217*95c635efSGarrett D'Amore.Sq c 218*95c635efSGarrett D'Amoreis rendered as 219*95c635efSGarrett D'Amore.Sq _ Ns \e[bs] Ns c , 220*95c635efSGarrett D'Amorewhere 221*95c635efSGarrett D'Amore.Sq \e[bs] 222*95c635efSGarrett D'Amoreis the back-space character number 8. 223*95c635efSGarrett D'AmoreEmboldened characters are rendered as 224*95c635efSGarrett D'Amore.Sq c Ns \e[bs] Ns c . 225*95c635efSGarrett D'Amore.Pp 226*95c635efSGarrett D'AmoreThe special characters documented in 227*95c635efSGarrett D'Amore.Xr mandoc_char 5 228*95c635efSGarrett D'Amoreare rendered best-effort in an ASCII equivalent. 229*95c635efSGarrett D'AmoreIf no equivalent is found, 230*95c635efSGarrett D'Amore.Sq \&? 231*95c635efSGarrett D'Amoreis used instead. 232*95c635efSGarrett D'Amore.Pp 233*95c635efSGarrett D'AmoreOutput width is limited to 78 visible columns unless literal input lines 234*95c635efSGarrett D'Amoreexceed this limit. 235*95c635efSGarrett D'Amore.Pp 236*95c635efSGarrett D'AmoreThe following 237*95c635efSGarrett D'Amore.Fl O 238*95c635efSGarrett D'Amorearguments are accepted: 239*95c635efSGarrett D'Amore.Bl -tag -width Ds 240*95c635efSGarrett D'Amore.It Cm indent Ns = Ns Ar indent 241*95c635efSGarrett D'AmoreThe left margin for normal text is set to 242*95c635efSGarrett D'Amore.Ar indent 243*95c635efSGarrett D'Amoreblank characters instead of the default of five for 244*95c635efSGarrett D'Amore.Xr mdoc 5 245*95c635efSGarrett D'Amoreand seven for 246*95c635efSGarrett D'Amore.Xr man 5 . 247*95c635efSGarrett D'AmoreIncreasing this is not recommended; it may result in degraded formatting, 248*95c635efSGarrett D'Amorefor example overfull lines or ugly line breaks. 249*95c635efSGarrett D'Amore.It Cm width Ns = Ns Ar width 250*95c635efSGarrett D'AmoreThe output width is set to 251*95c635efSGarrett D'Amore.Ar width , 252*95c635efSGarrett D'Amorewhich will normalise to \(>=60. 253*95c635efSGarrett D'Amore.El 254*95c635efSGarrett D'Amore.Ss HTML Output 255*95c635efSGarrett D'AmoreOutput produced by 256*95c635efSGarrett D'Amore.Fl T Ns Cm html 257*95c635efSGarrett D'Amoreconforms to HTML-4.01 strict. 258*95c635efSGarrett D'Amore.Pp 259*95c635efSGarrett D'AmoreThe 260*95c635efSGarrett D'Amore.Pa example.style.css 261*95c635efSGarrett D'Amorefile documents style-sheet classes available for customising output. 262*95c635efSGarrett D'AmoreIf a style-sheet is not specified with 263*95c635efSGarrett D'Amore.Fl O Ns Ar style , 264*95c635efSGarrett D'Amore.Fl T Ns Cm html 265*95c635efSGarrett D'Amoredefaults to simple output readable in any graphical or text-based web 266*95c635efSGarrett D'Amorebrowser. 267*95c635efSGarrett D'Amore.Pp 268*95c635efSGarrett D'AmoreSpecial characters are rendered in decimal-encoded UTF\-8. 269*95c635efSGarrett D'Amore.Pp 270*95c635efSGarrett D'AmoreThe following 271*95c635efSGarrett D'Amore.Fl O 272*95c635efSGarrett D'Amorearguments are accepted: 273*95c635efSGarrett D'Amore.Bl -tag -width Ds 274*95c635efSGarrett D'Amore.It Cm fragment 275*95c635efSGarrett D'AmoreOmit the 276*95c635efSGarrett D'Amore.Aq !DOCTYPE 277*95c635efSGarrett D'Amoredeclaration and the 278*95c635efSGarrett D'Amore.Aq html , 279*95c635efSGarrett D'Amore.Aq head , 280*95c635efSGarrett D'Amoreand 281*95c635efSGarrett D'Amore.Aq body 282*95c635efSGarrett D'Amoreelements and only emit the subtree below the 283*95c635efSGarrett D'Amore.Aq body 284*95c635efSGarrett D'Amoreelement. 285*95c635efSGarrett D'AmoreThe 286*95c635efSGarrett D'Amore.Cm style 287*95c635efSGarrett D'Amoreargument will be ignored. 288*95c635efSGarrett D'AmoreThis is useful when embedding manual content within existing documents. 289*95c635efSGarrett D'Amore.It Cm includes Ns = Ns Ar fmt 290*95c635efSGarrett D'AmoreThe string 291*95c635efSGarrett D'Amore.Ar fmt , 292*95c635efSGarrett D'Amorefor example, 293*95c635efSGarrett D'Amore.Ar ../src/%I.html , 294*95c635efSGarrett D'Amoreis used as a template for linked header files (usually via the 295*95c635efSGarrett D'Amore.Sq \&In 296*95c635efSGarrett D'Amoremacro). 297*95c635efSGarrett D'AmoreInstances of 298*95c635efSGarrett D'Amore.Sq \&%I 299*95c635efSGarrett D'Amoreare replaced with the include filename. 300*95c635efSGarrett D'AmoreThe default is not to present a 301*95c635efSGarrett D'Amorehyperlink. 302*95c635efSGarrett D'Amore.It Cm man Ns = Ns Ar fmt 303*95c635efSGarrett D'AmoreThe string 304*95c635efSGarrett D'Amore.Ar fmt , 305*95c635efSGarrett D'Amorefor example, 306*95c635efSGarrett D'Amore.Ar ../html%S/%N.%S.html , 307*95c635efSGarrett D'Amoreis used as a template for linked manuals (usually via the 308*95c635efSGarrett D'Amore.Sq \&Xr 309*95c635efSGarrett D'Amoremacro). 310*95c635efSGarrett D'AmoreInstances of 311*95c635efSGarrett D'Amore.Sq \&%N 312*95c635efSGarrett D'Amoreand 313*95c635efSGarrett D'Amore.Sq %S 314*95c635efSGarrett D'Amoreare replaced with the linked manual's name and section, respectively. 315*95c635efSGarrett D'AmoreIf no section is included, section 1 is assumed. 316*95c635efSGarrett D'AmoreThe default is not to 317*95c635efSGarrett D'Amorepresent a hyperlink. 318*95c635efSGarrett D'Amore.It Cm style Ns = Ns Ar style.css 319*95c635efSGarrett D'AmoreThe file 320*95c635efSGarrett D'Amore.Ar style.css 321*95c635efSGarrett D'Amoreis used for an external style-sheet. 322*95c635efSGarrett D'AmoreThis must be a valid absolute or 323*95c635efSGarrett D'Amorerelative URI. 324*95c635efSGarrett D'Amore.El 325*95c635efSGarrett D'Amore.Ss Locale Output 326*95c635efSGarrett D'AmoreLocale-depending output encoding is triggered with 327*95c635efSGarrett D'Amore.Fl T Ns Cm locale . 328*95c635efSGarrett D'AmoreThis option is not available on all systems: systems without locale 329*95c635efSGarrett D'Amoresupport, or those whose internal representation is not natively UCS-4, 330*95c635efSGarrett D'Amorewill fall back to 331*95c635efSGarrett D'Amore.Fl T Ns Cm ascii . 332*95c635efSGarrett D'AmoreSee 333*95c635efSGarrett D'Amore.Sx ASCII Output 334*95c635efSGarrett D'Amorefor font style specification and available command-line arguments. 335*95c635efSGarrett D'Amore.Ss Man Output 336*95c635efSGarrett D'AmoreTranslate input format into 337*95c635efSGarrett D'Amore.Xr man 5 338*95c635efSGarrett D'Amoreoutput format. 339*95c635efSGarrett D'AmoreThis is useful for distributing manual sources to legacy systems 340*95c635efSGarrett D'Amorelacking 341*95c635efSGarrett D'Amore.Xr mdoc 5 342*95c635efSGarrett D'Amoreformatters. 343*95c635efSGarrett D'Amore.Pp 344*95c635efSGarrett D'AmoreIf 345*95c635efSGarrett D'Amore.Xr mdoc 5 346*95c635efSGarrett D'Amoreis passed as input, it is translated into 347*95c635efSGarrett D'Amore.Xr man 5 . 348*95c635efSGarrett D'AmoreIf the input format is 349*95c635efSGarrett D'Amore.Xr man 5 , 350*95c635efSGarrett D'Amorethe input is copied to the output, expanding any 351*95c635efSGarrett D'Amore.Xr mandoc_roff 5 352*95c635efSGarrett D'Amore.Sq so 353*95c635efSGarrett D'Amorerequests. 354*95c635efSGarrett D'AmoreThe parser is also run, and as usual, the 355*95c635efSGarrett D'Amore.Fl W 356*95c635efSGarrett D'Amorelevel controls which 357*95c635efSGarrett D'Amore.Sx DIAGNOSTICS 358*95c635efSGarrett D'Amoreare displayed before copying the input to the output. 359*95c635efSGarrett D'Amore.Ss PDF Output 360*95c635efSGarrett D'AmorePDF-1.1 output may be generated by 361*95c635efSGarrett D'Amore.Fl T Ns Cm pdf . 362*95c635efSGarrett D'AmoreSee 363*95c635efSGarrett D'Amore.Sx PostScript Output 364*95c635efSGarrett D'Amorefor 365*95c635efSGarrett D'Amore.Fl O 366*95c635efSGarrett D'Amorearguments and defaults. 367*95c635efSGarrett D'Amore.Ss PostScript Output 368*95c635efSGarrett D'AmorePostScript 369*95c635efSGarrett D'Amore.Qq Adobe-3.0 370*95c635efSGarrett D'AmoreLevel-2 pages may be generated by 371*95c635efSGarrett D'Amore.Fl T Ns Cm ps . 372*95c635efSGarrett D'AmoreOutput pages default to letter sized and are rendered in the Times font 373*95c635efSGarrett D'Amorefamily, 11-point. 374*95c635efSGarrett D'AmoreMargins are calculated as 1/9 the page length and width. 375*95c635efSGarrett D'AmoreLine-height is 1.4m. 376*95c635efSGarrett D'Amore.Pp 377*95c635efSGarrett D'AmoreSpecial characters are rendered as in 378*95c635efSGarrett D'Amore.Sx ASCII Output . 379*95c635efSGarrett D'Amore.Pp 380*95c635efSGarrett D'AmoreThe following 381*95c635efSGarrett D'Amore.Fl O 382*95c635efSGarrett D'Amorearguments are accepted: 383*95c635efSGarrett D'Amore.Bl -tag -width Ds 384*95c635efSGarrett D'Amore.It Cm paper Ns = Ns Ar name 385*95c635efSGarrett D'AmoreThe paper size 386*95c635efSGarrett D'Amore.Ar name 387*95c635efSGarrett D'Amoremay be one of 388*95c635efSGarrett D'Amore.Ar a3 , 389*95c635efSGarrett D'Amore.Ar a4 , 390*95c635efSGarrett D'Amore.Ar a5 , 391*95c635efSGarrett D'Amore.Ar legal , 392*95c635efSGarrett D'Amoreor 393*95c635efSGarrett D'Amore.Ar letter . 394*95c635efSGarrett D'AmoreYou may also manually specify dimensions as 395*95c635efSGarrett D'Amore.Ar NNxNN , 396*95c635efSGarrett D'Amorewidth by height in millimetres. 397*95c635efSGarrett D'AmoreIf an unknown value is encountered, 398*95c635efSGarrett D'Amore.Ar letter 399*95c635efSGarrett D'Amoreis used. 400*95c635efSGarrett D'Amore.El 401*95c635efSGarrett D'Amore.Ss UTF\-8 Output 402*95c635efSGarrett D'AmoreUse 403*95c635efSGarrett D'Amore.Fl T Ns Cm utf8 404*95c635efSGarrett D'Amoreto force a UTF\-8 locale. 405*95c635efSGarrett D'AmoreSee 406*95c635efSGarrett D'Amore.Sx Locale Output 407*95c635efSGarrett D'Amorefor details and options. 408*95c635efSGarrett D'Amore.Ss XHTML Output 409*95c635efSGarrett D'AmoreOutput produced by 410*95c635efSGarrett D'Amore.Fl T Ns Cm xhtml 411*95c635efSGarrett D'Amoreconforms to XHTML-1.0 strict. 412*95c635efSGarrett D'Amore.Pp 413*95c635efSGarrett D'AmoreSee 414*95c635efSGarrett D'Amore.Sx HTML Output 415*95c635efSGarrett D'Amorefor details; beyond generating XHTML tags instead of HTML tags, these 416*95c635efSGarrett D'Amoreoutput modes are identical. 417*95c635efSGarrett D'Amore.Sh EXIT STATUS 418*95c635efSGarrett D'AmoreThe 419*95c635efSGarrett D'Amore.Nm 420*95c635efSGarrett D'Amoreutility exits with one of the following values, controlled by the message 421*95c635efSGarrett D'Amore.Ar level 422*95c635efSGarrett D'Amoreassociated with the 423*95c635efSGarrett D'Amore.Fl W 424*95c635efSGarrett D'Amoreoption: 425*95c635efSGarrett D'Amore.Pp 426*95c635efSGarrett D'Amore.Bl -tag -width Ds -compact 427*95c635efSGarrett D'Amore.It 0 428*95c635efSGarrett D'AmoreNo warnings or errors occurred, or those that did were ignored because 429*95c635efSGarrett D'Amorethey were lower than the requested 430*95c635efSGarrett D'Amore.Ar level . 431*95c635efSGarrett D'Amore.It 2 432*95c635efSGarrett D'AmoreAt least one warning occurred, but no error, and 433*95c635efSGarrett D'Amore.Fl W Ns Cm warning 434*95c635efSGarrett D'Amorewas specified. 435*95c635efSGarrett D'Amore.It 3 436*95c635efSGarrett D'AmoreAt least one parsing error occurred, but no fatal error, and 437*95c635efSGarrett D'Amore.Fl W Ns Cm error 438*95c635efSGarrett D'Amoreor 439*95c635efSGarrett D'Amore.Fl W Ns Cm warning 440*95c635efSGarrett D'Amorewas specified. 441*95c635efSGarrett D'Amore.It 4 442*95c635efSGarrett D'AmoreA fatal parsing error occurred. 443*95c635efSGarrett D'Amore.It 5 444*95c635efSGarrett D'AmoreInvalid command line arguments were specified. 445*95c635efSGarrett D'AmoreNo input files have been read. 446*95c635efSGarrett D'Amore.It 6 447*95c635efSGarrett D'AmoreAn operating system error occurred, for example memory exhaustion or an 448*95c635efSGarrett D'Amoreerror accessing input files. 449*95c635efSGarrett D'AmoreSuch errors cause 450*95c635efSGarrett D'Amore.Nm 451*95c635efSGarrett D'Amoreto exit at once, possibly in the middle of parsing or formatting a file. 452*95c635efSGarrett D'Amore.El 453*95c635efSGarrett D'Amore.Pp 454*95c635efSGarrett D'AmoreNote that selecting 455*95c635efSGarrett D'Amore.Fl T Ns Cm lint 456*95c635efSGarrett D'Amoreoutput mode implies 457*95c635efSGarrett D'Amore.Fl W Ns Cm warning . 458*95c635efSGarrett D'Amore.Sh EXAMPLES 459*95c635efSGarrett D'AmoreTo page manuals to the terminal: 460*95c635efSGarrett D'Amore.Pp 461*95c635efSGarrett D'Amore.Dl $ mandoc \-Wall,stop mandoc.1 2\*(Gt&1 | less 462*95c635efSGarrett D'Amore.Dl $ mandoc mandoc.1 mdoc.5 | less 463*95c635efSGarrett D'Amore.Pp 464*95c635efSGarrett D'AmoreTo produce HTML manuals with 465*95c635efSGarrett D'Amore.Ar style.css 466*95c635efSGarrett D'Amoreas the style-sheet: 467*95c635efSGarrett D'Amore.Pp 468*95c635efSGarrett D'Amore.Dl $ mandoc \-Thtml -Ostyle=style.css mdoc.5 \*(Gt mdoc.5.html 469*95c635efSGarrett D'Amore.Pp 470*95c635efSGarrett D'AmoreTo check over a large set of manuals: 471*95c635efSGarrett D'Amore.Pp 472*95c635efSGarrett D'Amore.Dl $ mandoc \-Tlint `find /usr/src -name \e*\e.[1-9]` 473*95c635efSGarrett D'Amore.Pp 474*95c635efSGarrett D'AmoreTo produce a series of PostScript manuals for A4 paper: 475*95c635efSGarrett D'Amore.Pp 476*95c635efSGarrett D'Amore.Dl $ mandoc \-Tps \-Opaper=a4 mdoc.5 man.5 \*(Gt manuals.ps 477*95c635efSGarrett D'Amore.Pp 478*95c635efSGarrett D'AmoreConvert a modern 479*95c635efSGarrett D'Amore.Xr mdoc 5 480*95c635efSGarrett D'Amoremanual to the older 481*95c635efSGarrett D'Amore.Xr man 5 482*95c635efSGarrett D'Amoreformat, for use on systems lacking an 483*95c635efSGarrett D'Amore.Xr mdoc 5 484*95c635efSGarrett D'Amoreparser: 485*95c635efSGarrett D'Amore.Pp 486*95c635efSGarrett D'Amore.Dl $ mandoc \-Tman foo.mdoc \*(Gt foo.man 487*95c635efSGarrett D'Amore.Sh DIAGNOSTICS 488*95c635efSGarrett D'AmoreStandard error messages reporting parsing errors are prefixed by 489*95c635efSGarrett D'Amore.Pp 490*95c635efSGarrett D'Amore.Sm off 491*95c635efSGarrett D'Amore.D1 Ar file : line : column : \ level : 492*95c635efSGarrett D'Amore.Sm on 493*95c635efSGarrett D'Amore.Pp 494*95c635efSGarrett D'Amorewhere the fields have the following meanings: 495*95c635efSGarrett D'Amore.Bl -tag -width "column" 496*95c635efSGarrett D'Amore.It Ar file 497*95c635efSGarrett D'AmoreThe name of the input file causing the message. 498*95c635efSGarrett D'Amore.It Ar line 499*95c635efSGarrett D'AmoreThe line number in that input file. 500*95c635efSGarrett D'AmoreLine numbering starts at 1. 501*95c635efSGarrett D'Amore.It Ar column 502*95c635efSGarrett D'AmoreThe column number in that input file. 503*95c635efSGarrett D'AmoreColumn numbering starts at 1. 504*95c635efSGarrett D'AmoreIf the issue is caused by a word, the column number usually 505*95c635efSGarrett D'Amorepoints to the first character of the word. 506*95c635efSGarrett D'Amore.It Ar level 507*95c635efSGarrett D'AmoreThe message level, printed in capital letters. 508*95c635efSGarrett D'Amore.El 509*95c635efSGarrett D'Amore.Pp 510*95c635efSGarrett D'AmoreMessage levels have the following meanings: 511*95c635efSGarrett D'Amore.Bl -tag -width "warning" 512*95c635efSGarrett D'Amore.It Cm fatal 513*95c635efSGarrett D'AmoreThe parser is unable to parse a given input file at all. 514*95c635efSGarrett D'AmoreNo formatted output is produced from that input file. 515*95c635efSGarrett D'Amore.It Cm error 516*95c635efSGarrett D'AmoreAn input file contains syntax that cannot be safely interpreted, 517*95c635efSGarrett D'Amoreeither because it is invalid or because 518*95c635efSGarrett D'Amore.Nm 519*95c635efSGarrett D'Amoredoes not implement it yet. 520*95c635efSGarrett D'AmoreBy discarding part of the input or inserting missing tokens, 521*95c635efSGarrett D'Amorethe parser is able to continue, and the error does not prevent 522*95c635efSGarrett D'Amoregeneration of formatted output, but typically, preparing that 523*95c635efSGarrett D'Amoreoutput involves information loss, broken document structure 524*95c635efSGarrett D'Amoreor unintended formatting. 525*95c635efSGarrett D'Amore.It Cm warning 526*95c635efSGarrett D'AmoreAn input file uses obsolete, discouraged or non-portable syntax. 527*95c635efSGarrett D'AmoreAll the same, the meaning of the input is unambiguous and a correct 528*95c635efSGarrett D'Amorerendering can be produced. 529*95c635efSGarrett D'AmoreDocuments causing warnings may render poorly when using other 530*95c635efSGarrett D'Amoreformatting tools instead of 531*95c635efSGarrett D'Amore.Nm . 532*95c635efSGarrett D'Amore.El 533*95c635efSGarrett D'Amore.Pp 534*95c635efSGarrett D'AmoreMessages of the 535*95c635efSGarrett D'Amore.Cm warning 536*95c635efSGarrett D'Amoreand 537*95c635efSGarrett D'Amore.Cm error 538*95c635efSGarrett D'Amorelevels are hidden unless their level, or a lower level, is requested using a 539*95c635efSGarrett D'Amore.Fl W 540*95c635efSGarrett D'Amoreoption or 541*95c635efSGarrett D'Amore.Fl T Ns Cm lint 542*95c635efSGarrett D'Amoreoutput mode. 543*95c635efSGarrett D'Amore.Pp 544*95c635efSGarrett D'AmoreThe 545*95c635efSGarrett D'Amore.Nm 546*95c635efSGarrett D'Amoreutility may also print messages related to invalid command line arguments 547*95c635efSGarrett D'Amoreor operating system errors, for example when memory is exhausted or 548*95c635efSGarrett D'Amoreinput files cannot be read. 549*95c635efSGarrett D'AmoreSuch messages do not carry the prefix described above. 550*95c635efSGarrett D'Amore.Sh COMPATIBILITY 551*95c635efSGarrett D'AmoreThis section summarises 552*95c635efSGarrett D'Amore.Nm 553*95c635efSGarrett D'Amorecompatibility with GNU troff. 554*95c635efSGarrett D'AmoreEach input and output format is separately noted. 555*95c635efSGarrett D'Amore.Ss ASCII Compatibility 556*95c635efSGarrett D'Amore.Bl -bullet -compact 557*95c635efSGarrett D'Amore.It 558*95c635efSGarrett D'AmoreUnrenderable unicode codepoints specified with 559*95c635efSGarrett D'Amore.Sq \e[uNNNN] 560*95c635efSGarrett D'Amoreescapes are printed as 561*95c635efSGarrett D'Amore.Sq \&? 562*95c635efSGarrett D'Amorein mandoc. 563*95c635efSGarrett D'AmoreIn GNU troff, these raise an error. 564*95c635efSGarrett D'Amore.It 565*95c635efSGarrett D'AmoreThe 566*95c635efSGarrett D'Amore.Sq \&Bd \-literal 567*95c635efSGarrett D'Amoreand 568*95c635efSGarrett D'Amore.Sq \&Bd \-unfilled 569*95c635efSGarrett D'Amoremacros of 570*95c635efSGarrett D'Amore.Xr mdoc 5 571*95c635efSGarrett D'Amorein 572*95c635efSGarrett D'Amore.Fl T Ns Cm ascii 573*95c635efSGarrett D'Amoreare synonyms, as are \-filled and \-ragged. 574*95c635efSGarrett D'Amore.It 575*95c635efSGarrett D'AmoreIn historic GNU troff, the 576*95c635efSGarrett D'Amore.Sq \&Pa 577*95c635efSGarrett D'Amore.Xr mdoc 5 578*95c635efSGarrett D'Amoremacro does not underline when scoped under an 579*95c635efSGarrett D'Amore.Sq \&It 580*95c635efSGarrett D'Amorein the FILES section. 581*95c635efSGarrett D'AmoreThis behaves correctly in 582*95c635efSGarrett D'Amore.Nm . 583*95c635efSGarrett D'Amore.It 584*95c635efSGarrett D'AmoreA list or display following the 585*95c635efSGarrett D'Amore.Sq \&Ss 586*95c635efSGarrett D'Amore.Xr mdoc 5 587*95c635efSGarrett D'Amoremacro in 588*95c635efSGarrett D'Amore.Fl T Ns Cm ascii 589*95c635efSGarrett D'Amoredoes not assert a prior vertical break, just as it doesn't with 590*95c635efSGarrett D'Amore.Sq \&Sh . 591*95c635efSGarrett D'Amore.It 592*95c635efSGarrett D'AmoreThe 593*95c635efSGarrett D'Amore.Sq \&na 594*95c635efSGarrett D'Amore.Xr man 5 595*95c635efSGarrett D'Amoremacro in 596*95c635efSGarrett D'Amore.Fl T Ns Cm ascii 597*95c635efSGarrett D'Amorehas no effect. 598*95c635efSGarrett D'Amore.It 599*95c635efSGarrett D'AmoreWords aren't hyphenated. 600*95c635efSGarrett D'Amore.El 601*95c635efSGarrett D'Amore.Ss HTML/XHTML Compatibility 602*95c635efSGarrett D'Amore.Bl -bullet -compact 603*95c635efSGarrett D'Amore.It 604*95c635efSGarrett D'AmoreThe 605*95c635efSGarrett D'Amore.Sq \efP 606*95c635efSGarrett D'Amoreescape will revert the font to the previous 607*95c635efSGarrett D'Amore.Sq \ef 608*95c635efSGarrett D'Amoreescape, not to the last rendered decoration, which is now dictated by 609*95c635efSGarrett D'AmoreCSS instead of hard-coded. 610*95c635efSGarrett D'AmoreIt also will not span past the current scope, 611*95c635efSGarrett D'Amorefor the same reason. 612*95c635efSGarrett D'AmoreNote that in 613*95c635efSGarrett D'Amore.Sx ASCII Output 614*95c635efSGarrett D'Amoremode, this will work fine. 615*95c635efSGarrett D'Amore.It 616*95c635efSGarrett D'AmoreThe 617*95c635efSGarrett D'Amore.Xr mdoc 5 618*95c635efSGarrett D'Amore.Sq \&Bl \-hang 619*95c635efSGarrett D'Amoreand 620*95c635efSGarrett D'Amore.Sq \&Bl \-tag 621*95c635efSGarrett D'Amorelist types render similarly (no break following overreached left-hand 622*95c635efSGarrett D'Amoreside) due to the expressive constraints of HTML. 623*95c635efSGarrett D'Amore.It 624*95c635efSGarrett D'AmoreThe 625*95c635efSGarrett D'Amore.Xr man 5 626*95c635efSGarrett D'Amore.Sq IP 627*95c635efSGarrett D'Amoreand 628*95c635efSGarrett D'Amore.Sq TP 629*95c635efSGarrett D'Amorelists render similarly. 630*95c635efSGarrett D'Amore.El 631*95c635efSGarrett D'Amore.Sh INTERFACE STABILITY 632*95c635efSGarrett D'AmoreThe 633*95c635efSGarrett D'Amore.Nm 634*95c635efSGarrett D'Amoreutility is 635*95c635efSGarrett D'Amore.Nm Committed , 636*95c635efSGarrett D'Amorebut the details of specific output formats other than ASCII are 637*95c635efSGarrett D'Amore.Nm Uncommitted . 638*95c635efSGarrett D'Amore.Sh SEE ALSO 639*95c635efSGarrett D'Amore.Xr eqn 5 , 640*95c635efSGarrett D'Amore.Xr man 5 , 641*95c635efSGarrett D'Amore.Xr mandoc_char 5 , 642*95c635efSGarrett D'Amore.Xr mdoc 5 , 643*95c635efSGarrett D'Amore.Xr mandoc_roff 5 , 644*95c635efSGarrett D'Amore.Xr tbl 5 645*95c635efSGarrett D'Amore.Sh AUTHORS 646*95c635efSGarrett D'AmoreThe 647*95c635efSGarrett D'Amore.Nm 648*95c635efSGarrett D'Amoreutility was written by 649*95c635efSGarrett D'Amore.An Kristaps Dzonsons , 650*95c635efSGarrett D'Amore.Mt kristaps@bsd.lv . 651*95c635efSGarrett D'Amore.Sh CAVEATS 652*95c635efSGarrett D'AmoreIn 653*95c635efSGarrett D'Amore.Fl T Ns Cm html 654*95c635efSGarrett D'Amoreand 655*95c635efSGarrett D'Amore.Fl T Ns Cm xhtml , 656*95c635efSGarrett D'Amorethe maximum size of an element attribute is determined by 657*95c635efSGarrett D'Amore.Dv BUFSIZ , 658*95c635efSGarrett D'Amorewhich is usually 1024 bytes. 659*95c635efSGarrett D'AmoreBe aware of this when setting long link 660*95c635efSGarrett D'Amoreformats such as 661*95c635efSGarrett D'Amore.Fl O Ns Cm style Ns = Ns Ar really/long/link . 662*95c635efSGarrett D'Amore.Pp 663*95c635efSGarrett D'AmoreNesting elements within next-line element scopes of 664*95c635efSGarrett D'Amore.Fl m Ns Cm an , 665*95c635efSGarrett D'Amoresuch as 666*95c635efSGarrett D'Amore.Sq br 667*95c635efSGarrett D'Amorewithin an empty 668*95c635efSGarrett D'Amore.Sq B , 669*95c635efSGarrett D'Amorewill confuse 670*95c635efSGarrett D'Amore.Fl T Ns Cm html 671*95c635efSGarrett D'Amoreand 672*95c635efSGarrett D'Amore.Fl T Ns Cm xhtml 673*95c635efSGarrett D'Amoreand cause them to forget the formatting of the prior next-line scope. 674*95c635efSGarrett D'Amore.Pp 675*95c635efSGarrett D'AmoreThe 676*95c635efSGarrett D'Amore.Sq \(aq 677*95c635efSGarrett D'Amorecontrol character is an alias for the standard macro control character 678*95c635efSGarrett D'Amoreand does not emit a line-break as stipulated in GNU troff. 679