Annotation of src/usr.bin/mandoc/mandoc.1, Revision 1.69
1.69 ! schwarze 1: .\" $OpenBSD: mandoc.1,v 1.68 2014/12/02 11:31:46 schwarze 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.69 ! schwarze 18: .Dd $Mdocdate: December 2 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.69 ! schwarze 261: Produce HTML5, CSS1, and MathML 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.69 ! schwarze 349: Default styles use only CSS1.
! 350: Equations rendered from
! 351: .Xr eqn 7
! 352: blocks use MathML.
1.34 schwarze 353: .Pp
1.30 schwarze 354: The
1.34 schwarze 355: .Pa example.style.css
1.42 schwarze 356: file documents style-sheet classes available for customising output.
357: If a style-sheet is not specified with
358: .Fl O Ns Ar style ,
359: .Fl T Ns Cm html
1.63 schwarze 360: defaults to simple output (via an embedded style-sheet)
361: readable in any graphical or text-based web
1.42 schwarze 362: browser.
1.34 schwarze 363: .Pp
1.45 schwarze 364: Special characters are rendered in decimal-encoded UTF\-8.
1.34 schwarze 365: .Pp
366: The following
1.33 schwarze 367: .Fl O
1.34 schwarze 368: arguments are accepted:
1.17 schwarze 369: .Bl -tag -width Ds
1.49 schwarze 370: .It Cm fragment
1.67 bentley 371: Omit the <!DOCTYPE> declaration and the <html>, <head>, and <body>
372: elements and only emit the subtree below the <body> element.
1.49 schwarze 373: The
374: .Cm style
1.50 schwarze 375: argument will be ignored.
1.49 schwarze 376: This is useful when embedding manual content within existing documents.
1.33 schwarze 377: .It Cm includes Ns = Ns Ar fmt
1.17 schwarze 378: The string
379: .Ar fmt ,
1.21 schwarze 380: for example,
1.17 schwarze 381: .Ar ../src/%I.html ,
382: is used as a template for linked header files (usually via the
383: .Sq \&In
1.25 jmc 384: macro).
385: Instances of
1.17 schwarze 386: .Sq \&%I
1.25 jmc 387: are replaced with the include filename.
388: The default is not to present a
1.17 schwarze 389: hyperlink.
1.33 schwarze 390: .It Cm man Ns = Ns Ar fmt
1.17 schwarze 391: The string
392: .Ar fmt ,
1.21 schwarze 393: for example,
1.17 schwarze 394: .Ar ../html%S/%N.%S.html ,
395: is used as a template for linked manuals (usually via the
396: .Sq \&Xr
1.25 jmc 397: macro).
398: Instances of
1.17 schwarze 399: .Sq \&%N
400: and
401: .Sq %S
402: are replaced with the linked manual's name and section, respectively.
1.25 jmc 403: If no section is included, section 1 is assumed.
404: The default is not to
1.17 schwarze 405: present a hyperlink.
1.33 schwarze 406: .It Cm style Ns = Ns Ar style.css
1.26 jmc 407: The file
408: .Ar style.css
409: is used for an external style-sheet.
410: This must be a valid absolute or
411: relative URI.
1.30 schwarze 412: .El
1.48 jmc 413: .Ss Locale Output
414: Locale-depending output encoding is triggered with
415: .Fl T Ns Cm locale .
1.68 schwarze 416: This is the default.
417: .Pp
1.48 jmc 418: This option is not available on all systems: systems without locale
419: support, or those whose internal representation is not natively UCS-4,
420: will fall back to
421: .Fl T Ns Cm ascii .
422: See
423: .Sx ASCII Output
424: for font style specification and available command-line arguments.
1.49 schwarze 425: .Ss Man Output
426: Translate input format into
427: .Xr man 7
428: output format.
1.55 jmc 429: This is useful for distributing manual sources to legacy systems
1.49 schwarze 430: lacking
431: .Xr mdoc 7
432: formatters.
433: .Pp
434: If
435: .Xr mdoc 7
436: is passed as input, it is translated into
1.50 schwarze 437: .Xr man 7 .
438: If the input format is
1.49 schwarze 439: .Xr man 7 ,
1.50 schwarze 440: the input is copied to the output, expanding any
1.49 schwarze 441: .Xr roff 7
442: .Sq so
1.50 schwarze 443: requests.
444: The parser is also run, and as usual, the
445: .Fl W
446: level controls which
447: .Sx DIAGNOSTICS
448: are displayed before copying the input to the output.
1.48 jmc 449: .Ss PDF Output
450: PDF-1.1 output may be generated by
451: .Fl T Ns Cm pdf .
452: See
453: .Sx PostScript Output
454: for
455: .Fl O
456: arguments and defaults.
1.31 schwarze 457: .Ss PostScript Output
1.33 schwarze 458: PostScript
459: .Qq Adobe-3.0
460: Level-2 pages may be generated by
1.31 schwarze 461: .Fl T Ns Cm ps .
1.35 schwarze 462: Output pages default to letter sized and are rendered in the Times font
463: family, 11-point.
464: Margins are calculated as 1/9 the page length and width.
465: Line-height is 1.4m.
1.34 schwarze 466: .Pp
467: Special characters are rendered as in
468: .Sx ASCII Output .
469: .Pp
470: The following
471: .Fl O
472: arguments are accepted:
473: .Bl -tag -width Ds
474: .It Cm paper Ns = Ns Ar name
475: The paper size
476: .Ar name
477: may be one of
1.35 schwarze 478: .Ar a3 ,
479: .Ar a4 ,
480: .Ar a5 ,
481: .Ar legal ,
1.34 schwarze 482: or
483: .Ar letter .
1.35 schwarze 484: You may also manually specify dimensions as
485: .Ar NNxNN ,
486: width by height in millimetres.
487: If an unknown value is encountered,
488: .Ar letter
489: is used.
1.34 schwarze 490: .El
1.48 jmc 491: .Ss UTF\-8 Output
492: Use
493: .Fl T Ns Cm utf8
494: to force a UTF\-8 locale.
1.36 schwarze 495: See
1.48 jmc 496: .Sx Locale Output
497: for details and options.
1.60 schwarze 498: .Sh ENVIRONMENT
499: .Bl -tag -width MANPAGER
500: .It Ev MANPAGER
501: Any non-empty value of the environment variable
502: .Ev MANPAGER
503: will be used instead of the standard pagination program,
504: .Xr more 1 .
505: .It Ev PAGER
506: Specifies the pagination program to use when
507: .Ev MANPAGER
508: is not defined.
509: If neither PAGER nor MANPAGER is defined,
510: .Pa /usr/bin/more Fl s
511: will be used.
512: .El
1.38 schwarze 513: .Sh EXIT STATUS
514: The
515: .Nm
516: utility exits with one of the following values, controlled by the message
517: .Ar level
518: associated with the
519: .Fl W
520: option:
521: .Pp
522: .Bl -tag -width Ds -compact
523: .It 0
524: No warnings or errors occurred, or those that did were ignored because
525: they were lower than the requested
526: .Ar level .
527: .It 2
528: At least one warning occurred, but no error, and
529: .Fl W Ns Cm warning
530: was specified.
531: .It 3
532: At least one parsing error occurred, but no fatal error, and
533: .Fl W Ns Cm error
534: or
535: .Fl W Ns Cm warning
536: was specified.
537: .It 4
538: A fatal parsing error occurred.
539: .It 5
540: Invalid command line arguments were specified.
541: No input files have been read.
542: .It 6
543: An operating system error occurred, for example memory exhaustion or an
544: error accessing input files.
545: Such errors cause
546: .Nm
547: to exit at once, possibly in the middle of parsing or formatting a file.
548: .El
549: .Pp
550: Note that selecting
551: .Fl T Ns Cm lint
552: output mode implies
553: .Fl W Ns Cm warning .
1.1 kristaps 554: .Sh EXAMPLES
555: To page manuals to the terminal:
556: .Pp
1.42 schwarze 557: .Dl $ mandoc \-Wall,stop mandoc.1 2\*(Gt&1 | less
558: .Dl $ mandoc mandoc.1 mdoc.3 mdoc.7 | less
1.12 schwarze 559: .Pp
1.17 schwarze 560: To produce HTML manuals with
561: .Ar style.css
562: as the style-sheet:
563: .Pp
1.42 schwarze 564: .Dl $ mandoc \-Thtml -Ostyle=style.css mdoc.7 \*(Gt mdoc.7.html
1.17 schwarze 565: .Pp
1.12 schwarze 566: To check over a large set of manuals:
567: .Pp
1.38 schwarze 568: .Dl $ mandoc \-Tlint `find /usr/src -name \e*\e.[1-9]`
1.34 schwarze 569: .Pp
570: To produce a series of PostScript manuals for A4 paper:
571: .Pp
1.42 schwarze 572: .Dl $ mandoc \-Tps \-Opaper=a4 mdoc.7 man.7 \*(Gt manuals.ps
1.46 schwarze 573: .Pp
574: Convert a modern
575: .Xr mdoc 7
576: manual to the older
577: .Xr man 7
578: format, for use on systems lacking an
579: .Xr mdoc 7
580: parser:
581: .Pp
582: .Dl $ mandoc \-Tman foo.mdoc \*(Gt foo.man
1.38 schwarze 583: .Sh DIAGNOSTICS
1.59 schwarze 584: Messages displayed by
585: .Nm
586: follow this format:
1.38 schwarze 587: .Pp
1.59 schwarze 588: .D1 Nm Ns : Ar file : Ns Ar line : Ns Ar column : level : message : macro args
1.38 schwarze 589: .Pp
1.59 schwarze 590: Line and column numbers start at 1.
591: Both are omitted for messages referring to an input file as a whole.
592: Macro names and arguments are omitted where meaningless.
593: Fatal messages about invalid command line arguments
594: or operating system errors, for example when memory is exhausted,
595: may also omit the
596: .Ar file
1.57 schwarze 597: and
1.59 schwarze 598: .Ar level
599: fields.
1.57 schwarze 600: .Pp
1.38 schwarze 601: Message levels have the following meanings:
602: .Bl -tag -width "warning"
1.58 schwarze 603: .It Cm syserr
604: Opening or reading an input file failed, so the parser cannot
605: even be started and no output is produced from that input file.
1.38 schwarze 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.
619: .It Cm warning
620: An input file uses obsolete, discouraged or non-portable syntax.
621: All the same, the meaning of the input is unambiguous and a correct
622: rendering can be produced.
623: Documents causing warnings may render poorly when using other
624: formatting tools instead of
625: .Nm .
626: .El
627: .Pp
628: Messages of the
629: .Cm warning
630: and
631: .Cm error
632: levels are hidden unless their level, or a lower level, is requested using a
633: .Fl W
634: option or
635: .Fl T Ns Cm lint
636: output mode.
1.6 schwarze 637: .Sh COMPATIBILITY
1.10 schwarze 638: This section summarises
1.6 schwarze 639: .Nm
1.39 schwarze 640: compatibility with GNU troff.
1.14 schwarze 641: Each input and output format is separately noted.
1.20 schwarze 642: .Ss ASCII Compatibility
1.6 schwarze 643: .Bl -bullet -compact
1.13 schwarze 644: .It
1.44 schwarze 645: Unrenderable unicode codepoints specified with
646: .Sq \e[uNNNN]
647: escapes are printed as
648: .Sq \&?
649: in mandoc.
650: In GNU troff, these raise an error.
651: .It
1.21 schwarze 652: The
1.14 schwarze 653: .Sq \&Bd \-literal
1.21 schwarze 654: and
1.14 schwarze 655: .Sq \&Bd \-unfilled
656: macros of
657: .Xr mdoc 7
658: in
1.26 jmc 659: .Fl T Ns Cm ascii
1.14 schwarze 660: are synonyms, as are \-filled and \-ragged.
661: .It
1.44 schwarze 662: In historic GNU troff, the
1.14 schwarze 663: .Sq \&Pa
664: .Xr mdoc 7
665: macro does not underline when scoped under an
666: .Sq \&It
1.25 jmc 667: in the FILES section.
668: This behaves correctly in
1.14 schwarze 669: .Nm .
1.10 schwarze 670: .It
1.26 jmc 671: A list or display following the
1.11 schwarze 672: .Sq \&Ss
1.14 schwarze 673: .Xr mdoc 7
674: macro in
1.26 jmc 675: .Fl T Ns Cm ascii
1.6 schwarze 676: does not assert a prior vertical break, just as it doesn't with
1.11 schwarze 677: .Sq \&Sh .
1.6 schwarze 678: .It
1.14 schwarze 679: The
680: .Sq \&na
681: .Xr man 7
1.16 schwarze 682: macro in
1.26 jmc 683: .Fl T Ns Cm ascii
1.16 schwarze 684: has no effect.
1.6 schwarze 685: .It
686: Words aren't hyphenated.
687: .El
1.63 schwarze 688: .Ss HTML Compatibility
1.17 schwarze 689: .Bl -bullet -compact
690: .It
691: The
1.20 schwarze 692: .Sq \efP
693: escape will revert the font to the previous
694: .Sq \ef
695: escape, not to the last rendered decoration, which is now dictated by
1.25 jmc 696: CSS instead of hard-coded.
697: It also will not span past the current scope,
698: for the same reason.
699: Note that in
1.20 schwarze 700: .Sx ASCII Output
701: mode, this will work fine.
702: .It
703: The
1.17 schwarze 704: .Xr mdoc 7
705: .Sq \&Bl \-hang
706: and
707: .Sq \&Bl \-tag
708: list types render similarly (no break following overreached left-hand
709: side) due to the expressive constraints of HTML.
710: .It
711: The
712: .Xr man 7
713: .Sq IP
714: and
715: .Sq TP
716: lists render similarly.
717: .El
1.1 kristaps 718: .Sh SEE ALSO
1.47 schwarze 719: .Xr eqn 7 ,
1.25 jmc 720: .Xr man 7 ,
1.1 kristaps 721: .Xr mandoc_char 7 ,
1.43 schwarze 722: .Xr mdoc 7 ,
723: .Xr roff 7 ,
724: .Xr tbl 7
1.1 kristaps 725: .Sh AUTHORS
726: The
727: .Nm
1.10 schwarze 728: utility was written by
1.56 schwarze 729: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
1.17 schwarze 730: .Sh CAVEATS
731: In
1.26 jmc 732: .Fl T Ns Cm html
1.21 schwarze 733: and
1.26 jmc 734: .Fl T Ns Cm xhtml ,
1.17 schwarze 735: the maximum size of an element attribute is determined by
736: .Dv BUFSIZ ,
1.25 jmc 737: which is usually 1024 bytes.
738: Be aware of this when setting long link
1.26 jmc 739: formats such as
740: .Fl O Ns Cm style Ns = Ns Ar really/long/link .
1.22 schwarze 741: .Pp
742: Nesting elements within next-line element scopes of
1.26 jmc 743: .Fl m Ns Cm an ,
1.22 schwarze 744: such as
745: .Sq br
746: within an empty
747: .Sq B ,
748: will confuse
1.26 jmc 749: .Fl T Ns Cm html
1.22 schwarze 750: and
1.26 jmc 751: .Fl T Ns Cm xhtml
1.23 schwarze 752: and cause them to forget the formatting of the prior next-line scope.
753: .Pp
1.24 schwarze 754: The
755: .Sq \(aq
756: control character is an alias for the standard macro control character
757: and does not emit a line-break as stipulated in GNU troff.