Annotation of src/usr.bin/mandoc/mandoc.1, Revision 1.72
1.72 ! schwarze 1: .\" $OpenBSD: mandoc.1,v 1.71 2015/01/14 22:02:00 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.72 ! schwarze 18: .Dd $Mdocdate: January 14 2015 $
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
1.72 ! schwarze 162: .Cm warning
1.38 schwarze 163: or
1.72 ! schwarze 164: .Cm error ;
! 165: .Cm all
1.38 schwarze 166: is an alias for
1.72 ! schwarze 167: .Cm warning .
! 168: By default,
! 169: .Nm
! 170: is silent.
1.38 schwarze 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
1.72 ! schwarze 535: At least one parsing error occurred, and
1.38 schwarze 536: .Fl W Ns Cm error
537: or
538: .Fl W Ns Cm warning
539: was specified.
540: .It 5
541: Invalid command line arguments were specified.
542: No input files have been read.
543: .It 6
1.71 schwarze 544: An operating system error occurred, for example exhaustion
545: of memory, file descriptors, or process table entries.
1.38 schwarze 546: Such errors cause
547: .Nm
548: to exit at once, possibly in the middle of parsing or formatting a file.
549: .El
550: .Pp
551: Note that selecting
552: .Fl T Ns Cm lint
553: output mode implies
554: .Fl W Ns Cm warning .
1.1 kristaps 555: .Sh EXAMPLES
556: To page manuals to the terminal:
557: .Pp
1.42 schwarze 558: .Dl $ mandoc \-Wall,stop mandoc.1 2\*(Gt&1 | less
559: .Dl $ mandoc mandoc.1 mdoc.3 mdoc.7 | less
1.12 schwarze 560: .Pp
1.17 schwarze 561: To produce HTML manuals with
562: .Ar style.css
563: as the style-sheet:
564: .Pp
1.42 schwarze 565: .Dl $ mandoc \-Thtml -Ostyle=style.css mdoc.7 \*(Gt mdoc.7.html
1.17 schwarze 566: .Pp
1.12 schwarze 567: To check over a large set of manuals:
568: .Pp
1.38 schwarze 569: .Dl $ mandoc \-Tlint `find /usr/src -name \e*\e.[1-9]`
1.34 schwarze 570: .Pp
571: To produce a series of PostScript manuals for A4 paper:
572: .Pp
1.42 schwarze 573: .Dl $ mandoc \-Tps \-Opaper=a4 mdoc.7 man.7 \*(Gt manuals.ps
1.46 schwarze 574: .Pp
575: Convert a modern
576: .Xr mdoc 7
577: manual to the older
578: .Xr man 7
579: format, for use on systems lacking an
580: .Xr mdoc 7
581: parser:
582: .Pp
583: .Dl $ mandoc \-Tman foo.mdoc \*(Gt foo.man
1.38 schwarze 584: .Sh DIAGNOSTICS
1.59 schwarze 585: Messages displayed by
586: .Nm
587: follow this format:
1.38 schwarze 588: .Pp
1.59 schwarze 589: .D1 Nm Ns : Ar file : Ns Ar line : Ns Ar column : level : message : macro args
1.38 schwarze 590: .Pp
1.59 schwarze 591: Line and column numbers start at 1.
592: Both are omitted for messages referring to an input file as a whole.
593: Macro names and arguments are omitted where meaningless.
594: Fatal messages about invalid command line arguments
595: or operating system errors, for example when memory is exhausted,
596: may also omit the
597: .Ar file
1.57 schwarze 598: and
1.59 schwarze 599: .Ar level
600: fields.
1.57 schwarze 601: .Pp
1.38 schwarze 602: Message levels have the following meanings:
603: .Bl -tag -width "warning"
604: .It Cm error
605: An input file contains syntax that cannot be safely interpreted,
606: either because it is invalid or because
607: .Nm
608: does not implement it yet.
609: By discarding part of the input or inserting missing tokens,
610: the parser is able to continue, and the error does not prevent
611: generation of formatted output, but typically, preparing that
612: output involves information loss, broken document structure
613: or unintended formatting.
1.71 schwarze 614: .Pp
615: Non-existent or unreadable input files are also reported on the
616: .Cm error
617: level.
618: In that case, the parser cannot even be started and no output
619: is produced from those input files.
1.38 schwarze 620: .It Cm warning
621: An input file uses obsolete, discouraged or non-portable syntax.
622: All the same, the meaning of the input is unambiguous and a correct
623: rendering can be produced.
624: Documents causing warnings may render poorly when using other
625: formatting tools instead of
626: .Nm .
627: .El
628: .Pp
629: Messages of the
630: .Cm warning
631: and
632: .Cm error
1.71 schwarze 633: levels except those about non-existent or unreadable input files
634: are hidden unless their level, or a lower level, is requested using a
1.38 schwarze 635: .Fl W
636: option or
637: .Fl T Ns Cm lint
638: output mode.
1.6 schwarze 639: .Sh COMPATIBILITY
1.10 schwarze 640: This section summarises
1.6 schwarze 641: .Nm
1.39 schwarze 642: compatibility with GNU troff.
1.14 schwarze 643: Each input and output format is separately noted.
1.20 schwarze 644: .Ss ASCII Compatibility
1.6 schwarze 645: .Bl -bullet -compact
1.13 schwarze 646: .It
1.44 schwarze 647: Unrenderable unicode codepoints specified with
648: .Sq \e[uNNNN]
649: escapes are printed as
650: .Sq \&?
651: in mandoc.
652: In GNU troff, these raise an error.
653: .It
1.21 schwarze 654: The
1.14 schwarze 655: .Sq \&Bd \-literal
1.21 schwarze 656: and
1.14 schwarze 657: .Sq \&Bd \-unfilled
658: macros of
659: .Xr mdoc 7
660: in
1.26 jmc 661: .Fl T Ns Cm ascii
1.14 schwarze 662: are synonyms, as are \-filled and \-ragged.
663: .It
1.44 schwarze 664: In historic GNU troff, the
1.14 schwarze 665: .Sq \&Pa
666: .Xr mdoc 7
667: macro does not underline when scoped under an
668: .Sq \&It
1.25 jmc 669: in the FILES section.
670: This behaves correctly in
1.14 schwarze 671: .Nm .
1.10 schwarze 672: .It
1.26 jmc 673: A list or display following the
1.11 schwarze 674: .Sq \&Ss
1.14 schwarze 675: .Xr mdoc 7
676: macro in
1.26 jmc 677: .Fl T Ns Cm ascii
1.6 schwarze 678: does not assert a prior vertical break, just as it doesn't with
1.11 schwarze 679: .Sq \&Sh .
1.6 schwarze 680: .It
1.14 schwarze 681: The
682: .Sq \&na
683: .Xr man 7
1.16 schwarze 684: macro in
1.26 jmc 685: .Fl T Ns Cm ascii
1.16 schwarze 686: has no effect.
1.6 schwarze 687: .It
688: Words aren't hyphenated.
689: .El
1.63 schwarze 690: .Ss HTML Compatibility
1.17 schwarze 691: .Bl -bullet -compact
692: .It
693: The
1.20 schwarze 694: .Sq \efP
695: escape will revert the font to the previous
696: .Sq \ef
697: escape, not to the last rendered decoration, which is now dictated by
1.25 jmc 698: CSS instead of hard-coded.
699: It also will not span past the current scope,
700: for the same reason.
701: Note that in
1.20 schwarze 702: .Sx ASCII Output
703: mode, this will work fine.
704: .It
705: The
1.17 schwarze 706: .Xr mdoc 7
707: .Sq \&Bl \-hang
708: and
709: .Sq \&Bl \-tag
710: list types render similarly (no break following overreached left-hand
711: side) due to the expressive constraints of HTML.
712: .It
713: The
714: .Xr man 7
715: .Sq IP
716: and
717: .Sq TP
718: lists render similarly.
719: .El
1.1 kristaps 720: .Sh SEE ALSO
1.47 schwarze 721: .Xr eqn 7 ,
1.25 jmc 722: .Xr man 7 ,
1.1 kristaps 723: .Xr mandoc_char 7 ,
1.43 schwarze 724: .Xr mdoc 7 ,
725: .Xr roff 7 ,
726: .Xr tbl 7
1.1 kristaps 727: .Sh AUTHORS
728: The
729: .Nm
1.10 schwarze 730: utility was written by
1.56 schwarze 731: .An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
1.17 schwarze 732: .Sh CAVEATS
733: In
1.26 jmc 734: .Fl T Ns Cm html
1.21 schwarze 735: and
1.26 jmc 736: .Fl T Ns Cm xhtml ,
1.17 schwarze 737: the maximum size of an element attribute is determined by
738: .Dv BUFSIZ ,
1.25 jmc 739: which is usually 1024 bytes.
740: Be aware of this when setting long link
1.26 jmc 741: formats such as
742: .Fl O Ns Cm style Ns = Ns Ar really/long/link .
1.22 schwarze 743: .Pp
744: Nesting elements within next-line element scopes of
1.26 jmc 745: .Fl m Ns Cm an ,
1.22 schwarze 746: such as
747: .Sq br
748: within an empty
749: .Sq B ,
750: will confuse
1.26 jmc 751: .Fl T Ns Cm html
1.22 schwarze 752: and
1.26 jmc 753: .Fl T Ns Cm xhtml
1.23 schwarze 754: and cause them to forget the formatting of the prior next-line scope.
755: .Pp
1.24 schwarze 756: The
757: .Sq \(aq
758: control character is an alias for the standard macro control character
759: and does not emit a line-break as stipulated in GNU troff.