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