xref: /titanic_53/usr/src/man/man5/eqn.5 (revision 260e9a87725c090ba5835b1f9f0b62fa2f96036f)
1*260e9a87SYuri Pankov.\"	$Id: eqn.7,v 1.34 2015/03/09 20:17:23 schwarze Exp $
2*260e9a87SYuri Pankov.\"
3*260e9a87SYuri Pankov.\" Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
4*260e9a87SYuri Pankov.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
595c635efSGarrett D'Amore.\"
695c635efSGarrett D'Amore.\" Permission to use, copy, modify, and distribute this software for any
795c635efSGarrett D'Amore.\" purpose with or without fee is hereby granted, provided that the above
895c635efSGarrett D'Amore.\" copyright notice and this permission notice appear in all copies.
995c635efSGarrett D'Amore.\"
1095c635efSGarrett D'Amore.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1195c635efSGarrett D'Amore.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1295c635efSGarrett D'Amore.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1395c635efSGarrett D'Amore.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1495c635efSGarrett D'Amore.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1595c635efSGarrett D'Amore.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1695c635efSGarrett D'Amore.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1795c635efSGarrett D'Amore.\"
18*260e9a87SYuri Pankov.Dd $Mdocdate: March 9 2015 $
1995c635efSGarrett D'Amore.Dt EQN 5
2095c635efSGarrett D'Amore.Os
2195c635efSGarrett D'Amore.Sh NAME
2295c635efSGarrett D'Amore.Nm eqn
2395c635efSGarrett D'Amore.Nd eqn language reference for mandoc
2495c635efSGarrett D'Amore.Sh DESCRIPTION
2595c635efSGarrett D'AmoreThe
2695c635efSGarrett D'Amore.Nm eqn
2795c635efSGarrett D'Amorelanguage is an equation-formatting language.
2895c635efSGarrett D'AmoreIt is used within
2995c635efSGarrett D'Amore.Xr mdoc 5
3095c635efSGarrett D'Amoreand
3195c635efSGarrett D'Amore.Xr man 5
3295c635efSGarrett D'Amore.Ux
3395c635efSGarrett D'Amoremanual pages.
3495c635efSGarrett D'AmoreIt describes the
3595c635efSGarrett D'Amore.Em structure
3695c635efSGarrett D'Amoreof an equation, not its mathematical meaning.
3795c635efSGarrett D'AmoreThis manual describes the
3895c635efSGarrett D'Amore.Nm
3995c635efSGarrett D'Amorelanguage accepted by the
4095c635efSGarrett D'Amore.Xr mandoc 1
41*260e9a87SYuri Pankovutility, which corresponds to the Second Edition
42*260e9a87SYuri Pankov.Nm
43*260e9a87SYuri Pankovspecification (see
4495c635efSGarrett D'Amore.Sx SEE ALSO
4595c635efSGarrett D'Amorefor references).
4695c635efSGarrett D'Amore.Pp
4795c635efSGarrett D'AmoreEquations within
4895c635efSGarrett D'Amore.Xr mdoc 5
4995c635efSGarrett D'Amoreor
5095c635efSGarrett D'Amore.Xr man 5
5195c635efSGarrett D'Amoredocuments are enclosed by the standalone
5295c635efSGarrett D'Amore.Sq \&.EQ
5395c635efSGarrett D'Amoreand
5495c635efSGarrett D'Amore.Sq \&.EN
5595c635efSGarrett D'Amoretags.
5695c635efSGarrett D'AmoreEquations are multi-line blocks consisting of formulas and control
5795c635efSGarrett D'Amorestatements.
5895c635efSGarrett D'Amore.Sh EQUATION STRUCTURE
5995c635efSGarrett D'AmoreEach equation is bracketed by
6095c635efSGarrett D'Amore.Sq \&.EQ
6195c635efSGarrett D'Amoreand
6295c635efSGarrett D'Amore.Sq \&.EN
6395c635efSGarrett D'Amorestrings.
6495c635efSGarrett D'Amore.Em Note :
6595c635efSGarrett D'Amorethese are not the same as
66*260e9a87SYuri Pankov.Xr mandoc_roff 5
6795c635efSGarrett D'Amoremacros, and may only be invoked as
6895c635efSGarrett D'Amore.Sq \&.EQ .
6995c635efSGarrett D'Amore.Pp
7095c635efSGarrett D'AmoreThe equation grammar is as follows, where quoted strings are
7195c635efSGarrett D'Amorecase-sensitive literals in the input:
7295c635efSGarrett D'Amore.Bd -literal -offset indent
7395c635efSGarrett D'Amoreeqn     : box | eqn box
7495c635efSGarrett D'Amorebox     : text
75*260e9a87SYuri Pankov        | \(dq{\(dq eqn \(dq}\(dq
76*260e9a87SYuri Pankov        | \(dqdefine\(dq text text
77*260e9a87SYuri Pankov        | \(dqndefine\(dq text text
78*260e9a87SYuri Pankov        | \(dqtdefine\(dq text text
79*260e9a87SYuri Pankov        | \(dqgfont\(dq text
80*260e9a87SYuri Pankov        | \(dqgsize\(dq text
81*260e9a87SYuri Pankov        | \(dqset\(dq text text
82*260e9a87SYuri Pankov        | \(dqundef\(dq text
83*260e9a87SYuri Pankov        | \(dqsqrt\(dq box
8495c635efSGarrett D'Amore        | box pos box
8595c635efSGarrett D'Amore        | box mark
86*260e9a87SYuri Pankov        | \(dqmatrix\(dq \(dq{\(dq [col \(dq{\(dq list \(dq}\(dq ]*
87*260e9a87SYuri Pankov        | pile \(dq{\(dq list \(dq}\(dq
8895c635efSGarrett D'Amore        | font box
89*260e9a87SYuri Pankov        | \(dqsize\(dq text box
90*260e9a87SYuri Pankov        | \(dqleft\(dq text eqn [\(dqright\(dq text]
91*260e9a87SYuri Pankovcol     : \(dqlcol\(dq | \(dqrcol\(dq | \(dqccol\(dq | \(dqcol\(dq
92*260e9a87SYuri Pankovtext    : [^space\e\(dq]+ | \e\(dq.*\e\(dq
93*260e9a87SYuri Pankovpile    : \(dqlpile\(dq | \(dqcpile\(dq | \(dqrpile\(dq | \(dqpile\(dq
94*260e9a87SYuri Pankovpos     : \(dqover\(dq | \(dqsup\(dq | \(dqsub\(dq | \(dqto\(dq | \(dqfrom\(dq
95*260e9a87SYuri Pankovmark	: \(dqdot\(dq | \(dqdotdot\(dq | \(dqhat\(dq | \(dqtilde\(dq | \(dqvec\(dq
96*260e9a87SYuri Pankov        | \(dqdyad\(dq | \(dqbar\(dq | \(dqunder\(dq
97*260e9a87SYuri Pankovfont    : \(dqroman\(dq | \(dqitalic\(dq | \(dqbold\(dq | \(dqfat\(dq
9895c635efSGarrett D'Amorelist    : eqn
99*260e9a87SYuri Pankov        | list \(dqabove\(dq eqn
10095c635efSGarrett D'Amorespace   : [\e^~ \et]
10195c635efSGarrett D'Amore.Ed
10295c635efSGarrett D'Amore.Pp
10395c635efSGarrett D'AmoreWhite-space consists of the space, tab, circumflex, and tilde
10495c635efSGarrett D'Amorecharacters.
105*260e9a87SYuri PankovIt is required to delimit tokens consisting of alphabetic characters
106*260e9a87SYuri Pankovand it is ignored at other places.
107*260e9a87SYuri PankovBraces and quotes also delimit tokens.
10895c635efSGarrett D'AmoreIf within a quoted string, these space characters are retained.
109*260e9a87SYuri PankovQuoted strings are also not scanned for keywords, glyph names,
110*260e9a87SYuri Pankovand expansion of definitions.
111*260e9a87SYuri PankovTo print a literal quote character, it can be prepended with a
112*260e9a87SYuri Pankovbackslash or expressed with the \e(dq escape sequence.
113*260e9a87SYuri Pankov.Pp
114*260e9a87SYuri PankovSubequations can be enclosed in braces to pass them as arguments
115*260e9a87SYuri Pankovto operation keywords, overriding standard operation precedence.
116*260e9a87SYuri PankovBraces can be nested.
117*260e9a87SYuri PankovTo set a brace verbatim, it needs to be enclosed in quotes.
11895c635efSGarrett D'Amore.Pp
11995c635efSGarrett D'AmoreThe following text terms are translated into a rendered glyph, if
12095c635efSGarrett D'Amoreavailable: alpha, beta, chi, delta, epsilon, eta, gamma, iota, kappa,
12195c635efSGarrett D'Amorelambda, mu, nu, omega, omicron, phi, pi, psi, rho, sigma, tau, theta,
12295c635efSGarrett D'Amoreupsilon, xi, zeta, DELTA, GAMMA, LAMBDA, OMEGA, PHI, PI, PSI, SIGMA,
12395c635efSGarrett D'AmoreTHETA, UPSILON, XI, inter (intersection), union (union), prod (product),
12495c635efSGarrett D'Amoreint (integral), sum (summation), grad (gradient), del (vector
125*260e9a87SYuri Pankovdifferential), times (multiply), cdot (center-dot), nothing (zero-width
12695c635efSGarrett D'Amorespace), approx (approximately equals), prime (prime), half (one-half),
12795c635efSGarrett D'Amorepartial (partial differential), inf (infinity), >> (much greater), <<
128*260e9a87SYuri Pankov(much less), \-> (left arrow), <\- (right arrow), +\- (plus-minus), !=
12995c635efSGarrett D'Amore(not equal), == (equivalence), <= (less-than-equal), and >=
13095c635efSGarrett D'Amore(more-than-equal).
131*260e9a87SYuri PankovThe character escape sequences documented in
132*260e9a87SYuri Pankov.Xr mandoc_char 5
133*260e9a87SYuri Pankovcan be used, too.
13495c635efSGarrett D'Amore.Pp
13595c635efSGarrett D'AmoreThe following control statements are available:
13695c635efSGarrett D'Amore.Bl -tag -width Ds
13795c635efSGarrett D'Amore.It Cm define
13895c635efSGarrett D'AmoreReplace all occurrences of a key with a value.
13995c635efSGarrett D'AmoreIts syntax is as follows:
14095c635efSGarrett D'Amore.Pp
141*260e9a87SYuri Pankov.D1 Cm define Ar key cvalc
14295c635efSGarrett D'Amore.Pp
14395c635efSGarrett D'AmoreThe first character of the value string,
14495c635efSGarrett D'Amore.Ar c ,
14595c635efSGarrett D'Amoreis used as the delimiter for the value
14695c635efSGarrett D'Amore.Ar val .
14795c635efSGarrett D'AmoreThis allows for arbitrary enclosure of terms (not just quotes), such as
14895c635efSGarrett D'Amore.Pp
149*260e9a87SYuri Pankov.D1 Cm define Ar foo 'bar baz'
150*260e9a87SYuri Pankov.D1 Cm define Ar foo cbar bazc
15195c635efSGarrett D'Amore.Pp
15295c635efSGarrett D'AmoreIt is an error to have an empty
15395c635efSGarrett D'Amore.Ar key
15495c635efSGarrett D'Amoreor
15595c635efSGarrett D'Amore.Ar val .
15695c635efSGarrett D'AmoreNote that a quoted
15795c635efSGarrett D'Amore.Ar key
15895c635efSGarrett D'Amorecauses errors in some
15995c635efSGarrett D'Amore.Nm
16095c635efSGarrett D'Amoreimplementations and should not be considered portable.
16195c635efSGarrett D'AmoreIt is not expanded for replacements.
16295c635efSGarrett D'AmoreDefinitions may refer to other definitions; these are evaluated
16395c635efSGarrett D'Amorerecursively when text replacement occurs and not when the definition is
16495c635efSGarrett D'Amorecreated.
16595c635efSGarrett D'Amore.Pp
16695c635efSGarrett D'AmoreDefinitions can create arbitrary strings, for example, the following is
16795c635efSGarrett D'Amorea legal construction.
16895c635efSGarrett D'Amore.Bd -literal -offset indent
16995c635efSGarrett D'Amoredefine foo 'define'
17095c635efSGarrett D'Amorefoo bar 'baz'
17195c635efSGarrett D'Amore.Ed
17295c635efSGarrett D'Amore.Pp
17395c635efSGarrett D'AmoreSelf-referencing definitions will raise an error.
17495c635efSGarrett D'AmoreThe
17595c635efSGarrett D'Amore.Cm ndefine
17695c635efSGarrett D'Amorestatement is a synonym for
17795c635efSGarrett D'Amore.Cm define ,
17895c635efSGarrett D'Amorewhile
17995c635efSGarrett D'Amore.Cm tdefine
18095c635efSGarrett D'Amoreis discarded.
18195c635efSGarrett D'Amore.It Cm gfont
18295c635efSGarrett D'AmoreSet the default font of subsequent output.
18395c635efSGarrett D'AmoreIts syntax is as follows:
18495c635efSGarrett D'Amore.Pp
185*260e9a87SYuri Pankov.D1 Cm gfont Ar font
18695c635efSGarrett D'Amore.Pp
187*260e9a87SYuri PankovIn mandoc, this value is discarded.
18895c635efSGarrett D'Amore.It Cm gsize
18995c635efSGarrett D'AmoreSet the default size of subsequent output.
19095c635efSGarrett D'AmoreIts syntax is as follows:
19195c635efSGarrett D'Amore.Pp
192*260e9a87SYuri Pankov.D1 Cm gsize Oo +|\- Oc Ns Ar size
19395c635efSGarrett D'Amore.Pp
19495c635efSGarrett D'AmoreThe
19595c635efSGarrett D'Amore.Ar size
19695c635efSGarrett D'Amorevalue should be an integer.
197*260e9a87SYuri PankovIf prepended by a sign,
198*260e9a87SYuri Pankovthe font size is changed relative to the current size.
19995c635efSGarrett D'Amore.It Cm set
20095c635efSGarrett D'AmoreSet an equation mode.
201*260e9a87SYuri PankovIn mandoc, both arguments are thrown away.
20295c635efSGarrett D'AmoreIts syntax is as follows:
20395c635efSGarrett D'Amore.Pp
204*260e9a87SYuri Pankov.D1 Cm set Ar key val
20595c635efSGarrett D'Amore.Pp
20695c635efSGarrett D'AmoreThe
20795c635efSGarrett D'Amore.Ar key
20895c635efSGarrett D'Amoreand
20995c635efSGarrett D'Amore.Ar val
21095c635efSGarrett D'Amoreare not expanded for replacements.
21195c635efSGarrett D'AmoreThis statement is a GNU extension.
21295c635efSGarrett D'Amore.It Cm undef
21395c635efSGarrett D'AmoreUnset a previously-defined key.
21495c635efSGarrett D'AmoreIts syntax is as follows:
21595c635efSGarrett D'Amore.Pp
216*260e9a87SYuri Pankov.D1 Cm define Ar key
21795c635efSGarrett D'Amore.Pp
21895c635efSGarrett D'AmoreOnce invoked, the definition for
21995c635efSGarrett D'Amore.Ar key
22095c635efSGarrett D'Amoreis discarded.
22195c635efSGarrett D'AmoreThe
22295c635efSGarrett D'Amore.Ar key
22395c635efSGarrett D'Amoreis not expanded for replacements.
22495c635efSGarrett D'AmoreThis statement is a GNU extension.
22595c635efSGarrett D'Amore.El
226*260e9a87SYuri Pankov.Pp
227*260e9a87SYuri PankovOperation keywords have the following semantics:
228*260e9a87SYuri Pankov.Bl -tag -width Ds
229*260e9a87SYuri Pankov.It Cm above
230*260e9a87SYuri PankovSee
231*260e9a87SYuri Pankov.Cm pile .
232*260e9a87SYuri Pankov.It Cm bar
233*260e9a87SYuri PankovDraw a line over the preceding box.
234*260e9a87SYuri Pankov.It Cm bold
235*260e9a87SYuri PankovSet the following box using bold font.
236*260e9a87SYuri Pankov.It Cm ccol
237*260e9a87SYuri PankovLike
238*260e9a87SYuri Pankov.Cm cpile ,
239*260e9a87SYuri Pankovbut for use in
240*260e9a87SYuri Pankov.Cm matrix .
241*260e9a87SYuri Pankov.It Cm cpile
242*260e9a87SYuri PankovLike
243*260e9a87SYuri Pankov.Cm pile ,
244*260e9a87SYuri Pankovbut with slightly increased vertical spacing.
245*260e9a87SYuri Pankov.It Cm dot
246*260e9a87SYuri PankovSet a single dot over the preceding box.
247*260e9a87SYuri Pankov.It Cm dotdot
248*260e9a87SYuri PankovSet two dots (dieresis) over the preceding box.
249*260e9a87SYuri Pankov.It Cm dyad
250*260e9a87SYuri PankovSet a dyad symbol (left-right arrow) over the preceding box.
251*260e9a87SYuri Pankov.It Cm fat
252*260e9a87SYuri PankovA synonym for
253*260e9a87SYuri Pankov.Cm bold .
254*260e9a87SYuri Pankov.It Cm font
255*260e9a87SYuri PankovSet the second argument using the font specified by the first argument;
256*260e9a87SYuri Pankovcurrently not recognized by the
25795c635efSGarrett D'Amore.Xr mandoc 1
25895c635efSGarrett D'Amore.Nm
259*260e9a87SYuri Pankovparser.
260*260e9a87SYuri Pankov.It Cm from
261*260e9a87SYuri PankovSet the following box below the preceding box,
262*260e9a87SYuri Pankovusing a slightly smaller font.
263*260e9a87SYuri PankovUsed for sums, integrals, limits, and the like.
264*260e9a87SYuri Pankov.It Cm hat
265*260e9a87SYuri PankovSet a hat (circumflex) over the preceding box.
266*260e9a87SYuri Pankov.It Cm italic
267*260e9a87SYuri PankovSet the following box using italic font.
268*260e9a87SYuri Pankov.It Cm lcol
269*260e9a87SYuri PankovLike
270*260e9a87SYuri Pankov.Cm lpile ,
271*260e9a87SYuri Pankovbut for use in
272*260e9a87SYuri Pankov.Cm matrix .
273*260e9a87SYuri Pankov.It Cm left
274*260e9a87SYuri PankovSet the first argument as a big left delimiter before the second argument.
275*260e9a87SYuri PankovAs an optional third argument,
276*260e9a87SYuri Pankov.Cm right
277*260e9a87SYuri Pankovcan follow.
278*260e9a87SYuri PankovIn that case, the fourth argument is set as a big right delimiter after
279*260e9a87SYuri Pankovthe second argument.
280*260e9a87SYuri Pankov.It Cm lpile
281*260e9a87SYuri PankovLike
282*260e9a87SYuri Pankov.Cm cpile ,
283*260e9a87SYuri Pankovbut subequations are left-justified.
284*260e9a87SYuri Pankov.It Cm matrix
285*260e9a87SYuri PankovFollowed by a list of columns enclosed in braces.
286*260e9a87SYuri PankovAll columns need to have the same number of subequations.
287*260e9a87SYuri PankovThe columns are set as a matrix.
288*260e9a87SYuri PankovThe difference compared to multiple subsequent
289*260e9a87SYuri Pankov.Cm pile
290*260e9a87SYuri Pankovoperators is that in a
291*260e9a87SYuri Pankov.Cm matrix ,
292*260e9a87SYuri Pankovcorresponding subequations in all columns line up horizontally,
293*260e9a87SYuri Pankovwhile each
294*260e9a87SYuri Pankov.Cm pile
295*260e9a87SYuri Pankovdoes vertical spacing independently.
296*260e9a87SYuri Pankov.It Cm over
297*260e9a87SYuri PankovSet a fraction.
298*260e9a87SYuri PankovThe preceding box is the numerator, the following box is the denominator.
299*260e9a87SYuri Pankov.It Cm pile
300*260e9a87SYuri PankovFollowed by a list of subequations enclosed in braces,
301*260e9a87SYuri Pankovthe subequations being separated by
302*260e9a87SYuri Pankov.Cm above
303*260e9a87SYuri Pankovkeywords.
304*260e9a87SYuri PankovSets the subequations one above the other, each of them centered.
305*260e9a87SYuri PankovTypically used to represent vectors in coordinate representation.
306*260e9a87SYuri Pankov.It Cm rcol
307*260e9a87SYuri PankovLike
308*260e9a87SYuri Pankov.Cm rpile ,
309*260e9a87SYuri Pankovbut for use in
310*260e9a87SYuri Pankov.Cm matrix .
311*260e9a87SYuri Pankov.It Cm right
312*260e9a87SYuri PankovSee
313*260e9a87SYuri Pankov.Cm left ;
314*260e9a87SYuri Pankov.Cm right
315*260e9a87SYuri Pankovcannot be used without
316*260e9a87SYuri Pankov.Cm left .
317*260e9a87SYuri PankovTo set a big right delimiter without a big left delimiter, the following
318*260e9a87SYuri Pankovconstruction can be used:
319*260e9a87SYuri Pankov.Pp
320*260e9a87SYuri Pankov.D1 Cm left No \(dq\(dq Ar box Cm right Ar delimiter
321*260e9a87SYuri Pankov.It Cm roman
322*260e9a87SYuri PankovSet the following box using the default font.
323*260e9a87SYuri Pankov.It Cm rpile
324*260e9a87SYuri PankovLike
325*260e9a87SYuri Pankov.Cm cpile ,
326*260e9a87SYuri Pankovbut subequations are right-justified.
327*260e9a87SYuri Pankov.It Cm size
328*260e9a87SYuri PankovSet the second argument with the font size specified by the first
329*260e9a87SYuri Pankovargument; currently ignored by
330*260e9a87SYuri Pankov.Xr mandoc 1 .
331*260e9a87SYuri PankovBy prepending a plus or minus sign to the first argument,
332*260e9a87SYuri Pankovthe font size can be selected relative to the current size.
333*260e9a87SYuri Pankov.It Cm sqrt
334*260e9a87SYuri PankovSet the square root of the following box.
335*260e9a87SYuri Pankov.It Cm sub
336*260e9a87SYuri PankovSet the following box as a subscript to the preceding box.
337*260e9a87SYuri Pankov.It Cm sup
338*260e9a87SYuri PankovSet the following box as a superscript to the preceding box.
339*260e9a87SYuri PankovAs a special case, if a
340*260e9a87SYuri Pankov.Cm sup
341*260e9a87SYuri Pankovclause immediately follows a
342*260e9a87SYuri Pankov.Cm sub
343*260e9a87SYuri Pankovclause as in
344*260e9a87SYuri Pankov.Pp
345*260e9a87SYuri Pankov.D1 Ar mainbox Cm sub Ar subbox Cm sup Ar supbox
346*260e9a87SYuri Pankov.Pp
347*260e9a87SYuri Pankovboth are set with respect to the same
348*260e9a87SYuri Pankov.Ar mainbox ,
349*260e9a87SYuri Pankovthat is,
350*260e9a87SYuri Pankov.Ar supbox
351*260e9a87SYuri Pankovis set above
352*260e9a87SYuri Pankov.Ar subbox .
353*260e9a87SYuri Pankov.It Cm tilde
354*260e9a87SYuri PankovSet a tilde over the preceding box.
355*260e9a87SYuri Pankov.It Cm to
356*260e9a87SYuri PankovSet the following box above the preceding box,
357*260e9a87SYuri Pankovusing a slightly smaller font.
358*260e9a87SYuri PankovUsed for sums and integrals and the like.
359*260e9a87SYuri PankovAs a special case, if a
360*260e9a87SYuri Pankov.Cm to
361*260e9a87SYuri Pankovclause immediately follows a
362*260e9a87SYuri Pankov.Cm from
363*260e9a87SYuri Pankovclause as in
364*260e9a87SYuri Pankov.Pp
365*260e9a87SYuri Pankov.D1 Ar mainbox Cm from Ar frombox Cm to Ar tobox
366*260e9a87SYuri Pankov.Pp
367*260e9a87SYuri Pankovboth are set below and above the same
368*260e9a87SYuri Pankov.Ar mainbox .
369*260e9a87SYuri Pankov.It Cm under
370*260e9a87SYuri PankovUnderline the preceding box.
371*260e9a87SYuri Pankov.It Cm vec
372*260e9a87SYuri PankovSet a vector symbol (right arrow) over the preceding box.
373*260e9a87SYuri Pankov.El
374*260e9a87SYuri Pankov.Pp
375*260e9a87SYuri PankovThe binary operations
376*260e9a87SYuri Pankov.Cm from ,
377*260e9a87SYuri Pankov.Cm to ,
378*260e9a87SYuri Pankov.Cm sub ,
379*260e9a87SYuri Pankovand
380*260e9a87SYuri Pankov.Cm sup
381*260e9a87SYuri Pankovgroup to the right, that is,
382*260e9a87SYuri Pankov.Pp
383*260e9a87SYuri Pankov.D1 Ar mainbox Cm sup Ar supbox Cm sub Ar subbox
384*260e9a87SYuri Pankov.Pp
385*260e9a87SYuri Pankovis the same as
386*260e9a87SYuri Pankov.Pp
387*260e9a87SYuri Pankov.D1 Ar mainbox Cm sup Brq Ar supbox Cm sub Ar subbox
388*260e9a87SYuri Pankov.Pp
389*260e9a87SYuri Pankovand different from
390*260e9a87SYuri Pankov.Pp
391*260e9a87SYuri Pankov.D1 Bro Ar mainbox Cm sup Ar supbox Brc Cm sub Ar subbox .
392*260e9a87SYuri Pankov.Pp
393*260e9a87SYuri PankovBy contrast,
394*260e9a87SYuri Pankov.Cm over
395*260e9a87SYuri Pankovgroups to the left.
396*260e9a87SYuri Pankov.Pp
397*260e9a87SYuri PankovIn the following list, earlier operations bind more tightly than
398*260e9a87SYuri Pankovlater operations:
399*260e9a87SYuri Pankov.Pp
400*260e9a87SYuri Pankov.Bl -enum -compact
401*260e9a87SYuri Pankov.It
402*260e9a87SYuri Pankov.Cm dyad ,
403*260e9a87SYuri Pankov.Cm vec ,
404*260e9a87SYuri Pankov.Cm under ,
405*260e9a87SYuri Pankov.Cm bar ,
406*260e9a87SYuri Pankov.Cm tilde ,
407*260e9a87SYuri Pankov.Cm hat ,
408*260e9a87SYuri Pankov.Cm dot ,
409*260e9a87SYuri Pankov.Cm dotdot
410*260e9a87SYuri Pankov.It
411*260e9a87SYuri Pankov.Cm fat ,
412*260e9a87SYuri Pankov.Cm roman ,
413*260e9a87SYuri Pankov.Cm italic ,
414*260e9a87SYuri Pankov.Cm bold ,
415*260e9a87SYuri Pankov.Cm size
416*260e9a87SYuri Pankov.It
417*260e9a87SYuri Pankov.Cm sub ,
418*260e9a87SYuri Pankov.Cm sup
419*260e9a87SYuri Pankov.It
420*260e9a87SYuri Pankov.Cm sqrt
421*260e9a87SYuri Pankov.It
422*260e9a87SYuri Pankov.Cm over
423*260e9a87SYuri Pankov.It
424*260e9a87SYuri Pankov.Cm from ,
425*260e9a87SYuri Pankov.Cm to
426*260e9a87SYuri Pankov.El
427*260e9a87SYuri Pankov.Sh COMPATIBILITY
428*260e9a87SYuri PankovThis section documents the compatibility of mandoc
429*260e9a87SYuri Pankov.Nm
430*260e9a87SYuri Pankovand the troff
43195c635efSGarrett D'Amore.Nm
43295c635efSGarrett D'Amoreimplementation (including GNU troff).
43395c635efSGarrett D'Amore.Pp
43495c635efSGarrett D'Amore.Bl -dash -compact
43595c635efSGarrett D'Amore.It
43695c635efSGarrett D'AmoreThe text string
437*260e9a87SYuri Pankov.Sq \e\(dq
438*260e9a87SYuri Pankovis interpreted as a literal quote in troff.
439*260e9a87SYuri PankovIn mandoc, this is interpreted as a comment.
44095c635efSGarrett D'Amore.It
441*260e9a87SYuri PankovIn troff, The circumflex and tilde white-space symbols map to
44295c635efSGarrett D'Amorefixed-width spaces.
443*260e9a87SYuri PankovIn mandoc, these characters are synonyms for the space character.
44495c635efSGarrett D'Amore.It
445*260e9a87SYuri PankovThe troff implementation of
44695c635efSGarrett D'Amore.Nm
44795c635efSGarrett D'Amoreallows for equation alignment with the
44895c635efSGarrett D'Amore.Cm mark
44995c635efSGarrett D'Amoreand
45095c635efSGarrett D'Amore.Cm lineup
45195c635efSGarrett D'Amoretokens.
452*260e9a87SYuri Pankovmandoc discards these tokens.
45395c635efSGarrett D'AmoreThe
45495c635efSGarrett D'Amore.Cm back Ar n ,
45595c635efSGarrett D'Amore.Cm fwd Ar n ,
45695c635efSGarrett D'Amore.Cm up Ar n ,
45795c635efSGarrett D'Amoreand
45895c635efSGarrett D'Amore.Cm down Ar n
45995c635efSGarrett D'Amorecommands are also ignored.
46095c635efSGarrett D'Amore.El
46195c635efSGarrett D'Amore.Sh SEE ALSO
46295c635efSGarrett D'Amore.Xr mandoc 1 ,
46395c635efSGarrett D'Amore.Xr man 5 ,
46495c635efSGarrett D'Amore.Xr mandoc_char 5 ,
465*260e9a87SYuri Pankov.Xr mandoc_roff 5 ,
466*260e9a87SYuri Pankov.Xr mdoc 5
46795c635efSGarrett D'Amore.Rs
46895c635efSGarrett D'Amore.%A Brian W. Kernighan
46995c635efSGarrett D'Amore.%A Lorinda L. Cherry
47095c635efSGarrett D'Amore.%T System for Typesetting Mathematics
47195c635efSGarrett D'Amore.%J Communications of the ACM
47295c635efSGarrett D'Amore.%V 18
47395c635efSGarrett D'Amore.%P 151\(en157
47495c635efSGarrett D'Amore.%D March, 1975
47595c635efSGarrett D'Amore.Re
47695c635efSGarrett D'Amore.Rs
47795c635efSGarrett D'Amore.%A Brian W. Kernighan
47895c635efSGarrett D'Amore.%A Lorinda L. Cherry
47995c635efSGarrett D'Amore.%T Typesetting Mathematics, User's Guide
48095c635efSGarrett D'Amore.%D 1976
48195c635efSGarrett D'Amore.Re
48295c635efSGarrett D'Amore.Rs
48395c635efSGarrett D'Amore.%A Brian W. Kernighan
48495c635efSGarrett D'Amore.%A Lorinda L. Cherry
48595c635efSGarrett D'Amore.%T Typesetting Mathematics, User's Guide (Second Edition)
48695c635efSGarrett D'Amore.%D 1978
48795c635efSGarrett D'Amore.Re
48895c635efSGarrett D'Amore.Sh HISTORY
48995c635efSGarrett D'AmoreThe eqn utility, a preprocessor for troff, was originally written by
49095c635efSGarrett D'AmoreBrian W. Kernighan and Lorinda L. Cherry in 1975.
49195c635efSGarrett D'AmoreThe GNU reimplementation of eqn, part of the GNU troff package, was
49295c635efSGarrett D'Amorereleased in 1989 by James Clark.
49395c635efSGarrett D'AmoreThe eqn component of
49495c635efSGarrett D'Amore.Xr mandoc 1
49595c635efSGarrett D'Amorewas added in 2011.
49695c635efSGarrett D'Amore.Sh AUTHORS
49795c635efSGarrett D'AmoreThis
49895c635efSGarrett D'Amore.Nm
49995c635efSGarrett D'Amorereference was written by
500*260e9a87SYuri Pankov.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .
501