1*95c635efSGarrett D'Amore.\" 2*95c635efSGarrett D'Amore.\" Permission to use, copy, modify, and distribute this software for any 3*95c635efSGarrett D'Amore.\" purpose with or without fee is hereby granted, provided that the above 4*95c635efSGarrett D'Amore.\" copyright notice and this permission notice appear in all copies. 5*95c635efSGarrett D'Amore.\" 6*95c635efSGarrett D'Amore.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 7*95c635efSGarrett D'Amore.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 8*95c635efSGarrett D'Amore.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 9*95c635efSGarrett D'Amore.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 10*95c635efSGarrett D'Amore.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 11*95c635efSGarrett D'Amore.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 12*95c635efSGarrett D'Amore.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 13*95c635efSGarrett D'Amore.\" 14*95c635efSGarrett D'Amore.\" 15*95c635efSGarrett D'Amore.\" Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> 16*95c635efSGarrett D'Amore.\" Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> 17*95c635efSGarrett D'Amore.\" Copyright 2012 Nexenta Systems, Inc. All rights reserved. 18*95c635efSGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org> 19*95c635efSGarrett D'Amore.\" 20*95c635efSGarrett D'Amore.Dd Jul 13, 2014 21*95c635efSGarrett D'Amore.Dt MANDOC_ROFF 5 22*95c635efSGarrett D'Amore.Os 23*95c635efSGarrett D'Amore.Sh NAME 24*95c635efSGarrett D'Amore.Nm mandoc_roff 25*95c635efSGarrett D'Amore.Nd roff language reference for mandoc 26*95c635efSGarrett D'Amore.Sh DESCRIPTION 27*95c635efSGarrett D'AmoreThe 28*95c635efSGarrett D'Amore.Nm roff 29*95c635efSGarrett D'Amorelanguage is a general purpose text formatting language. 30*95c635efSGarrett D'AmoreSince traditional implementations of the 31*95c635efSGarrett D'Amore.Xr mdoc 5 32*95c635efSGarrett D'Amoreand 33*95c635efSGarrett D'Amore.Xr man 5 34*95c635efSGarrett D'Amoremanual formatting languages are based on it, 35*95c635efSGarrett D'Amoremany real-world manuals use small numbers of 36*95c635efSGarrett D'Amore.Nm 37*95c635efSGarrett D'Amorerequests intermixed with their 38*95c635efSGarrett D'Amore.Xr mdoc 5 39*95c635efSGarrett D'Amoreor 40*95c635efSGarrett D'Amore.Xr man 5 41*95c635efSGarrett D'Amorecode. 42*95c635efSGarrett D'AmoreTo properly format such manuals, the 43*95c635efSGarrett D'Amore.Xr mandoc 1 44*95c635efSGarrett D'Amoreutility supports a tiny subset of 45*95c635efSGarrett D'Amore.Nm 46*95c635efSGarrett D'Amorerequests. 47*95c635efSGarrett D'AmoreOnly these requests supported by 48*95c635efSGarrett D'Amore.Xr mandoc 1 49*95c635efSGarrett D'Amoreare documented in the present manual, 50*95c635efSGarrett D'Amoretogether with the basic language syntax shared by 51*95c635efSGarrett D'Amore.Nm , 52*95c635efSGarrett D'Amore.Xr mdoc 5 , 53*95c635efSGarrett D'Amoreand 54*95c635efSGarrett D'Amore.Xr man 5 . 55*95c635efSGarrett D'AmoreFor complete 56*95c635efSGarrett D'Amore.Nm 57*95c635efSGarrett D'Amoremanuals, consult the 58*95c635efSGarrett D'Amore.Sx SEE ALSO 59*95c635efSGarrett D'Amoresection. 60*95c635efSGarrett D'Amore.Pp 61*95c635efSGarrett D'AmoreInput lines beginning with the control character 62*95c635efSGarrett D'Amore.Sq \&. 63*95c635efSGarrett D'Amoreare parsed for requests and macros. 64*95c635efSGarrett D'AmoreSuch lines are called 65*95c635efSGarrett D'Amore.Dq request lines 66*95c635efSGarrett D'Amoreor 67*95c635efSGarrett D'Amore.Dq macro lines , 68*95c635efSGarrett D'Amorerespectively. 69*95c635efSGarrett D'AmoreRequests change the processing state and manipulate the formatting; 70*95c635efSGarrett D'Amoresome macros also define the document structure and produce formatted 71*95c635efSGarrett D'Amoreoutput. 72*95c635efSGarrett D'AmoreThe single quote 73*95c635efSGarrett D'Amore.Pq Qq \(aq 74*95c635efSGarrett D'Amoreis accepted as an alternative control character, 75*95c635efSGarrett D'Amoretreated by 76*95c635efSGarrett D'Amore.Xr mandoc 1 77*95c635efSGarrett D'Amorejust like 78*95c635efSGarrett D'Amore.Ql \&. 79*95c635efSGarrett D'Amore.Pp 80*95c635efSGarrett D'AmoreLines not beginning with control characters are called 81*95c635efSGarrett D'Amore.Dq text lines . 82*95c635efSGarrett D'AmoreThey provide free-form text to be printed; the formatting of the text 83*95c635efSGarrett D'Amoredepends on the respective processing context. 84*95c635efSGarrett D'Amore.Sh LANGUAGE SYNTAX 85*95c635efSGarrett D'Amore.Nm 86*95c635efSGarrett D'Amoredocuments may contain only graphable 7-bit ASCII characters, the space 87*95c635efSGarrett D'Amorecharacter, and, in certain circumstances, the tab character. 88*95c635efSGarrett D'AmoreThe back-space character 89*95c635efSGarrett D'Amore.Sq \e 90*95c635efSGarrett D'Amoreindicates the start of an escape sequence for 91*95c635efSGarrett D'Amore.Sx Comments , 92*95c635efSGarrett D'Amore.Sx Special Characters , 93*95c635efSGarrett D'Amore.Sx Predefined Strings , 94*95c635efSGarrett D'Amoreand 95*95c635efSGarrett D'Amoreuser-defined strings defined using the 96*95c635efSGarrett D'Amore.Sx ds 97*95c635efSGarrett D'Amorerequest. 98*95c635efSGarrett D'Amore.Ss Comments 99*95c635efSGarrett D'AmoreText following an escaped double-quote 100*95c635efSGarrett D'Amore.Sq \e\(dq , 101*95c635efSGarrett D'Amorewhether in a request, macro, or text line, is ignored to the end of the line. 102*95c635efSGarrett D'AmoreA request line beginning with a control character and comment escape 103*95c635efSGarrett D'Amore.Sq \&.\e\(dq 104*95c635efSGarrett D'Amoreis also ignored. 105*95c635efSGarrett D'AmoreFurthermore, request lines with only a control character and optional 106*95c635efSGarrett D'Amoretrailing whitespace are stripped from input. 107*95c635efSGarrett D'Amore.Pp 108*95c635efSGarrett D'AmoreExamples: 109*95c635efSGarrett D'Amore.Bd -literal -offset indent -compact 110*95c635efSGarrett D'Amore\&.\e\(dq This is a comment line. 111*95c635efSGarrett D'Amore\&.\e\(dq The next line is ignored: 112*95c635efSGarrett D'Amore\&. 113*95c635efSGarrett D'Amore\&.Sh EXAMPLES \e\(dq This is a comment, too. 114*95c635efSGarrett D'Amore\&example text \e\(dq And so is this. 115*95c635efSGarrett D'Amore.Ed 116*95c635efSGarrett D'Amore.Ss Special Characters 117*95c635efSGarrett D'AmoreSpecial characters are used to encode special glyphs and are rendered 118*95c635efSGarrett D'Amoredifferently across output media. 119*95c635efSGarrett D'AmoreThey may occur in request, macro, and text lines. 120*95c635efSGarrett D'AmoreSequences begin with the escape character 121*95c635efSGarrett D'Amore.Sq \e 122*95c635efSGarrett D'Amorefollowed by either an open-parenthesis 123*95c635efSGarrett D'Amore.Sq \&( 124*95c635efSGarrett D'Amorefor two-character sequences; an open-bracket 125*95c635efSGarrett D'Amore.Sq \&[ 126*95c635efSGarrett D'Amorefor n-character sequences (terminated at a close-bracket 127*95c635efSGarrett D'Amore.Sq \&] ) ; 128*95c635efSGarrett D'Amoreor a single one character sequence. 129*95c635efSGarrett D'Amore.Pp 130*95c635efSGarrett D'AmoreExamples: 131*95c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact 132*95c635efSGarrett D'Amore.It Li \e(em 133*95c635efSGarrett D'AmoreTwo-letter em dash escape. 134*95c635efSGarrett D'Amore.It Li \ee 135*95c635efSGarrett D'AmoreOne-letter backslash escape. 136*95c635efSGarrett D'Amore.El 137*95c635efSGarrett D'Amore.Pp 138*95c635efSGarrett D'AmoreSee 139*95c635efSGarrett D'Amore.Xr mandoc_char 5 140*95c635efSGarrett D'Amorefor a complete list. 141*95c635efSGarrett D'Amore.Ss Text Decoration 142*95c635efSGarrett D'AmoreTerms may be text-decorated using the 143*95c635efSGarrett D'Amore.Sq \ef 144*95c635efSGarrett D'Amoreescape followed by an indicator: B (bold), I (italic), R (regular), or P 145*95c635efSGarrett D'Amore(revert to previous mode). 146*95c635efSGarrett D'AmoreA numerical representation 3, 2, or 1 (bold, italic, and regular, 147*95c635efSGarrett D'Amorerespectively) may be used instead. 148*95c635efSGarrett D'AmoreThe indicator or numerical representative may be preceded by C 149*95c635efSGarrett D'Amore(constant-width), which is ignored. 150*95c635efSGarrett D'Amore.Pp 151*95c635efSGarrett D'AmoreExamples: 152*95c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact 153*95c635efSGarrett D'Amore.It Li \efBbold\efR 154*95c635efSGarrett D'AmoreWrite in bold, then switch to regular font mode. 155*95c635efSGarrett D'Amore.It Li \efIitalic\efP 156*95c635efSGarrett D'AmoreWrite in italic, then return to previous font mode. 157*95c635efSGarrett D'Amore.El 158*95c635efSGarrett D'Amore.Pp 159*95c635efSGarrett D'AmoreText decoration is 160*95c635efSGarrett D'Amore.Em not 161*95c635efSGarrett D'Amorerecommended for 162*95c635efSGarrett D'Amore.Xr mdoc 5 , 163*95c635efSGarrett D'Amorewhich encourages semantic annotation. 164*95c635efSGarrett D'Amore.Ss Predefined Strings 165*95c635efSGarrett D'AmorePredefined strings, like 166*95c635efSGarrett D'Amore.Sx Special Characters , 167*95c635efSGarrett D'Amoremark special output glyphs. 168*95c635efSGarrett D'AmorePredefined strings are escaped with the slash-asterisk, 169*95c635efSGarrett D'Amore.Sq \e* : 170*95c635efSGarrett D'Amoresingle-character 171*95c635efSGarrett D'Amore.Sq \e*X , 172*95c635efSGarrett D'Amoretwo-character 173*95c635efSGarrett D'Amore.Sq \e*(XX , 174*95c635efSGarrett D'Amoreand N-character 175*95c635efSGarrett D'Amore.Sq \e*[N] . 176*95c635efSGarrett D'Amore.Pp 177*95c635efSGarrett D'AmoreExamples: 178*95c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact 179*95c635efSGarrett D'Amore.It Li \e*(Am 180*95c635efSGarrett D'AmoreTwo-letter ampersand predefined string. 181*95c635efSGarrett D'Amore.It Li \e*q 182*95c635efSGarrett D'AmoreOne-letter double-quote predefined string. 183*95c635efSGarrett D'Amore.El 184*95c635efSGarrett D'Amore.Pp 185*95c635efSGarrett D'AmorePredefined strings are not recommended for use, 186*95c635efSGarrett D'Amoreas they differ across implementations. 187*95c635efSGarrett D'AmoreThose supported by 188*95c635efSGarrett D'Amore.Xr mandoc 1 189*95c635efSGarrett D'Amoreare listed in 190*95c635efSGarrett D'Amore.Xr mandoc_char 5 . 191*95c635efSGarrett D'AmoreManuals using these predefined strings are almost certainly not portable. 192*95c635efSGarrett D'Amore.Ss Whitespace 193*95c635efSGarrett D'AmoreWhitespace consists of the space character. 194*95c635efSGarrett D'AmoreIn text lines, whitespace is preserved within a line. 195*95c635efSGarrett D'AmoreIn request and macro lines, whitespace delimits arguments and is discarded. 196*95c635efSGarrett D'Amore.Pp 197*95c635efSGarrett D'AmoreUnescaped trailing spaces are stripped from text line input unless in a 198*95c635efSGarrett D'Amoreliteral context. 199*95c635efSGarrett D'AmoreIn general, trailing whitespace on any input line is discouraged for 200*95c635efSGarrett D'Amorereasons of portability. 201*95c635efSGarrett D'AmoreIn the rare case that a blank character is needed at the end of an 202*95c635efSGarrett D'Amoreinput line, it may be forced by 203*95c635efSGarrett D'Amore.Sq \e\ \e& . 204*95c635efSGarrett D'Amore.Pp 205*95c635efSGarrett D'AmoreLiteral space characters can be produced in the output 206*95c635efSGarrett D'Amoreusing escape sequences. 207*95c635efSGarrett D'AmoreIn macro lines, they can also be included in arguments using quotation; see 208*95c635efSGarrett D'Amore.Sx MACRO SYNTAX 209*95c635efSGarrett D'Amorefor details. 210*95c635efSGarrett D'Amore.Pp 211*95c635efSGarrett D'AmoreBlank text lines, which may include whitespace, are only permitted 212*95c635efSGarrett D'Amorewithin literal contexts. 213*95c635efSGarrett D'AmoreIf the first character of a text line is a space, that line is printed 214*95c635efSGarrett D'Amorewith a leading newline. 215*95c635efSGarrett D'Amore.Ss Scaling Widths 216*95c635efSGarrett D'AmoreMany requests and macros support scaled widths for their arguments. 217*95c635efSGarrett D'AmoreThe syntax for a scaled width is 218*95c635efSGarrett D'Amore.Sq Li [+-]?[0-9]*.[0-9]*[:unit:] , 219*95c635efSGarrett D'Amorewhere a decimal must be preceded or followed by at least one digit. 220*95c635efSGarrett D'AmoreNegative numbers, while accepted, are truncated to zero. 221*95c635efSGarrett D'Amore.Pp 222*95c635efSGarrett D'AmoreThe following scaling units are accepted: 223*95c635efSGarrett D'Amore.Pp 224*95c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact 225*95c635efSGarrett D'Amore.It c 226*95c635efSGarrett D'Amorecentimetre 227*95c635efSGarrett D'Amore.It i 228*95c635efSGarrett D'Amoreinch 229*95c635efSGarrett D'Amore.It P 230*95c635efSGarrett D'Amorepica (~1/6 inch) 231*95c635efSGarrett D'Amore.It p 232*95c635efSGarrett D'Amorepoint (~1/72 inch) 233*95c635efSGarrett D'Amore.It f 234*95c635efSGarrett D'Amoresynonym for 235*95c635efSGarrett D'Amore.Sq u 236*95c635efSGarrett D'Amore.It v 237*95c635efSGarrett D'Amoredefault vertical span 238*95c635efSGarrett D'Amore.It m 239*95c635efSGarrett D'Amorewidth of rendered 240*95c635efSGarrett D'Amore.Sq m 241*95c635efSGarrett D'Amore.Pq em 242*95c635efSGarrett D'Amorecharacter 243*95c635efSGarrett D'Amore.It n 244*95c635efSGarrett D'Amorewidth of rendered 245*95c635efSGarrett D'Amore.Sq n 246*95c635efSGarrett D'Amore.Pq en 247*95c635efSGarrett D'Amorecharacter 248*95c635efSGarrett D'Amore.It u 249*95c635efSGarrett D'Amoredefault horizontal span 250*95c635efSGarrett D'Amore.It M 251*95c635efSGarrett D'Amoremini-em (~1/100 em) 252*95c635efSGarrett D'Amore.El 253*95c635efSGarrett D'Amore.Pp 254*95c635efSGarrett D'AmoreUsing anything other than 255*95c635efSGarrett D'Amore.Sq m , 256*95c635efSGarrett D'Amore.Sq n , 257*95c635efSGarrett D'Amore.Sq u , 258*95c635efSGarrett D'Amoreor 259*95c635efSGarrett D'Amore.Sq v 260*95c635efSGarrett D'Amoreis necessarily non-portable across output media. 261*95c635efSGarrett D'AmoreSee 262*95c635efSGarrett D'Amore.Sx COMPATIBILITY . 263*95c635efSGarrett D'Amore.Pp 264*95c635efSGarrett D'AmoreIf a scaling unit is not provided, the numerical value is interpreted 265*95c635efSGarrett D'Amoreunder the default rules of 266*95c635efSGarrett D'Amore.Sq v 267*95c635efSGarrett D'Amorefor vertical spaces and 268*95c635efSGarrett D'Amore.Sq u 269*95c635efSGarrett D'Amorefor horizontal ones. 270*95c635efSGarrett D'Amore.Pp 271*95c635efSGarrett D'AmoreExamples: 272*95c635efSGarrett D'Amore.Bl -tag -width ".Bl -tag -width 2i" -offset indent -compact 273*95c635efSGarrett D'Amore.It Li \&.Bl -tag -width 2i 274*95c635efSGarrett D'Amoretwo-inch tagged list indentation in 275*95c635efSGarrett D'Amore.Xr mdoc 5 276*95c635efSGarrett D'Amore.It Li \&.HP 2i 277*95c635efSGarrett D'Amoretwo-inch tagged list indentation in 278*95c635efSGarrett D'Amore.Xr man 5 279*95c635efSGarrett D'Amore.It Li \&.sp 2v 280*95c635efSGarrett D'Amoretwo vertical spaces 281*95c635efSGarrett D'Amore.El 282*95c635efSGarrett D'Amore.Ss Sentence Spacing 283*95c635efSGarrett D'AmoreEach sentence should terminate at the end of an input line. 284*95c635efSGarrett D'AmoreBy doing this, a formatter will be able to apply the proper amount of 285*95c635efSGarrett D'Amorespacing after the end of sentence (unescaped) period, exclamation mark, 286*95c635efSGarrett D'Amoreor question mark followed by zero or more non-sentence closing 287*95c635efSGarrett D'Amoredelimiters 288*95c635efSGarrett D'Amore.Po 289*95c635efSGarrett D'Amore.Sq \&) , 290*95c635efSGarrett D'Amore.Sq \&] , 291*95c635efSGarrett D'Amore.Sq \&' , 292*95c635efSGarrett D'Amore.Sq \&" 293*95c635efSGarrett D'Amore.Pc . 294*95c635efSGarrett D'Amore.Pp 295*95c635efSGarrett D'AmoreThe proper spacing is also intelligently preserved if a sentence ends at 296*95c635efSGarrett D'Amorethe boundary of a macro line. 297*95c635efSGarrett D'Amore.Pp 298*95c635efSGarrett D'AmoreExamples: 299*95c635efSGarrett D'Amore.Bd -literal -offset indent -compact 300*95c635efSGarrett D'AmoreDo not end sentences mid-line like this. Instead, 301*95c635efSGarrett D'Amoreend a sentence like this. 302*95c635efSGarrett D'AmoreA macro would end like this: 303*95c635efSGarrett D'Amore\&.Xr mandoc 1 \&. 304*95c635efSGarrett D'Amore.Ed 305*95c635efSGarrett D'Amore.Sh REQUEST SYNTAX 306*95c635efSGarrett D'AmoreA request or macro line consists of: 307*95c635efSGarrett D'Amore.Pp 308*95c635efSGarrett D'Amore.Bl -enum -compact 309*95c635efSGarrett D'Amore.It 310*95c635efSGarrett D'Amorethe control character 311*95c635efSGarrett D'Amore.Sq \&. 312*95c635efSGarrett D'Amoreor 313*95c635efSGarrett D'Amore.Sq \(aq 314*95c635efSGarrett D'Amoreat the beginning of the line, 315*95c635efSGarrett D'Amore.It 316*95c635efSGarrett D'Amoreoptionally an arbitrary amount of whitespace, 317*95c635efSGarrett D'Amore.It 318*95c635efSGarrett D'Amorethe name of the request or the macro, which is one word of arbitrary 319*95c635efSGarrett D'Amorelength, terminated by whitespace, 320*95c635efSGarrett D'Amore.It 321*95c635efSGarrett D'Amoreand zero or more arguments delimited by whitespace. 322*95c635efSGarrett D'Amore.El 323*95c635efSGarrett D'Amore.Pp 324*95c635efSGarrett D'AmoreThus, the following request lines are all equivalent: 325*95c635efSGarrett D'Amore.Bd -literal -offset indent 326*95c635efSGarrett D'Amore\&.ig end 327*95c635efSGarrett D'Amore\&.ig end 328*95c635efSGarrett D'Amore\&. ig end 329*95c635efSGarrett D'Amore.Ed 330*95c635efSGarrett D'Amore.Sh MACRO SYNTAX 331*95c635efSGarrett D'AmoreMacros are provided by the 332*95c635efSGarrett D'Amore.Xr mdoc 5 333*95c635efSGarrett D'Amoreand 334*95c635efSGarrett D'Amore.Xr man 5 335*95c635efSGarrett D'Amorelanguages and can be defined by the 336*95c635efSGarrett D'Amore.Sx \&de 337*95c635efSGarrett D'Amorerequest. 338*95c635efSGarrett D'AmoreWhen called, they follow the same syntax as requests, except that 339*95c635efSGarrett D'Amoremacro arguments may optionally be quoted by enclosing them 340*95c635efSGarrett D'Amorein double quote characters 341*95c635efSGarrett D'Amore.Pq Sq \(dq . 342*95c635efSGarrett D'AmoreQuoted text, even if it contains whitespace or would cause 343*95c635efSGarrett D'Amorea macro invocation when unquoted, is always considered literal text. 344*95c635efSGarrett D'AmoreInside quoted text, pairs of double quote characters 345*95c635efSGarrett D'Amore.Pq Sq Qq 346*95c635efSGarrett D'Amoreresolve to single double quote characters. 347*95c635efSGarrett D'Amore.Pp 348*95c635efSGarrett D'AmoreTo be recognised as the beginning of a quoted argument, the opening 349*95c635efSGarrett D'Amorequote character must be preceded by a space character. 350*95c635efSGarrett D'AmoreA quoted argument extends to the next double quote character that is not 351*95c635efSGarrett D'Amorepart of a pair, or to the end of the input line, whichever comes earlier. 352*95c635efSGarrett D'AmoreLeaving out the terminating double quote character at the end of the line 353*95c635efSGarrett D'Amoreis discouraged. 354*95c635efSGarrett D'AmoreFor clarity, if more arguments follow on the same input line, 355*95c635efSGarrett D'Amoreit is recommended to follow the terminating double quote character 356*95c635efSGarrett D'Amoreby a space character; in case the next character after the terminating 357*95c635efSGarrett D'Amoredouble quote character is anything else, it is regarded as the beginning 358*95c635efSGarrett D'Amoreof the next, unquoted argument. 359*95c635efSGarrett D'Amore.Pp 360*95c635efSGarrett D'AmoreBoth in quoted and unquoted arguments, pairs of backslashes 361*95c635efSGarrett D'Amore.Pq Sq \e\e 362*95c635efSGarrett D'Amoreresolve to single backslashes. 363*95c635efSGarrett D'AmoreIn unquoted arguments, space characters can alternatively be included 364*95c635efSGarrett D'Amoreby preceding them with a backslash 365*95c635efSGarrett D'Amore.Pq Sq \e\~ , 366*95c635efSGarrett D'Amorebut quoting is usually better for clarity. 367*95c635efSGarrett D'Amore.Pp 368*95c635efSGarrett D'AmoreExamples: 369*95c635efSGarrett D'Amore.Bl -tag -width Ds -offset indent -compact 370*95c635efSGarrett D'Amore.It Li .Fn strlen \(dqconst char *s\(dq 371*95c635efSGarrett D'AmoreGroup arguments 372*95c635efSGarrett D'Amore.Qq const char *s 373*95c635efSGarrett D'Amoreinto one function argument. 374*95c635efSGarrett D'AmoreIf unspecified, 375*95c635efSGarrett D'Amore.Qq const , 376*95c635efSGarrett D'Amore.Qq char , 377*95c635efSGarrett D'Amoreand 378*95c635efSGarrett D'Amore.Qq *s 379*95c635efSGarrett D'Amorewould be considered separate arguments. 380*95c635efSGarrett D'Amore.It Li .Op \(dqFl a\(dq 381*95c635efSGarrett D'AmoreConsider 382*95c635efSGarrett D'Amore.Qq \&Fl a 383*95c635efSGarrett D'Amoreas literal text instead of a flag macro. 384*95c635efSGarrett D'Amore.El 385*95c635efSGarrett D'Amore.Sh REQUEST REFERENCE 386*95c635efSGarrett D'AmoreThe 387*95c635efSGarrett D'Amore.Xr mandoc 1 388*95c635efSGarrett D'Amore.Nm 389*95c635efSGarrett D'Amoreparser recognises the following requests. 390*95c635efSGarrett D'AmoreNote that the 391*95c635efSGarrett D'Amore.Nm 392*95c635efSGarrett D'Amorelanguage defines many more requests not implemented in 393*95c635efSGarrett D'Amore.Xr mandoc 1 . 394*95c635efSGarrett D'Amore.Ss \&ad 395*95c635efSGarrett D'AmoreSet line adjustment mode. 396*95c635efSGarrett D'AmoreThis line-scoped request is intended to have one argument to select 397*95c635efSGarrett D'Amorenormal, left, right, or centre adjustment for subsequent text. 398*95c635efSGarrett D'AmoreCurrently, it is ignored including its arguments, 399*95c635efSGarrett D'Amoreand the number of arguments is not checked. 400*95c635efSGarrett D'Amore.Ss \&am 401*95c635efSGarrett D'AmoreAppend to a macro definition. 402*95c635efSGarrett D'AmoreThe syntax of this request is the same as that of 403*95c635efSGarrett D'Amore.Sx \&de . 404*95c635efSGarrett D'AmoreIt is currently ignored by 405*95c635efSGarrett D'Amore.Xr mandoc 1 , 406*95c635efSGarrett D'Amoreas are its children. 407*95c635efSGarrett D'Amore.Ss \&ami 408*95c635efSGarrett D'AmoreAppend to a macro definition, specifying the macro name indirectly. 409*95c635efSGarrett D'AmoreThe syntax of this request is the same as that of 410*95c635efSGarrett D'Amore.Sx \&dei . 411*95c635efSGarrett D'AmoreIt is currently ignored by 412*95c635efSGarrett D'Amore.Xr mandoc 1 , 413*95c635efSGarrett D'Amoreas are its children. 414*95c635efSGarrett D'Amore.Ss \&am1 415*95c635efSGarrett D'AmoreAppend to a macro definition, switching roff compatibility mode off 416*95c635efSGarrett D'Amoreduring macro execution. 417*95c635efSGarrett D'AmoreThe syntax of this request is the same as that of 418*95c635efSGarrett D'Amore.Sx \&de1 . 419*95c635efSGarrett D'AmoreIt is currently ignored by 420*95c635efSGarrett D'Amore.Xr mandoc 1 , 421*95c635efSGarrett D'Amoreas are its children. 422*95c635efSGarrett D'Amore.Ss \&de 423*95c635efSGarrett D'AmoreDefine a 424*95c635efSGarrett D'Amore.Nm 425*95c635efSGarrett D'Amoremacro. 426*95c635efSGarrett D'AmoreIts syntax can be either 427*95c635efSGarrett D'Amore.Bd -literal -offset indent 428*95c635efSGarrett D'Amore.Pf . Cm \&de Ar name 429*95c635efSGarrett D'Amore.Ar macro definition 430*95c635efSGarrett D'Amore\&.. 431*95c635efSGarrett D'Amore.Ed 432*95c635efSGarrett D'Amore.Pp 433*95c635efSGarrett D'Amoreor 434*95c635efSGarrett D'Amore.Bd -literal -offset indent 435*95c635efSGarrett D'Amore.Pf . Cm \&de Ar name Ar end 436*95c635efSGarrett D'Amore.Ar macro definition 437*95c635efSGarrett D'Amore.Pf . Ar end 438*95c635efSGarrett D'Amore.Ed 439*95c635efSGarrett D'Amore.Pp 440*95c635efSGarrett D'AmoreBoth forms define or redefine the macro 441*95c635efSGarrett D'Amore.Ar name 442*95c635efSGarrett D'Amoreto represent the 443*95c635efSGarrett D'Amore.Ar macro definition , 444*95c635efSGarrett D'Amorewhich may consist of one or more input lines, including the newline 445*95c635efSGarrett D'Amorecharacters terminating each line, optionally containing calls to 446*95c635efSGarrett D'Amore.Nm 447*95c635efSGarrett D'Amorerequests, 448*95c635efSGarrett D'Amore.Nm 449*95c635efSGarrett D'Amoremacros or high-level macros like 450*95c635efSGarrett D'Amore.Xr man 5 451*95c635efSGarrett D'Amoreor 452*95c635efSGarrett D'Amore.Xr mdoc 5 453*95c635efSGarrett D'Amoremacros, whichever applies to the document in question. 454*95c635efSGarrett D'Amore.Pp 455*95c635efSGarrett D'AmoreSpecifying a custom 456*95c635efSGarrett D'Amore.Ar end 457*95c635efSGarrett D'Amoremacro works in the same way as for 458*95c635efSGarrett D'Amore.Sx \&ig ; 459*95c635efSGarrett D'Amorenamely, the call to 460*95c635efSGarrett D'Amore.Sq Pf . Ar end 461*95c635efSGarrett D'Amorefirst ends the 462*95c635efSGarrett D'Amore.Ar macro definition , 463*95c635efSGarrett D'Amoreand after that, it is also evaluated as a 464*95c635efSGarrett D'Amore.Nm 465*95c635efSGarrett D'Amorerequest or 466*95c635efSGarrett D'Amore.Nm 467*95c635efSGarrett D'Amoremacro, but not as a high-level macro. 468*95c635efSGarrett D'Amore.Pp 469*95c635efSGarrett D'AmoreThe macro can be invoked later using the syntax 470*95c635efSGarrett D'Amore.Pp 471*95c635efSGarrett D'Amore.D1 Pf . Ar name Op Ar argument Op Ar argument ... 472*95c635efSGarrett D'Amore.Pp 473*95c635efSGarrett D'AmoreRegarding argument parsing, see 474*95c635efSGarrett D'Amore.Sx MACRO SYNTAX 475*95c635efSGarrett D'Amoreabove. 476*95c635efSGarrett D'Amore.Pp 477*95c635efSGarrett D'AmoreThe line invoking the macro will be replaced 478*95c635efSGarrett D'Amorein the input stream by the 479*95c635efSGarrett D'Amore.Ar macro definition , 480*95c635efSGarrett D'Amorereplacing all occurrences of 481*95c635efSGarrett D'Amore.No \e\e$ Ns Ar N , 482*95c635efSGarrett D'Amorewhere 483*95c635efSGarrett D'Amore.Ar N 484*95c635efSGarrett D'Amoreis a digit, by the 485*95c635efSGarrett D'Amore.Ar N Ns th Ar argument . 486*95c635efSGarrett D'AmoreFor example, 487*95c635efSGarrett D'Amore.Bd -literal -offset indent 488*95c635efSGarrett D'Amore\&.de ZN 489*95c635efSGarrett D'Amore\efI\e^\e\e$1\e^\efP\e\e$2 490*95c635efSGarrett D'Amore\&.. 491*95c635efSGarrett D'Amore\&.ZN XtFree . 492*95c635efSGarrett D'Amore.Ed 493*95c635efSGarrett D'Amore.Pp 494*95c635efSGarrett D'Amoreproduces 495*95c635efSGarrett D'Amore.Pp 496*95c635efSGarrett D'Amore.D1 \efI\e^XtFree\e^\efP. 497*95c635efSGarrett D'Amore.Pp 498*95c635efSGarrett D'Amorein the input stream, and thus in the output: \fI\^XtFree\^\fP. 499*95c635efSGarrett D'Amore.Pp 500*95c635efSGarrett D'AmoreSince macros and user-defined strings share a common string table, 501*95c635efSGarrett D'Amoredefining a macro 502*95c635efSGarrett D'Amore.Ar name 503*95c635efSGarrett D'Amoreclobbers the user-defined string 504*95c635efSGarrett D'Amore.Ar name , 505*95c635efSGarrett D'Amoreand the 506*95c635efSGarrett D'Amore.Ar macro definition 507*95c635efSGarrett D'Amorecan also be printed using the 508*95c635efSGarrett D'Amore.Sq \e* 509*95c635efSGarrett D'Amorestring interpolation syntax described below 510*95c635efSGarrett D'Amore.Sx ds , 511*95c635efSGarrett D'Amorebut this is rarely useful because every macro definition contains at least 512*95c635efSGarrett D'Amoreone explicit newline character. 513*95c635efSGarrett D'Amore.Pp 514*95c635efSGarrett D'AmoreIn order to prevent endless recursion, both groff and 515*95c635efSGarrett D'Amore.Xr mandoc 1 516*95c635efSGarrett D'Amorelimit the stack depth for expanding macros and strings 517*95c635efSGarrett D'Amoreto a large, but finite number. 518*95c635efSGarrett D'AmoreDo not rely on the exact value of this limit. 519*95c635efSGarrett D'Amore.Ss \&dei 520*95c635efSGarrett D'AmoreDefine a 521*95c635efSGarrett D'Amore.Nm 522*95c635efSGarrett D'Amoremacro, specifying the macro name indirectly. 523*95c635efSGarrett D'AmoreThe syntax of this request is the same as that of 524*95c635efSGarrett D'Amore.Sx \&de . 525*95c635efSGarrett D'AmoreIt is currently ignored by 526*95c635efSGarrett D'Amore.Xr mandoc 1 , 527*95c635efSGarrett D'Amoreas are its children. 528*95c635efSGarrett D'Amore.Ss \&de1 529*95c635efSGarrett D'AmoreDefine a 530*95c635efSGarrett D'Amore.Nm 531*95c635efSGarrett D'Amoremacro that will be executed with 532*95c635efSGarrett D'Amore.Nm 533*95c635efSGarrett D'Amorecompatibility mode switched off during macro execution. 534*95c635efSGarrett D'AmoreThis is a GNU extension not available in traditional 535*95c635efSGarrett D'Amore.Nm 536*95c635efSGarrett D'Amoreimplementations and not even in older versions of groff. 537*95c635efSGarrett D'AmoreSince 538*95c635efSGarrett D'Amore.Xr mandoc 1 539*95c635efSGarrett D'Amoredoes not implement 540*95c635efSGarrett D'Amore.Nm 541*95c635efSGarrett D'Amorecompatibility mode at all, it handles this request as an alias for 542*95c635efSGarrett D'Amore.Sx \&de . 543*95c635efSGarrett D'Amore.Ss \&ds 544*95c635efSGarrett D'AmoreDefine a user-defined string. 545*95c635efSGarrett D'AmoreIts syntax is as follows: 546*95c635efSGarrett D'Amore.Pp 547*95c635efSGarrett D'Amore.D1 Pf . Cm \&ds Ar name Oo \(dq Oc Ns Ar string 548*95c635efSGarrett D'Amore.Pp 549*95c635efSGarrett D'AmoreThe 550*95c635efSGarrett D'Amore.Ar name 551*95c635efSGarrett D'Amoreand 552*95c635efSGarrett D'Amore.Ar string 553*95c635efSGarrett D'Amorearguments are space-separated. 554*95c635efSGarrett D'AmoreIf the 555*95c635efSGarrett D'Amore.Ar string 556*95c635efSGarrett D'Amorebegins with a double-quote character, that character will not be part 557*95c635efSGarrett D'Amoreof the string. 558*95c635efSGarrett D'AmoreAll remaining characters on the input line form the 559*95c635efSGarrett D'Amore.Ar string , 560*95c635efSGarrett D'Amoreincluding whitespace and double-quote characters, even trailing ones. 561*95c635efSGarrett D'Amore.Pp 562*95c635efSGarrett D'AmoreThe 563*95c635efSGarrett D'Amore.Ar string 564*95c635efSGarrett D'Amorecan be interpolated into subsequent text by using 565*95c635efSGarrett D'Amore.No \e* Ns Bq Ar name 566*95c635efSGarrett D'Amorefor a 567*95c635efSGarrett D'Amore.Ar name 568*95c635efSGarrett D'Amoreof arbitrary length, or \e*(NN or \e*N if the length of 569*95c635efSGarrett D'Amore.Ar name 570*95c635efSGarrett D'Amoreis two or one characters, respectively. 571*95c635efSGarrett D'AmoreInterpolation can be prevented by escaping the leading backslash; 572*95c635efSGarrett D'Amorethat is, an asterisk preceded by an even number of backslashes 573*95c635efSGarrett D'Amoredoes not trigger string interpolation. 574*95c635efSGarrett D'Amore.Pp 575*95c635efSGarrett D'AmoreSince user-defined strings and macros share a common string table, 576*95c635efSGarrett D'Amoredefining a string 577*95c635efSGarrett D'Amore.Ar name 578*95c635efSGarrett D'Amoreclobbers the macro 579*95c635efSGarrett D'Amore.Ar name , 580*95c635efSGarrett D'Amoreand the 581*95c635efSGarrett D'Amore.Ar name 582*95c635efSGarrett D'Amoreused for defining a string can also be invoked as a macro, 583*95c635efSGarrett D'Amorein which case the following input line will be appended to the 584*95c635efSGarrett D'Amore.Ar string , 585*95c635efSGarrett D'Amoreforming a new input line passed to the 586*95c635efSGarrett D'Amore.Nm 587*95c635efSGarrett D'Amoreparser. 588*95c635efSGarrett D'AmoreFor example, 589*95c635efSGarrett D'Amore.Bd -literal -offset indent 590*95c635efSGarrett D'Amore\&.ds badidea .S 591*95c635efSGarrett D'Amore\&.badidea 592*95c635efSGarrett D'AmoreH SYNOPSIS 593*95c635efSGarrett D'Amore.Ed 594*95c635efSGarrett D'Amore.Pp 595*95c635efSGarrett D'Amoreinvokes the 596*95c635efSGarrett D'Amore.Cm SH 597*95c635efSGarrett D'Amoremacro when used in a 598*95c635efSGarrett D'Amore.Xr man 5 599*95c635efSGarrett D'Amoredocument. 600*95c635efSGarrett D'AmoreSuch abuse is of course strongly discouraged. 601*95c635efSGarrett D'Amore.Ss \&el 602*95c635efSGarrett D'AmoreThe 603*95c635efSGarrett D'Amore.Qq else 604*95c635efSGarrett D'Amorehalf of an if/else conditional. 605*95c635efSGarrett D'AmorePops a result off the stack of conditional evaluations pushed by 606*95c635efSGarrett D'Amore.Sx \&ie 607*95c635efSGarrett D'Amoreand uses it as its conditional. 608*95c635efSGarrett D'AmoreIf no stack entries are present (e.g., due to no prior 609*95c635efSGarrett D'Amore.Sx \&ie 610*95c635efSGarrett D'Amorecalls) 611*95c635efSGarrett D'Amorethen false is assumed. 612*95c635efSGarrett D'AmoreThe syntax of this request is similar to 613*95c635efSGarrett D'Amore.Sx \&if 614*95c635efSGarrett D'Amoreexcept that the conditional is missing. 615*95c635efSGarrett D'Amore.Ss \&EN 616*95c635efSGarrett D'AmoreEnd an equation block. 617*95c635efSGarrett D'AmoreSee 618*95c635efSGarrett D'Amore.Sx \&EQ . 619*95c635efSGarrett D'Amore.Ss \&EQ 620*95c635efSGarrett D'AmoreBegin an equation block. 621*95c635efSGarrett D'AmoreSee 622*95c635efSGarrett D'Amore.Xr eqn 5 623*95c635efSGarrett D'Amorefor a description of the equation language. 624*95c635efSGarrett D'Amore.Ss \&hy 625*95c635efSGarrett D'AmoreSet automatic hyphenation mode. 626*95c635efSGarrett D'AmoreThis line-scoped request is currently ignored. 627*95c635efSGarrett D'Amore.Ss \&ie 628*95c635efSGarrett D'AmoreThe 629*95c635efSGarrett D'Amore.Qq if 630*95c635efSGarrett D'Amorehalf of an if/else conditional. 631*95c635efSGarrett D'AmoreThe result of the conditional is pushed into a stack used by subsequent 632*95c635efSGarrett D'Amoreinvocations of 633*95c635efSGarrett D'Amore.Sx \&el , 634*95c635efSGarrett D'Amorewhich may be separated by any intervening input (or not exist at all). 635*95c635efSGarrett D'AmoreIts syntax is equivalent to 636*95c635efSGarrett D'Amore.Sx \&if . 637*95c635efSGarrett D'Amore.Ss \&if 638*95c635efSGarrett D'AmoreBegins a conditional. 639*95c635efSGarrett D'AmoreRight now, the conditional evaluates to true 640*95c635efSGarrett D'Amoreif and only if it starts with the letter 641*95c635efSGarrett D'Amore.Sy n , 642*95c635efSGarrett D'Amoreindicating processing in nroff style as opposed to troff style. 643*95c635efSGarrett D'AmoreIf a conditional is false, its children are not processed, but are 644*95c635efSGarrett D'Amoresyntactically interpreted to preserve the integrity of the input 645*95c635efSGarrett D'Amoredocument. 646*95c635efSGarrett D'AmoreThus, 647*95c635efSGarrett D'Amore.Pp 648*95c635efSGarrett D'Amore.D1 \&.if t .ig 649*95c635efSGarrett D'Amore.Pp 650*95c635efSGarrett D'Amorewill discard the 651*95c635efSGarrett D'Amore.Sq \&.ig , 652*95c635efSGarrett D'Amorewhich may lead to interesting results, but 653*95c635efSGarrett D'Amore.Pp 654*95c635efSGarrett D'Amore.D1 \&.if t .if t \e{\e 655*95c635efSGarrett D'Amore.Pp 656*95c635efSGarrett D'Amorewill continue to syntactically interpret to the block close of the final 657*95c635efSGarrett D'Amoreconditional. 658*95c635efSGarrett D'AmoreSub-conditionals, in this case, obviously inherit the truth value of 659*95c635efSGarrett D'Amorethe parent. 660*95c635efSGarrett D'AmoreThis request has the following syntax: 661*95c635efSGarrett D'Amore.Bd -literal -offset indent 662*95c635efSGarrett D'Amore\&.if COND \e{\e 663*95c635efSGarrett D'AmoreBODY... 664*95c635efSGarrett D'Amore\&.\e} 665*95c635efSGarrett D'Amore.Ed 666*95c635efSGarrett D'Amore.Bd -literal -offset indent 667*95c635efSGarrett D'Amore\&.if COND \e{ BODY 668*95c635efSGarrett D'AmoreBODY... \e} 669*95c635efSGarrett D'Amore.Ed 670*95c635efSGarrett D'Amore.Bd -literal -offset indent 671*95c635efSGarrett D'Amore\&.if COND \e{ BODY 672*95c635efSGarrett D'AmoreBODY... 673*95c635efSGarrett D'Amore\&.\e} 674*95c635efSGarrett D'Amore.Ed 675*95c635efSGarrett D'Amore.Bd -literal -offset indent 676*95c635efSGarrett D'Amore\&.if COND \e 677*95c635efSGarrett D'AmoreBODY 678*95c635efSGarrett D'Amore.Ed 679*95c635efSGarrett D'Amore.Pp 680*95c635efSGarrett D'AmoreCOND is a conditional statement. 681*95c635efSGarrett D'Amoreroff allows for complicated conditionals; mandoc is much simpler. 682*95c635efSGarrett D'AmoreAt this time, mandoc supports only 683*95c635efSGarrett D'Amore.Sq n , 684*95c635efSGarrett D'Amoreevaluating to true; 685*95c635efSGarrett D'Amoreand 686*95c635efSGarrett D'Amore.Sq t , 687*95c635efSGarrett D'Amore.Sq e , 688*95c635efSGarrett D'Amoreand 689*95c635efSGarrett D'Amore.Sq o , 690*95c635efSGarrett D'Amoreevaluating to false. 691*95c635efSGarrett D'AmoreAll other invocations are read up to the next end of line or space and 692*95c635efSGarrett D'Amoreevaluate as false. 693*95c635efSGarrett D'Amore.Pp 694*95c635efSGarrett D'AmoreIf the BODY section is begun by an escaped brace 695*95c635efSGarrett D'Amore.Sq \e{ , 696*95c635efSGarrett D'Amorescope continues until a closing-brace escape sequence 697*95c635efSGarrett D'Amore.Sq \.\e} . 698*95c635efSGarrett D'AmoreIf the BODY is not enclosed in braces, scope continues until 699*95c635efSGarrett D'Amorethe end of the line. 700*95c635efSGarrett D'AmoreIf the COND is followed by a BODY on the same line, whether after a 701*95c635efSGarrett D'Amorebrace or not, then requests and macros 702*95c635efSGarrett D'Amore.Em must 703*95c635efSGarrett D'Amorebegin with a control character. 704*95c635efSGarrett D'AmoreIt is generally more intuitive, in this case, to write 705*95c635efSGarrett D'Amore.Bd -literal -offset indent 706*95c635efSGarrett D'Amore\&.if COND \e{\e 707*95c635efSGarrett D'Amore\&.foo 708*95c635efSGarrett D'Amorebar 709*95c635efSGarrett D'Amore\&.\e} 710*95c635efSGarrett D'Amore.Ed 711*95c635efSGarrett D'Amore.Pp 712*95c635efSGarrett D'Amorethan having the request or macro follow as 713*95c635efSGarrett D'Amore.Pp 714*95c635efSGarrett D'Amore.D1 \&.if COND \e{ .foo 715*95c635efSGarrett D'Amore.Pp 716*95c635efSGarrett D'AmoreThe scope of a conditional is always parsed, but only executed if the 717*95c635efSGarrett D'Amoreconditional evaluates to true. 718*95c635efSGarrett D'Amore.Pp 719*95c635efSGarrett D'AmoreNote that the 720*95c635efSGarrett D'Amore.Sq \e} 721*95c635efSGarrett D'Amoreis converted into a zero-width escape sequence if not passed as a 722*95c635efSGarrett D'Amorestandalone macro 723*95c635efSGarrett D'Amore.Sq \&.\e} . 724*95c635efSGarrett D'AmoreFor example, 725*95c635efSGarrett D'Amore.Pp 726*95c635efSGarrett D'Amore.D1 \&.Fl a \e} b 727*95c635efSGarrett D'Amore.Pp 728*95c635efSGarrett D'Amorewill result in 729*95c635efSGarrett D'Amore.Sq \e} 730*95c635efSGarrett D'Amorebeing considered an argument of the 731*95c635efSGarrett D'Amore.Sq \&Fl 732*95c635efSGarrett D'Amoremacro. 733*95c635efSGarrett D'Amore.Ss \&ig 734*95c635efSGarrett D'AmoreIgnore input. 735*95c635efSGarrett D'AmoreIts syntax can be either 736*95c635efSGarrett D'Amore.Bd -literal -offset indent 737*95c635efSGarrett D'Amore.Pf . Cm \&ig 738*95c635efSGarrett D'Amore.Ar ignored text 739*95c635efSGarrett D'Amore\&.. 740*95c635efSGarrett D'Amore.Ed 741*95c635efSGarrett D'Amore.Pp 742*95c635efSGarrett D'Amoreor 743*95c635efSGarrett D'Amore.Bd -literal -offset indent 744*95c635efSGarrett D'Amore.Pf . Cm \&ig Ar end 745*95c635efSGarrett D'Amore.Ar ignored text 746*95c635efSGarrett D'Amore.Pf . Ar end 747*95c635efSGarrett D'Amore.Ed 748*95c635efSGarrett D'Amore.Pp 749*95c635efSGarrett D'AmoreIn the first case, input is ignored until a 750*95c635efSGarrett D'Amore.Sq \&.. 751*95c635efSGarrett D'Amorerequest is encountered on its own line. 752*95c635efSGarrett D'AmoreIn the second case, input is ignored until the specified 753*95c635efSGarrett D'Amore.Sq Pf . Ar end 754*95c635efSGarrett D'Amoremacro is encountered. 755*95c635efSGarrett D'AmoreDo not use the escape character 756*95c635efSGarrett D'Amore.Sq \e 757*95c635efSGarrett D'Amoreanywhere in the definition of 758*95c635efSGarrett D'Amore.Ar end ; 759*95c635efSGarrett D'Amoreit would cause very strange behaviour. 760*95c635efSGarrett D'Amore.Pp 761*95c635efSGarrett D'AmoreWhen the 762*95c635efSGarrett D'Amore.Ar end 763*95c635efSGarrett D'Amoremacro is a roff request or a roff macro, like in 764*95c635efSGarrett D'Amore.Pp 765*95c635efSGarrett D'Amore.D1 \&.ig if 766*95c635efSGarrett D'Amore.Pp 767*95c635efSGarrett D'Amorethe subsequent invocation of 768*95c635efSGarrett D'Amore.Sx \&if 769*95c635efSGarrett D'Amorewill first terminate the 770*95c635efSGarrett D'Amore.Ar ignored text , 771*95c635efSGarrett D'Amorethen be invoked as usual. 772*95c635efSGarrett D'AmoreOtherwise, it only terminates the 773*95c635efSGarrett D'Amore.Ar ignored text , 774*95c635efSGarrett D'Amoreand arguments following it or the 775*95c635efSGarrett D'Amore.Sq \&.. 776*95c635efSGarrett D'Amorerequest are discarded. 777*95c635efSGarrett D'Amore.Ss \&ne 778*95c635efSGarrett D'AmoreDeclare the need for the specified minimum vertical space 779*95c635efSGarrett D'Amorebefore the next trap or the bottom of the page. 780*95c635efSGarrett D'AmoreThis line-scoped request is currently ignored. 781*95c635efSGarrett D'Amore.Ss \&nh 782*95c635efSGarrett D'AmoreTurn off automatic hyphenation mode. 783*95c635efSGarrett D'AmoreThis line-scoped request is currently ignored. 784*95c635efSGarrett D'Amore.Ss \&rm 785*95c635efSGarrett D'AmoreRemove a request, macro or string. 786*95c635efSGarrett D'AmoreThis request is intended to have one argument, 787*95c635efSGarrett D'Amorethe name of the request, macro or string to be undefined. 788*95c635efSGarrett D'AmoreCurrently, it is ignored including its arguments, 789*95c635efSGarrett D'Amoreand the number of arguments is not checked. 790*95c635efSGarrett D'Amore.Ss \&nr 791*95c635efSGarrett D'AmoreDefine a register. 792*95c635efSGarrett D'AmoreA register is an arbitrary string value that defines some sort of state, 793*95c635efSGarrett D'Amorewhich influences parsing and/or formatting. 794*95c635efSGarrett D'AmoreIts syntax is as follows: 795*95c635efSGarrett D'Amore.Pp 796*95c635efSGarrett D'Amore.D1 Pf \. Cm \&nr Ar name Ar value 797*95c635efSGarrett D'Amore.Pp 798*95c635efSGarrett D'AmoreThe 799*95c635efSGarrett D'Amore.Ar value 800*95c635efSGarrett D'Amoremay, at the moment, only be an integer. 801*95c635efSGarrett D'AmoreSo far, only the following register 802*95c635efSGarrett D'Amore.Ar name 803*95c635efSGarrett D'Amoreis recognised: 804*95c635efSGarrett D'Amore.Bl -tag -width Ds 805*95c635efSGarrett D'Amore.It Cm nS 806*95c635efSGarrett D'AmoreIf set to a positive integer value, certain 807*95c635efSGarrett D'Amore.Xr mdoc 5 808*95c635efSGarrett D'Amoremacros will behave in the same way as in the 809*95c635efSGarrett D'Amore.Em SYNOPSIS 810*95c635efSGarrett D'Amoresection. 811*95c635efSGarrett D'AmoreIf set to 0, these macros will behave in the same way as outside the 812*95c635efSGarrett D'Amore.Em SYNOPSIS 813*95c635efSGarrett D'Amoresection, even when called within the 814*95c635efSGarrett D'Amore.Em SYNOPSIS 815*95c635efSGarrett D'Amoresection itself. 816*95c635efSGarrett D'AmoreNote that starting a new 817*95c635efSGarrett D'Amore.Xr mdoc 5 818*95c635efSGarrett D'Amoresection with the 819*95c635efSGarrett D'Amore.Cm \&Sh 820*95c635efSGarrett D'Amoremacro will reset this register. 821*95c635efSGarrett D'Amore.El 822*95c635efSGarrett D'Amore.Ss \&ns 823*95c635efSGarrett D'AmoreTurn on no-space mode. 824*95c635efSGarrett D'AmoreThis line-scoped request is intended to take no arguments. 825*95c635efSGarrett D'AmoreCurrently, it is ignored including its arguments, 826*95c635efSGarrett D'Amoreand the number of arguments is not checked. 827*95c635efSGarrett D'Amore.Ss \&ps 828*95c635efSGarrett D'AmoreChange point size. 829*95c635efSGarrett D'AmoreThis line-scoped request is intended to take one numerical argument. 830*95c635efSGarrett D'AmoreCurrently, it is ignored including its arguments, 831*95c635efSGarrett D'Amoreand the number of arguments is not checked. 832*95c635efSGarrett D'Amore.Ss \&so 833*95c635efSGarrett D'AmoreInclude a source file. 834*95c635efSGarrett D'AmoreIts syntax is as follows: 835*95c635efSGarrett D'Amore.Pp 836*95c635efSGarrett D'Amore.D1 Pf \. Cm \&so Ar file 837*95c635efSGarrett D'Amore.Pp 838*95c635efSGarrett D'AmoreThe 839*95c635efSGarrett D'Amore.Ar file 840*95c635efSGarrett D'Amorewill be read and its contents processed as input in place of the 841*95c635efSGarrett D'Amore.Sq \&.so 842*95c635efSGarrett D'Amorerequest line. 843*95c635efSGarrett D'AmoreTo avoid inadvertent inclusion of unrelated files, 844*95c635efSGarrett D'Amore.Xr mandoc 1 845*95c635efSGarrett D'Amoreonly accepts relative paths not containing the strings 846*95c635efSGarrett D'Amore.Qq ../ 847*95c635efSGarrett D'Amoreand 848*95c635efSGarrett D'Amore.Qq /.. . 849*95c635efSGarrett D'Amore.Pp 850*95c635efSGarrett D'AmoreThis request requires 851*95c635efSGarrett D'Amore.Xr man 1 852*95c635efSGarrett D'Amoreto change to the right directory before calling 853*95c635efSGarrett D'Amore.Xr mandoc 1 , 854*95c635efSGarrett D'Amoreper convention to the root of the manual tree. 855*95c635efSGarrett D'AmoreTypical usage looks like: 856*95c635efSGarrett D'Amore.Pp 857*95c635efSGarrett D'Amore.Dl \&.so man3/Xcursor.3 858*95c635efSGarrett D'Amore.Pp 859*95c635efSGarrett D'AmoreAs the whole concept is rather fragile, the use of 860*95c635efSGarrett D'Amore.Sx \&so 861*95c635efSGarrett D'Amoreis discouraged. 862*95c635efSGarrett D'AmoreUse 863*95c635efSGarrett D'Amore.Xr ln 1 864*95c635efSGarrett D'Amoreinstead. 865*95c635efSGarrett D'Amore.Ss \&ta 866*95c635efSGarrett D'AmoreSet tab stops. 867*95c635efSGarrett D'AmoreThis line-scoped request can take an arbitrary number of arguments. 868*95c635efSGarrett D'AmoreCurrently, it is ignored including its arguments. 869*95c635efSGarrett D'Amore.Ss \&tr 870*95c635efSGarrett D'AmoreOutput character translation. 871*95c635efSGarrett D'AmoreIts syntax is as follows: 872*95c635efSGarrett D'Amore.Pp 873*95c635efSGarrett D'Amore.D1 Pf \. Cm \&tr Ar [ab]+ 874*95c635efSGarrett D'Amore.Pp 875*95c635efSGarrett D'AmorePairs of 876*95c635efSGarrett D'Amore.Ar ab 877*95c635efSGarrett D'Amorecharacters are replaced 878*95c635efSGarrett D'Amore.Ar ( a 879*95c635efSGarrett D'Amorefor 880*95c635efSGarrett D'Amore.Ar b ) . 881*95c635efSGarrett D'AmoreReplacement (or origin) characters may also be character escapes; thus, 882*95c635efSGarrett D'Amore.Pp 883*95c635efSGarrett D'Amore.Dl tr \e(xx\e(yy 884*95c635efSGarrett D'Amore.Pp 885*95c635efSGarrett D'Amorereplaces all invocations of \e(xx with \e(yy. 886*95c635efSGarrett D'Amore.Ss \&T& 887*95c635efSGarrett D'AmoreRe-start a table layout, retaining the options of the prior table 888*95c635efSGarrett D'Amoreinvocation. 889*95c635efSGarrett D'AmoreSee 890*95c635efSGarrett D'Amore.Sx \&TS . 891*95c635efSGarrett D'Amore.Ss \&TE 892*95c635efSGarrett D'AmoreEnd a table context. 893*95c635efSGarrett D'AmoreSee 894*95c635efSGarrett D'Amore.Sx \&TS . 895*95c635efSGarrett D'Amore.Ss \&TS 896*95c635efSGarrett D'AmoreBegin a table, which formats input in aligned rows and columns. 897*95c635efSGarrett D'AmoreSee 898*95c635efSGarrett D'Amore.Xr tbl 5 899*95c635efSGarrett D'Amorefor a description of the tbl language. 900*95c635efSGarrett D'Amore.Sh COMPATIBILITY 901*95c635efSGarrett D'AmoreThis section documents compatibility between mandoc and other other 902*95c635efSGarrett D'Amore.Nm 903*95c635efSGarrett D'Amoreimplementations, at this time limited to GNU troff 904*95c635efSGarrett D'Amore.Pq Qq groff . 905*95c635efSGarrett D'AmoreThe term 906*95c635efSGarrett D'Amore.Qq historic groff 907*95c635efSGarrett D'Amorerefers to groff version 1.15. 908*95c635efSGarrett D'Amore.Pp 909*95c635efSGarrett D'Amore.Bl -dash -compact 910*95c635efSGarrett D'Amore.It 911*95c635efSGarrett D'AmoreIn mandoc, the 912*95c635efSGarrett D'Amore.Sx \&EQ , 913*95c635efSGarrett D'Amore.Sx \&TE , 914*95c635efSGarrett D'Amore.Sx \&TS , 915*95c635efSGarrett D'Amoreand 916*95c635efSGarrett D'Amore.Sx \&T& , 917*95c635efSGarrett D'Amoremacros are considered regular macros. 918*95c635efSGarrett D'AmoreIn all other 919*95c635efSGarrett D'Amore.Nm 920*95c635efSGarrett D'Amoreimplementations, these are special macros that must be specified without 921*95c635efSGarrett D'Amorespacing between the control character (which must be a period) and the 922*95c635efSGarrett D'Amoremacro name. 923*95c635efSGarrett D'Amore.It 924*95c635efSGarrett D'AmoreThe 925*95c635efSGarrett D'Amore.Cm nS 926*95c635efSGarrett D'Amoreregister is only compatible with OpenBSD's groff-1.15. 927*95c635efSGarrett D'Amore.It 928*95c635efSGarrett D'AmoreHistoric groff did not accept white-space before a custom 929*95c635efSGarrett D'Amore.Ar end 930*95c635efSGarrett D'Amoremacro for the 931*95c635efSGarrett D'Amore.Sx \&ig 932*95c635efSGarrett D'Amorerequest. 933*95c635efSGarrett D'Amore.It 934*95c635efSGarrett D'AmoreThe 935*95c635efSGarrett D'Amore.Sx \&if 936*95c635efSGarrett D'Amoreand family would print funny white-spaces with historic groff when 937*95c635efSGarrett D'Amoreusing the next-line syntax. 938*95c635efSGarrett D'Amore.El 939*95c635efSGarrett D'Amore.Sh SEE ALSO 940*95c635efSGarrett D'Amore.Xr mandoc 1 , 941*95c635efSGarrett D'Amore.Xr eqn 5 , 942*95c635efSGarrett D'Amore.Xr man 5 , 943*95c635efSGarrett D'Amore.Xr mandoc_char 5 , 944*95c635efSGarrett D'Amore.Xr mdoc 5 , 945*95c635efSGarrett D'Amore.Xr tbl 5 946*95c635efSGarrett D'Amore.Rs 947*95c635efSGarrett D'Amore.%A Joseph F. Ossanna 948*95c635efSGarrett D'Amore.%A Brian W. Kernighan 949*95c635efSGarrett D'Amore.%I AT&T Bell Laboratories 950*95c635efSGarrett D'Amore.%T Troff User's Manual 951*95c635efSGarrett D'Amore.%R Computing Science Technical Report 952*95c635efSGarrett D'Amore.%N 54 953*95c635efSGarrett D'Amore.%C Murray Hill, New Jersey 954*95c635efSGarrett D'Amore.%D 1976 and 1992 955*95c635efSGarrett D'Amore.%U http://www.kohala.com/start/troff/cstr54.ps 956*95c635efSGarrett D'Amore.Re 957*95c635efSGarrett D'Amore.Rs 958*95c635efSGarrett D'Amore.%A Joseph F. Ossanna 959*95c635efSGarrett D'Amore.%A Brian W. Kernighan 960*95c635efSGarrett D'Amore.%A Gunnar Ritter 961*95c635efSGarrett D'Amore.%T Heirloom Documentation Tools Nroff/Troff User's Manual 962*95c635efSGarrett D'Amore.%D September 17, 2007 963*95c635efSGarrett D'Amore.%U http://heirloom.sourceforge.net/doctools/troff.pdf 964*95c635efSGarrett D'Amore.Re 965*95c635efSGarrett D'Amore.Sh HISTORY 966*95c635efSGarrett D'AmoreThe RUNOFF typesetting system, whose input forms the basis for 967*95c635efSGarrett D'Amore.Nm , 968*95c635efSGarrett D'Amorewas written in MAD and FAP for the CTSS operating system by Jerome E. 969*95c635efSGarrett D'AmoreSaltzer in 1964. 970*95c635efSGarrett D'AmoreDoug McIlroy rewrote it in BCPL in 1969, renaming it 971*95c635efSGarrett D'Amore.Nm . 972*95c635efSGarrett D'AmoreDennis M. Ritchie rewrote McIlroy's 973*95c635efSGarrett D'Amore.Nm 974*95c635efSGarrett D'Amorein PDP-11 assembly for 975*95c635efSGarrett D'Amore.At v1 , 976*95c635efSGarrett D'AmoreJoseph F. Ossanna improved roff and renamed it nroff 977*95c635efSGarrett D'Amorefor 978*95c635efSGarrett D'Amore.At v2 , 979*95c635efSGarrett D'Amorethen ported nroff to C as troff, which Brian W. Kernighan released with 980*95c635efSGarrett D'Amore.At v7 . 981*95c635efSGarrett D'AmoreIn 1989, James Clarke re-implemented troff in C++, naming it groff. 982*95c635efSGarrett D'Amore.Sh AUTHORS 983*95c635efSGarrett D'Amore.An -nosplit 984*95c635efSGarrett D'AmoreThis 985*95c635efSGarrett D'Amore.Nm 986*95c635efSGarrett D'Amorereference was written by 987*95c635efSGarrett D'Amore.An Kristaps Dzonsons , 988*95c635efSGarrett D'Amore.Mt kristaps@bsd.lv ; 989*95c635efSGarrett D'Amoreand 990*95c635efSGarrett D'Amore.An Ingo Schwarze , 991*95c635efSGarrett D'Amore.Mt schwarze@openbsd.org . 992