Annotation of src/usr.bin/mandoc/mandoc.1, Revision 1.71
1.71 ! schwarze 1: .\" $OpenBSD: mandoc.1,v 1.70 2014/12/28 14:39:08 schwarze Exp $
1.1 kristaps 2: .\"
1.44 schwarze 3: .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
1.71 ! schwarze 4: .\" Copyright (c) 2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
1.1 kristaps 5: .\"
6: .\" Permission to use, copy, modify, and distribute this software for any
1.3 schwarze 7: .\" purpose with or without fee is hereby granted, provided that the above
8: .\" copyright notice and this permission notice appear in all copies.
1.1 kristaps 9: .\"
1.3 schwarze 10: .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11: .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12: .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13: .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14: .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15: .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16: .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1.1 kristaps 17: .\"
1.71 ! schwarze 18: .Dd $Mdocdate: December 28 2014 $
1.2 deraadt 19: .Dt MANDOC 1
1.1 kristaps 20: .Os
21: .Sh NAME
22: .Nm mandoc
23: .Nd format and display UNIX manuals
24: .Sh SYNOPSIS
25: .Nm mandoc
1.62 schwarze 26: .Op Fl acfhklV
1.54 schwarze 27: .Sm off
28: .Op Fl I Cm os Li = Ar name
29: .Sm on
1.65 jmc 30: .Op Fl K Ns Ar encoding
1.1 kristaps 31: .Op Fl m Ns Ar format
1.26 jmc 32: .Op Fl O Ns Ar option
1.17 schwarze 33: .Op Fl T Ns Ar output
1.38 schwarze 34: .Op Fl W Ns Ar level
1.45 schwarze 35: .Op Ar
1.1 kristaps 36: .Sh DESCRIPTION
37: The
38: .Nm
1.10 schwarze 39: utility formats
1.1 kristaps 40: .Ux
1.25 jmc 41: manual pages for display.
1.53 schwarze 42: .Pp
43: By default,
44: .Nm
45: reads
46: .Xr mdoc 7
47: or
48: .Xr man 7
49: text from stdin, implying
50: .Fl m Ns Cm andoc ,
51: and produces
1.68 schwarze 52: .Fl T Ns Cm locale
1.53 schwarze 53: output.
54: .Pp
1.61 schwarze 55: The options are as follows:
1.5 schwarze 56: .Bl -tag -width Ds
1.60 schwarze 57: .It Fl a
58: If the standard output is a terminal device and
59: .Fl c
60: is not specified, use
61: .Xr more 1
62: to paginate the output, just like
63: .Xr man 1
64: would.
65: .It Fl c
66: Copy the formatted manual pages to the standard output without using
67: .Xr more 1
68: to paginate them.
69: This is the default.
70: It can be specified to override
71: .Fl a .
1.61 schwarze 72: .It Fl f
73: A synonym for
74: .Xr whatis 1 .
75: This overrides any earlier
76: .Fl k
77: and
78: .Fl l
79: options.
1.54 schwarze 80: .Sm off
81: .It Fl I Cm os Li = Ar name
82: .Sm on
83: Override the default operating system
84: .Ar name
85: for the
86: .Xr mdoc 7
87: .Sq \&Os
1.70 schwarze 88: and for the
89: .Xr man 7
90: .Sq \&TH
1.54 schwarze 91: macro.
1.62 schwarze 92: .It Fl h
93: Display only the SYNOPSIS lines.
94: Implies
1.66 schwarze 95: .Fl c .
1.64 schwarze 96: .It Fl K Ns Ar encoding
97: Specify the input encoding.
98: The supported
99: .Ar encoding
100: arguments are
101: .Cm us-ascii ,
102: .Cm iso-8859-1 ,
103: and
104: .Cm utf-8 .
105: If not specified, autodetection uses the first match:
106: .Bl -tag -width iso-8859-1
107: .It Cm utf-8
108: if the first three bytes of the input file
109: are the UTF-8 byte order mark (BOM, 0xefbbbf)
110: .It Ar encoding
111: if the first or second line of the input file matches the
112: .Sy emacs
113: mode line format
114: .Pp
115: .D1 .\e" -*- Oo ...; Oc coding: Ar encoding ; No -*-
116: .It Cm utf-8
117: if the first non-ASCII byte in the file introduces a valid UTF-8 sequence
118: .It Cm iso-8859-1
119: otherwise
120: .El
1.61 schwarze 121: .It Fl k
122: A synonym for
123: .Xr apropos 1 .
124: This overrides any earlier
125: .Fl f
126: and
127: .Fl l
128: options.
129: .It Fl l
130: A synonym for
131: .Fl a .
132: Also reverts any earlier
133: .Fl f
134: and
135: .Fl k
136: options.
1.1 kristaps 137: .It Fl m Ns Ar format
1.25 jmc 138: Input format.
139: See
1.1 kristaps 140: .Sx Input Formats
1.25 jmc 141: for available formats.
142: Defaults to
1.26 jmc 143: .Fl m Ns Cm andoc .
144: .It Fl O Ns Ar option
1.25 jmc 145: Comma-separated output options.
1.1 kristaps 146: .It Fl T Ns Ar output
1.25 jmc 147: Output format.
148: See
1.1 kristaps 149: .Sx Output Formats
1.25 jmc 150: for available formats.
151: Defaults to
1.68 schwarze 152: .Fl T Ns Cm locale .
1.4 schwarze 153: .It Fl V
154: Print version and exit.
1.38 schwarze 155: .It Fl W Ns Ar level
156: Specify the minimum message
157: .Ar level
158: to be reported on the standard error output and to affect the exit status.
159: The
160: .Ar level
161: can be
162: .Cm warning ,
163: .Cm error ,
164: or
165: .Cm fatal .
166: The default is
167: .Fl W Ns Cm fatal ;
1.26 jmc 168: .Fl W Ns Cm all
1.38 schwarze 169: is an alias for
170: .Fl W Ns Cm warning .
171: See
172: .Sx EXIT STATUS
173: and
174: .Sx DIAGNOSTICS
175: for details.
176: .Pp
177: The special option
178: .Fl W Ns Cm stop
179: tells
180: .Nm
181: to exit after parsing a file that causes warnings or errors of at least
182: the requested level.
183: No formatted output will be produced from that file.
184: If both a
185: .Ar level
186: and
187: .Cm stop
188: are requested, they can be joined with a comma, for example
189: .Fl W Ns Cm error , Ns Cm stop .
1.26 jmc 190: .It Ar file
191: Read input from zero or more files.
1.25 jmc 192: If unspecified, reads from stdin.
193: If multiple files are specified,
1.1 kristaps 194: .Nm
195: will halt with the first failed parse.
196: .El
1.61 schwarze 197: .Pp
198: In
199: .Fl f
200: and
201: .Fl k
202: mode,
203: .Nm
204: also supports the options
205: .Fl CMmOSsw
206: described in the
207: .Xr apropos 1
208: manual.
1.1 kristaps 209: .Ss Input Formats
210: The
211: .Nm
212: utility accepts
213: .Xr mdoc 7
214: and
215: .Xr man 7
216: input with
1.26 jmc 217: .Fl m Ns Cm doc
1.1 kristaps 218: and
1.26 jmc 219: .Fl m Ns Cm an ,
1.25 jmc 220: respectively.
221: The
1.1 kristaps 222: .Xr mdoc 7
223: format is
224: .Em strongly
1.10 schwarze 225: recommended;
1.1 kristaps 226: .Xr man 7
227: should only be used for legacy manuals.
228: .Pp
229: A third option,
1.26 jmc 230: .Fl m Ns Cm andoc ,
1.1 kristaps 231: which is also the default, determines encoding on-the-fly: if the first
1.10 schwarze 232: non-comment macro is
1.11 schwarze 233: .Sq \&Dd
1.1 kristaps 234: or
1.11 schwarze 235: .Sq \&Dt ,
1.10 schwarze 236: the
1.1 kristaps 237: .Xr mdoc 7
238: parser is used; otherwise, the
239: .Xr man 7
240: parser is used.
241: .Pp
242: If multiple
1.10 schwarze 243: files are specified with
1.26 jmc 244: .Fl m Ns Cm andoc ,
1.25 jmc 245: each has its file-type determined this way.
246: If multiple files are
1.1 kristaps 247: specified and
1.26 jmc 248: .Fl m Ns Cm doc
1.1 kristaps 249: or
1.26 jmc 250: .Fl m Ns Cm an
1.1 kristaps 251: is specified, then this format is used exclusively.
252: .Ss Output Formats
253: The
254: .Nm
255: utility accepts the following
256: .Fl T
1.34 schwarze 257: arguments, which correspond to output modes:
1.48 jmc 258: .Bl -tag -width "-Tlocale"
1.26 jmc 259: .It Fl T Ns Cm ascii
1.42 schwarze 260: Produce 7-bit ASCII output.
1.25 jmc 261: See
1.20 schwarze 262: .Sx ASCII Output .
1.26 jmc 263: .It Fl T Ns Cm html
1.69 schwarze 264: Produce HTML5, CSS1, and MathML output.
1.25 jmc 265: See
1.20 schwarze 266: .Sx HTML Output .
1.26 jmc 267: .It Fl T Ns Cm lint
268: Parse only: produce no output.
269: Implies
1.38 schwarze 270: .Fl W Ns Cm warning .
1.48 jmc 271: .It Fl T Ns Cm locale
272: Encode output using the current locale.
1.68 schwarze 273: This is the default.
1.48 jmc 274: See
275: .Sx Locale Output .
1.46 schwarze 276: .It Fl T Ns Cm man
1.49 schwarze 277: Produce
1.46 schwarze 278: .Xr man 7
1.49 schwarze 279: format output.
280: See
281: .Sx Man Output .
1.36 schwarze 282: .It Fl T Ns Cm pdf
283: Produce PDF output.
284: See
285: .Sx PDF Output .
1.31 schwarze 286: .It Fl T Ns Cm ps
287: Produce PostScript output.
288: See
289: .Sx PostScript Output .
1.26 jmc 290: .It Fl T Ns Cm tree
291: Produce an indented parse tree.
1.48 jmc 292: .It Fl T Ns Cm utf8
293: Encode output in the UTF\-8 multi-byte format.
294: See
295: .Sx UTF\-8 Output .
1.26 jmc 296: .It Fl T Ns Cm xhtml
1.63 schwarze 297: This is a synonym for
298: .Fl T Ns Cm html .
1.1 kristaps 299: .El
300: .Pp
301: If multiple input files are specified, these will be processed by the
302: corresponding filter in-order.
1.34 schwarze 303: .Ss ASCII Output
304: Output produced by
1.68 schwarze 305: .Fl T Ns Cm ascii
306: is rendered in standard 7-bit ASCII documented in
1.34 schwarze 307: .Xr ascii 7 .
308: .Pp
309: Font styles are applied by using back-spaced encoding such that an
310: underlined character
311: .Sq c
312: is rendered as
313: .Sq _ Ns \e[bs] Ns c ,
314: where
315: .Sq \e[bs]
316: is the back-space character number 8.
317: Emboldened characters are rendered as
318: .Sq c Ns \e[bs] Ns c .
319: .Pp
320: The special characters documented in
321: .Xr mandoc_char 7
322: are rendered best-effort in an ASCII equivalent.
1.44 schwarze 323: If no equivalent is found,
324: .Sq \&?
325: is used instead.
1.34 schwarze 326: .Pp
327: Output width is limited to 78 visible columns unless literal input lines
328: exceed this limit.
329: .Pp
330: The following
331: .Fl O
332: arguments are accepted:
1.5 schwarze 333: .Bl -tag -width Ds
1.51 schwarze 334: .It Cm indent Ns = Ns Ar indent
335: The left margin for normal text is set to
336: .Ar indent
337: blank characters instead of the default of five for
338: .Xr mdoc 7
339: and seven for
340: .Xr man 7 .
341: Increasing this is not recommended; it may result in degraded formatting,
1.52 jmc 342: for example overfull lines or ugly line breaks.
1.34 schwarze 343: .It Cm width Ns = Ns Ar width
344: The output width is set to
345: .Ar width ,
346: which will normalise to \(>=60.
1.1 kristaps 347: .El
1.34 schwarze 348: .Ss HTML Output
349: Output produced by
350: .Fl T Ns Cm html
1.63 schwarze 351: conforms to HTML5 using optional self-closing tags.
1.69 schwarze 352: Default styles use only CSS1.
353: Equations rendered from
354: .Xr eqn 7
355: blocks use MathML.
1.34 schwarze 356: .Pp
1.30 schwarze 357: The
1.34 schwarze 358: .Pa example.style.css
1.42 schwarze 359: file documents style-sheet classes available for customising output.
360: If a style-sheet is not specified with
361: .Fl O Ns Ar style ,
362: .Fl T Ns Cm html
1.63 schwarze 363: defaults to simple output (via an embedded style-sheet)
364: readable in any graphical or text-based web
1.42 schwarze 365: browser.
1.34 schwarze 366: .Pp
1.45 schwarze 367: Special characters are rendered in decimal-encoded UTF\-8.
1.34 schwarze 368: .Pp
369: The following
1.33 schwarze 370: .Fl O
1.34 schwarze 371: arguments are accepted:
1.17 schwarze 372: .Bl -tag -width Ds
1.49 schwarze 373: .It Cm fragment
1.67 bentley 374: Omit the <!DOCTYPE> declaration and the <html>, <head>, and <body>
375: elements and only emit the subtree below the <body> element.
1.49 schwarze 376: The
377: .Cm style
1.50 schwarze 378: argument will be ignored.
1.49 schwarze 379: This is useful when embedding manual content within existing documents.
1.33 schwarze 380: .It Cm includes Ns = Ns Ar fmt
1.17 schwarze 381: The string
382: .Ar fmt ,
1.21 schwarze 383: for example,
1.17 schwarze 384: .Ar ../src/%I.html ,
385: is used as a template for linked header files (usually via the
386: .Sq \&In
1.25 jmc 387: macro).
388: Instances of
1.17 schwarze 389: .Sq \&%I
1.25 jmc 390: are replaced with the include filename.
391: The default is not to present a
1.17 schwarze 392: hyperlink.
1.33 schwarze 393: .It Cm man Ns = Ns Ar fmt
1.17 schwarze 394: The string
395: .Ar fmt ,
1.21 schwarze 396: for example,
1.17 schwarze 397: .Ar ../html%S/%N.%S.html ,
398: is used as a template for linked manuals (usually via the
399: .Sq \&Xr
1.25 jmc 400: macro).
401: Instances of
1.17 schwarze 402: .Sq \&%N
403: and
404: .Sq %S
405: are replaced with the linked manual's name and section, respectively.
1.25 jmc 406: If no section is included, section 1 is assumed.
407: The default is not to
1.17 schwarze 408: present a hyperlink.
1.33 schwarze 409: .It Cm style Ns = Ns Ar style.css
1.26 jmc 410: The file
411: .Ar style.css
412: is used for an external style-sheet.
413: This must be a valid absolute or
414: relative URI.
1.30 schwarze 415: .El
1.48 jmc 416: .Ss Locale Output
417: Locale-depending output encoding is triggered with
418: .Fl T Ns Cm locale .
1.68 schwarze 419: This is the default.
420: .Pp
1.48 jmc 421: This option is not available on all systems: systems without locale
422: support, or those whose internal representation is not natively UCS-4,
423: will fall back to
424: .Fl T Ns Cm ascii .
425: See
426: .Sx ASCII Output
427: for font style specification and available command-line arguments.
1.49 schwarze 428: .Ss Man Output
429: Translate input format into
430: .Xr man 7
431: output format.
1.55 jmc 432: This is useful for distributing manual sources to legacy systems
1.49 schwarze 433: lacking
434: .Xr mdoc 7
435: formatters.
436: .Pp
437: If
438: .Xr mdoc 7
439: is passed as input, it is translated into
1.50 schwarze 440: .Xr man 7 .
441: If the input format is
1.49 schwarze 442: .Xr man 7 ,
1.50 schwarze 443: the input is copied to the output, expanding any
1.49 schwarze 444: .Xr roff 7
445: .Sq so
1.50 schwarze 446: requests.
447: The parser is also run, and as usual, the
448: .Fl W
449: level controls which
450: .Sx DIAGNOSTICS
451: are displayed before copying the input to the output.
1.48 jmc 452: .Ss PDF Output
453: PDF-1.1 output may be generated by
454: .Fl T Ns Cm pdf .
455: See
456: .Sx PostScript Output
457: for
458: .Fl O
459: arguments and defaults.
1.31 schwarze 460: .Ss PostScript Output
1.33 schwarze 461: PostScript
462: .Qq Adobe-3.0
463: Level-2 pages may be generated by
1.31 schwarze 464: .Fl T Ns Cm ps .
1.35 schwarze 465: Output pages default to letter sized and are rendered in the Times font
466: family, 11-point.
467: Margins are calculated as 1/9 the page length and width.
468: Line-height is 1.4m.
1.34 schwarze 469: .Pp
470: Special characters are rendered as in
471: .Sx ASCII Output .
472: .Pp
473: The following
474: .Fl O
475: arguments are accepted:
476: .Bl -tag -width Ds
477: .It Cm paper Ns = Ns Ar name
478: The paper size
479: .Ar name
480: may be one of
1.35 schwarze 481: .Ar a3 ,
482: .Ar a4 ,
483: .Ar a5 ,
484: .Ar legal ,
1.34 schwarze 485: or
486: .Ar letter .
1.35 schwarze 487: You may also manually specify dimensions as
488: .Ar NNxNN ,
489: width by height in millimetres.
490: If an unknown value is encountered,
491: .Ar letter
492: is used.
1.34 schwarze 493: .El
1.48 jmc 494: .Ss UTF\-8 Output
495: Use
496: .Fl T Ns Cm utf8
497: to force a UTF\-8 locale.
1.36 schwarze 498: See
1.48 jmc 499: .Sx Locale Output
500: for details and options.
1.60 schwarze 501: .Sh ENVIRONMENT
502: .Bl -tag -width MANPAGER
503: .It Ev MANPAGER
504: Any non-empty value of the environment variable
505: .Ev MANPAGER
506: will be used instead of the standard pagination program,
507: .Xr more 1 .
508: .It Ev PAGER
509: Specifies the pagination program to use when
510: .Ev MANPAGER
511: is not defined.
512: If neither PAGER nor MANPAGER is defined,
513: .Pa /usr/bin/more Fl s
514: will be used.
515: .El
1.38 schwarze 516: .Sh EXIT STATUS
517: The
518: .Nm
519: utility exits with one of the following values, controlled by the message
520: .Ar level
521: associated with the
522: .Fl W
523: option:
524: .Pp
525: .Bl -tag -width Ds -compact
526: .It 0
527: No warnings or errors occurred, or those that did were ignored because
528: they were lower than the requested
529: .Ar level .
530: .It 2
531: At least one warning occurred, but no error, and
532: .Fl W Ns Cm warning
533: was specified.
534: .It 3
535: At least one parsing error occurred, but no fatal error, and
536: .Fl W Ns Cm error
537: or
538: .Fl W Ns Cm warning
539: was specified.
540: .It 4
541: A fatal parsing error occurred.
542: .It 5
543: Invalid command line arguments were specified.
544: No input files have been read.
545: .It 6
1.71 ! schwarze 546: An operating system error occurred, for example exhaustion
! 547: of memory, file descriptors, or process table entries.
1.38 schwarze 548: Such errors cause
549: .Nm
550: to exit at once, possibly in the middle of parsing or formatting a file.
551: .El
552: .Pp
553: Note that selecting
554: .Fl T Ns Cm lint
555: output mode implies
556: .Fl W Ns Cm warning .
1.1 kristaps 557: .Sh EXAMPLES
558: To page manuals to the terminal:
559: .Pp
1.42 schwarze 560: .Dl $ mandoc \-Wall,stop mandoc.1 2\*(Gt&1 | less
561: .Dl $ mandoc mandoc.1 mdoc.3 mdoc.7 | less
1.12 schwarze 562: .Pp
1.17 schwarze 563: To produce HTML manuals with
564: .Ar style.css
565: as the style-sheet:
566: .Pp
1.42 schwarze 567: .Dl $ mandoc \-Thtml -Ostyle=style.css mdoc.7 \*(Gt mdoc.7.html
1.17 schwarze 568: .Pp
1.12 schwarze 569: To check over a large set of manuals:
570: .Pp
1.38 schwarze 571: .Dl $ mandoc \-Tlint `find /usr/src -name \e*\e.[1-9]`
1.34 schwarze 572: .Pp
573: To produce a series of PostScript manuals for A4 paper:
574: .Pp
1.42 schwarze 575: .Dl $ mandoc \-Tps \-Opaper=a4 mdoc.7 man.7 \*(Gt manuals.ps
1.46 schwarze 576: .Pp
577: Convert a modern
578: .Xr mdoc 7
579: manual to the older
580: .Xr man 7
581: format, for use on systems lacking an
582: .Xr mdoc 7
583: parser:
584: .Pp
585: .Dl $ mandoc \-Tman foo.mdoc \*(Gt foo.man
1.38 schwarze 586: .Sh DIAGNOSTICS
1.59 schwarze 587: Messages displayed by
588: .Nm
589: follow this format:
1.38 schwarze 590: .Pp
1.59 schwarze 591: .D1 Nm Ns : Ar file : Ns Ar line : Ns Ar column : level : message : macro args
1.38 schwarze 592: .Pp
1.59 schwarze 593: Line and column numbers start at 1.
594: Both are omitted for messages referring to an input file as a whole.
595: Macro names and arguments are omitted where meaningless.
596: Fatal messages about invalid command line arguments
597: or operating system errors, for example when memory is exhausted,
598: may also omit the
599: .Ar file
1.57 schwarze 600: and
1.59 schwarze 601: .Ar level
602: fields.
1.57 schwarze 603: .Pp
1.38 schwarze 604: Message levels have the following meanings:
605: .Bl -tag -width "warning"
606: .It Cm fatal
607: The parser is unable to parse a given input file at all.
608: No formatted output is produced from that input file.
609: .It Cm error
610: An input file contains syntax that cannot be safely interpreted,
611: either because it is invalid or because
612: .Nm
613: does not implement it yet.
614: By discarding part of the input or inserting missing tokens,
615: the parser is able to continue, and the error does not prevent
616: generation of formatted output, but typically, preparing that
617: output involves information loss, broken document structure
618: or unintended formatting.
1.71 ! schwarze 619: .Pp
! 620: Non-existent or unreadable input files are also reported on the
! 621: .Cm error
! 622: level.
! 623: In that case, the parser cannot even be started and no output
! 624: is produced from those input files.
1.38 schwarze 625: .It Cm warning
626: An input file uses obsolete, discouraged or non-portable syntax.
627: All the same, the meaning of the input is unambiguous and a correct
628: rendering can be produced.
629: Documents causing warnings may render poorly when using other
630: formatting tools instead of
631: .Nm .
632: .El
633: .Pp
634: Messages of the
635: .Cm warning
636: and
637: .Cm error
1.71 ! schwarze 638: levels except those about non-existent or unreadable input files
! 639: are hidden unless their level, or a lower level, is requested using a
1.38 schwarze 640: .Fl W
641: option or
642: .Fl T Ns Cm lint
643: output mode.
1.6 schwarze 644: .Sh COMPATIBILITY
1.10 schwarze 645: This section summarises
1.6 schwarze 646: .Nm
1.39 schwarze 647: compatibility with GNU troff.
1.14 schwarze 648: Each input and output format is separately noted.
1.20 schwarze 649: .Ss ASCII Compatibility
1.6 schwarze 650: .Bl -bullet -compact
1.13 schwarze 651: .It
1.44 schwarze 652: Unrenderable unicode codepoints specified with
653: .Sq \e[uNNNN]
654: escapes are printed as
655: .Sq \&?
656: in mandoc.
657: In GNU troff, these raise an error.
658: .It
1.21 schwarze 659: The
1.14 schwarze 660: .Sq \&Bd \-literal
1.21 schwarze 661: and
1.14 schwarze 662: .Sq \&Bd \-unfilled
663: macros of
664: .Xr mdoc 7
665: in
1.26 jmc 666: .Fl T Ns Cm ascii
1.14 schwarze 667: are synonyms, as are \-filled and \-ragged.
668: .It
1.44 schwarze 669: In historic GNU troff, the
1.14 schwarze 670: .Sq \&Pa
671: .Xr mdoc 7
672: macro does not underline when scoped under an
673: .Sq \&It
1.25 jmc 674: in the FILES section.
675: This behaves correctly in
1.14 schwarze 676: .Nm .
1.10 schwarze 677: .It
1.26 jmc 678: A list or display following the
1.11 schwarze 679: .Sq \&Ss
1.14 schwarze 680: .Xr mdoc 7
681: macro in
1.26 jmc 682: .Fl T Ns Cm ascii
1.6 schwarze 683: does not assert a prior vertical break, just as it doesn't with
1.11 schwarze 684: .Sq \&Sh .
1.6 schwarze 685: .It
1.14 schwarze 686: The
687: .Sq \&na
688: .Xr man 7
1.16 schwarze 689: macro in
1.26 jmc 690: .Fl T Ns Cm ascii
1.16 schwarze 691: has no effect.
1.6 schwarze 692: .It
693: Words aren't hyphenated.
694: .El
1.63 schwarze 695: .Ss HTML Compatibility
1.17 schwarze 696: .Bl -bullet -compact
697: .It
698: The
1.20 schwarze 699: .Sq \efP
700: escape will revert the font to the previous
701: .Sq \ef
702: escape, not to the last rendered decoration, which is now dictated by
1.25 jmc 703: CSS instead of hard-coded.
704: It also will not span past the current scope,
705: for the same reason.
706: Note that in
1.20 schwarze 707: .Sx ASCII Output
708: mode, this will work fine.
709: .It
710: The
1.17 schwarze 711: .Xr mdoc 7
712: .Sq \&Bl \-hang
713: and
714: .Sq \&Bl \-tag
715: list types render similarly (no break following overreached left-hand
716: side) due to the expressive constraints of HTML.
717: .It
718: The
719: .Xr man 7
720: .Sq IP
721: and
722: .Sq TP
723: lists render similarly.
724: .El
1.1 kristaps 725: .Sh SEE ALSO
1.47 schwarze 726: .Xr eqn 7 ,
1.25 jmc 727: .Xr man 7 ,
1.1 kristaps 728: .Xr mandoc_char 7 ,
1.43 schwarze 729: .Xr mdoc 7 ,
730: .Xr roff 7 ,
731: .Xr tbl 7
1.1 kristaps 732: .Sh AUTHORS
733: The
734: .Nm
1.10 schwarze 735: utility was written by
1.56 schwarze 736: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
1.17 schwarze 737: .Sh CAVEATS
738: In
1.26 jmc 739: .Fl T Ns Cm html
1.21 schwarze 740: and
1.26 jmc 741: .Fl T Ns Cm xhtml ,
1.17 schwarze 742: the maximum size of an element attribute is determined by
743: .Dv BUFSIZ ,
1.25 jmc 744: which is usually 1024 bytes.
745: Be aware of this when setting long link
1.26 jmc 746: formats such as
747: .Fl O Ns Cm style Ns = Ns Ar really/long/link .
1.22 schwarze 748: .Pp
749: Nesting elements within next-line element scopes of
1.26 jmc 750: .Fl m Ns Cm an ,
1.22 schwarze 751: such as
752: .Sq br
753: within an empty
754: .Sq B ,
755: will confuse
1.26 jmc 756: .Fl T Ns Cm html
1.22 schwarze 757: and
1.26 jmc 758: .Fl T Ns Cm xhtml
1.23 schwarze 759: and cause them to forget the formatting of the prior next-line scope.
760: .Pp
1.24 schwarze 761: The
762: .Sq \(aq
763: control character is an alias for the standard macro control character
764: and does not emit a line-break as stipulated in GNU troff.