1.\" $OpenBSD: mdoc.7,v 1.144 2016/09/03 13:37:41 guenther Exp $ 2.\" 3.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> 4.\" Copyright (c) 2010, 2011, 2013 Ingo Schwarze <schwarze@openbsd.org> 5.\" 6.\" Permission to use, copy, modify, and distribute this software for any 7.\" purpose with or without fee is hereby granted, provided that the above 8.\" copyright notice and this permission notice appear in all copies. 9.\" 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. 17.\" 18.Dd $Mdocdate: September 3 2016 $ 19.Dt MDOC 7 20.Os 21.Sh NAME 22.Nm mdoc 23.Nd semantic markup language for formatting manual pages 24.Sh DESCRIPTION 25The 26.Nm mdoc 27language supports authoring of manual pages for the 28.Xr man 1 29utility by allowing semantic annotations of words, phrases, 30page sections and complete manual pages. 31Such annotations are used by formatting tools to achieve a uniform 32presentation across all manuals written in 33.Nm , 34and to support hyperlinking if supported by the output medium. 35.Pp 36This reference document describes the structure of manual pages 37and the syntax and usage of the 38.Nm 39language. 40The reference implementation of a parsing and formatting tool is 41.Xr mandoc 1 ; 42the 43.Sx COMPATIBILITY 44section describes compatibility with other implementations. 45.Pp 46In an 47.Nm 48document, lines beginning with the control character 49.Sq \&. 50are called 51.Dq macro lines . 52The first word is the macro name. 53It consists of two or three letters. 54Most macro names begin with a capital letter. 55For a list of available macros, see 56.Sx MACRO OVERVIEW . 57The words following the macro name are arguments to the macro, optionally 58including the names of other, callable macros; see 59.Sx MACRO SYNTAX 60for details. 61.Pp 62Lines not beginning with the control character are called 63.Dq text lines . 64They provide free-form text to be printed; the formatting of the text 65depends on the respective processing context: 66.Bd -literal -offset indent 67\&.Sh Macro lines change control state. 68Text lines are interpreted within the current state. 69.Ed 70.Pp 71Many aspects of the basic syntax of the 72.Nm 73language are based on the 74.Xr roff 7 75language; see the 76.Em LANGUAGE SYNTAX 77and 78.Em MACRO SYNTAX 79sections in the 80.Xr roff 7 81manual for details, in particular regarding 82comments, escape sequences, whitespace, and quoting. 83However, using 84.Xr roff 7 85requests in 86.Nm 87documents is discouraged; 88.Xr mandoc 1 89supports some of them merely for backward compatibility. 90.Sh MANUAL STRUCTURE 91A well-formed 92.Nm 93document consists of a document prologue followed by one or more 94sections. 95.Pp 96The prologue, which consists of the 97.Sx \&Dd , 98.Sx \&Dt , 99and 100.Sx \&Os 101macros in that order, is required for every document. 102.Pp 103The first section (sections are denoted by 104.Sx \&Sh ) 105must be the NAME section, consisting of at least one 106.Sx \&Nm 107followed by 108.Sx \&Nd . 109.Pp 110Following that, convention dictates specifying at least the 111.Em SYNOPSIS 112and 113.Em DESCRIPTION 114sections, although this varies between manual sections. 115.Pp 116The following is a well-formed skeleton 117.Nm 118file for a utility 119.Qq progname : 120.Bd -literal -offset indent 121\&.Dd $\&Mdocdate$ 122\&.Dt PROGNAME section 123\&.Os 124\&.Sh NAME 125\&.Nm progname 126\&.Nd one line about what it does 127\&.\e\(dq .Sh LIBRARY 128\&.\e\(dq For sections 2, 3, and 9 only. 129\&.\e\(dq Not used in OpenBSD. 130\&.Sh SYNOPSIS 131\&.Nm progname 132\&.Op Fl options 133\&.Ar 134\&.Sh DESCRIPTION 135The 136\&.Nm 137utility processes files ... 138\&.\e\(dq .Sh CONTEXT 139\&.\e\(dq For section 9 functions only. 140\&.\e\(dq .Sh IMPLEMENTATION NOTES 141\&.\e\(dq Not used in OpenBSD. 142\&.\e\(dq .Sh RETURN VALUES 143\&.\e\(dq For sections 2, 3, and 9 function return values only. 144\&.\e\(dq .Sh ENVIRONMENT 145\&.\e\(dq For sections 1, 6, 7, and 8 only. 146\&.\e\(dq .Sh FILES 147\&.\e\(dq .Sh EXIT STATUS 148\&.\e\(dq For sections 1, 6, and 8 only. 149\&.\e\(dq .Sh EXAMPLES 150\&.\e\(dq .Sh DIAGNOSTICS 151\&.\e\(dq For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only. 152\&.\e\(dq .Sh ERRORS 153\&.\e\(dq For sections 2, 3, 4, and 9 errno settings only. 154\&.\e\(dq .Sh SEE ALSO 155\&.\e\(dq .Xr foobar 1 156\&.\e\(dq .Sh STANDARDS 157\&.\e\(dq .Sh HISTORY 158\&.\e\(dq .Sh AUTHORS 159\&.\e\(dq .Sh CAVEATS 160\&.\e\(dq .Sh BUGS 161\&.\e\(dq .Sh SECURITY CONSIDERATIONS 162\&.\e\(dq Not used in OpenBSD. 163.Ed 164.Pp 165The sections in an 166.Nm 167document are conventionally ordered as they appear above. 168Sections should be composed as follows: 169.Bl -ohang -offset Ds 170.It Em NAME 171The name(s) and a one line description of the documented material. 172The syntax for this as follows: 173.Bd -literal -offset indent 174\&.Nm name0 , 175\&.Nm name1 , 176\&.Nm name2 177\&.Nd a one line description 178.Ed 179.Pp 180Multiple 181.Sq \&Nm 182names should be separated by commas. 183.Pp 184The 185.Sx \&Nm 186macro(s) must precede the 187.Sx \&Nd 188macro. 189.Pp 190See 191.Sx \&Nm 192and 193.Sx \&Nd . 194.It Em LIBRARY 195The name of the library containing the documented material, which is 196assumed to be a function in a section 2, 3, or 9 manual. 197The syntax for this is as follows: 198.Bd -literal -offset indent 199\&.Lb libarm 200.Ed 201.Pp 202See 203.Sx \&Lb . 204.It Em SYNOPSIS 205Documents the utility invocation syntax, function call syntax, or device 206configuration. 207.Pp 208For the first, utilities (sections 1, 6, and 8), this is 209generally structured as follows: 210.Bd -literal -offset indent 211\&.Nm bar 212\&.Op Fl v 213\&.Op Fl o Ar file 214\&.Op Ar 215\&.Nm foo 216\&.Op Fl v 217\&.Op Fl o Ar file 218\&.Op Ar 219.Ed 220.Pp 221Commands should be ordered alphabetically. 222.Pp 223For the second, function calls (sections 2, 3, 9): 224.Bd -literal -offset indent 225\&.In header.h 226\&.Vt extern const char *global; 227\&.Ft "char *" 228\&.Fn foo "const char *src" 229\&.Ft "char *" 230\&.Fn bar "const char *src" 231.Ed 232.Pp 233Ordering of 234.Sx \&In , 235.Sx \&Vt , 236.Sx \&Fn , 237and 238.Sx \&Fo 239macros should follow C header-file conventions. 240.Pp 241And for the third, configurations (section 4): 242.Bd -literal -offset indent 243\&.Cd \(dqit* at isa? port 0x2e\(dq 244\&.Cd \(dqit* at isa? port 0x4e\(dq 245.Ed 246.Pp 247Manuals not in these sections generally don't need a 248.Em SYNOPSIS . 249.Pp 250Some macros are displayed differently in the 251.Em SYNOPSIS 252section, particularly 253.Sx \&Nm , 254.Sx \&Cd , 255.Sx \&Fd , 256.Sx \&Fn , 257.Sx \&Fo , 258.Sx \&In , 259.Sx \&Vt , 260and 261.Sx \&Ft . 262All of these macros are output on their own line. 263If two such dissimilar macros are pairwise invoked (except for 264.Sx \&Ft 265before 266.Sx \&Fo 267or 268.Sx \&Fn ) , 269they are separated by a vertical space, unless in the case of 270.Sx \&Fo , 271.Sx \&Fn , 272and 273.Sx \&Ft , 274which are always separated by vertical space. 275.Pp 276When text and macros following an 277.Sx \&Nm 278macro starting an input line span multiple output lines, 279all output lines but the first will be indented to align 280with the text immediately following the 281.Sx \&Nm 282macro, up to the next 283.Sx \&Nm , 284.Sx \&Sh , 285or 286.Sx \&Ss 287macro or the end of an enclosing block, whichever comes first. 288.It Em DESCRIPTION 289This begins with an expansion of the brief, one line description in 290.Em NAME : 291.Bd -literal -offset indent 292The 293\&.Nm 294utility does this, that, and the other. 295.Ed 296.Pp 297It usually follows with a breakdown of the options (if documenting a 298command), such as: 299.Bd -literal -offset indent 300The arguments are as follows: 301\&.Bl \-tag \-width Ds 302\&.It Fl v 303Print verbose information. 304\&.El 305.Ed 306.Pp 307List the options in alphabetical order, 308uppercase before lowercase for each letter and 309with no regard to whether an option takes an argument. 310Put digits in ascending order before all letter options. 311.Pp 312Manuals not documenting a command won't include the above fragment. 313.Pp 314Since the 315.Em DESCRIPTION 316section usually contains most of the text of a manual, longer manuals 317often use the 318.Sx \&Ss 319macro to form subsections. 320In very long manuals, the 321.Em DESCRIPTION 322may be split into multiple sections, each started by an 323.Sx \&Sh 324macro followed by a non-standard section name, and each having 325several subsections, like in the present 326.Nm 327manual. 328.It Em CONTEXT 329This section lists the contexts in which functions can be called in section 9. 330The contexts are autoconf, process, or interrupt. 331.It Em IMPLEMENTATION NOTES 332Implementation-specific notes should be kept here. 333This is useful when implementing standard functions that may have side 334effects or notable algorithmic implications. 335.It Em RETURN VALUES 336This section documents the 337return values of functions in sections 2, 3, and 9. 338.Pp 339See 340.Sx \&Rv . 341.It Em ENVIRONMENT 342Lists the environment variables used by the utility, 343and explains the syntax and semantics of their values. 344The 345.Xr environ 7 346manual provides examples of typical content and formatting. 347.Pp 348See 349.Sx \&Ev . 350.It Em FILES 351Documents files used. 352It's helpful to document both the file name and a short description of how 353the file is used (created, modified, etc.). 354.Pp 355See 356.Sx \&Pa . 357.It Em EXIT STATUS 358This section documents the 359command exit status for section 1, 6, and 8 utilities. 360Historically, this information was described in 361.Em DIAGNOSTICS , 362a practise that is now discouraged. 363.Pp 364See 365.Sx \&Ex . 366.It Em EXAMPLES 367Example usages. 368This often contains snippets of well-formed, well-tested invocations. 369Make sure that examples work properly! 370.It Em DIAGNOSTICS 371Documents error messages. 372In section 4 and 9 manuals, these are usually messages printed by the 373kernel to the console and to the kernel log. 374In section 1, 6, 7, and 8, these are usually messages printed by 375userland programs to the standard error output. 376.Pp 377Historically, this section was used in place of 378.Em EXIT STATUS 379for manuals in sections 1, 6, and 8; however, this practise is 380discouraged. 381.Pp 382See 383.Sx \&Bl 384.Fl diag . 385.It Em ERRORS 386Documents 387.Xr errno 2 388settings in sections 2, 3, 4, and 9. 389.Pp 390See 391.Sx \&Er . 392.It Em SEE ALSO 393References other manuals with related topics. 394This section should exist for most manuals. 395Cross-references should conventionally be ordered first by section, then 396alphabetically (ignoring case). 397.Pp 398References to other documentation concerning the topic of the manual page, 399for example authoritative books or journal articles, may also be 400provided in this section. 401.Pp 402See 403.Sx \&Rs 404and 405.Sx \&Xr . 406.It Em STANDARDS 407References any standards implemented or used. 408If not adhering to any standards, the 409.Em HISTORY 410section should be used instead. 411.Pp 412See 413.Sx \&St . 414.It Em HISTORY 415A brief history of the subject, including where it was first implemented, 416and when it was ported to or reimplemented for the operating system at hand. 417.It Em AUTHORS 418Credits to the person or persons who wrote the code and/or documentation. 419Authors should generally be noted by both name and email address. 420.Pp 421See 422.Sx \&An . 423.It Em CAVEATS 424Common misuses and misunderstandings should be explained 425in this section. 426.It Em BUGS 427Known bugs, limitations, and work-arounds should be described 428in this section. 429.It Em SECURITY CONSIDERATIONS 430Documents any security precautions that operators should consider. 431.El 432.Sh MACRO OVERVIEW 433This overview is sorted such that macros of similar purpose are listed 434together, to help find the best macro for any given purpose. 435Deprecated macros are not included in the overview, but can be found below 436in the alphabetical 437.Sx MACRO REFERENCE . 438.Ss Document preamble and NAME section macros 439.Bl -column "Brq, Bro, Brc" description 440.It Sx \&Dd Ta document date: Cm $\&Mdocdate$ | Ar month day , year 441.It Sx \&Dt Ta document title: Ar TITLE section Op Ar arch 442.It Sx \&Os Ta operating system version: Op Ar system Op Ar version 443.It Sx \&Nm Ta document name (one argument) 444.It Sx \&Nd Ta document description (one line) 445.El 446.Ss Sections and cross references 447.Bl -column "Brq, Bro, Brc" description 448.It Sx \&Sh Ta section header (one line) 449.It Sx \&Ss Ta subsection header (one line) 450.It Sx \&Sx Ta internal cross reference to a section or subsection 451.It Sx \&Xr Ta cross reference to another manual page: Ar name section 452.It Sx \&Pp , \&Lp Ta start a text paragraph (no arguments) 453.El 454.Ss Displays and lists 455.Bl -column "Brq, Bro, Brc" description 456.It Sx \&Bd , \&Ed Ta display block: 457.Fl Ar type 458.Op Fl offset Ar width 459.Op Fl compact 460.It Sx \&D1 Ta indented display (one line) 461.It Sx \&Dl Ta indented literal display (one line) 462.It Sx \&Ql Ta in-line literal display: Ql text 463.It Sx \&Bl , \&El Ta list block: 464.Fl Ar type 465.Op Fl width Ar val 466.Op Fl offset Ar val 467.Op Fl compact 468.It Sx \&It Ta list item (syntax depends on Fl Ar type ) 469.It Sx \&Ta Ta table cell separator in Sx \&Bl Fl column No lists 470.It Sx \&Rs , \&%* , \&Re Ta bibliographic block (references) 471.El 472.Ss Spacing control 473.Bl -column "Brq, Bro, Brc" description 474.It Sx \&Pf Ta prefix, no following horizontal space (one argument) 475.It Sx \&Ns Ta roman font, no preceding horizontal space (no arguments) 476.It Sx \&Ap Ta apostrophe without surrounding whitespace (no arguments) 477.It Sx \&Sm Ta switch horizontal spacing mode: Op Cm on | off 478.It Sx \&Bk , \&Ek Ta keep block: Fl words 479.It Sx \&br Ta force output line break in text mode (no arguments) 480.It Sx \&sp Ta force vertical space: Op Ar height 481.El 482.Ss Semantic markup for command line utilities: 483.Bl -column "Brq, Bro, Brc" description 484.It Sx \&Nm Ta start a SYNOPSIS block with the name of a utility 485.It Sx \&Fl Ta command line options (flags) (>=0 arguments) 486.It Sx \&Cm Ta command modifier (>0 arguments) 487.It Sx \&Ar Ta command arguments (>=0 arguments) 488.It Sx \&Op , \&Oo , \&Oc Ta optional syntax elements (enclosure) 489.It Sx \&Ic Ta internal or interactive command (>0 arguments) 490.It Sx \&Ev Ta environmental variable (>0 arguments) 491.It Sx \&Pa Ta file system path (>=0 arguments) 492.El 493.Ss Semantic markup for function libraries: 494.Bl -column "Brq, Bro, Brc" description 495.It Sx \&Lb Ta function library (one argument) 496.It Sx \&In Ta include file (one argument) 497.It Sx \&Fd Ta other preprocessor directive (>0 arguments) 498.It Sx \&Ft Ta function type (>0 arguments) 499.It Sx \&Fo , \&Fc Ta function block: Ar funcname 500.It Sx \&Fn Ta function name: 501.Op Ar functype 502.Ar funcname 503.Oo 504.Op Ar argtype 505.Ar argname 506.Oc 507.It Sx \&Fa Ta function argument (>0 arguments) 508.It Sx \&Vt Ta variable type (>0 arguments) 509.It Sx \&Va Ta variable name (>0 arguments) 510.It Sx \&Dv Ta defined variable or preprocessor constant (>0 arguments) 511.It Sx \&Er Ta error constant (>0 arguments) 512.It Sx \&Ev Ta environmental variable (>0 arguments) 513.El 514.Ss Various semantic markup: 515.Bl -column "Brq, Bro, Brc" description 516.It Sx \&An Ta author name (>0 arguments) 517.It Sx \&Lk Ta hyperlink: Ar uri Op Ar name 518.It Sx \&Mt Ta Do mailto Dc hyperlink: Ar address 519.It Sx \&Cd Ta kernel configuration declaration (>0 arguments) 520.It Sx \&Ad Ta memory address (>0 arguments) 521.It Sx \&Ms Ta mathematical symbol (>0 arguments) 522.El 523.Ss Physical markup 524.Bl -column "Brq, Bro, Brc" description 525.It Sx \&Em Ta italic font or underline (emphasis) (>0 arguments) 526.It Sx \&Sy Ta boldface font (symbolic) (>0 arguments) 527.It Sx \&Li Ta typewriter font (literal) (>0 arguments) 528.It Sx \&No Ta return to roman font (normal) (no arguments) 529.It Sx \&Bf , \&Ef Ta font block: 530.Op Fl Ar type | Cm \&Em | \&Li | \&Sy 531.El 532.Ss Physical enclosures 533.Bl -column "Brq, Bro, Brc" description 534.It Sx \&Dq , \&Do , \&Dc Ta enclose in typographic double quotes: Dq text 535.It Sx \&Qq , \&Qo , \&Qc Ta enclose in typewriter double quotes: Qq text 536.It Sx \&Sq , \&So , \&Sc Ta enclose in single quotes: Sq text 537.It Sx \&Pq , \&Po , \&Pc Ta enclose in parentheses: Pq text 538.It Sx \&Bq , \&Bo , \&Bc Ta enclose in square brackets: Bq text 539.It Sx \&Brq , \&Bro , \&Brc Ta enclose in curly braces: Brq text 540.It Sx \&Aq , \&Ao , \&Ac Ta enclose in angle brackets: Aq text 541.It Sx \&Eo , \&Ec Ta generic enclosure 542.El 543.Ss Text production 544.Bl -column "Brq, Bro, Brc" description 545.It Sx \&Ex Fl std Ta standard command exit values: Op Ar utility ... 546.It Sx \&Rv Fl std Ta standard function return values: Op Ar function ... 547.It Sx \&St Ta reference to a standards document (one argument) 548.It Sx \&At Ta At 549.It Sx \&Bx Ta Bx 550.It Sx \&Bsx Ta Bsx 551.It Sx \&Nx Ta Nx 552.It Sx \&Fx Ta Fx 553.It Sx \&Ox Ta Ox 554.It Sx \&Dx Ta Dx 555.El 556.Sh MACRO REFERENCE 557This section is a canonical reference of all macros, arranged 558alphabetically. 559For the scoping of individual macros, see 560.Sx MACRO SYNTAX . 561.Ss \&%A 562Author name of an 563.Sx \&Rs 564block. 565Multiple authors should each be accorded their own 566.Sx \%%A 567line. 568Author names should be ordered with full or abbreviated forename(s) 569first, then full surname. 570.Ss \&%B 571Book title of an 572.Sx \&Rs 573block. 574This macro may also be used in a non-bibliographic context when 575referring to book titles. 576.Ss \&%C 577Publication city or location of an 578.Sx \&Rs 579block. 580.Ss \&%D 581Publication date of an 582.Sx \&Rs 583block. 584Recommended formats of arguments are 585.Ar month day , year 586or just 587.Ar year . 588.Ss \&%I 589Publisher or issuer name of an 590.Sx \&Rs 591block. 592.Ss \&%J 593Journal name of an 594.Sx \&Rs 595block. 596.Ss \&%N 597Issue number (usually for journals) of an 598.Sx \&Rs 599block. 600.Ss \&%O 601Optional information of an 602.Sx \&Rs 603block. 604.Ss \&%P 605Book or journal page number of an 606.Sx \&Rs 607block. 608.Ss \&%Q 609Institutional author (school, government, etc.) of an 610.Sx \&Rs 611block. 612Multiple institutional authors should each be accorded their own 613.Sx \&%Q 614line. 615.Ss \&%R 616Technical report name of an 617.Sx \&Rs 618block. 619.Ss \&%T 620Article title of an 621.Sx \&Rs 622block. 623This macro may also be used in a non-bibliographical context when 624referring to article titles. 625.Ss \&%U 626URI of reference document. 627.Ss \&%V 628Volume number of an 629.Sx \&Rs 630block. 631.Ss \&Ac 632Close an 633.Sx \&Ao 634block. 635Does not have any tail arguments. 636.Ss \&Ad 637Memory address. 638Do not use this for postal addresses. 639.Pp 640Examples: 641.Dl \&.Ad [0,$] 642.Dl \&.Ad 0x00000000 643.Ss \&An 644Author name. 645Can be used both for the authors of the program, function, or driver 646documented in the manual, or for the authors of the manual itself. 647Requires either the name of an author or one of the following arguments: 648.Pp 649.Bl -tag -width "-nosplitX" -offset indent -compact 650.It Fl split 651Start a new output line before each subsequent invocation of 652.Sx \&An . 653.It Fl nosplit 654The opposite of 655.Fl split . 656.El 657.Pp 658The default is 659.Fl nosplit . 660The effect of selecting either of the 661.Fl split 662modes ends at the beginning of the 663.Em AUTHORS 664section. 665In the 666.Em AUTHORS 667section, the default is 668.Fl nosplit 669for the first author listing and 670.Fl split 671for all other author listings. 672.Pp 673Examples: 674.Dl \&.An -nosplit 675.Dl \&.An Kristaps Dzonsons \&Aq \&Mt kristaps@bsd.lv 676.Ss \&Ao 677Begin a block enclosed by angle brackets. 678Does not have any head arguments. 679.Pp 680Examples: 681.Dl \&.Fl -key= \&Ns \&Ao \&Ar val \&Ac 682.Pp 683See also 684.Sx \&Aq . 685.Ss \&Ap 686Inserts an apostrophe without any surrounding whitespace. 687This is generally used as a grammatical device when referring to the verb 688form of a function. 689.Pp 690Examples: 691.Dl \&.Fn execve \&Ap d 692.Ss \&Aq 693Encloses its arguments in angle brackets. 694.Pp 695Examples: 696.Dl \&.Fl -key= \&Ns \&Aq \&Ar val 697.Pp 698.Em Remarks : 699this macro is often abused for rendering URIs, which should instead use 700.Sx \&Lk 701or 702.Sx \&Mt , 703or to note pre-processor 704.Dq Li #include 705statements, which should use 706.Sx \&In . 707.Pp 708See also 709.Sx \&Ao . 710.Ss \&Ar 711Command arguments. 712If an argument is not provided, the string 713.Dq file ...\& 714is used as a default. 715.Pp 716Examples: 717.Dl ".Fl o Ar file" 718.Dl ".Ar" 719.Dl ".Ar arg1 , arg2 ." 720.Pp 721The arguments to the 722.Sx \&Ar 723macro are names and placeholders for command arguments; 724for fixed strings to be passed verbatim as arguments, use 725.Sx \&Fl 726or 727.Sx \&Cm . 728.Ss \&At 729Formats an 730.At 731version. 732Accepts one optional argument: 733.Pp 734.Bl -tag -width "v[1-7] | 32vX" -offset indent -compact 735.It Cm v[1-7] | 32v 736A version of 737.At . 738.It Cm III 739.At III . 740.It Cm V[.[1-4]]? 741A version of 742.At V . 743.El 744.Pp 745Note that these arguments do not begin with a hyphen. 746.Pp 747Examples: 748.Dl \&.At 749.Dl \&.At III 750.Dl \&.At V.1 751.Pp 752See also 753.Sx \&Bsx , 754.Sx \&Bx , 755.Sx \&Dx , 756.Sx \&Fx , 757.Sx \&Nx , 758and 759.Sx \&Ox . 760.Ss \&Bc 761Close a 762.Sx \&Bo 763block. 764Does not have any tail arguments. 765.Ss \&Bd 766Begin a display block. 767Its syntax is as follows: 768.Bd -ragged -offset indent 769.Pf \. Sx \&Bd 770.Fl Ns Ar type 771.Op Fl offset Ar width 772.Op Fl compact 773.Ed 774.Pp 775Display blocks are used to select a different indentation and 776justification than the one used by the surrounding text. 777They may contain both macro lines and text lines. 778By default, a display block is preceded by a vertical space. 779.Pp 780The 781.Ar type 782must be one of the following: 783.Bl -tag -width 13n -offset indent 784.It Fl centered 785Produce one output line from each input line, and center-justify each line. 786Using this display type is not recommended; many 787.Nm 788implementations render it poorly. 789.It Fl filled 790Change the positions of line breaks to fill each line, and left- and 791right-justify the resulting block. 792.It Fl literal 793Produce one output line from each input line, 794and do not justify the block at all. 795Preserve white space as it appears in the input. 796Always use a constant-width font. 797Use this for displaying source code. 798.It Fl ragged 799Change the positions of line breaks to fill each line, and left-justify 800the resulting block. 801.It Fl unfilled 802The same as 803.Fl literal , 804but using the same font as for normal text, which is a variable width font 805if supported by the output device. 806.El 807.Pp 808The 809.Ar type 810must be provided first. 811Additional arguments may follow: 812.Bl -tag -width 13n -offset indent 813.It Fl offset Ar width 814Indent the display by the 815.Ar width , 816which may be one of the following: 817.Bl -item 818.It 819One of the pre-defined strings 820.Cm indent , 821the width of a standard indentation (six constant width characters); 822.Cm indent-two , 823twice 824.Cm indent ; 825.Cm left , 826which has no effect; 827.Cm right , 828which justifies to the right margin; or 829.Cm center , 830which aligns around an imagined center axis. 831.It 832A macro invocation, which selects a predefined width 833associated with that macro. 834The most popular is the imaginary macro 835.Ar \&Ds , 836which resolves to 837.Sy 6n . 838.It 839A scaling width as described in 840.Xr roff 7 . 841.It 842An arbitrary string, which indents by the length of this string. 843.El 844.Pp 845When the argument is missing, 846.Fl offset 847is ignored. 848.It Fl compact 849Do not assert vertical space before the display. 850.El 851.Pp 852Examples: 853.Bd -literal -offset indent 854\&.Bd \-literal \-offset indent \-compact 855 Hello world. 856\&.Ed 857.Ed 858.Pp 859See also 860.Sx \&D1 861and 862.Sx \&Dl . 863.Ss \&Bf 864Change the font mode for a scoped block of text. 865Its syntax is as follows: 866.Bd -ragged -offset indent 867.Pf \. Sx \&Bf 868.Oo 869.Fl emphasis | literal | symbolic | 870.Cm \&Em | \&Li | \&Sy 871.Oc 872.Ed 873.Pp 874The 875.Fl emphasis 876and 877.Cm \&Em 878argument are equivalent, as are 879.Fl symbolic 880and 881.Cm \&Sy , 882and 883.Fl literal 884and 885.Cm \&Li . 886Without an argument, this macro does nothing. 887The font mode continues until broken by a new font mode in a nested 888scope or 889.Sx \&Ef 890is encountered. 891.Pp 892See also 893.Sx \&Li , 894.Sx \&Ef , 895.Sx \&Em , 896and 897.Sx \&Sy . 898.Ss \&Bk 899For each macro, keep its output together on the same output line, 900until the end of the macro or the end of the input line is reached, 901whichever comes first. 902Line breaks in text lines are unaffected. 903The syntax is as follows: 904.Pp 905.D1 Pf \. Sx \&Bk Fl words 906.Pp 907The 908.Fl words 909argument is required; additional arguments are ignored. 910.Pp 911The following example will not break within each 912.Sx \&Op 913macro line: 914.Bd -literal -offset indent 915\&.Bk \-words 916\&.Op Fl f Ar flags 917\&.Op Fl o Ar output 918\&.Ek 919.Ed 920.Pp 921Be careful in using over-long lines within a keep block! 922Doing so will clobber the right margin. 923.Ss \&Bl 924Begin a list. 925Lists consist of items specified using the 926.Sx \&It 927macro, containing a head or a body or both. 928The list syntax is as follows: 929.Bd -ragged -offset indent 930.Pf \. Sx \&Bl 931.Fl Ns Ar type 932.Op Fl width Ar val 933.Op Fl offset Ar val 934.Op Fl compact 935.Op HEAD ... 936.Ed 937.Pp 938The list 939.Ar type 940is mandatory and must be specified first. 941The 942.Fl width 943and 944.Fl offset 945arguments accept macro names as described for 946.Sx \&Bd 947.Fl offset , 948scaling widths as described in 949.Xr roff 7 , 950or use the length of the given string. 951The 952.Fl offset 953is a global indentation for the whole list, affecting both item heads 954and bodies. 955For those list types supporting it, the 956.Fl width 957argument requests an additional indentation of item bodies, 958to be added to the 959.Fl offset . 960Unless the 961.Fl compact 962argument is specified, list entries are separated by vertical space. 963.Pp 964A list must specify one of the following list types: 965.Bl -tag -width 12n -offset indent 966.It Fl bullet 967No item heads can be specified, but a bullet will be printed at the head 968of each item. 969Item bodies start on the same output line as the bullet 970and are indented according to the 971.Fl width 972argument. 973.It Fl column 974A columnated list. 975The 976.Fl width 977argument has no effect; instead, each argument specifies the width 978of one column, using either the scaling width syntax described in 979.Xr roff 7 980or the string length of the argument. 981If the first line of the body of a 982.Fl column 983list is not an 984.Sx \&It 985macro line, 986.Sx \&It 987contexts spanning one input line each are implied until an 988.Sx \&It 989macro line is encountered, at which point items start being interpreted as 990described in the 991.Sx \&It 992documentation. 993.It Fl dash 994Like 995.Fl bullet , 996except that dashes are used in place of bullets. 997.It Fl diag 998Like 999.Fl inset , 1000except that item heads are not parsed for macro invocations. 1001Most often used in the 1002.Em DIAGNOSTICS 1003section with error constants in the item heads. 1004.It Fl enum 1005A numbered list. 1006No item heads can be specified. 1007Formatted like 1008.Fl bullet , 1009except that cardinal numbers are used in place of bullets, 1010starting at 1. 1011.It Fl hang 1012Like 1013.Fl tag , 1014except that the first lines of item bodies are not indented, but follow 1015the item heads like in 1016.Fl inset 1017lists. 1018.It Fl hyphen 1019Synonym for 1020.Fl dash . 1021.It Fl inset 1022Item bodies follow items heads on the same line, using normal inter-word 1023spacing. 1024Bodies are not indented, and the 1025.Fl width 1026argument is ignored. 1027.It Fl item 1028No item heads can be specified, and none are printed. 1029Bodies are not indented, and the 1030.Fl width 1031argument is ignored. 1032.It Fl ohang 1033Item bodies start on the line following item heads and are not indented. 1034The 1035.Fl width 1036argument is ignored. 1037.It Fl tag 1038Item bodies are indented according to the 1039.Fl width 1040argument. 1041When an item head fits inside the indentation, the item body follows 1042this head on the same output line. 1043Otherwise, the body starts on the output line following the head. 1044.El 1045.Pp 1046Lists may be nested within lists and displays. 1047Nesting of 1048.Fl column 1049and 1050.Fl enum 1051lists may not be portable. 1052.Pp 1053See also 1054.Sx \&El 1055and 1056.Sx \&It . 1057.Ss \&Bo 1058Begin a block enclosed by square brackets. 1059Does not have any head arguments. 1060.Pp 1061Examples: 1062.Bd -literal -offset indent -compact 1063\&.Bo 1 , 1064\&.Dv BUFSIZ \&Bc 1065.Ed 1066.Pp 1067See also 1068.Sx \&Bq . 1069.Ss \&Bq 1070Encloses its arguments in square brackets. 1071.Pp 1072Examples: 1073.Dl \&.Bq 1 , \&Dv BUFSIZ 1074.Pp 1075.Em Remarks : 1076this macro is sometimes abused to emulate optional arguments for 1077commands; the correct macros to use for this purpose are 1078.Sx \&Op , 1079.Sx \&Oo , 1080and 1081.Sx \&Oc . 1082.Pp 1083See also 1084.Sx \&Bo . 1085.Ss \&Brc 1086Close a 1087.Sx \&Bro 1088block. 1089Does not have any tail arguments. 1090.Ss \&Bro 1091Begin a block enclosed by curly braces. 1092Does not have any head arguments. 1093.Pp 1094Examples: 1095.Bd -literal -offset indent -compact 1096\&.Bro 1 , ... , 1097\&.Va n \&Brc 1098.Ed 1099.Pp 1100See also 1101.Sx \&Brq . 1102.Ss \&Brq 1103Encloses its arguments in curly braces. 1104.Pp 1105Examples: 1106.Dl \&.Brq 1 , ... , \&Va n 1107.Pp 1108See also 1109.Sx \&Bro . 1110.Ss \&Bsx 1111Format the 1112.Bsx 1113version provided as an argument, or a default value if 1114no argument is provided. 1115.Pp 1116Examples: 1117.Dl \&.Bsx 1.0 1118.Dl \&.Bsx 1119.Pp 1120See also 1121.Sx \&At , 1122.Sx \&Bx , 1123.Sx \&Dx , 1124.Sx \&Fx , 1125.Sx \&Nx , 1126and 1127.Sx \&Ox . 1128.Ss \&Bt 1129Supported only for compatibility, do not use this in new manuals. 1130Prints 1131.Dq is currently in beta test. 1132.Ss \&Bx 1133Format the 1134.Bx 1135version provided as an argument, or a default value if no 1136argument is provided. 1137.Pp 1138Examples: 1139.Dl \&.Bx 4.3 Tahoe 1140.Dl \&.Bx 4.4 1141.Dl \&.Bx 1142.Pp 1143See also 1144.Sx \&At , 1145.Sx \&Bsx , 1146.Sx \&Dx , 1147.Sx \&Fx , 1148.Sx \&Nx , 1149and 1150.Sx \&Ox . 1151.Ss \&Cd 1152Kernel configuration declaration. 1153This denotes strings accepted by 1154.Xr config 8 . 1155It is most often used in section 4 manual pages. 1156.Pp 1157Examples: 1158.Dl \&.Cd device le0 at scode? 1159.Pp 1160.Em Remarks : 1161this macro is commonly abused by using quoted literals to retain 1162whitespace and align consecutive 1163.Sx \&Cd 1164declarations. 1165This practise is discouraged. 1166.Ss \&Cm 1167Command modifiers. 1168Typically used for fixed strings passed as arguments, unless 1169.Sx \&Fl 1170is more appropriate. 1171Also useful when specifying configuration options or keys. 1172.Pp 1173Examples: 1174.Dl ".Nm mt Fl f Ar device Cm rewind" 1175.Dl ".Nm ps Fl o Cm pid , Ns Cm command" 1176.Dl ".Nm dd Cm if= Ns Ar file1 Cm of= Ns Ar file2" 1177.Dl ".Cm IdentityFile Pa ~/.ssh/id_rsa" 1178.Dl ".Cm LogLevel Dv DEBUG" 1179.Ss \&D1 1180One-line indented display. 1181This is formatted by the default rules and is useful for simple indented 1182statements. 1183It is followed by a newline. 1184.Pp 1185Examples: 1186.Dl \&.D1 \&Fl abcdefgh 1187.Pp 1188See also 1189.Sx \&Bd 1190and 1191.Sx \&Dl . 1192.Ss \&Db 1193This macro is obsolete. 1194No replacement is needed. 1195It is ignored by 1196.Xr mandoc 1 1197and groff including its arguments. 1198It was formerly used to toggle a debugging mode. 1199.Ss \&Dc 1200Close a 1201.Sx \&Do 1202block. 1203Does not have any tail arguments. 1204.Ss \&Dd 1205Document date for display in the page footer. 1206This is the mandatory first macro of any 1207.Nm 1208manual. 1209Its syntax is as follows: 1210.Pp 1211.D1 Pf \. Sx \&Dd Ar month day , year 1212.Pp 1213The 1214.Ar month 1215is the full English month name, the 1216.Ar day 1217is an optionally zero-padded numeral, and the 1218.Ar year 1219is the full four-digit year. 1220.Pp 1221Other arguments are not portable; the 1222.Xr mandoc 1 1223utility handles them as follows: 1224.Bl -dash -offset 3n -compact 1225.It 1226To have the date automatically filled in by the 1227.Ox 1228version of 1229.Xr cvs 1 , 1230the special string 1231.Dq $\&Mdocdate$ 1232can be given as an argument. 1233.It 1234The traditional, purely numeric 1235.Xr man 7 1236format 1237.Ar year Ns \(en Ns Ar month Ns \(en Ns Ar day 1238is accepted, too. 1239.It 1240If a date string cannot be parsed, it is used verbatim. 1241.It 1242If no date string is given, the current date is used. 1243.El 1244.Pp 1245Examples: 1246.Dl \&.Dd $\&Mdocdate$ 1247.Dl \&.Dd $\&Mdocdate: July 21 2007$ 1248.Dl \&.Dd July 21, 2007 1249.Pp 1250See also 1251.Sx \&Dt 1252and 1253.Sx \&Os . 1254.Ss \&Dl 1255One-line indented display. 1256This is formatted as literal text and is useful for commands and 1257invocations. 1258It is followed by a newline. 1259.Pp 1260Examples: 1261.Dl \&.Dl % mandoc mdoc.7 \e(ba less 1262.Pp 1263See also 1264.Sx \&Ql , 1265.Sx \&Bd 1266.Fl literal , 1267and 1268.Sx \&D1 . 1269.Ss \&Do 1270Begin a block enclosed by double quotes. 1271Does not have any head arguments. 1272.Pp 1273Examples: 1274.Bd -literal -offset indent -compact 1275\&.Do 1276April is the cruellest month 1277\&.Dc 1278\e(em T.S. Eliot 1279.Ed 1280.Pp 1281See also 1282.Sx \&Dq . 1283.Ss \&Dq 1284Encloses its arguments in 1285.Dq typographic 1286double-quotes. 1287.Pp 1288Examples: 1289.Bd -literal -offset indent -compact 1290\&.Dq April is the cruellest month 1291\e(em T.S. Eliot 1292.Ed 1293.Pp 1294See also 1295.Sx \&Qq , 1296.Sx \&Sq , 1297and 1298.Sx \&Do . 1299.Ss \&Dt 1300Document title for display in the page header. 1301This is the mandatory second macro of any 1302.Nm 1303file. 1304Its syntax is as follows: 1305.Bd -ragged -offset indent 1306.Pf \. Sx \&Dt 1307.Ar TITLE 1308.Ar section 1309.Op Ar arch 1310.Ed 1311.Pp 1312Its arguments are as follows: 1313.Bl -tag -width section -offset 2n 1314.It Ar TITLE 1315The document's title (name), defaulting to 1316.Dq UNTITLED 1317if unspecified. 1318To achieve a uniform appearance of page header lines, 1319it should by convention be all caps. 1320.It Ar section 1321The manual section. 1322This may be one of 1323.Cm 1 1324.Pq General Commands , 1325.Cm 2 1326.Pq System Calls , 1327.Cm 3 1328.Pq Library Functions , 1329.Cm 3p 1330.Pq Perl Library , 1331.Cm 4 1332.Pq Device Drivers , 1333.Cm 5 1334.Pq File Formats , 1335.Cm 6 1336.Pq Games , 1337.Cm 7 1338.Pq Miscellaneous Information , 1339.Cm 8 1340.Pq System Manager's Manual , 1341or 1342.Cm 9 1343.Pq Kernel Developer's Manual . 1344It should correspond to the manual's filename suffix and defaults to 1345the empty string if unspecified. 1346.It Ar arch 1347This specifies the machine architecture a manual page applies to, 1348where relevant. 1349For 1350.Ox , 1351the following are valid architectures: 1352.Cm alpha , 1353.Cm amd64 , 1354.Cm armv7 , 1355.Cm hppa , 1356.Cm i386 , 1357.Cm landisk , 1358.Cm loongson , 1359.Cm luna88k , 1360.Cm macppc , 1361.Cm mips64 , 1362.Cm octeon , 1363.Cm sgi , 1364.Cm socppc , 1365and 1366.Cm sparc64 . 1367.El 1368.Pp 1369Examples: 1370.Dl \&.Dt FOO 1 1371.Dl \&.Dt FOO 9 i386 1372.Pp 1373See also 1374.Sx \&Dd 1375and 1376.Sx \&Os . 1377.Ss \&Dv 1378Defined variables such as preprocessor constants, constant symbols, 1379enumeration values, and so on. 1380.Pp 1381Examples: 1382.Dl \&.Dv NULL 1383.Dl \&.Dv BUFSIZ 1384.Dl \&.Dv STDOUT_FILENO 1385.Pp 1386See also 1387.Sx \&Er 1388and 1389.Sx \&Ev 1390for special-purpose constants, 1391.Sx \&Va 1392for variable symbols, and 1393.Sx \&Fd 1394for listing preprocessor variable definitions in the 1395.Em SYNOPSIS . 1396.Ss \&Dx 1397Format the 1398.Dx 1399version provided as an argument, or a default 1400value if no argument is provided. 1401.Pp 1402Examples: 1403.Dl \&.Dx 2.4.1 1404.Dl \&.Dx 1405.Pp 1406See also 1407.Sx \&At , 1408.Sx \&Bsx , 1409.Sx \&Bx , 1410.Sx \&Fx , 1411.Sx \&Nx , 1412and 1413.Sx \&Ox . 1414.Ss \&Ec 1415Close a scope started by 1416.Sx \&Eo . 1417Its syntax is as follows: 1418.Pp 1419.D1 Pf \. Sx \&Ec Op Ar TERM 1420.Pp 1421The 1422.Ar TERM 1423argument is used as the enclosure tail, for example, specifying \e(rq 1424will emulate 1425.Sx \&Dc . 1426.Ss \&Ed 1427End a display context started by 1428.Sx \&Bd . 1429.Ss \&Ef 1430End a font mode context started by 1431.Sx \&Bf . 1432.Ss \&Ek 1433End a keep context started by 1434.Sx \&Bk . 1435.Ss \&El 1436End a list context started by 1437.Sx \&Bl . 1438.Pp 1439See also 1440.Sx \&Bl 1441and 1442.Sx \&It . 1443.Ss \&Em 1444Request an italic font. 1445If the output device does not provide that, underline. 1446.Pp 1447This is most often used for stress emphasis (not to be confused with 1448importance, see 1449.Sx \&Sy ) . 1450In the rare cases where none of the semantic markup macros fit, 1451it can also be used for technical terms and placeholders, except 1452that for syntax elements, 1453.Sx \&Sy 1454and 1455.Sx \&Ar 1456are preferred, respectively. 1457.Pp 1458Examples: 1459.Bd -literal -compact -offset indent 1460Selected lines are those 1461\&.Em not 1462matching any of the specified patterns. 1463Some of the functions use a 1464\&.Em hold space 1465to save the pattern space for subsequent retrieval. 1466.Ed 1467.Pp 1468See also 1469.Sx \&Bf , 1470.Sx \&Li , 1471.Sx \&No , 1472and 1473.Sx \&Sy . 1474.Ss \&En 1475This macro is obsolete. 1476Use 1477.Sx \&Eo 1478or any of the other enclosure macros. 1479.Pp 1480It encloses its argument in the delimiters specified by the last 1481.Sx \&Es 1482macro. 1483.Ss \&Eo 1484An arbitrary enclosure. 1485Its syntax is as follows: 1486.Pp 1487.D1 Pf \. Sx \&Eo Op Ar TERM 1488.Pp 1489The 1490.Ar TERM 1491argument is used as the enclosure head, for example, specifying \e(lq 1492will emulate 1493.Sx \&Do . 1494.Ss \&Er 1495Error constants for definitions of the 1496.Va errno 1497libc global variable. 1498This is most often used in section 2 and 3 manual pages. 1499.Pp 1500Examples: 1501.Dl \&.Er EPERM 1502.Dl \&.Er ENOENT 1503.Pp 1504See also 1505.Sx \&Dv 1506for general constants. 1507.Ss \&Es 1508This macro is obsolete. 1509Use 1510.Sx \&Eo 1511or any of the other enclosure macros. 1512.Pp 1513It takes two arguments, defining the delimiters to be used by subsequent 1514.Sx \&En 1515macros. 1516.Ss \&Ev 1517Environmental variables such as those specified in 1518.Xr environ 7 . 1519.Pp 1520Examples: 1521.Dl \&.Ev DISPLAY 1522.Dl \&.Ev PATH 1523.Pp 1524See also 1525.Sx \&Dv 1526for general constants. 1527.Ss \&Ex 1528Insert a standard sentence regarding command exit values of 0 on success 1529and >0 on failure. 1530This is most often used in section 1, 6, and 8 manual pages. 1531Its syntax is as follows: 1532.Pp 1533.D1 Pf \. Sx \&Ex Fl std Op Ar utility ... 1534.Pp 1535If 1536.Ar utility 1537is not specified, the document's name set by 1538.Sx \&Nm 1539is used. 1540Multiple 1541.Ar utility 1542arguments are treated as separate utilities. 1543.Pp 1544See also 1545.Sx \&Rv . 1546.Ss \&Fa 1547Function argument or parameter. 1548Its syntax is as follows: 1549.Bd -ragged -offset indent 1550.Pf \. Sx \&Fa 1551.Qo 1552.Op Ar argtype 1553.Op Ar argname 1554.Qc Ar \&... 1555.Ed 1556.Pp 1557Each argument may be a name and a type (recommended for the 1558.Em SYNOPSIS 1559section), a name alone (for function invocations), 1560or a type alone (for function prototypes). 1561If both a type and a name are given or if the type consists of multiple 1562words, all words belonging to the same function argument have to be 1563given in a single argument to the 1564.Sx \&Fa 1565macro. 1566.Pp 1567This macro is also used to specify the field name of a structure. 1568.Pp 1569Most often, the 1570.Sx \&Fa 1571macro is used in the 1572.Em SYNOPSIS 1573within 1574.Sx \&Fo 1575blocks when documenting multi-line function prototypes. 1576If invoked with multiple arguments, the arguments are separated by a 1577comma. 1578Furthermore, if the following macro is another 1579.Sx \&Fa , 1580the last argument will also have a trailing comma. 1581.Pp 1582Examples: 1583.Dl \&.Fa \(dqconst char *p\(dq 1584.Dl \&.Fa \(dqint a\(dq \(dqint b\(dq \(dqint c\(dq 1585.Dl \&.Fa \(dqchar *\(dq size_t 1586.Pp 1587See also 1588.Sx \&Fo . 1589.Ss \&Fc 1590End a function context started by 1591.Sx \&Fo . 1592.Ss \&Fd 1593Preprocessor directive, in particular for listing it in the 1594.Em SYNOPSIS . 1595Historically, it was also used to document include files. 1596The latter usage has been deprecated in favour of 1597.Sx \&In . 1598.Pp 1599Its syntax is as follows: 1600.Bd -ragged -offset indent 1601.Pf \. Sx \&Fd 1602.Li # Ns Ar directive 1603.Op Ar argument ... 1604.Ed 1605.Pp 1606Examples: 1607.Dl \&.Fd #define sa_handler __sigaction_u.__sa_handler 1608.Dl \&.Fd #define SIO_MAXNFDS 1609.Dl \&.Fd #ifdef FS_DEBUG 1610.Dl \&.Ft void 1611.Dl \&.Fn dbg_open \(dqconst char *\(dq 1612.Dl \&.Fd #endif 1613.Pp 1614See also 1615.Sx MANUAL STRUCTURE , 1616.Sx \&In , 1617and 1618.Sx \&Dv . 1619.Ss \&Fl 1620Command-line flag or option. 1621Used when listing arguments to command-line utilities. 1622Prints a fixed-width hyphen 1623.Sq \- 1624directly followed by each argument. 1625If no arguments are provided, a hyphen is printed followed by a space. 1626If the argument is a macro, a hyphen is prefixed to the subsequent macro 1627output. 1628.Pp 1629Examples: 1630.Dl ".Fl R Op Fl H | L | P" 1631.Dl ".Op Fl 1AaCcdFfgHhikLlmnopqRrSsTtux" 1632.Dl ".Fl type Cm d Fl name Pa CVS" 1633.Dl ".Fl Ar signal_number" 1634.Dl ".Fl o Fl" 1635.Pp 1636See also 1637.Sx \&Cm . 1638.Ss \&Fn 1639A function name. 1640Its syntax is as follows: 1641.Bd -ragged -offset indent 1642.Pf . Sx \&Fn 1643.Op Ar functype 1644.Ar funcname 1645.Op Oo Ar argtype Oc Ar argname 1646.Ed 1647.Pp 1648Function arguments are surrounded in parenthesis and 1649are delimited by commas. 1650If no arguments are specified, blank parenthesis are output. 1651In the 1652.Em SYNOPSIS 1653section, this macro starts a new output line, 1654and a blank line is automatically inserted between function definitions. 1655.Pp 1656Examples: 1657.Dl \&.Fn \(dqint funcname\(dq \(dqint arg0\(dq \(dqint arg1\(dq 1658.Dl \&.Fn funcname \(dqint arg0\(dq 1659.Dl \&.Fn funcname arg0 1660.Pp 1661.Bd -literal -offset indent -compact 1662\&.Ft functype 1663\&.Fn funcname 1664.Ed 1665.Pp 1666When referring to a function documented in another manual page, use 1667.Sx \&Xr 1668instead. 1669See also 1670.Sx MANUAL STRUCTURE , 1671.Sx \&Fo , 1672and 1673.Sx \&Ft . 1674.Ss \&Fo 1675Begin a function block. 1676This is a multi-line version of 1677.Sx \&Fn . 1678Its syntax is as follows: 1679.Pp 1680.D1 Pf \. Sx \&Fo Ar funcname 1681.Pp 1682Invocations usually occur in the following context: 1683.Bd -ragged -offset indent 1684.Pf \. Sx \&Ft Ar functype 1685.br 1686.Pf \. Sx \&Fo Ar funcname 1687.br 1688.Pf \. Sx \&Fa Qq Ar argtype Ar argname 1689.br 1690\&.\.\. 1691.br 1692.Pf \. Sx \&Fc 1693.Ed 1694.Pp 1695A 1696.Sx \&Fo 1697scope is closed by 1698.Sx \&Fc . 1699.Pp 1700See also 1701.Sx MANUAL STRUCTURE , 1702.Sx \&Fa , 1703.Sx \&Fc , 1704and 1705.Sx \&Ft . 1706.Ss \&Fr 1707This macro is obsolete. 1708No replacement markup is needed. 1709.Pp 1710It was used to show numerical function return values in an italic font. 1711.Ss \&Ft 1712A function type. 1713Its syntax is as follows: 1714.Pp 1715.D1 Pf \. Sx \&Ft Ar functype 1716.Pp 1717In the 1718.Em SYNOPSIS 1719section, a new output line is started after this macro. 1720.Pp 1721Examples: 1722.Dl \&.Ft int 1723.Bd -literal -offset indent -compact 1724\&.Ft functype 1725\&.Fn funcname 1726.Ed 1727.Pp 1728See also 1729.Sx MANUAL STRUCTURE , 1730.Sx \&Fn , 1731and 1732.Sx \&Fo . 1733.Ss \&Fx 1734Format the 1735.Fx 1736version provided as an argument, or a default value 1737if no argument is provided. 1738.Pp 1739Examples: 1740.Dl \&.Fx 7.1 1741.Dl \&.Fx 1742.Pp 1743See also 1744.Sx \&At , 1745.Sx \&Bsx , 1746.Sx \&Bx , 1747.Sx \&Dx , 1748.Sx \&Nx , 1749and 1750.Sx \&Ox . 1751.Ss \&Hf 1752This macro is not implemented in 1753.Xr mandoc 1 . 1754.Pp 1755It was used to include the contents of a (header) file literally. 1756The syntax was: 1757.Pp 1758.Dl Pf . Sx \&Hf Ar filename 1759.Ss \&Ic 1760Designate an internal or interactive command. 1761This is similar to 1762.Sx \&Cm 1763but used for instructions rather than values. 1764.Pp 1765Examples: 1766.Dl \&.Ic :wq 1767.Dl \&.Ic hash 1768.Dl \&.Ic alias 1769.Pp 1770Note that using 1771.Sx \&Bd Fl literal 1772or 1773.Sx \&D1 1774is preferred for displaying code; the 1775.Sx \&Ic 1776macro is used when referring to specific instructions. 1777.Ss \&In 1778The name of an include file. 1779This macro is most often used in section 2, 3, and 9 manual pages. 1780.Pp 1781When invoked as the first macro on an input line in the 1782.Em SYNOPSIS 1783section, the argument is displayed in angle brackets 1784and preceded by 1785.Qq #include , 1786and a blank line is inserted in front if there is a preceding 1787function declaration. 1788In other sections, it only encloses its argument in angle brackets 1789and causes no line break. 1790.Pp 1791Examples: 1792.Dl \&.In sys/types.h 1793.Pp 1794See also 1795.Sx MANUAL STRUCTURE . 1796.Ss \&It 1797A list item. 1798The syntax of this macro depends on the list type. 1799.Pp 1800Lists 1801of type 1802.Fl hang , 1803.Fl ohang , 1804.Fl inset , 1805and 1806.Fl diag 1807have the following syntax: 1808.Pp 1809.D1 Pf \. Sx \&It Ar args 1810.Pp 1811Lists of type 1812.Fl bullet , 1813.Fl dash , 1814.Fl enum , 1815.Fl hyphen 1816and 1817.Fl item 1818have the following syntax: 1819.Pp 1820.D1 Pf \. Sx \&It 1821.Pp 1822with subsequent lines interpreted within the scope of the 1823.Sx \&It 1824until either a closing 1825.Sx \&El 1826or another 1827.Sx \&It . 1828.Pp 1829The 1830.Fl tag 1831list has the following syntax: 1832.Pp 1833.D1 Pf \. Sx \&It Op Cm args 1834.Pp 1835Subsequent lines are interpreted as with 1836.Fl bullet 1837and family. 1838The line arguments correspond to the list's left-hand side; body 1839arguments correspond to the list's contents. 1840.Pp 1841The 1842.Fl column 1843list is the most complicated. 1844Its syntax is as follows: 1845.Pp 1846.D1 Pf \. Sx \&It Ar cell Op <TAB> Ar cell ... 1847.D1 Pf \. Sx \&It Ar cell Op Sx \&Ta Ar cell ... 1848.Pp 1849The arguments consist of one or more lines of text and macros 1850representing a complete table line. 1851Cells within the line are delimited by tabs or by the special 1852.Sx \&Ta 1853block macro. 1854The tab cell delimiter may only be used within the 1855.Sx \&It 1856line itself; on following lines, only the 1857.Sx \&Ta 1858macro can be used to delimit cells, and 1859.Sx \&Ta 1860is only recognised as a macro when called by other macros, 1861not as the first macro on a line. 1862.Pp 1863Note that quoted strings may span tab-delimited cells on an 1864.Sx \&It 1865line. 1866For example, 1867.Pp 1868.Dl .It \(dqcol1 ; <TAB> col2 ;\(dq \&; 1869.Pp 1870will preserve the semicolon whitespace except for the last. 1871.Pp 1872See also 1873.Sx \&Bl . 1874.Ss \&Lb 1875Specify a library. 1876The syntax is as follows: 1877.Pp 1878.D1 Pf \. Sx \&Lb Ar library 1879.Pp 1880The 1881.Ar library 1882parameter may be a system library, such as 1883.Cm libz 1884or 1885.Cm libpam , 1886in which case a small library description is printed next to the linker 1887invocation; or a custom library, in which case the library name is 1888printed in quotes. 1889This is most commonly used in the 1890.Em SYNOPSIS 1891section as described in 1892.Sx MANUAL STRUCTURE . 1893.Pp 1894Examples: 1895.Dl \&.Lb libz 1896.Dl \&.Lb libmandoc 1897.Ss \&Li 1898Denotes text that should be in a 1899.Li literal 1900font mode. 1901Note that this is a presentation term and should not be used for 1902stylistically decorating technical terms. 1903.Pp 1904On terminal output devices, this is often indistinguishable from 1905normal text. 1906.Pp 1907See also 1908.Sx \&Bf , 1909.Sx \&Em , 1910.Sx \&No , 1911and 1912.Sx \&Sy . 1913.Ss \&Lk 1914Format a hyperlink. 1915Its syntax is as follows: 1916.Pp 1917.D1 Pf \. Sx \&Lk Ar uri Op Ar name 1918.Pp 1919Examples: 1920.Dl \&.Lk http://bsd.lv \(dqThe BSD.lv Project\(dq 1921.Dl \&.Lk http://bsd.lv 1922.Pp 1923See also 1924.Sx \&Mt . 1925.Ss \&Lp 1926Synonym for 1927.Sx \&Pp . 1928.Ss \&Ms 1929Display a mathematical symbol. 1930Its syntax is as follows: 1931.Pp 1932.D1 Pf \. Sx \&Ms Ar symbol 1933.Pp 1934Examples: 1935.Dl \&.Ms sigma 1936.Dl \&.Ms aleph 1937.Ss \&Mt 1938Format a 1939.Dq mailto: 1940hyperlink. 1941Its syntax is as follows: 1942.Pp 1943.D1 Pf \. Sx \&Mt Ar address 1944.Pp 1945Examples: 1946.Dl \&.Mt discuss@manpages.bsd.lv 1947.Dl \&.An Kristaps Dzonsons \&Aq \&Mt kristaps@bsd.lv 1948.Ss \&Nd 1949A one line description of the manual's content. 1950This is the mandatory last macro of the 1951.Em NAME 1952section and not appropriate for other sections. 1953.Pp 1954Examples: 1955.Dl Pf . Sx \&Nd mdoc language reference 1956.Dl Pf . Sx \&Nd format and display UNIX manuals 1957.Pp 1958The 1959.Sx \&Nd 1960macro technically accepts child macros and terminates with a subsequent 1961.Sx \&Sh 1962invocation. 1963Do not assume this behaviour: some 1964.Xr whatis 1 1965database generators are not smart enough to parse more than the line 1966arguments and will display macros verbatim. 1967.Pp 1968See also 1969.Sx \&Nm . 1970.Ss \&Nm 1971The name of the manual page, or \(em in particular in section 1, 6, 1972and 8 pages \(em of an additional command or feature documented in 1973the manual page. 1974When first invoked, the 1975.Sx \&Nm 1976macro expects a single argument, the name of the manual page. 1977Usually, the first invocation happens in the 1978.Em NAME 1979section of the page. 1980The specified name will be remembered and used whenever the macro is 1981called again without arguments later in the page. 1982The 1983.Sx \&Nm 1984macro uses 1985.Sx Block full-implicit 1986semantics when invoked as the first macro on an input line in the 1987.Em SYNOPSIS 1988section; otherwise, it uses ordinary 1989.Sx In-line 1990semantics. 1991.Pp 1992Examples: 1993.Bd -literal -offset indent 1994\&.Sh SYNOPSIS 1995\&.Nm cat 1996\&.Op Fl benstuv 1997\&.Op Ar 1998.Ed 1999.Pp 2000In the 2001.Em SYNOPSIS 2002of section 2, 3 and 9 manual pages, use the 2003.Sx \&Fn 2004macro rather than 2005.Sx \&Nm 2006to mark up the name of the manual page. 2007.Ss \&No 2008Normal text. 2009Closes the scope of any preceding in-line macro. 2010When used after physical formatting macros like 2011.Sx \&Em 2012or 2013.Sx \&Sy , 2014switches back to the standard font face and weight. 2015Can also be used to embed plain text strings in macro lines 2016using semantic annotation macros. 2017.Pp 2018Examples: 2019.Dl ".Em italic , Sy bold , No and roman" 2020.Pp 2021.Bd -literal -offset indent -compact 2022\&.Sm off 2023\&.Cm :C No / Ar pattern No / Ar replacement No / 2024\&.Sm on 2025.Ed 2026.Pp 2027See also 2028.Sx \&Em , 2029.Sx \&Li , 2030and 2031.Sx \&Sy . 2032.Ss \&Ns 2033Suppress a space between the output of the preceding macro 2034and the following text or macro. 2035Following invocation, input is interpreted as normal text 2036just like after an 2037.Sx \&No 2038macro. 2039.Pp 2040This has no effect when invoked at the start of a macro line. 2041.Pp 2042Examples: 2043.Dl ".Ar name Ns = Ns Ar value" 2044.Dl ".Cm :M Ns Ar pattern" 2045.Dl ".Fl o Ns Ar output" 2046.Pp 2047See also 2048.Sx \&No 2049and 2050.Sx \&Sm . 2051.Ss \&Nx 2052Format the 2053.Nx 2054version provided as an argument, or a default value if 2055no argument is provided. 2056.Pp 2057Examples: 2058.Dl \&.Nx 5.01 2059.Dl \&.Nx 2060.Pp 2061See also 2062.Sx \&At , 2063.Sx \&Bsx , 2064.Sx \&Bx , 2065.Sx \&Dx , 2066.Sx \&Fx , 2067and 2068.Sx \&Ox . 2069.Ss \&Oc 2070Close multi-line 2071.Sx \&Oo 2072context. 2073.Ss \&Oo 2074Multi-line version of 2075.Sx \&Op . 2076.Pp 2077Examples: 2078.Bd -literal -offset indent -compact 2079\&.Oo 2080\&.Op Fl flag Ns Ar value 2081\&.Oc 2082.Ed 2083.Ss \&Op 2084Optional part of a command line. 2085Prints the argument(s) in brackets. 2086This is most often used in the 2087.Em SYNOPSIS 2088section of section 1 and 8 manual pages. 2089.Pp 2090Examples: 2091.Dl \&.Op \&Fl a \&Ar b 2092.Dl \&.Op \&Ar a | b 2093.Pp 2094See also 2095.Sx \&Oo . 2096.Ss \&Os 2097Operating system version for display in the page footer. 2098This is the mandatory third macro of 2099any 2100.Nm 2101file. 2102Its syntax is as follows: 2103.Pp 2104.D1 Pf \. Sx \&Os Op Ar system Op Ar version 2105.Pp 2106The optional 2107.Ar system 2108parameter specifies the relevant operating system or environment. 2109It is suggested to leave it unspecified, in which case 2110.Xr mandoc 1 2111uses its 2112.Fl Ios 2113argument or, if that isn't specified either, 2114.Fa sysname 2115and 2116.Fa release 2117as returned by 2118.Xr uname 3 . 2119.Pp 2120Examples: 2121.Dl \&.Os 2122.Dl \&.Os KTH/CSC/TCS 2123.Dl \&.Os BSD 4.3 2124.Pp 2125See also 2126.Sx \&Dd 2127and 2128.Sx \&Dt . 2129.Ss \&Ot 2130This macro is obsolete. 2131Use 2132.Sx \&Ft 2133instead; with 2134.Xr mandoc 1 , 2135both have the same effect. 2136.Pp 2137Historical 2138.Nm 2139packages described it as 2140.Dq "old function type (FORTRAN)" . 2141.Ss \&Ox 2142Format the 2143.Ox 2144version provided as an argument, or a default value 2145if no argument is provided. 2146.Pp 2147Examples: 2148.Dl \&.Ox 4.5 2149.Dl \&.Ox 2150.Pp 2151See also 2152.Sx \&At , 2153.Sx \&Bsx , 2154.Sx \&Bx , 2155.Sx \&Dx , 2156.Sx \&Fx , 2157and 2158.Sx \&Nx . 2159.Ss \&Pa 2160An absolute or relative file system path, or a file or directory name. 2161If an argument is not provided, the character 2162.Sq \(ti 2163is used as a default. 2164.Pp 2165Examples: 2166.Dl \&.Pa /usr/bin/mandoc 2167.Dl \&.Pa /usr/share/man/man7/mdoc.7 2168.Pp 2169See also 2170.Sx \&Lk . 2171.Ss \&Pc 2172Close parenthesised context opened by 2173.Sx \&Po . 2174.Ss \&Pf 2175Removes the space between its argument and the following macro. 2176Its syntax is as follows: 2177.Pp 2178.D1 .Pf Ar prefix macro arguments ... 2179.Pp 2180This is equivalent to: 2181.Pp 2182.D1 .No \e& Ns Ar prefix No \&Ns Ar macro arguments ... 2183.Pp 2184The 2185.Ar prefix 2186argument is not parsed for macro names or delimiters, 2187but used verbatim as if it were escaped. 2188.Pp 2189Examples: 2190.Dl ".Pf $ Ar variable_name" 2191.Dl ".Pf . Ar macro_name" 2192.Dl ".Pf 0x Ar hex_digits" 2193.Pp 2194See also 2195.Sx \&Ns 2196and 2197.Sx \&Sm . 2198.Ss \&Po 2199Multi-line version of 2200.Sx \&Pq . 2201.Ss \&Pp 2202Break a paragraph. 2203This will assert vertical space between prior and subsequent macros 2204and/or text. 2205.Pp 2206Paragraph breaks are not needed before or after 2207.Sx \&Sh 2208or 2209.Sx \&Ss 2210macros or before displays 2211.Pq Sx \&Bd 2212or lists 2213.Pq Sx \&Bl 2214unless the 2215.Fl compact 2216flag is given. 2217.Ss \&Pq 2218Parenthesised enclosure. 2219.Pp 2220See also 2221.Sx \&Po . 2222.Ss \&Qc 2223Close quoted context opened by 2224.Sx \&Qo . 2225.Ss \&Ql 2226In-line literal display. 2227This can for example be used for complete command invocations and 2228for multi-word code fragments when more specific markup is not 2229appropriate and an indented display is not desired. 2230While 2231.Xr mandoc 1 2232always encloses the arguments in single quotes, other formatters 2233usually omit the quotes on non-terminal output devices when the 2234arguments have three or more characters. 2235.Pp 2236See also 2237.Sx \&Dl 2238and 2239.Sx \&Bd 2240.Fl literal . 2241.Ss \&Qo 2242Multi-line version of 2243.Sx \&Qq . 2244.Ss \&Qq 2245Encloses its arguments in 2246.Qq typewriter 2247double-quotes. 2248Consider using 2249.Sx \&Dq . 2250.Pp 2251See also 2252.Sx \&Dq , 2253.Sx \&Sq , 2254and 2255.Sx \&Qo . 2256.Ss \&Re 2257Close an 2258.Sx \&Rs 2259block. 2260Does not have any tail arguments. 2261.Ss \&Rs 2262Begin a bibliographic 2263.Pq Dq reference 2264block. 2265Does not have any head arguments. 2266The block macro may only contain 2267.Sx \&%A , 2268.Sx \&%B , 2269.Sx \&%C , 2270.Sx \&%D , 2271.Sx \&%I , 2272.Sx \&%J , 2273.Sx \&%N , 2274.Sx \&%O , 2275.Sx \&%P , 2276.Sx \&%Q , 2277.Sx \&%R , 2278.Sx \&%T , 2279.Sx \&%U , 2280and 2281.Sx \&%V 2282child macros (at least one must be specified). 2283.Pp 2284Examples: 2285.Bd -literal -offset indent -compact 2286\&.Rs 2287\&.%A J. E. Hopcroft 2288\&.%A J. D. Ullman 2289\&.%B Introduction to Automata Theory, Languages, and Computation 2290\&.%I Addison-Wesley 2291\&.%C Reading, Massachusetts 2292\&.%D 1979 2293\&.Re 2294.Ed 2295.Pp 2296If an 2297.Sx \&Rs 2298block is used within a SEE ALSO section, a vertical space is asserted 2299before the rendered output, else the block continues on the current 2300line. 2301.Ss \&Rv 2302Insert a standard sentence regarding a function call's return value of 0 2303on success and \-1 on error, with the 2304.Va errno 2305libc global variable set on error. 2306Its syntax is as follows: 2307.Pp 2308.D1 Pf \. Sx \&Rv Fl std Op Ar function ... 2309.Pp 2310If 2311.Ar function 2312is not specified, the document's name set by 2313.Sx \&Nm 2314is used. 2315Multiple 2316.Ar function 2317arguments are treated as separate functions. 2318.Pp 2319See also 2320.Sx \&Ex . 2321.Ss \&Sc 2322Close single-quoted context opened by 2323.Sx \&So . 2324.Ss \&Sh 2325Begin a new section. 2326For a list of conventional manual sections, see 2327.Sx MANUAL STRUCTURE . 2328These sections should be used unless it's absolutely necessary that 2329custom sections be used. 2330.Pp 2331Section names should be unique so that they may be keyed by 2332.Sx \&Sx . 2333Although this macro is parsed, it should not consist of child node or it 2334may not be linked with 2335.Sx \&Sx . 2336.Pp 2337See also 2338.Sx \&Pp , 2339.Sx \&Ss , 2340and 2341.Sx \&Sx . 2342.Ss \&Sm 2343Switches the spacing mode for output generated from macros. 2344Its syntax is as follows: 2345.Pp 2346.D1 Pf \. Sx \&Sm Op Cm on | off 2347.Pp 2348By default, spacing is 2349.Cm on . 2350When switched 2351.Cm off , 2352no white space is inserted between macro arguments and between the 2353output generated from adjacent macros, but text lines 2354still get normal spacing between words and sentences. 2355.Pp 2356When called without an argument, the 2357.Sx \&Sm 2358macro toggles the spacing mode. 2359Using this is not recommended because it makes the code harder to read. 2360.Ss \&So 2361Multi-line version of 2362.Sx \&Sq . 2363.Ss \&Sq 2364Encloses its arguments in 2365.Sq typewriter 2366single-quotes. 2367.Pp 2368See also 2369.Sx \&Dq , 2370.Sx \&Qq , 2371and 2372.Sx \&So . 2373.Ss \&Ss 2374Begin a new subsection. 2375Unlike with 2376.Sx \&Sh , 2377there is no convention for the naming of subsections. 2378Except 2379.Em DESCRIPTION , 2380the conventional sections described in 2381.Sx MANUAL STRUCTURE 2382rarely have subsections. 2383.Pp 2384Sub-section names should be unique so that they may be keyed by 2385.Sx \&Sx . 2386Although this macro is parsed, it should not consist of child node or it 2387may not be linked with 2388.Sx \&Sx . 2389.Pp 2390See also 2391.Sx \&Pp , 2392.Sx \&Sh , 2393and 2394.Sx \&Sx . 2395.Ss \&St 2396Replace an abbreviation for a standard with the full form. 2397The following standards are recognised. 2398Where multiple lines are given without a blank line in between, 2399they all refer to the same standard, and using the first form 2400is recommended. 2401.Bl -tag -width 1n 2402.It C language standards 2403.Pp 2404.Bl -tag -width "-p1003.1g-2000" -compact 2405.It \-ansiC 2406.St -ansiC 2407.It \-ansiC-89 2408.St -ansiC-89 2409.It \-isoC 2410.St -isoC 2411.It \-isoC-90 2412.St -isoC-90 2413.br 2414The original C standard. 2415.Pp 2416.It \-isoC-amd1 2417.St -isoC-amd1 2418.Pp 2419.It \-isoC-tcor1 2420.St -isoC-tcor1 2421.Pp 2422.It \-isoC-tcor2 2423.St -isoC-tcor2 2424.Pp 2425.It \-isoC-99 2426.St -isoC-99 2427.br 2428The second major version of the C language standard. 2429.Pp 2430.It \-isoC-2011 2431.St -isoC-2011 2432.br 2433The third major version of the C language standard. 2434.El 2435.It POSIX.1 before the Single UNIX Specification 2436.Pp 2437.Bl -tag -width "-p1003.1g-2000" -compact 2438.It \-p1003.1-88 2439.St -p1003.1-88 2440.It \-p1003.1 2441.St -p1003.1 2442.br 2443The original POSIX standard, based on ANSI C. 2444.Pp 2445.It \-p1003.1-90 2446.St -p1003.1-90 2447.It \-iso9945-1-90 2448.St -iso9945-1-90 2449.br 2450The first update of POSIX.1. 2451.Pp 2452.It \-p1003.1b-93 2453.St -p1003.1b-93 2454.It \-p1003.1b 2455.St -p1003.1b 2456.br 2457Real-time extensions. 2458.Pp 2459.It \-p1003.1c-95 2460.St -p1003.1c-95 2461.br 2462POSIX thread interfaces. 2463.Pp 2464.It \-p1003.1i-95 2465.St -p1003.1i-95 2466.br 2467Technical Corrigendum. 2468.Pp 2469.It \-p1003.1-96 2470.St -p1003.1-96 2471.It \-iso9945-1-96 2472.St -iso9945-1-96 2473.br 2474Includes POSIX.1-1990, 1b, 1c, and 1i. 2475.El 2476.It X/Open Portability Guide version 4 and related standards 2477.Pp 2478.Bl -tag -width "-p1003.1g-2000" -compact 2479.It \-xpg3 2480.St -xpg3 2481.br 2482An XPG4 precursor, published in 1989. 2483.Pp 2484.It \-p1003.2 2485.St -p1003.2 2486.It \-p1003.2-92 2487.St -p1003.2-92 2488.It \-iso9945-2-93 2489.St -iso9945-2-93 2490.br 2491An XCU4 precursor. 2492.Pp 2493.It \-p1003.2a-92 2494.St -p1003.2a-92 2495.br 2496Updates to POSIX.2. 2497.Pp 2498.It \-xpg4 2499.St -xpg4 2500.br 2501Based on POSIX.1 and POSIX.2, published in 1992. 2502.El 2503.It Single UNIX Specification version 1 and related standards 2504.Pp 2505.Bl -tag -width "-p1003.1g-2000" -compact 2506.It \-susv1 2507.St -susv1 2508.It \-xpg4.2 2509.St -xpg4.2 2510.br 2511This standard was published in 1994. 2512It was used as the basis for UNIX 95 certification. 2513The following three refer to parts of it. 2514.Pp 2515.It \-xsh4.2 2516.St -xsh4.2 2517.Pp 2518.It \-xcurses4.2 2519.St -xcurses4.2 2520.Pp 2521.It \-p1003.1g-2000 2522.St -p1003.1g-2000 2523.br 2524Networking APIs, including sockets. 2525.Pp 2526.It \-svid4 2527.St -svid4 , 2528.br 2529Published in 1995. 2530.El 2531.It Single UNIX Specification version 2 and related standards 2532.Pp 2533.Bl -tag -width "-p1003.1g-2000" -compact 2534.It \-susv2 2535.St -susv2 2536This Standard was published in 1997 2537and is also called X/Open Portability Guide version 5. 2538It was used as the basis for UNIX 98 certification. 2539The following refer to parts of it. 2540.Pp 2541.It \-xbd5 2542.St -xbd5 2543.Pp 2544.It \-xsh5 2545.St -xsh5 2546.Pp 2547.It \-xcu5 2548.St -xcu5 2549.Pp 2550.It \-xns5 2551.St -xns5 2552.It \-xns5.2 2553.St -xns5.2 2554.El 2555.It Single UNIX Specification version 3 2556.Pp 2557.Bl -tag -width "-p1003.1-2001" -compact 2558.It \-p1003.1-2001 2559.St -p1003.1-2001 2560.It \-susv3 2561.St -susv3 2562.br 2563This standard is based on C99, SUSv2, POSIX.1-1996, 1d, and 1j. 2564It is also called X/Open Portability Guide version 6. 2565It is used as the basis for UNIX 03 certification. 2566.Pp 2567.It \-p1003.1-2004 2568.St -p1003.1-2004 2569.br 2570The second and last Technical Corrigendum. 2571.El 2572.It Single UNIX Specification version 4 2573.Pp 2574.Bl -tag -width "-p1003.1g-2000" -compact 2575.It \-p1003.1-2008 2576.St -p1003.1-2008 2577.It \-susv4 2578.St -susv4 2579.br 2580This standard is also called 2581X/Open Portability Guide version 7. 2582.Pp 2583.It \-p1003.1-2013 2584.St -p1003.1-2013 2585.br 2586This is the first Technical Corrigendum. 2587.El 2588.It Other standards 2589.Pp 2590.Bl -tag -width "-p1003.1g-2000" -compact 2591.It \-ieee754 2592.St -ieee754 2593.br 2594Floating-point arithmetic. 2595.Pp 2596.It \-iso8601 2597.St -iso8601 2598.br 2599Representation of dates and times, published in 1988. 2600.Pp 2601.It \-iso8802-3 2602.St -iso8802-3 2603.br 2604Ethernet local area networks. 2605.Pp 2606.It \-ieee1275-94 2607.St -ieee1275-94 2608.El 2609.El 2610.Ss \&Sx 2611Reference a section or subsection in the same manual page. 2612The referenced section or subsection name must be identical to the 2613enclosed argument, including whitespace. 2614.Pp 2615Examples: 2616.Dl \&.Sx MANUAL STRUCTURE 2617.Pp 2618See also 2619.Sx \&Sh 2620and 2621.Sx \&Ss . 2622.Ss \&Sy 2623Request a boldface font. 2624.Pp 2625This is most often used to indicate importance or seriousness (not to be 2626confused with stress emphasis, see 2627.Sx \&Em ) . 2628When none of the semantic macros fit, it is also adequate for syntax 2629elements that have to be given or that appear verbatim. 2630.Pp 2631Examples: 2632.Bd -literal -compact -offset indent 2633\&.Sy Warning : 2634If 2635\&.Sy s 2636appears in the owner permissions, set-user-ID mode is set. 2637This utility replaces the former 2638\&.Sy dumpdir 2639program. 2640.Ed 2641.Pp 2642See also 2643.Sx \&Bf , 2644.Sx \&Em , 2645.Sx \&Li , 2646and 2647.Sx \&No . 2648.Ss \&Ta 2649Table cell separator in 2650.Sx \&Bl Fl column 2651lists; can only be used below 2652.Sx \&It . 2653.Ss \&Tn 2654Supported only for compatibility, do not use this in new manuals. 2655Even though the macro name 2656.Pq Dq tradename 2657suggests a semantic function, historic usage is inconsistent, mostly 2658using it as a presentation-level macro to request a small caps font. 2659.Ss \&Ud 2660Supported only for compatibility, do not use this in new manuals. 2661Prints out 2662.Dq currently under development. 2663.Ss \&Ux 2664Supported only for compatibility, do not use this in new manuals. 2665Prints out 2666.Dq Ux . 2667.Ss \&Va 2668A variable name. 2669.Pp 2670Examples: 2671.Dl \&.Va foo 2672.Dl \&.Va const char *bar ; 2673.Pp 2674For function arguments and parameters, use 2675.Sx \&Fa 2676instead. 2677For declarations of global variables in the 2678.Em SYNOPSIS 2679section, use 2680.Sx \&Vt . 2681.Ss \&Vt 2682A variable type. 2683.Pp 2684This is also used for indicating global variables in the 2685.Em SYNOPSIS 2686section, in which case a variable name is also specified. 2687Note that it accepts 2688.Sx Block partial-implicit 2689syntax when invoked as the first macro on an input line in the 2690.Em SYNOPSIS 2691section, else it accepts ordinary 2692.Sx In-line 2693syntax. 2694In the former case, this macro starts a new output line, 2695and a blank line is inserted in front if there is a preceding 2696function definition or include directive. 2697.Pp 2698Examples: 2699.Dl \&.Vt unsigned char 2700.Dl \&.Vt extern const char * const sys_signame[] \&; 2701.Pp 2702For parameters in function prototypes, use 2703.Sx \&Fa 2704instead, for function return types 2705.Sx \&Ft , 2706and for variable names outside the 2707.Em SYNOPSIS 2708section 2709.Sx \&Va , 2710even when including a type with the name. 2711See also 2712.Sx MANUAL STRUCTURE . 2713.Ss \&Xc 2714Close a scope opened by 2715.Sx \&Xo . 2716.Ss \&Xo 2717Extend the header of an 2718.Sx \&It 2719macro or the body of a partial-implicit block macro 2720beyond the end of the input line. 2721This macro originally existed to work around the 9-argument limit 2722of historic 2723.Xr roff 7 . 2724.Ss \&Xr 2725Link to another manual 2726.Pq Qq cross-reference . 2727Its syntax is as follows: 2728.Pp 2729.D1 Pf \. Sx \&Xr Ar name Op section 2730.Pp 2731Cross reference the 2732.Ar name 2733and 2734.Ar section 2735number of another man page; 2736omitting the section number is rarely useful. 2737.Pp 2738Examples: 2739.Dl \&.Xr mandoc 1 2740.Dl \&.Xr mandoc 1 \&; 2741.Dl \&.Xr mandoc 1 \&Ns s behaviour 2742.Ss \&br 2743Emits a line-break. 2744This macro should not be used; it is implemented for compatibility with 2745historical manuals. 2746.Pp 2747Consider using 2748.Sx \&Pp 2749in the event of natural paragraph breaks. 2750.Ss \&sp 2751Emits vertical space. 2752This macro should not be used; it is implemented for compatibility with 2753historical manuals. 2754Its syntax is as follows: 2755.Pp 2756.D1 Pf \. Sx \&sp Op Ar height 2757.Pp 2758The 2759.Ar height 2760argument is a scaling width as described in 2761.Xr roff 7 . 2762If unspecified, 2763.Sx \&sp 2764asserts a single vertical space. 2765.Sh MACRO SYNTAX 2766The syntax of a macro depends on its classification. 2767In this section, 2768.Sq \-arg 2769refers to macro arguments, which may be followed by zero or more 2770.Sq parm 2771parameters; 2772.Sq \&Yo 2773opens the scope of a macro; and if specified, 2774.Sq \&Yc 2775closes it out. 2776.Pp 2777The 2778.Em Callable 2779column indicates that the macro may also be called by passing its name 2780as an argument to another macro. 2781For example, 2782.Sq \&.Op \&Fl O \&Ar file 2783produces 2784.Sq Op Fl O Ar file . 2785To prevent a macro call and render the macro name literally, 2786escape it by prepending a zero-width space, 2787.Sq \e& . 2788For example, 2789.Sq \&Op \e&Fl O 2790produces 2791.Sq Op \&Fl O . 2792If a macro is not callable but its name appears as an argument 2793to another macro, it is interpreted as opaque text. 2794For example, 2795.Sq \&.Fl \&Sh 2796produces 2797.Sq Fl \&Sh . 2798.Pp 2799The 2800.Em Parsed 2801column indicates whether the macro may call other macros by receiving 2802their names as arguments. 2803If a macro is not parsed but the name of another macro appears 2804as an argument, it is interpreted as opaque text. 2805.Pp 2806The 2807.Em Scope 2808column, if applicable, describes closure rules. 2809.Ss Block full-explicit 2810Multi-line scope closed by an explicit closing macro. 2811All macros contains bodies; only 2812.Sx \&Bf 2813and 2814.Pq optionally 2815.Sx \&Bl 2816contain a head. 2817.Bd -literal -offset indent 2818\&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB 2819\(lBbody...\(rB 2820\&.Yc 2821.Ed 2822.Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXX" -offset indent 2823.It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope 2824.It Sx \&Bd Ta \&No Ta \&No Ta closed by Sx \&Ed 2825.It Sx \&Bf Ta \&No Ta \&No Ta closed by Sx \&Ef 2826.It Sx \&Bk Ta \&No Ta \&No Ta closed by Sx \&Ek 2827.It Sx \&Bl Ta \&No Ta \&No Ta closed by Sx \&El 2828.It Sx \&Ed Ta \&No Ta \&No Ta opened by Sx \&Bd 2829.It Sx \&Ef Ta \&No Ta \&No Ta opened by Sx \&Bf 2830.It Sx \&Ek Ta \&No Ta \&No Ta opened by Sx \&Bk 2831.It Sx \&El Ta \&No Ta \&No Ta opened by Sx \&Bl 2832.El 2833.Ss Block full-implicit 2834Multi-line scope closed by end-of-file or implicitly by another macro. 2835All macros have bodies; some 2836.Po 2837.Sx \&It Fl bullet , 2838.Fl hyphen , 2839.Fl dash , 2840.Fl enum , 2841.Fl item 2842.Pc 2843don't have heads; only one 2844.Po 2845.Sx \&It 2846in 2847.Sx \&Bl Fl column 2848.Pc 2849has multiple heads. 2850.Bd -literal -offset indent 2851\&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead... \(lBTa head...\(rB\(rB 2852\(lBbody...\(rB 2853.Ed 2854.Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXXXXXXXXXX" -offset indent 2855.It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope 2856.It Sx \&It Ta \&No Ta Yes Ta closed by Sx \&It , Sx \&El 2857.It Sx \&Nd Ta \&No Ta \&No Ta closed by Sx \&Sh 2858.It Sx \&Nm Ta \&No Ta Yes Ta closed by Sx \&Nm , Sx \&Sh , Sx \&Ss 2859.It Sx \&Sh Ta \&No Ta Yes Ta closed by Sx \&Sh 2860.It Sx \&Ss Ta \&No Ta Yes Ta closed by Sx \&Sh , Sx \&Ss 2861.El 2862.Pp 2863Note that the 2864.Sx \&Nm 2865macro is a 2866.Sx Block full-implicit 2867macro only when invoked as the first macro 2868in a 2869.Em SYNOPSIS 2870section line, else it is 2871.Sx In-line . 2872.Ss Block partial-explicit 2873Like block full-explicit, but also with single-line scope. 2874Each has at least a body and, in limited circumstances, a head 2875.Po 2876.Sx \&Fo , 2877.Sx \&Eo 2878.Pc 2879and/or tail 2880.Pq Sx \&Ec . 2881.Bd -literal -offset indent 2882\&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB 2883\(lBbody...\(rB 2884\&.Yc \(lBtail...\(rB 2885 2886\&.Yo \(lB\-arg \(lBparm...\(rB\(rB \(lBhead...\(rB \ 2887\(lBbody...\(rB \&Yc \(lBtail...\(rB 2888.Ed 2889.Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXXX" -offset indent 2890.It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope 2891.It Sx \&Ac Ta Yes Ta Yes Ta opened by Sx \&Ao 2892.It Sx \&Ao Ta Yes Ta Yes Ta closed by Sx \&Ac 2893.It Sx \&Bc Ta Yes Ta Yes Ta closed by Sx \&Bo 2894.It Sx \&Bo Ta Yes Ta Yes Ta opened by Sx \&Bc 2895.It Sx \&Brc Ta Yes Ta Yes Ta opened by Sx \&Bro 2896.It Sx \&Bro Ta Yes Ta Yes Ta closed by Sx \&Brc 2897.It Sx \&Dc Ta Yes Ta Yes Ta opened by Sx \&Do 2898.It Sx \&Do Ta Yes Ta Yes Ta closed by Sx \&Dc 2899.It Sx \&Ec Ta Yes Ta Yes Ta opened by Sx \&Eo 2900.It Sx \&Eo Ta Yes Ta Yes Ta closed by Sx \&Ec 2901.It Sx \&Fc Ta Yes Ta Yes Ta opened by Sx \&Fo 2902.It Sx \&Fo Ta \&No Ta \&No Ta closed by Sx \&Fc 2903.It Sx \&Oc Ta Yes Ta Yes Ta closed by Sx \&Oo 2904.It Sx \&Oo Ta Yes Ta Yes Ta opened by Sx \&Oc 2905.It Sx \&Pc Ta Yes Ta Yes Ta closed by Sx \&Po 2906.It Sx \&Po Ta Yes Ta Yes Ta opened by Sx \&Pc 2907.It Sx \&Qc Ta Yes Ta Yes Ta opened by Sx \&Oo 2908.It Sx \&Qo Ta Yes Ta Yes Ta closed by Sx \&Oc 2909.It Sx \&Re Ta \&No Ta \&No Ta opened by Sx \&Rs 2910.It Sx \&Rs Ta \&No Ta \&No Ta closed by Sx \&Re 2911.It Sx \&Sc Ta Yes Ta Yes Ta opened by Sx \&So 2912.It Sx \&So Ta Yes Ta Yes Ta closed by Sx \&Sc 2913.It Sx \&Xc Ta Yes Ta Yes Ta opened by Sx \&Xo 2914.It Sx \&Xo Ta Yes Ta Yes Ta closed by Sx \&Xc 2915.El 2916.Ss Block partial-implicit 2917Like block full-implicit, but with single-line scope closed by the 2918end of the line. 2919.Bd -literal -offset indent 2920\&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBbody...\(rB \(lBres...\(rB 2921.Ed 2922.Bl -column "MacroX" "CallableX" "ParsedX" -offset indent 2923.It Em Macro Ta Em Callable Ta Em Parsed 2924.It Sx \&Aq Ta Yes Ta Yes 2925.It Sx \&Bq Ta Yes Ta Yes 2926.It Sx \&Brq Ta Yes Ta Yes 2927.It Sx \&D1 Ta \&No Ta \&Yes 2928.It Sx \&Dl Ta \&No Ta Yes 2929.It Sx \&Dq Ta Yes Ta Yes 2930.It Sx \&En Ta Yes Ta Yes 2931.It Sx \&Op Ta Yes Ta Yes 2932.It Sx \&Pq Ta Yes Ta Yes 2933.It Sx \&Ql Ta Yes Ta Yes 2934.It Sx \&Qq Ta Yes Ta Yes 2935.It Sx \&Sq Ta Yes Ta Yes 2936.It Sx \&Vt Ta Yes Ta Yes 2937.El 2938.Pp 2939Note that the 2940.Sx \&Vt 2941macro is a 2942.Sx Block partial-implicit 2943only when invoked as the first macro 2944in a 2945.Em SYNOPSIS 2946section line, else it is 2947.Sx In-line . 2948.Ss Special block macro 2949The 2950.Sx \&Ta 2951macro can only be used below 2952.Sx \&It 2953in 2954.Sx \&Bl Fl column 2955lists. 2956It delimits blocks representing table cells; 2957these blocks have bodies, but no heads. 2958.Bl -column "MacroX" "CallableX" "ParsedX" "closed by XXXX" -offset indent 2959.It Em Macro Ta Em Callable Ta Em Parsed Ta Em Scope 2960.It Sx \&Ta Ta Yes Ta Yes Ta closed by Sx \&Ta , Sx \&It 2961.El 2962.Ss In-line 2963Closed by the end of the line, fixed argument lengths, 2964and/or subsequent macros. 2965In-line macros have only text children. 2966If a number (or inequality) of arguments is 2967.Pq n , 2968then the macro accepts an arbitrary number of arguments. 2969.Bd -literal -offset indent 2970\&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB \(lBres...\(rB 2971 2972\&.Yo \(lB\-arg \(lBval...\(rB\(rB \(lBargs...\(rB Yc... 2973 2974\&.Yo \(lB\-arg \(lBval...\(rB\(rB arg0 arg1 argN 2975.Ed 2976.Bl -column "MacroX" "CallableX" "ParsedX" "Arguments" -offset indent 2977.It Em Macro Ta Em Callable Ta Em Parsed Ta Em Arguments 2978.It Sx \&%A Ta \&No Ta \&No Ta >0 2979.It Sx \&%B Ta \&No Ta \&No Ta >0 2980.It Sx \&%C Ta \&No Ta \&No Ta >0 2981.It Sx \&%D Ta \&No Ta \&No Ta >0 2982.It Sx \&%I Ta \&No Ta \&No Ta >0 2983.It Sx \&%J Ta \&No Ta \&No Ta >0 2984.It Sx \&%N Ta \&No Ta \&No Ta >0 2985.It Sx \&%O Ta \&No Ta \&No Ta >0 2986.It Sx \&%P Ta \&No Ta \&No Ta >0 2987.It Sx \&%Q Ta \&No Ta \&No Ta >0 2988.It Sx \&%R Ta \&No Ta \&No Ta >0 2989.It Sx \&%T Ta \&No Ta \&No Ta >0 2990.It Sx \&%U Ta \&No Ta \&No Ta >0 2991.It Sx \&%V Ta \&No Ta \&No Ta >0 2992.It Sx \&Ad Ta Yes Ta Yes Ta >0 2993.It Sx \&An Ta Yes Ta Yes Ta >0 2994.It Sx \&Ap Ta Yes Ta Yes Ta 0 2995.It Sx \&Ar Ta Yes Ta Yes Ta n 2996.It Sx \&At Ta Yes Ta Yes Ta 1 2997.It Sx \&Bsx Ta Yes Ta Yes Ta n 2998.It Sx \&Bt Ta \&No Ta \&No Ta 0 2999.It Sx \&Bx Ta Yes Ta Yes Ta n 3000.It Sx \&Cd Ta Yes Ta Yes Ta >0 3001.It Sx \&Cm Ta Yes Ta Yes Ta >0 3002.It Sx \&Db Ta \&No Ta \&No Ta 1 3003.It Sx \&Dd Ta \&No Ta \&No Ta n 3004.It Sx \&Dt Ta \&No Ta \&No Ta n 3005.It Sx \&Dv Ta Yes Ta Yes Ta >0 3006.It Sx \&Dx Ta Yes Ta Yes Ta n 3007.It Sx \&Em Ta Yes Ta Yes Ta >0 3008.It Sx \&Er Ta Yes Ta Yes Ta >0 3009.It Sx \&Es Ta Yes Ta Yes Ta 2 3010.It Sx \&Ev Ta Yes Ta Yes Ta >0 3011.It Sx \&Ex Ta \&No Ta \&No Ta n 3012.It Sx \&Fa Ta Yes Ta Yes Ta >0 3013.It Sx \&Fd Ta \&No Ta \&No Ta >0 3014.It Sx \&Fl Ta Yes Ta Yes Ta n 3015.It Sx \&Fn Ta Yes Ta Yes Ta >0 3016.It Sx \&Fr Ta Yes Ta Yes Ta >0 3017.It Sx \&Ft Ta Yes Ta Yes Ta >0 3018.It Sx \&Fx Ta Yes Ta Yes Ta n 3019.It Sx \&Hf Ta \&No Ta \&No Ta n 3020.It Sx \&Ic Ta Yes Ta Yes Ta >0 3021.It Sx \&In Ta \&No Ta \&No Ta 1 3022.It Sx \&Lb Ta \&No Ta \&No Ta 1 3023.It Sx \&Li Ta Yes Ta Yes Ta >0 3024.It Sx \&Lk Ta Yes Ta Yes Ta >0 3025.It Sx \&Lp Ta \&No Ta \&No Ta 0 3026.It Sx \&Ms Ta Yes Ta Yes Ta >0 3027.It Sx \&Mt Ta Yes Ta Yes Ta >0 3028.It Sx \&Nm Ta Yes Ta Yes Ta n 3029.It Sx \&No Ta Yes Ta Yes Ta 0 3030.It Sx \&Ns Ta Yes Ta Yes Ta 0 3031.It Sx \&Nx Ta Yes Ta Yes Ta n 3032.It Sx \&Os Ta \&No Ta \&No Ta n 3033.It Sx \&Ot Ta Yes Ta Yes Ta >0 3034.It Sx \&Ox Ta Yes Ta Yes Ta n 3035.It Sx \&Pa Ta Yes Ta Yes Ta n 3036.It Sx \&Pf Ta Yes Ta Yes Ta 1 3037.It Sx \&Pp Ta \&No Ta \&No Ta 0 3038.It Sx \&Rv Ta \&No Ta \&No Ta n 3039.It Sx \&Sm Ta \&No Ta \&No Ta <2 3040.It Sx \&St Ta \&No Ta Yes Ta 1 3041.It Sx \&Sx Ta Yes Ta Yes Ta >0 3042.It Sx \&Sy Ta Yes Ta Yes Ta >0 3043.It Sx \&Tn Ta Yes Ta Yes Ta >0 3044.It Sx \&Ud Ta \&No Ta \&No Ta 0 3045.It Sx \&Ux Ta Yes Ta Yes Ta n 3046.It Sx \&Va Ta Yes Ta Yes Ta n 3047.It Sx \&Vt Ta Yes Ta Yes Ta >0 3048.It Sx \&Xr Ta Yes Ta Yes Ta >0 3049.It Sx \&br Ta \&No Ta \&No Ta 0 3050.It Sx \&sp Ta \&No Ta \&No Ta 1 3051.El 3052.Ss Delimiters 3053When a macro argument consists of one single input character 3054considered as a delimiter, the argument gets special handling. 3055This does not apply when delimiters appear in arguments containing 3056more than one character. 3057Consequently, to prevent special handling and just handle it 3058like any other argument, a delimiter can be escaped by prepending 3059a zero-width space 3060.Pq Sq \e& . 3061In text lines, delimiters never need escaping, but may be used 3062as normal punctuation. 3063.Pp 3064For many macros, when the leading arguments are opening delimiters, 3065these delimiters are put before the macro scope, 3066and when the trailing arguments are closing delimiters, 3067these delimiters are put after the macro scope. 3068For example, 3069.Pp 3070.D1 Pf \. \&Aq "( [ word ] ) ." 3071.Pp 3072renders as: 3073.Pp 3074.D1 Aq ( [ word ] ) . 3075.Pp 3076Opening delimiters are: 3077.Pp 3078.Bl -tag -width Ds -offset indent -compact 3079.It \&( 3080left parenthesis 3081.It \&[ 3082left bracket 3083.El 3084.Pp 3085Closing delimiters are: 3086.Pp 3087.Bl -tag -width Ds -offset indent -compact 3088.It \&. 3089period 3090.It \&, 3091comma 3092.It \&: 3093colon 3094.It \&; 3095semicolon 3096.It \&) 3097right parenthesis 3098.It \&] 3099right bracket 3100.It \&? 3101question mark 3102.It \&! 3103exclamation mark 3104.El 3105.Pp 3106Note that even a period preceded by a backslash 3107.Pq Sq \e.\& 3108gets this special handling; use 3109.Sq \e&. 3110to prevent that. 3111.Pp 3112Many in-line macros interrupt their scope when they encounter 3113delimiters, and resume their scope when more arguments follow that 3114are not delimiters. 3115For example, 3116.Pp 3117.D1 Pf \. \&Fl "a ( b | c \e*(Ba d ) e" 3118.Pp 3119renders as: 3120.Pp 3121.D1 Fl a ( b | c \*(Ba d ) e 3122.Pp 3123This applies to both opening and closing delimiters, 3124and also to the middle delimiter: 3125.Pp 3126.Bl -tag -width Ds -offset indent -compact 3127.It \&| 3128vertical bar 3129.El 3130.Pp 3131As a special case, the predefined string \e*(Ba is handled and rendered 3132in the same way as a plain 3133.Sq \&| 3134character. 3135Using this predefined string is not recommended in new manuals. 3136.Ss Font handling 3137In 3138.Nm 3139documents, usage of semantic markup is recommended in order to have 3140proper fonts automatically selected; only when no fitting semantic markup 3141is available, consider falling back to 3142.Sx Physical markup 3143macros. 3144Whenever any 3145.Nm 3146macro switches the 3147.Xr roff 7 3148font mode, it will automatically restore the previous font when exiting 3149its scope. 3150Manually switching the font using the 3151.Xr roff 7 3152.Ql \ef 3153font escape sequences is never required. 3154.Sh COMPATIBILITY 3155This section provides an incomplete list of compatibility issues 3156between mandoc and GNU troff 3157.Pq Qq groff . 3158.Pp 3159The following problematic behaviour is found in groff: 3160.Pp 3161.Bl -dash -compact 3162.It 3163.Sx \&Dd 3164with non-standard arguments behaves very strangely. 3165When there are three arguments, they are printed verbatim. 3166Any other number of arguments is replaced by the current date, 3167but without any arguments the string 3168.Dq Epoch 3169is printed. 3170.It 3171.Sx \&Lk 3172only accepts a single link-name argument; the remainder is misformatted. 3173.It 3174.Sx \&Pa 3175does not format its arguments when used in the FILES section under 3176certain list types. 3177.It 3178.Sx \&Ta 3179can only be called by other macros, but not at the beginning of a line. 3180.It 3181.Sx \&%C 3182is not implemented (up to and including groff-1.22.2). 3183.It 3184.Sq \ef 3185.Pq font face 3186and 3187.Sq \eF 3188.Pq font family face 3189.Sx Text Decoration 3190escapes behave irregularly when specified within line-macro scopes. 3191.It 3192Negative scaling units return to prior lines. 3193Instead, mandoc truncates them to zero. 3194.El 3195.Pp 3196The following features are unimplemented in mandoc: 3197.Pp 3198.Bl -dash -compact 3199.It 3200.Sx \&Bd 3201.Fl file Ar file 3202is unsupported for security reasons. 3203.It 3204.Sx \&Bd 3205.Fl filled 3206does not adjust the right margin, but is an alias for 3207.Sx \&Bd 3208.Fl ragged . 3209.It 3210.Sx \&Bd 3211.Fl literal 3212does not use a literal font, but is an alias for 3213.Sx \&Bd 3214.Fl unfilled . 3215.It 3216.Sx \&Bd 3217.Fl offset Cm center 3218and 3219.Fl offset Cm right 3220don't work. 3221Groff does not implement centered and flush-right rendering either, 3222but produces large indentations. 3223.El 3224.Sh SEE ALSO 3225.Xr man 1 , 3226.Xr mandoc 1 , 3227.Xr eqn 7 , 3228.Xr man 7 , 3229.Xr mandoc_char 7 , 3230.Xr roff 7 , 3231.Xr tbl 7 3232.Sh HISTORY 3233The 3234.Nm 3235language first appeared as a troff macro package in 3236.Bx 4.4 . 3237It was later significantly updated by Werner Lemberg and Ruslan Ermilov 3238in groff-1.17. 3239The standalone implementation that is part of the 3240.Xr mandoc 1 3241utility written by Kristaps Dzonsons appeared in 3242.Ox 4.6 . 3243.Sh AUTHORS 3244The 3245.Nm 3246reference was written by 3247.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv . 3248