1*bbf21555SRichard Lowe.\" $Id: eqn.7,v 1.39 2020/01/10 11:55:04 schwarze Exp $ 2*bbf21555SRichard Lowe.\" 3*bbf21555SRichard Lowe.\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> 4*bbf21555SRichard Lowe.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> 5*bbf21555SRichard Lowe.\" 6*bbf21555SRichard Lowe.\" Permission to use, copy, modify, and distribute this software for any 7*bbf21555SRichard Lowe.\" purpose with or without fee is hereby granted, provided that the above 8*bbf21555SRichard Lowe.\" copyright notice and this permission notice appear in all copies. 9*bbf21555SRichard Lowe.\" 10*bbf21555SRichard Lowe.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11*bbf21555SRichard Lowe.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12*bbf21555SRichard Lowe.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13*bbf21555SRichard Lowe.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14*bbf21555SRichard Lowe.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15*bbf21555SRichard Lowe.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16*bbf21555SRichard Lowe.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17*bbf21555SRichard Lowe.\" 18*bbf21555SRichard Lowe.Dd $Mdocdate: January 10 2020 $ 19*bbf21555SRichard Lowe.Dt EQN 7 20*bbf21555SRichard Lowe.Os 21*bbf21555SRichard Lowe.Sh NAME 22*bbf21555SRichard Lowe.Nm eqn 23*bbf21555SRichard Lowe.Nd eqn language reference for mandoc 24*bbf21555SRichard Lowe.Sh DESCRIPTION 25*bbf21555SRichard LoweThe 26*bbf21555SRichard Lowe.Nm eqn 27*bbf21555SRichard Lowelanguage is an equation-formatting language. 28*bbf21555SRichard LoweIt is used within 29*bbf21555SRichard Lowe.Xr mdoc 7 30*bbf21555SRichard Loweand 31*bbf21555SRichard Lowe.Xr man 7 32*bbf21555SRichard Lowe.Ux 33*bbf21555SRichard Lowemanual pages. 34*bbf21555SRichard LoweIt describes the 35*bbf21555SRichard Lowe.Em structure 36*bbf21555SRichard Loweof an equation, not its mathematical meaning. 37*bbf21555SRichard LoweThis manual describes the 38*bbf21555SRichard Lowe.Nm 39*bbf21555SRichard Lowelanguage accepted by the 40*bbf21555SRichard Lowe.Xr mandoc 1 41*bbf21555SRichard Loweutility, which corresponds to the Second Edition 42*bbf21555SRichard Lowe.Nm 43*bbf21555SRichard Lowespecification (see 44*bbf21555SRichard Lowe.Sx SEE ALSO 45*bbf21555SRichard Lowefor references). 46*bbf21555SRichard Lowe.Pp 47*bbf21555SRichard LoweAn equation starts with an input line containing exactly the characters 48*bbf21555SRichard Lowe.Sq \&.EQ , 49*bbf21555SRichard Lowemay contain multiple input lines, and ends with an input line 50*bbf21555SRichard Lowecontaining exactly the characters 51*bbf21555SRichard Lowe.Sq \&.EN . 52*bbf21555SRichard LoweEquivalently, an equation can be given in the middle of a single 53*bbf21555SRichard Lowetext input line by surrounding it with the equation delimiters 54*bbf21555SRichard Lowedefined with the 55*bbf21555SRichard Lowe.Cm delim 56*bbf21555SRichard Lowestatement. 57*bbf21555SRichard Lowe.Pp 58*bbf21555SRichard LoweThe equation grammar is as follows, where quoted strings are 59*bbf21555SRichard Lowecase-sensitive literals in the input: 60*bbf21555SRichard Lowe.Bd -literal -offset indent 61*bbf21555SRichard Loweeqn : box | eqn box 62*bbf21555SRichard Lowebox : text 63*bbf21555SRichard Lowe | \(dq{\(dq eqn \(dq}\(dq 64*bbf21555SRichard Lowe | \(dqdefine\(dq text text 65*bbf21555SRichard Lowe | \(dqndefine\(dq text text 66*bbf21555SRichard Lowe | \(dqtdefine\(dq text text 67*bbf21555SRichard Lowe | \(dqgfont\(dq text 68*bbf21555SRichard Lowe | \(dqgsize\(dq text 69*bbf21555SRichard Lowe | \(dqset\(dq text text 70*bbf21555SRichard Lowe | \(dqundef\(dq text 71*bbf21555SRichard Lowe | \(dqsqrt\(dq box 72*bbf21555SRichard Lowe | box pos box 73*bbf21555SRichard Lowe | box mark 74*bbf21555SRichard Lowe | \(dqmatrix\(dq \(dq{\(dq [col \(dq{\(dq list \(dq}\(dq]* \(dq}\(dq 75*bbf21555SRichard Lowe | pile \(dq{\(dq list \(dq}\(dq 76*bbf21555SRichard Lowe | font box 77*bbf21555SRichard Lowe | \(dqsize\(dq text box 78*bbf21555SRichard Lowe | \(dqleft\(dq text eqn [\(dqright\(dq text] 79*bbf21555SRichard Lowecol : \(dqlcol\(dq | \(dqrcol\(dq | \(dqccol\(dq | \(dqcol\(dq 80*bbf21555SRichard Lowetext : [^space\e\(dq]+ | \e\(dq.*\e\(dq 81*bbf21555SRichard Lowepile : \(dqlpile\(dq | \(dqcpile\(dq | \(dqrpile\(dq | \(dqpile\(dq 82*bbf21555SRichard Lowepos : \(dqover\(dq | \(dqsup\(dq | \(dqsub\(dq | \(dqto\(dq | \(dqfrom\(dq 83*bbf21555SRichard Lowemark : \(dqdot\(dq | \(dqdotdot\(dq | \(dqhat\(dq | \(dqtilde\(dq | \(dqvec\(dq 84*bbf21555SRichard Lowe | \(dqdyad\(dq | \(dqbar\(dq | \(dqunder\(dq 85*bbf21555SRichard Lowefont : \(dqroman\(dq | \(dqitalic\(dq | \(dqbold\(dq | \(dqfat\(dq 86*bbf21555SRichard Lowelist : eqn 87*bbf21555SRichard Lowe | list \(dqabove\(dq eqn 88*bbf21555SRichard Lowespace : [\e^~ \et] 89*bbf21555SRichard Lowe.Ed 90*bbf21555SRichard Lowe.Pp 91*bbf21555SRichard LoweWhite-space consists of the space, tab, circumflex, and tilde 92*bbf21555SRichard Lowecharacters. 93*bbf21555SRichard LoweIt is required to delimit tokens consisting of alphabetic characters 94*bbf21555SRichard Loweand it is ignored at other places. 95*bbf21555SRichard LoweBraces and quotes also delimit tokens. 96*bbf21555SRichard LoweIf within a quoted string, these space characters are retained. 97*bbf21555SRichard LoweQuoted strings are also not scanned for keywords, glyph names, 98*bbf21555SRichard Loweand expansion of definitions. 99*bbf21555SRichard LoweTo print a literal quote character, it can be prepended with a 100*bbf21555SRichard Lowebackslash or expressed with the \e(dq escape sequence. 101*bbf21555SRichard Lowe.Pp 102*bbf21555SRichard LoweSubequations can be enclosed in braces to pass them as arguments 103*bbf21555SRichard Loweto operation keywords, overriding standard operation precedence. 104*bbf21555SRichard LoweBraces can be nested. 105*bbf21555SRichard LoweTo set a brace verbatim, it needs to be enclosed in quotes. 106*bbf21555SRichard Lowe.Pp 107*bbf21555SRichard LoweThe following text terms are translated into a rendered glyph, if 108*bbf21555SRichard Loweavailable: alpha, beta, chi, delta, epsilon, eta, gamma, iota, kappa, 109*bbf21555SRichard Lowelambda, mu, nu, omega, omicron, phi, pi, psi, rho, sigma, tau, theta, 110*bbf21555SRichard Loweupsilon, xi, zeta, DELTA, GAMMA, LAMBDA, OMEGA, PHI, PI, PSI, SIGMA, 111*bbf21555SRichard LoweTHETA, UPSILON, XI, inter (intersection), union (union), prod (product), 112*bbf21555SRichard Loweint (integral), sum (summation), grad (gradient), del (vector 113*bbf21555SRichard Lowedifferential), times (multiply), cdot (center-dot), nothing (zero-width 114*bbf21555SRichard Lowespace), approx (approximately equals), prime (prime), half (one-half), 115*bbf21555SRichard Lowepartial (partial differential), inf (infinity), >> (much greater), << 116*bbf21555SRichard Lowe(much less), <\- (left arrow), \-> (right arrow), +\- (plus-minus), != 117*bbf21555SRichard Lowe(not equal), == (equivalence), <= (less-than-equal), and >= 118*bbf21555SRichard Lowe(more-than-equal). 119*bbf21555SRichard LoweThe character escape sequences documented in 120*bbf21555SRichard Lowe.Xr mandoc_char 7 121*bbf21555SRichard Lowecan be used, too. 122*bbf21555SRichard Lowe.Pp 123*bbf21555SRichard LoweThe following control statements are available: 124*bbf21555SRichard Lowe.Bl -tag -width Ds 125*bbf21555SRichard Lowe.It Cm define 126*bbf21555SRichard LoweReplace all occurrences of a key with a value. 127*bbf21555SRichard LoweIts syntax is as follows: 128*bbf21555SRichard Lowe.Pp 129*bbf21555SRichard Lowe.D1 Cm define Ar key cvalc 130*bbf21555SRichard Lowe.Pp 131*bbf21555SRichard LoweThe first character of the value string, 132*bbf21555SRichard Lowe.Ar c , 133*bbf21555SRichard Loweis used as the delimiter for the value 134*bbf21555SRichard Lowe.Ar val . 135*bbf21555SRichard LoweThis allows for arbitrary enclosure of terms (not just quotes), such as 136*bbf21555SRichard Lowe.Pp 137*bbf21555SRichard Lowe.D1 Cm define Ar foo \(aqbar baz\(aq 138*bbf21555SRichard Lowe.D1 Cm define Ar foo cbar bazc 139*bbf21555SRichard Lowe.Pp 140*bbf21555SRichard LoweIt is an error to have an empty 141*bbf21555SRichard Lowe.Ar key 142*bbf21555SRichard Loweor 143*bbf21555SRichard Lowe.Ar val . 144*bbf21555SRichard LoweNote that a quoted 145*bbf21555SRichard Lowe.Ar key 146*bbf21555SRichard Lowecauses errors in some 147*bbf21555SRichard Lowe.Nm 148*bbf21555SRichard Loweimplementations and should not be considered portable. 149*bbf21555SRichard LoweIt is not expanded for replacements. 150*bbf21555SRichard LoweDefinitions may refer to other definitions; these are evaluated 151*bbf21555SRichard Lowerecursively when text replacement occurs and not when the definition is 152*bbf21555SRichard Lowecreated. 153*bbf21555SRichard Lowe.Pp 154*bbf21555SRichard LoweDefinitions can create arbitrary strings, for example, the following is 155*bbf21555SRichard Lowea legal construction. 156*bbf21555SRichard Lowe.Bd -literal -offset indent 157*bbf21555SRichard Lowedefine foo \(aqdefine\(aq 158*bbf21555SRichard Lowefoo bar \(aqbaz\(aq 159*bbf21555SRichard Lowe.Ed 160*bbf21555SRichard Lowe.Pp 161*bbf21555SRichard LoweSelf-referencing definitions will raise an error. 162*bbf21555SRichard LoweThe 163*bbf21555SRichard Lowe.Cm ndefine 164*bbf21555SRichard Lowestatement is a synonym for 165*bbf21555SRichard Lowe.Cm define , 166*bbf21555SRichard Lowewhile 167*bbf21555SRichard Lowe.Cm tdefine 168*bbf21555SRichard Loweis discarded. 169*bbf21555SRichard Lowe.It Cm delim 170*bbf21555SRichard LoweThis statement takes a string argument consisting of two bytes, 171*bbf21555SRichard Loweto be used as the opening and closing delimiters for equations 172*bbf21555SRichard Lowein the middle of text input lines. 173*bbf21555SRichard LoweConventionally, the dollar sign is used for both delimiters, 174*bbf21555SRichard Loweas follows: 175*bbf21555SRichard Lowe.Bd -literal -offset indent 176*bbf21555SRichard Lowe\&.EQ 177*bbf21555SRichard Lowedelim $$ 178*bbf21555SRichard Lowe\&.EN 179*bbf21555SRichard LoweAn equation like $sin pi = 0$ can now be entered 180*bbf21555SRichard Lowein the middle of a text input line. 181*bbf21555SRichard Lowe.Ed 182*bbf21555SRichard Lowe.Pp 183*bbf21555SRichard LoweThe special statement 184*bbf21555SRichard Lowe.Cm delim off 185*bbf21555SRichard Lowetemporarily disables previously declared delimiters and 186*bbf21555SRichard Lowe.Cm delim on 187*bbf21555SRichard Lowereenables them. 188*bbf21555SRichard Lowe.It Cm gfont 189*bbf21555SRichard LoweSet the default font of subsequent output. 190*bbf21555SRichard LoweIts syntax is as follows: 191*bbf21555SRichard Lowe.Pp 192*bbf21555SRichard Lowe.D1 Cm gfont Ar font 193*bbf21555SRichard Lowe.Pp 194*bbf21555SRichard LoweIn mandoc, this value is discarded. 195*bbf21555SRichard Lowe.It Cm gsize 196*bbf21555SRichard LoweSet the default size of subsequent output. 197*bbf21555SRichard LoweIts syntax is as follows: 198*bbf21555SRichard Lowe.Pp 199*bbf21555SRichard Lowe.D1 Cm gsize Oo +|\- Oc Ns Ar size 200*bbf21555SRichard Lowe.Pp 201*bbf21555SRichard LoweThe 202*bbf21555SRichard Lowe.Ar size 203*bbf21555SRichard Lowevalue should be an integer. 204*bbf21555SRichard LoweIf prepended by a sign, 205*bbf21555SRichard Lowethe font size is changed relative to the current size. 206*bbf21555SRichard Lowe.It Cm set 207*bbf21555SRichard LoweSet an equation mode. 208*bbf21555SRichard LoweIn mandoc, both arguments are thrown away. 209*bbf21555SRichard LoweIts syntax is as follows: 210*bbf21555SRichard Lowe.Pp 211*bbf21555SRichard Lowe.D1 Cm set Ar key val 212*bbf21555SRichard Lowe.Pp 213*bbf21555SRichard LoweThe 214*bbf21555SRichard Lowe.Ar key 215*bbf21555SRichard Loweand 216*bbf21555SRichard Lowe.Ar val 217*bbf21555SRichard Loweare not expanded for replacements. 218*bbf21555SRichard LoweThis statement is a GNU extension. 219*bbf21555SRichard Lowe.It Cm undef 220*bbf21555SRichard LoweUnset a previously-defined key. 221*bbf21555SRichard LoweIts syntax is as follows: 222*bbf21555SRichard Lowe.Pp 223*bbf21555SRichard Lowe.D1 Cm define Ar key 224*bbf21555SRichard Lowe.Pp 225*bbf21555SRichard LoweOnce invoked, the definition for 226*bbf21555SRichard Lowe.Ar key 227*bbf21555SRichard Loweis discarded. 228*bbf21555SRichard LoweThe 229*bbf21555SRichard Lowe.Ar key 230*bbf21555SRichard Loweis not expanded for replacements. 231*bbf21555SRichard LoweThis statement is a GNU extension. 232*bbf21555SRichard Lowe.El 233*bbf21555SRichard Lowe.Pp 234*bbf21555SRichard LoweOperation keywords have the following semantics: 235*bbf21555SRichard Lowe.Bl -tag -width Ds 236*bbf21555SRichard Lowe.It Cm above 237*bbf21555SRichard LoweSee 238*bbf21555SRichard Lowe.Cm pile . 239*bbf21555SRichard Lowe.It Cm bar 240*bbf21555SRichard LoweDraw a line over the preceding box. 241*bbf21555SRichard Lowe.It Cm bold 242*bbf21555SRichard LoweSet the following box using bold font. 243*bbf21555SRichard Lowe.It Cm ccol 244*bbf21555SRichard LoweLike 245*bbf21555SRichard Lowe.Cm cpile , 246*bbf21555SRichard Lowebut for use in 247*bbf21555SRichard Lowe.Cm matrix . 248*bbf21555SRichard Lowe.It Cm cpile 249*bbf21555SRichard LoweLike 250*bbf21555SRichard Lowe.Cm pile , 251*bbf21555SRichard Lowebut with slightly increased vertical spacing. 252*bbf21555SRichard Lowe.It Cm dot 253*bbf21555SRichard LoweSet a single dot over the preceding box. 254*bbf21555SRichard Lowe.It Cm dotdot 255*bbf21555SRichard LoweSet two dots (dieresis) over the preceding box. 256*bbf21555SRichard Lowe.It Cm dyad 257*bbf21555SRichard LoweSet a dyad symbol (left-right arrow) over the preceding box. 258*bbf21555SRichard Lowe.It Cm fat 259*bbf21555SRichard LoweA synonym for 260*bbf21555SRichard Lowe.Cm bold . 261*bbf21555SRichard Lowe.It Cm font 262*bbf21555SRichard LoweSet the second argument using the font specified by the first argument; 263*bbf21555SRichard Lowecurrently not recognized by the 264*bbf21555SRichard Lowe.Xr mandoc 1 265*bbf21555SRichard Lowe.Nm 266*bbf21555SRichard Loweparser. 267*bbf21555SRichard Lowe.It Cm from 268*bbf21555SRichard LoweSet the following box below the preceding box, 269*bbf21555SRichard Loweusing a slightly smaller font. 270*bbf21555SRichard LoweUsed for sums, integrals, limits, and the like. 271*bbf21555SRichard Lowe.It Cm hat 272*bbf21555SRichard LoweSet a hat (circumflex) over the preceding box. 273*bbf21555SRichard Lowe.It Cm italic 274*bbf21555SRichard LoweSet the following box using italic font. 275*bbf21555SRichard Lowe.It Cm lcol 276*bbf21555SRichard LoweLike 277*bbf21555SRichard Lowe.Cm lpile , 278*bbf21555SRichard Lowebut for use in 279*bbf21555SRichard Lowe.Cm matrix . 280*bbf21555SRichard Lowe.It Cm left 281*bbf21555SRichard LoweSet the first argument as a big left delimiter before the second argument. 282*bbf21555SRichard LoweAs an optional third argument, 283*bbf21555SRichard Lowe.Cm right 284*bbf21555SRichard Lowecan follow. 285*bbf21555SRichard LoweIn that case, the fourth argument is set as a big right delimiter after 286*bbf21555SRichard Lowethe second argument. 287*bbf21555SRichard Lowe.It Cm lpile 288*bbf21555SRichard LoweLike 289*bbf21555SRichard Lowe.Cm cpile , 290*bbf21555SRichard Lowebut subequations are left-justified. 291*bbf21555SRichard Lowe.It Cm matrix 292*bbf21555SRichard LoweFollowed by a list of columns enclosed in braces. 293*bbf21555SRichard LoweAll columns need to have the same number of subequations. 294*bbf21555SRichard LoweThe columns are set as a matrix. 295*bbf21555SRichard LoweThe difference compared to multiple subsequent 296*bbf21555SRichard Lowe.Cm pile 297*bbf21555SRichard Loweoperators is that in a 298*bbf21555SRichard Lowe.Cm matrix , 299*bbf21555SRichard Lowecorresponding subequations in all columns line up horizontally, 300*bbf21555SRichard Lowewhile each 301*bbf21555SRichard Lowe.Cm pile 302*bbf21555SRichard Lowedoes vertical spacing independently. 303*bbf21555SRichard Lowe.It Cm over 304*bbf21555SRichard LoweSet a fraction. 305*bbf21555SRichard LoweThe preceding box is the numerator, the following box is the denominator. 306*bbf21555SRichard Lowe.It Cm pile 307*bbf21555SRichard LoweFollowed by a list of subequations enclosed in braces, 308*bbf21555SRichard Lowethe subequations being separated by 309*bbf21555SRichard Lowe.Cm above 310*bbf21555SRichard Lowekeywords. 311*bbf21555SRichard LoweSets the subequations one above the other, each of them centered. 312*bbf21555SRichard LoweTypically used to represent vectors in coordinate representation. 313*bbf21555SRichard Lowe.It Cm rcol 314*bbf21555SRichard LoweLike 315*bbf21555SRichard Lowe.Cm rpile , 316*bbf21555SRichard Lowebut for use in 317*bbf21555SRichard Lowe.Cm matrix . 318*bbf21555SRichard Lowe.It Cm right 319*bbf21555SRichard LoweSee 320*bbf21555SRichard Lowe.Cm left ; 321*bbf21555SRichard Lowe.Cm right 322*bbf21555SRichard Lowecannot be used without 323*bbf21555SRichard Lowe.Cm left . 324*bbf21555SRichard LoweTo set a big right delimiter without a big left delimiter, the following 325*bbf21555SRichard Loweconstruction can be used: 326*bbf21555SRichard Lowe.Pp 327*bbf21555SRichard Lowe.D1 Cm left No \(dq\(dq Ar box Cm right Ar delimiter 328*bbf21555SRichard Lowe.It Cm roman 329*bbf21555SRichard LoweSet the following box using the default font. 330*bbf21555SRichard Lowe.It Cm rpile 331*bbf21555SRichard LoweLike 332*bbf21555SRichard Lowe.Cm cpile , 333*bbf21555SRichard Lowebut subequations are right-justified. 334*bbf21555SRichard Lowe.It Cm size 335*bbf21555SRichard LoweSet the second argument with the font size specified by the first 336*bbf21555SRichard Loweargument; currently ignored by 337*bbf21555SRichard Lowe.Xr mandoc 1 . 338*bbf21555SRichard LoweBy prepending a plus or minus sign to the first argument, 339*bbf21555SRichard Lowethe font size can be selected relative to the current size. 340*bbf21555SRichard Lowe.It Cm sqrt 341*bbf21555SRichard LoweSet the square root of the following box. 342*bbf21555SRichard Lowe.It Cm sub 343*bbf21555SRichard LoweSet the following box as a subscript to the preceding box. 344*bbf21555SRichard Lowe.It Cm sup 345*bbf21555SRichard LoweSet the following box as a superscript to the preceding box. 346*bbf21555SRichard LoweAs a special case, if a 347*bbf21555SRichard Lowe.Cm sup 348*bbf21555SRichard Loweclause immediately follows a 349*bbf21555SRichard Lowe.Cm sub 350*bbf21555SRichard Loweclause as in 351*bbf21555SRichard Lowe.Pp 352*bbf21555SRichard Lowe.D1 Ar mainbox Cm sub Ar subbox Cm sup Ar supbox 353*bbf21555SRichard Lowe.Pp 354*bbf21555SRichard Loweboth are set with respect to the same 355*bbf21555SRichard Lowe.Ar mainbox , 356*bbf21555SRichard Lowethat is, 357*bbf21555SRichard Lowe.Ar supbox 358*bbf21555SRichard Loweis set above 359*bbf21555SRichard Lowe.Ar subbox . 360*bbf21555SRichard Lowe.It Cm tilde 361*bbf21555SRichard LoweSet a tilde over the preceding box. 362*bbf21555SRichard Lowe.It Cm to 363*bbf21555SRichard LoweSet the following box above the preceding box, 364*bbf21555SRichard Loweusing a slightly smaller font. 365*bbf21555SRichard LoweUsed for sums and integrals and the like. 366*bbf21555SRichard LoweAs a special case, if a 367*bbf21555SRichard Lowe.Cm to 368*bbf21555SRichard Loweclause immediately follows a 369*bbf21555SRichard Lowe.Cm from 370*bbf21555SRichard Loweclause as in 371*bbf21555SRichard Lowe.Pp 372*bbf21555SRichard Lowe.D1 Ar mainbox Cm from Ar frombox Cm to Ar tobox 373*bbf21555SRichard Lowe.Pp 374*bbf21555SRichard Loweboth are set below and above the same 375*bbf21555SRichard Lowe.Ar mainbox . 376*bbf21555SRichard Lowe.It Cm under 377*bbf21555SRichard LoweUnderline the preceding box. 378*bbf21555SRichard Lowe.It Cm vec 379*bbf21555SRichard LoweSet a vector symbol (right arrow) over the preceding box. 380*bbf21555SRichard Lowe.El 381*bbf21555SRichard Lowe.Pp 382*bbf21555SRichard LoweThe binary operations 383*bbf21555SRichard Lowe.Cm from , 384*bbf21555SRichard Lowe.Cm to , 385*bbf21555SRichard Lowe.Cm sub , 386*bbf21555SRichard Loweand 387*bbf21555SRichard Lowe.Cm sup 388*bbf21555SRichard Lowegroup to the right, that is, 389*bbf21555SRichard Lowe.Pp 390*bbf21555SRichard Lowe.D1 Ar mainbox Cm sup Ar supbox Cm sub Ar subbox 391*bbf21555SRichard Lowe.Pp 392*bbf21555SRichard Loweis the same as 393*bbf21555SRichard Lowe.Pp 394*bbf21555SRichard Lowe.D1 Ar mainbox Cm sup Brq Ar supbox Cm sub Ar subbox 395*bbf21555SRichard Lowe.Pp 396*bbf21555SRichard Loweand different from 397*bbf21555SRichard Lowe.Pp 398*bbf21555SRichard Lowe.D1 Bro Ar mainbox Cm sup Ar supbox Brc Cm sub Ar subbox . 399*bbf21555SRichard Lowe.Pp 400*bbf21555SRichard LoweBy contrast, 401*bbf21555SRichard Lowe.Cm over 402*bbf21555SRichard Lowegroups to the left. 403*bbf21555SRichard Lowe.Pp 404*bbf21555SRichard LoweIn the following list, earlier operations bind more tightly than 405*bbf21555SRichard Lowelater operations: 406*bbf21555SRichard Lowe.Pp 407*bbf21555SRichard Lowe.Bl -enum -compact 408*bbf21555SRichard Lowe.It 409*bbf21555SRichard Lowe.Cm dyad , 410*bbf21555SRichard Lowe.Cm vec , 411*bbf21555SRichard Lowe.Cm under , 412*bbf21555SRichard Lowe.Cm bar , 413*bbf21555SRichard Lowe.Cm tilde , 414*bbf21555SRichard Lowe.Cm hat , 415*bbf21555SRichard Lowe.Cm dot , 416*bbf21555SRichard Lowe.Cm dotdot 417*bbf21555SRichard Lowe.It 418*bbf21555SRichard Lowe.Cm fat , 419*bbf21555SRichard Lowe.Cm roman , 420*bbf21555SRichard Lowe.Cm italic , 421*bbf21555SRichard Lowe.Cm bold , 422*bbf21555SRichard Lowe.Cm size 423*bbf21555SRichard Lowe.It 424*bbf21555SRichard Lowe.Cm sub , 425*bbf21555SRichard Lowe.Cm sup 426*bbf21555SRichard Lowe.It 427*bbf21555SRichard Lowe.Cm sqrt 428*bbf21555SRichard Lowe.It 429*bbf21555SRichard Lowe.Cm over 430*bbf21555SRichard Lowe.It 431*bbf21555SRichard Lowe.Cm from , 432*bbf21555SRichard Lowe.Cm to 433*bbf21555SRichard Lowe.El 434*bbf21555SRichard Lowe.Sh COMPATIBILITY 435*bbf21555SRichard LoweThis section documents the compatibility of mandoc 436*bbf21555SRichard Lowe.Nm 437*bbf21555SRichard Loweand the troff 438*bbf21555SRichard Lowe.Nm 439*bbf21555SRichard Loweimplementation (including GNU troff). 440*bbf21555SRichard Lowe.Pp 441*bbf21555SRichard Lowe.Bl -dash -compact 442*bbf21555SRichard Lowe.It 443*bbf21555SRichard LoweThe text string 444*bbf21555SRichard Lowe.Sq \e\(dq 445*bbf21555SRichard Loweis interpreted as a literal quote in troff. 446*bbf21555SRichard LoweIn mandoc, this is interpreted as a comment. 447*bbf21555SRichard Lowe.It 448*bbf21555SRichard LoweIn troff, The circumflex and tilde white-space symbols map to 449*bbf21555SRichard Lowefixed-width spaces. 450*bbf21555SRichard LoweIn mandoc, these characters are synonyms for the space character. 451*bbf21555SRichard Lowe.It 452*bbf21555SRichard LoweThe troff implementation of 453*bbf21555SRichard Lowe.Nm 454*bbf21555SRichard Loweallows for equation alignment with the 455*bbf21555SRichard Lowe.Cm mark 456*bbf21555SRichard Loweand 457*bbf21555SRichard Lowe.Cm lineup 458*bbf21555SRichard Lowetokens. 459*bbf21555SRichard Lowemandoc discards these tokens. 460*bbf21555SRichard LoweThe 461*bbf21555SRichard Lowe.Cm back Ar n , 462*bbf21555SRichard Lowe.Cm fwd Ar n , 463*bbf21555SRichard Lowe.Cm up Ar n , 464*bbf21555SRichard Loweand 465*bbf21555SRichard Lowe.Cm down Ar n 466*bbf21555SRichard Lowecommands are also ignored. 467*bbf21555SRichard Lowe.El 468*bbf21555SRichard Lowe.Sh SEE ALSO 469*bbf21555SRichard Lowe.Xr mandoc 1 , 470*bbf21555SRichard Lowe.Xr man 7 , 471*bbf21555SRichard Lowe.Xr mandoc_char 7 , 472*bbf21555SRichard Lowe.Xr mandoc_roff 7 , 473*bbf21555SRichard Lowe.Xr mdoc 7 474*bbf21555SRichard Lowe.Rs 475*bbf21555SRichard Lowe.%A Brian W. Kernighan 476*bbf21555SRichard Lowe.%A Lorinda L. Cherry 477*bbf21555SRichard Lowe.%T System for Typesetting Mathematics 478*bbf21555SRichard Lowe.%J Communications of the ACM 479*bbf21555SRichard Lowe.%V 18 480*bbf21555SRichard Lowe.%P pp. 151\(en157 481*bbf21555SRichard Lowe.%D March, 1975 482*bbf21555SRichard Lowe.Re 483*bbf21555SRichard Lowe.Rs 484*bbf21555SRichard Lowe.%A Brian W. Kernighan 485*bbf21555SRichard Lowe.%A Lorinda L. Cherry 486*bbf21555SRichard Lowe.%T Typesetting Mathematics, User's Guide 487*bbf21555SRichard Lowe.%D 1976 488*bbf21555SRichard Lowe.Re 489*bbf21555SRichard Lowe.Rs 490*bbf21555SRichard Lowe.%A Brian W. Kernighan 491*bbf21555SRichard Lowe.%A Lorinda L. Cherry 492*bbf21555SRichard Lowe.%T Typesetting Mathematics, User's Guide (Second Edition) 493*bbf21555SRichard Lowe.%D 1978 494*bbf21555SRichard Lowe.Re 495*bbf21555SRichard Lowe.Sh HISTORY 496*bbf21555SRichard LoweThe eqn utility, a preprocessor for troff, was originally written by 497*bbf21555SRichard LoweBrian W. Kernighan and Lorinda L. Cherry in 1975. 498*bbf21555SRichard LoweThe GNU reimplementation of eqn, part of the GNU troff package, was 499*bbf21555SRichard Lowereleased in 1989 by James Clark. 500*bbf21555SRichard LoweThe eqn component of 501*bbf21555SRichard Lowe.Xr mandoc 1 502*bbf21555SRichard Lowewas added in 2011. 503*bbf21555SRichard Lowe.Sh AUTHORS 504*bbf21555SRichard LoweThis 505*bbf21555SRichard Lowe.Nm 506*bbf21555SRichard Lowereference was written by 507*bbf21555SRichard Lowe.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv . 508