1.\" $OpenBSD: roff.7,v 1.19 2012/07/29 12:57:45 schwarze Exp $ 2.\" 3.\" Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> 4.\" Copyright (c) 2010, 2011 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: July 29 2012 $ 19.Dt ROFF 7 20.Os 21.Sh NAME 22.Nm roff 23.Nd roff language reference for mandoc 24.Sh DESCRIPTION 25The 26.Nm roff 27language is a general purpose text formatting language. 28Since traditional implementations of the 29.Xr mdoc 7 30and 31.Xr man 7 32manual formatting languages are based on it, 33many real-world manuals use small numbers of 34.Nm 35requests intermixed with their 36.Xr mdoc 7 37or 38.Xr man 7 39code. 40To properly format such manuals, the 41.Xr mandoc 1 42utility supports a tiny subset of 43.Nm 44requests. 45Only these requests supported by 46.Xr mandoc 1 47are documented in the present manual, 48together with the basic language syntax shared by 49.Nm , 50.Xr mdoc 7 , 51and 52.Xr man 7 . 53For complete 54.Nm 55manuals, consult the 56.Sx SEE ALSO 57section. 58.Pp 59Input lines beginning with the control character 60.Sq \&. 61are parsed for requests and macros. 62Such lines are called 63.Dq request lines 64or 65.Dq macro lines , 66respectively. 67Requests change the processing state and manipulate the formatting; 68some macros also define the document structure and produce formatted 69output. 70The single quote 71.Pq Qq \(aq 72is accepted as an alternative control character, 73treated by 74.Xr mandoc 1 75just like 76.Ql \&. 77.Pp 78Lines not beginning with control characters are called 79.Dq text lines . 80They provide free-form text to be printed; the formatting of the text 81depends on the respective processing context. 82.Sh LANGUAGE SYNTAX 83.Nm 84documents may contain only graphable 7-bit ASCII characters, the space 85character, and, in certain circumstances, the tab character. 86The backslash character 87.Sq \e 88indicates the start of an escape sequence for 89.Sx Comments , 90.Sx Special Characters , 91.Sx Predefined Strings , 92and 93user-defined strings defined using the 94.Sx ds 95request. 96.Ss Comments 97Text following an escaped double-quote 98.Sq \e\(dq , 99whether in a request, macro, or text line, is ignored to the end of the line. 100A request line beginning with a control character and comment escape 101.Sq \&.\e\(dq 102is also ignored. 103Furthermore, request lines with only a control character and optional 104trailing whitespace are stripped from input. 105.Pp 106Examples: 107.Bd -literal -offset indent -compact 108\&.\e\(dq This is a comment line. 109\&.\e\(dq The next line is ignored: 110\&. 111\&.Sh EXAMPLES \e\(dq This is a comment, too. 112\&example text \e\(dq And so is this. 113.Ed 114.Ss Special Characters 115Special characters are used to encode special glyphs and are rendered 116differently across output media. 117They may occur in request, macro, and text lines. 118Sequences begin with the escape character 119.Sq \e 120followed by either an open-parenthesis 121.Sq \&( 122for two-character sequences; an open-bracket 123.Sq \&[ 124for n-character sequences (terminated at a close-bracket 125.Sq \&] ) ; 126or a single one character sequence. 127.Pp 128Examples: 129.Bl -tag -width Ds -offset indent -compact 130.It Li \e(em 131Two-letter em dash escape. 132.It Li \ee 133One-letter backslash escape. 134.El 135.Pp 136See 137.Xr mandoc_char 7 138for a complete list. 139.Ss Text Decoration 140Terms may be text-decorated using the 141.Sq \ef 142escape followed by an indicator: B (bold), I (italic), R (regular), or P 143(revert to previous mode). 144A numerical representation 3, 2, or 1 (bold, italic, and regular, 145respectively) may be used instead. 146.Pp 147Examples: 148.Bl -tag -width Ds -offset indent -compact 149.It Li \efBbold\efR 150Write in bold, then switch to regular font mode. 151.It Li \efIitalic\efP 152Write in italic, then return to previous font mode. 153.El 154.Pp 155Text decoration is 156.Em not 157recommended for 158.Xr mdoc 7 , 159which encourages semantic annotation. 160.Ss Predefined Strings 161Predefined strings, like 162.Sx Special Characters , 163mark special output glyphs. 164Predefined strings are escaped with the slash-asterisk, 165.Sq \e* : 166single-character 167.Sq \e*X , 168two-character 169.Sq \e*(XX , 170and N-character 171.Sq \e*[N] . 172.Pp 173Examples: 174.Bl -tag -width Ds -offset indent -compact 175.It Li \e*(Am 176Two-letter ampersand predefined string. 177.It Li \e*q 178One-letter double-quote predefined string. 179.El 180.Pp 181Predefined strings are not recommended for use, 182as they differ across implementations. 183Those supported by 184.Xr mandoc 1 185are listed in 186.Xr mandoc_char 7 . 187Manuals using these predefined strings are almost certainly not portable. 188.Ss Whitespace 189Whitespace consists of the space character. 190In text lines, whitespace is preserved within a line. 191In request and macro lines, whitespace delimits arguments and is discarded. 192.Pp 193Unescaped trailing spaces are stripped from text line input unless in a 194literal context. 195In general, trailing whitespace on any input line is discouraged for 196reasons of portability. 197In the rare case that a blank character is needed at the end of an 198input line, it may be forced by 199.Sq \e\ \e& . 200.Pp 201Literal space characters can be produced in the output 202using escape sequences. 203In macro lines, they can also be included in arguments using quotation; see 204.Sx MACRO SYNTAX 205for details. 206.Pp 207Blank text lines, which may include whitespace, are only permitted 208within literal contexts. 209If the first character of a text line is a space, that line is printed 210with a leading newline. 211.Ss Scaling Widths 212Many requests and macros support scaled widths for their arguments. 213The syntax for a scaled width is 214.Sq Li [+-]?[0-9]*.[0-9]*[:unit:] , 215where a decimal must be preceded or followed by at least one digit. 216Negative numbers, while accepted, are truncated to zero. 217.Pp 218The following scaling units are accepted: 219.Pp 220.Bl -tag -width Ds -offset indent -compact 221.It c 222centimetre 223.It i 224inch 225.It P 226pica (~1/6 inch) 227.It p 228point (~1/72 inch) 229.It f 230synonym for 231.Sq u 232.It v 233default vertical span 234.It m 235width of rendered 236.Sq m 237.Pq em 238character 239.It n 240width of rendered 241.Sq n 242.Pq en 243character 244.It u 245default horizontal span 246.It M 247mini-em (~1/100 em) 248.El 249.Pp 250Using anything other than 251.Sq m , 252.Sq n , 253.Sq u , 254or 255.Sq v 256is necessarily non-portable across output media. 257See 258.Sx COMPATIBILITY . 259.Pp 260If a scaling unit is not provided, the numerical value is interpreted 261under the default rules of 262.Sq v 263for vertical spaces and 264.Sq u 265for horizontal ones. 266.Pp 267Examples: 268.Bl -tag -width ".Bl -tag -width 2i" -offset indent -compact 269.It Li \&.Bl -tag -width 2i 270two-inch tagged list indentation in 271.Xr mdoc 7 272.It Li \&.HP 2i 273two-inch tagged list indentation in 274.Xr man 7 275.It Li \&.sp 2v 276two vertical spaces 277.El 278.Ss Sentence Spacing 279Each sentence should terminate at the end of an input line. 280By doing this, a formatter will be able to apply the proper amount of 281spacing after the end of sentence (unescaped) period, exclamation mark, 282or question mark followed by zero or more non-sentence closing 283delimiters 284.Po 285.Sq \&) , 286.Sq \&] , 287.Sq \&' , 288.Sq \&" 289.Pc . 290.Pp 291The proper spacing is also intelligently preserved if a sentence ends at 292the boundary of a macro line. 293.Pp 294Examples: 295.Bd -literal -offset indent -compact 296Do not end sentences mid-line like this. Instead, 297end a sentence like this. 298A macro would end like this: 299\&.Xr mandoc 1 \&. 300.Ed 301.Sh REQUEST SYNTAX 302A request or macro line consists of: 303.Pp 304.Bl -enum -compact 305.It 306the control character 307.Sq \&. 308or 309.Sq \(aq 310at the beginning of the line, 311.It 312optionally an arbitrary amount of whitespace, 313.It 314the name of the request or the macro, which is one word of arbitrary 315length, terminated by whitespace, 316.It 317and zero or more arguments delimited by whitespace. 318.El 319.Pp 320Thus, the following request lines are all equivalent: 321.Bd -literal -offset indent 322\&.ig end 323\&.ig end 324\&. ig end 325.Ed 326.Sh MACRO SYNTAX 327Macros are provided by the 328.Xr mdoc 7 329and 330.Xr man 7 331languages and can be defined by the 332.Sx \&de 333request. 334When called, they follow the same syntax as requests, except that 335macro arguments may optionally be quoted by enclosing them 336in double quote characters 337.Pq Sq \(dq . 338Quoted text, even if it contains whitespace or would cause 339a macro invocation when unquoted, is always considered literal text. 340Inside quoted text, pairs of double quote characters 341.Pq Sq Qq 342resolve to single double quote characters. 343.Pp 344To be recognised as the beginning of a quoted argument, the opening 345quote character must be preceded by a space character. 346A quoted argument extends to the next double quote character that is not 347part of a pair, or to the end of the input line, whichever comes earlier. 348Leaving out the terminating double quote character at the end of the line 349is discouraged. 350For clarity, if more arguments follow on the same input line, 351it is recommended to follow the terminating double quote character 352by a space character; in case the next character after the terminating 353double quote character is anything else, it is regarded as the beginning 354of the next, unquoted argument. 355.Pp 356Both in quoted and unquoted arguments, pairs of backslashes 357.Pq Sq \e\e 358resolve to single backslashes. 359In unquoted arguments, space characters can alternatively be included 360by preceding them with a backslash 361.Pq Sq \e\~ , 362but quoting is usually better for clarity. 363.Pp 364Examples: 365.Bl -tag -width Ds -offset indent -compact 366.It Li .Fn strlen \(dqconst char *s\(dq 367Group arguments 368.Qq const char *s 369into one function argument. 370If unspecified, 371.Qq const , 372.Qq char , 373and 374.Qq *s 375would be considered separate arguments. 376.It Li .Op \(dqFl a\(dq 377Consider 378.Qq \&Fl a 379as literal text instead of a flag macro. 380.El 381.Sh REQUEST REFERENCE 382The 383.Xr mandoc 1 384.Nm 385parser recognises the following requests. 386Note that the 387.Nm 388language defines many more requests not implemented in 389.Xr mandoc 1 . 390.Ss \&ad 391Set line adjustment mode. 392This line-scoped request is intended to have one argument to select 393normal, left, right, or centre adjustment for subsequent text. 394Currently, it is ignored including its arguments, 395and the number of arguments is not checked. 396.Ss \&am 397Append to a macro definition. 398The syntax of this request is the same as that of 399.Sx \&de . 400It is currently ignored by 401.Xr mandoc 1 , 402as are its children. 403.Ss \&ami 404Append to a macro definition, specifying the macro name indirectly. 405The syntax of this request is the same as that of 406.Sx \&dei . 407It is currently ignored by 408.Xr mandoc 1 , 409as are its children. 410.Ss \&am1 411Append to a macro definition, switching roff compatibility mode off 412during macro execution. 413The syntax of this request is the same as that of 414.Sx \&de1 . 415It is currently ignored by 416.Xr mandoc 1 , 417as are its children. 418.Ss \&cc 419Changes the control character. 420Its syntax is as follows: 421.Bd -literal -offset indent 422.Pf . Cm \&cc Op Ar c 423.Ed 424.Pp 425If 426.Ar c 427is not specified, the control character is reset to 428.Sq \&. . 429Trailing characters are ignored. 430.Ss \&de 431Define a 432.Nm 433macro. 434Its syntax can be either 435.Bd -literal -offset indent 436.Pf . Cm \&de Ar name 437.Ar macro definition 438\&.. 439.Ed 440.Pp 441or 442.Bd -literal -offset indent 443.Pf . Cm \&de Ar name Ar end 444.Ar macro definition 445.Pf . Ar end 446.Ed 447.Pp 448Both forms define or redefine the macro 449.Ar name 450to represent the 451.Ar macro definition , 452which may consist of one or more input lines, including the newline 453characters terminating each line, optionally containing calls to 454.Nm 455requests, 456.Nm 457macros or high-level macros like 458.Xr man 7 459or 460.Xr mdoc 7 461macros, whichever applies to the document in question. 462.Pp 463Specifying a custom 464.Ar end 465macro works in the same way as for 466.Sx \&ig ; 467namely, the call to 468.Sq Pf . Ar end 469first ends the 470.Ar macro definition , 471and after that, it is also evaluated as a 472.Nm 473request or 474.Nm 475macro, but not as a high-level macro. 476.Pp 477The macro can be invoked later using the syntax 478.Pp 479.D1 Pf . Ar name Op Ar argument Op Ar argument ... 480.Pp 481Regarding argument parsing, see 482.Sx MACRO SYNTAX 483above. 484.Pp 485The line invoking the macro will be replaced 486in the input stream by the 487.Ar macro definition , 488replacing all occurrences of 489.No \e\e$ Ns Ar N , 490where 491.Ar N 492is a digit, by the 493.Ar N Ns th Ar argument . 494For example, 495.Bd -literal -offset indent 496\&.de ZN 497\efI\e^\e\e$1\e^\efP\e\e$2 498\&.. 499\&.ZN XtFree . 500.Ed 501.Pp 502produces 503.Pp 504.D1 \efI\e^XtFree\e^\efP. 505.Pp 506in the input stream, and thus in the output: \fI\^XtFree\^\fP. 507.Pp 508Since macros and user-defined strings share a common string table, 509defining a macro 510.Ar name 511clobbers the user-defined string 512.Ar name , 513and the 514.Ar macro definition 515can also be printed using the 516.Sq \e* 517string interpolation syntax described below 518.Sx ds , 519but this is rarely useful because every macro definition contains at least 520one explicit newline character. 521.Pp 522In order to prevent endless recursion, both groff and 523.Xr mandoc 1 524limit the stack depth for expanding macros and strings 525to a large, but finite number. 526Do not rely on the exact value of this limit. 527.Ss \&dei 528Define a 529.Nm 530macro, specifying the macro name indirectly. 531The syntax of this request is the same as that of 532.Sx \&de . 533It is currently ignored by 534.Xr mandoc 1 , 535as are its children. 536.Ss \&de1 537Define a 538.Nm 539macro that will be executed with 540.Nm 541compatibility mode switched off during macro execution. 542This is a GNU extension not available in traditional 543.Nm 544implementations and not even in older versions of groff. 545Since 546.Xr mandoc 1 547does not implement 548.Nm 549compatibility mode at all, it handles this request as an alias for 550.Sx \&de . 551.Ss \&ds 552Define a user-defined string. 553Its syntax is as follows: 554.Pp 555.D1 Pf . Cm \&ds Ar name Oo \(dq Oc Ns Ar string 556.Pp 557The 558.Ar name 559and 560.Ar string 561arguments are space-separated. 562If the 563.Ar string 564begins with a double-quote character, that character will not be part 565of the string. 566All remaining characters on the input line form the 567.Ar string , 568including whitespace and double-quote characters, even trailing ones. 569.Pp 570The 571.Ar string 572can be interpolated into subsequent text by using 573.No \e* Ns Bq Ar name 574for a 575.Ar name 576of arbitrary length, or \e*(NN or \e*N if the length of 577.Ar name 578is two or one characters, respectively. 579Interpolation can be prevented by escaping the leading backslash; 580that is, an asterisk preceded by an even number of backslashes 581does not trigger string interpolation. 582.Pp 583Since user-defined strings and macros share a common string table, 584defining a string 585.Ar name 586clobbers the macro 587.Ar name , 588and the 589.Ar name 590used for defining a string can also be invoked as a macro, 591in which case the following input line will be appended to the 592.Ar string , 593forming a new input line passed to the 594.Nm 595parser. 596For example, 597.Bd -literal -offset indent 598\&.ds badidea .S 599\&.badidea 600H SYNOPSIS 601.Ed 602.Pp 603invokes the 604.Cm SH 605macro when used in a 606.Xr man 7 607document. 608Such abuse is of course strongly discouraged. 609.Ss \&el 610The 611.Qq else 612half of an if/else conditional. 613Pops a result off the stack of conditional evaluations pushed by 614.Sx \&ie 615and uses it as its conditional. 616If no stack entries are present (e.g., due to no prior 617.Sx \&ie 618calls) 619then false is assumed. 620The syntax of this request is similar to 621.Sx \&if 622except that the conditional is missing. 623.Ss \&EN 624End an equation block. 625See 626.Sx \&EQ . 627.Ss \&EQ 628Begin an equation block. 629See 630.Xr eqn 7 631for a description of the equation language. 632.Ss \&ft 633Change the font. 634Its syntax is as follows: 635.Pp 636.D1 Pf . Cm \&ft Op Ar font 637.Pp 638The following 639.Ar font 640arguments are supported: 641.Bl -tag -width 4n -offset indent 642.It Cm B , BI , 3 , 4 643switches to 644.Sy bold 645font 646.It Cm I , 2 647switches to 648.Em underlined 649font 650.It Cm R , CW , 1 651switches to normal font 652.It Cm P No "or no argument" 653switches back to the previous font 654.El 655.Pp 656This request takes effect only locally, may be overridden by macros 657and escape sequences, and is only supported in 658.Xr man 7 659for now. 660.Ss \&hy 661Set automatic hyphenation mode. 662This line-scoped request is currently ignored. 663.Ss \&ie 664The 665.Qq if 666half of an if/else conditional. 667The result of the conditional is pushed into a stack used by subsequent 668invocations of 669.Sx \&el , 670which may be separated by any intervening input (or not exist at all). 671Its syntax is equivalent to 672.Sx \&if . 673.Ss \&if 674Begins a conditional. 675Right now, the conditional evaluates to true 676if and only if it starts with the letter 677.Sy n , 678indicating processing in nroff style as opposed to troff style. 679If a conditional is false, its children are not processed, but are 680syntactically interpreted to preserve the integrity of the input 681document. 682Thus, 683.Pp 684.D1 \&.if t .ig 685.Pp 686will discard the 687.Sq \&.ig , 688which may lead to interesting results, but 689.Pp 690.D1 \&.if t .if t \e{\e 691.Pp 692will continue to syntactically interpret to the block close of the final 693conditional. 694Sub-conditionals, in this case, obviously inherit the truth value of 695the parent. 696This request has the following syntax: 697.Bd -literal -offset indent 698\&.if COND \e{\e 699BODY... 700\&.\e} 701.Ed 702.Bd -literal -offset indent 703\&.if COND \e{ BODY 704BODY... \e} 705.Ed 706.Bd -literal -offset indent 707\&.if COND \e{ BODY 708BODY... 709\&.\e} 710.Ed 711.Bd -literal -offset indent 712\&.if COND \e 713BODY 714.Ed 715.Pp 716COND is a conditional statement. 717roff allows for complicated conditionals; mandoc is much simpler. 718At this time, mandoc supports only 719.Sq n , 720evaluating to true; 721and 722.Sq t , 723.Sq e , 724and 725.Sq o , 726evaluating to false. 727All other invocations are read up to the next end of line or space and 728evaluate as false. 729.Pp 730If the BODY section is begun by an escaped brace 731.Sq \e{ , 732scope continues until a closing-brace escape sequence 733.Sq \.\e} . 734If the BODY is not enclosed in braces, scope continues until 735the end of the line. 736If the COND is followed by a BODY on the same line, whether after a 737brace or not, then requests and macros 738.Em must 739begin with a control character. 740It is generally more intuitive, in this case, to write 741.Bd -literal -offset indent 742\&.if COND \e{\e 743\&.foo 744bar 745\&.\e} 746.Ed 747.Pp 748than having the request or macro follow as 749.Pp 750.D1 \&.if COND \e{ .foo 751.Pp 752The scope of a conditional is always parsed, but only executed if the 753conditional evaluates to true. 754.Pp 755Note that the 756.Sq \e} 757is converted into a zero-width escape sequence if not passed as a 758standalone macro 759.Sq \&.\e} . 760For example, 761.Pp 762.D1 \&.Fl a \e} b 763.Pp 764will result in 765.Sq \e} 766being considered an argument of the 767.Sq \&Fl 768macro. 769.Ss \&ig 770Ignore input. 771Its syntax can be either 772.Bd -literal -offset indent 773.Pf . Cm \&ig 774.Ar ignored text 775\&.. 776.Ed 777.Pp 778or 779.Bd -literal -offset indent 780.Pf . Cm \&ig Ar end 781.Ar ignored text 782.Pf . Ar end 783.Ed 784.Pp 785In the first case, input is ignored until a 786.Sq \&.. 787request is encountered on its own line. 788In the second case, input is ignored until the specified 789.Sq Pf . Ar end 790macro is encountered. 791Do not use the escape character 792.Sq \e 793anywhere in the definition of 794.Ar end ; 795it would cause very strange behaviour. 796.Pp 797When the 798.Ar end 799macro is a roff request or a roff macro, like in 800.Pp 801.D1 \&.ig if 802.Pp 803the subsequent invocation of 804.Sx \&if 805will first terminate the 806.Ar ignored text , 807then be invoked as usual. 808Otherwise, it only terminates the 809.Ar ignored text , 810and arguments following it or the 811.Sq \&.. 812request are discarded. 813.Ss \&ne 814Declare the need for the specified minimum vertical space 815before the next trap or the bottom of the page. 816This line-scoped request is currently ignored. 817.Ss \&nh 818Turn off automatic hyphenation mode. 819This line-scoped request is currently ignored. 820.Ss \&rm 821Remove a request, macro or string. 822This request is intended to have one argument, 823the name of the request, macro or string to be undefined. 824Currently, it is ignored including its arguments, 825and the number of arguments is not checked. 826.Ss \&nr 827Define a register. 828A register is an arbitrary string value that defines some sort of state, 829which influences parsing and/or formatting. 830Its syntax is as follows: 831.Pp 832.D1 Pf \. Cm \&nr Ar name Ar value 833.Pp 834The 835.Ar value 836may, at the moment, only be an integer. 837So far, only the following register 838.Ar name 839is recognised: 840.Bl -tag -width Ds 841.It Cm nS 842If set to a positive integer value, certain 843.Xr mdoc 7 844macros will behave in the same way as in the 845.Em SYNOPSIS 846section. 847If set to 0, these macros will behave in the same way as outside the 848.Em SYNOPSIS 849section, even when called within the 850.Em SYNOPSIS 851section itself. 852Note that starting a new 853.Xr mdoc 7 854section with the 855.Cm \&Sh 856macro will reset this register. 857.El 858.Ss \&ns 859Turn on no-space mode. 860This line-scoped request is intended to take no arguments. 861Currently, it is ignored including its arguments, 862and the number of arguments is not checked. 863.Ss \&ps 864Change point size. 865This line-scoped request is intended to take one numerical argument. 866Currently, it is ignored including its arguments, 867and the number of arguments is not checked. 868.Ss \&so 869Include a source file. 870Its syntax is as follows: 871.Pp 872.D1 Pf \. Cm \&so Ar file 873.Pp 874The 875.Ar file 876will be read and its contents processed as input in place of the 877.Sq \&.so 878request line. 879To avoid inadvertent inclusion of unrelated files, 880.Xr mandoc 1 881only accepts relative paths not containing the strings 882.Qq ../ 883and 884.Qq /.. . 885.Pp 886This request requires 887.Xr man 1 888to change to the right directory before calling 889.Xr mandoc 1 , 890per convention to the root of the manual tree. 891Typical usage looks like: 892.Pp 893.Dl \&.so man3/Xcursor.3 894.Pp 895As the whole concept is rather fragile, the use of 896.Sx \&so 897is discouraged. 898Use 899.Xr ln 1 900instead. 901.Ss \&ta 902Set tab stops. 903This line-scoped request can take an arbitrary number of arguments. 904Currently, it is ignored including its arguments. 905.Ss \&tr 906Output character translation. 907Its syntax is as follows: 908.Pp 909.D1 Pf \. Cm \&tr Ar [ab]+ 910.Pp 911Pairs of 912.Ar ab 913characters are replaced 914.Ar ( a 915for 916.Ar b ) . 917Replacement (or origin) characters may also be character escapes; thus, 918.Pp 919.Dl tr \e(xx\e(yy 920.Pp 921replaces all invocations of \e(xx with \e(yy. 922.Ss \&T& 923Re-start a table layout, retaining the options of the prior table 924invocation. 925See 926.Sx \&TS . 927.Ss \&TE 928End a table context. 929See 930.Sx \&TS . 931.Ss \&TS 932Begin a table, which formats input in aligned rows and columns. 933See 934.Xr tbl 7 935for a description of the tbl language. 936.Sh COMPATIBILITY 937This section documents compatibility between mandoc and other other 938.Nm 939implementations, at this time limited to GNU troff 940.Pq Qq groff . 941The term 942.Qq historic groff 943refers to groff version 1.15. 944.Pp 945.Bl -dash -compact 946.It 947In mandoc, the 948.Sx \&EQ , 949.Sx \&TE , 950.Sx \&TS , 951and 952.Sx \&T& , 953macros are considered regular macros. 954In all other 955.Nm 956implementations, these are special macros that must be specified without 957spacing between the control character (which must be a period) and the 958macro name. 959.It 960The 961.Cm nS 962register is only compatible with OpenBSD's groff-1.15. 963.It 964Historic groff did not accept white-space before a custom 965.Ar end 966macro for the 967.Sx \&ig 968request. 969.It 970The 971.Sx \&if 972and family would print funny white-spaces with historic groff when 973using the next-line syntax. 974.El 975.Sh SEE ALSO 976.Xr mandoc 1 , 977.Xr eqn 7 , 978.Xr man 7 , 979.Xr mandoc_char 7 , 980.Xr mdoc 7 , 981.Xr tbl 7 982.Rs 983.%A Joseph F. Ossanna 984.%A Brian W. Kernighan 985.%I AT&T Bell Laboratories 986.%T Troff User's Manual 987.%R Computing Science Technical Report 988.%N 54 989.%C Murray Hill, New Jersey 990.%D 1976 and 1992 991.%U http://www.kohala.com/start/troff/cstr54.ps 992.Re 993.Rs 994.%A Joseph F. Ossanna 995.%A Brian W. Kernighan 996.%A Gunnar Ritter 997.%T Heirloom Documentation Tools Nroff/Troff User's Manual 998.%D September 17, 2007 999.%U http://heirloom.sourceforge.net/doctools/troff.pdf 1000.Re 1001.Sh HISTORY 1002The RUNOFF typesetting system, whose input forms the basis for 1003.Nm , 1004was written in MAD and FAP for the CTSS operating system by Jerome E. 1005Saltzer in 1964. 1006Doug McIlroy rewrote it in BCPL in 1969, renaming it 1007.Nm . 1008Dennis M. Ritchie rewrote McIlroy's 1009.Nm 1010in PDP-11 assembly for 1011.At v1 , 1012Joseph F. Ossanna improved roff and renamed it nroff 1013for 1014.At v2 , 1015then ported nroff to C as troff, which Brian W. Kernighan released with 1016.At v7 . 1017In 1989, James Clarke re-implemented troff in C++, naming it groff. 1018.Sh AUTHORS 1019.An -nosplit 1020This 1021.Nm 1022reference was written by 1023.An Kristaps Dzonsons , 1024.Mt kristaps@bsd.lv ; 1025and 1026.An Ingo Schwarze , 1027.Mt schwarze@openbsd.org . 1028