1 .TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
3 @g@eqn \- format equations for troff or MathML
8 Copyright \[co] 1989-2014 Free Software Foundation, Inc.
10 Permission is granted to make and distribute verbatim copies of
11 this manual provided the copyright notice and this permission notice
12 are preserved on all copies.
14 Permission is granted to copy and distribute modified versions of this
15 manual under the conditions for verbatim copying, provided that the
16 entire resulting derived work is distributed under the terms of a
17 permission notice identical to this one.
19 Permission is granted to copy and distribute translations of this
20 manual into another language, under the above conditions for modified
21 versions, except that this permission notice may be included in
22 translations approved by the Free Software Foundation instead of in
27 . ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
32 .\" Like TP, but if specified indent is more than half
33 .\" the current line-length - indent, use the default indent.
35 . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
39 .\" The BSD man macros can't handle " in arguments to font change macros,
40 .\" so use \(ts instead of ".
44 .\" --------------------------------------------------------------------
46 .\" --------------------------------------------------------------------
57 .RI [ files\|.\|.\|. ]
61 .\" --------------------------------------------------------------------
63 .\" --------------------------------------------------------------------
65 This manual page describes the GNU version of
67 which is part of the groff document formatting system.
70 compiles descriptions of equations embedded within
72 input files into commands that are understood by
75 Normally, it should be invoked using the
80 The syntax is quite compatible with Unix eqn.
84 cannot be processed with Unix troff;
85 it must be processed with GNU troff.
87 If no files are given on the command line, the standard input is read.
91 causes the standard input to be read.
98 in the directories given with the
100 option first, then in
101 .BR @SYSTEMMACRODIR@ ,
102 .BR @LOCALMACRODIR@ ,
103 and finally in the standard macro directory
108 processes it before the other input files.
112 option prevents this.
118 does not provide the functionality of neqn:
119 it does not support low-resolution, typewriter-like devices
120 (although it may work adequately for very simple input).
123 .\" --------------------------------------------------------------------
125 .\" --------------------------------------------------------------------
128 It is possible to have whitespace between a command line option and its
137 for the left and right end, respectively, of in-line equations.
141 statements in the source file overrides this.
149 even when followed by a character other than space or newline.
152 .RB \[oq] "delim on" \[cq]
153 is not handled specially.
157 Don\[aq]t allow newlines within delimiters.
161 to recover better from missing closing delimiters.
165 Print the version number.
169 Only one size reduction.
173 The minimum point-size is\~\c
177 does not reduce the size of subscripts or superscripts to
178 a smaller size than\~\c
183 The output is for device
186 Normally, the only effect of this is to define a macro
191 uses this to provide definitions appropriate for the output device.
193 However, if the specified device is \[lq]MathML\[rq], the output is
194 MathML markup rather than troff commands, and
196 is not loaded at all.
198 The default output device is
207 before the default directories.
216 This is equivalent to a
222 This is equivalent to a
226 This option is deprecated.
228 normally sets equations at whatever the current point size
229 is when the equation is encountered.
233 This says that subscripts and superscripts should be
235 points smaller than the surrounding text.
237 This option is deprecated.
241 sets subscripts and superscripts at 70% of the size of the surrounding
245 .\" --------------------------------------------------------------------
247 .\" --------------------------------------------------------------------
249 Only the differences between GNU
251 and Unix eqn are described here.
257 emits Presentation MathML output when invoked with the
263 GNU eqn sets the input token
265 as three periods or low dots, rather than the three centered dots of
266 classic eqn. To get three centered dots, write
269 .BR "cdot cdot cdot".
273 Most of the new features of the GNU
275 input language are based on \*(tx.
277 There are some references to the differences between \*(tx and GNU
280 these may safely be ignored if you do not know \*(tx.
283 .\" --------------------------------------------------------------------
284 .SS Controlling delimiters
285 .\" --------------------------------------------------------------------
287 If not in compatibility mode,
297 to restore the delimiters which have been previously disabled
299 .RB \[oq] "delim off" \[cq].
301 If delimiters haven\[aq]t been specified, the call has no effect.
304 .\" --------------------------------------------------------------------
305 .SS Automatic spacing
306 .\" --------------------------------------------------------------------
309 gives each component of an equation a type, and adjusts the spacing
310 between components using that type.
315 .TP \w'punctuation'u+2n
316 ordinary an ordinary character such as \[oq]1\[cq] or \[oq]\c
321 a large operator such as
322 .ds Su \[oq]\s+5\(*S\s0\[cq]
323 .if \n(.g .if !c\(*S .ds Su the summation operator
328 a binary operator such as \[oq]\[pl]\[cq];
332 a relation such as \[oq]=\[cq];
336 a opening bracket such as \[oq](\[cq];
340 a closing bracket such as \[oq])\[cq];
344 a punctuation character such as \[oq],\[cl];
348 a subformula contained within brackets;
352 that suppresses automatic spacing adjustment.
357 Components of an equation
358 get a type in one of two ways.
362 This yields an equation component that contains\~\c
364 but that has type\~\c
368 is one of the types mentioned above.
381 The name of the type doesn\[aq]t have to be quoted, but quoting protects
382 from macro expansion.
385 .BI chartype\ t\ text
386 Unquoted groups of characters are split up into individual characters,
387 and the type of each character is looked up;
388 this changes the type that is stored for each character;
389 it says that the characters in
391 from now on have type\~\c
398 chartype "punctuation" .,;:
402 would make the characters \[oq].,;:\[cq] have type punctuation
403 whenever they subsequently appeared in an equation.
413 changes the font type of the characters.
420 .\" --------------------------------------------------------------------
422 .\" --------------------------------------------------------------------
426 Enlarges the expression it modifies; intended to have semantics like
429 In troff output, the point size is increased by\~5; in MathML output,
435 <mstyle \%mathsize='big'>
440 .IB e1\ smallover\ e2
448 it also puts less vertical space between
452 and the fraction bar.
456 primitive corresponds to the \*(tx
458 primitive in display styles;
462 in non-display styles.
466 This vertically centers
470 The math axis is the vertical position about which characters such as
471 \[oq]\[pl]\[]cq and \[oq]\[mi]\[cq] are centered; also it is the
472 vertical position used for the bar of fractions.
481 { type "operator" vcenter size +5 \e(*S }
485 (Note that vcenter is silently ignored when generating MathML.)
494 is assumed to be at the correct height for a lowercase letter;
496 is moved down according to whether
498 is taller or shorter than a lowercase letter.
517 are also defined using the
528 is assumed to be at the correct height for a character without a descender;
537 as a tilde accent below the baseline.
540 .BI split\ \(ts text \(ts
541 This has the same effect as simply
551 is not subject to macro expansion because it is quoted;
553 is split up and the spacing between individual characters is adjusted.
557 This has the same effect as
567 is not quoted it is subject to macro expansion;
570 and the spacing between individual characters is not adjusted.
576 that acts as an operator on\~\c
579 It produces a different result from
582 .BR A\ opprime\ sub\ 1 :
587 is tucked under the prime as a subscript to the\~\c
589 (as is conventional in mathematical typesetting),
594 is a subscript to the prime character.
598 is the same as that of
602 which is higher than that of everything except
607 In unquoted text a\~\c
609 that is not the first character is treated like
614 This constructs a new object from\~\c
617 .BR @g@troff (@MAN1EXT@)
621 When the macro is called,
624 contains the output for\~\c
626 and the number registers
633 contain the width, height, depth, subscript kern, and skew of\~\c
638 of an object says how much a subscript on that object should be tucked in;
641 of an object says how far to the right of the center of the object an
642 accent over the object should be placed.)
644 The macro must modify
646 so that it outputs the desired result with its origin at the current
647 point, and increase the current horizontal position by the width
650 The number registers must also be modified so that they correspond to the
654 For example, suppose you wanted a construct that \[oq]cancels\[cq] an
655 expression by drawing a diagonal line through it.
664 define cancel 'special Ca'
676 \eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\e
685 Then you could cancel an expression\~\c
688 .BI \%cancel\ {\ e\ }
691 Here\[aq]s a more complicated construct that draws a box round an
700 define box 'special Bx'
708 \eZ'\eh'1n'\e\e*(0s'\e
714 \eD'l \e\en(0wu+2n 0'\e
716 \eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e
718 \eD'l -\e\en(0wu-2n 0'\e
720 \eD'l 0 \e\en(0hu+\e\en(0du+2n'\e
738 A positive value of the integer\~\c
740 (in hundredths of an em) sets the vertical spacing before the
741 equation, a negative value sets the spacing after the equation,
742 replacing the default values.
744 This primitive provides an interface to
747 escape (but with opposite sign).
750 This keyword has no effect if the equation is part of a
755 .\" --------------------------------------------------------------------
756 .SS Extended primitives
757 .\" --------------------------------------------------------------------
760 .BI col\ n\ {\ .\|.\|.\ }
762 .BI ccol\ n\ {\ .\|.\|.\ }
764 .BI lcol\ n\ {\ .\|.\|.\ }
766 .BI rcol\ n\ {\ .\|.\|.\ }
768 .BI pile\ n\ {\ .\|.\|.\ }
770 .BI cpile\ n\ {\ .\|.\|.\ }
772 .BI lpile\ n\ {\ .\|.\|.\ }
774 .BI rpile\ n\ {\ .\|.\|.\ }
775 The integer value\~\c
777 (in hundredths of an em) increases the vertical spacing between rows,
781 escape (the value has no effect in MathML mode).
782 Negative values are possible but have no effect.
783 If there is more than a single value given in a matrix, the biggest one
787 .\" --------------------------------------------------------------------
789 .\" --------------------------------------------------------------------
793 is generating troff markup, the appearance of equations is controlled
794 by a large number of parameters.
796 They have no effect when generating MathML mode, which pushes
797 typesetting and fine motions downstream to a MathML rendering engine.
799 These parameters can be set using the
805 This sets parameter\~\c
823 should assume an x\~height of 0.45\~ems.
828 Possible parameters are as follows.
830 Values are in units of hundredths of an em unless otherwise stated.
832 These descriptions are intended to be expository rather than
836 . TP \w'\fBdefault_rule_thickness'u+2n
841 doesn\[aq]t set anything at a smaller point-size than this.
843 The value is in points.
849 primitive emboldens an equation by overprinting two copies of the
850 equation horizontally offset by this amount.
852 This parameter is not used in MathML mode; instead, fat text uses
857 <mstyle mathvariant='double-struck'>
863 A fraction bar is longer by twice this amount than
864 the maximum of the widths of the numerator and denominator;
865 in other words, it overhangs the numerator and
866 denominator by at least this amount.
874 is applied to a single character,
875 the line is this long.
881 produces a line whose length is the width of the object to which it applies;
882 in the case of a single character,
883 this tends to produce a line that looks too long.
887 Extensible delimiters produced with the
891 primitives have a combined height and depth of at least this many
892 thousandths of twice the maximum amount by which the sub-equation that
893 the delimiters enclose extends away from the axis.
896 .B delimiter_shortfall
897 Extensible delimiters produced with the
901 primitives have a combined height and depth not less than the
902 difference of twice the maximum amount by which the sub-equation that
903 the delimiters enclose extends away from the axis and this amount.
906 .B null_delimiter_space
907 This much horizontal space is inserted on each side of a fraction.
911 The width of subscripts and superscripts is increased by this amount.
915 This amount of space is automatically inserted after punctuation
920 This amount of space is automatically inserted on either side of
925 This amount of space is automatically inserted on either side of
930 The height of lowercase letters without ascenders such as \[oq]x\[cq].
934 The height above the baseline of the center of characters such as
935 \[oq]\[pl]\[cq] and \[oq]\[mi]\[cq].
937 It is important that this value is correct for the font
941 .B default_rule_thickness
942 This should set to the thickness of the
944 character, or the thickness of horizontal lines produced with the
952 command shifts up the numerator by at least this amount.
958 command shifts up the numerator by at least this amount.
964 command shifts down the denominator by at least this amount.
970 command shifts down the denominator by at least this amount.
974 Normally superscripts are shifted up by at least this amount.
978 Superscripts within superscripts or upper limits
981 fractions are shifted up by at least this amount.
983 This is usually less than sup1.
987 Superscripts within denominators or square roots
988 or subscripts or lower limits are shifted up by at least
991 This is usually less than sup2.
995 Subscripts are normally shifted down by at least this amount.
999 When there is both a subscript and a superscript, the subscript is
1000 shifted down by at least this amount.
1004 The baseline of a superscript is no more than this much amount below
1005 the top of the object on which the superscript is set.
1009 The baseline of a subscript is at least this much below the bottom of
1010 the object on which the subscript is set.
1014 The baseline of an upper limit is at least this much above the top of
1015 the object on which the limit is set.
1019 The baseline of a lower limit is at least this much below the bottom
1020 of the object on which the limit is set.
1024 The bottom of an upper limit is at least this much above the top of
1025 the object on which the limit is set.
1029 The top of a lower limit is at least this much below the bottom of the
1030 object on which the limit is set.
1034 This much vertical space is added above and below limits.
1038 The baselines of the rows in a pile or matrix are normally this far
1041 In most cases this should be equal to the sum of
1048 The midpoint between the top baseline and the bottom baseline in a
1049 matrix or pile is shifted down by this much from the axis.
1051 In most cases this should be equal to
1056 This much space is added between columns in a matrix.
1060 This much space is added at each side of a matrix.
1064 If this is non-zero, lines are drawn using the
1066 escape sequence, rather than with the
1068 escape sequence and the
1074 The amount by which the height of the equation exceeds this is added
1075 as extra space before the line containing the equation (using
1078 The default value is 85.
1082 The amount by which the depth of the equation exceeds this is added as
1083 extra space after the line containing the equation (using
1086 The default value is 35.
1090 If this is non-zero,
1097 is ignored, otherwise
1105 The default value is\~0 (This is typically changed to\~1 by the
1117 A more precise description of the role of many of these
1118 parameters can be found in Appendix\~H of
1119 .IR "The \*(txbook" .
1123 .\" --------------------------------------------------------------------
1125 .\" --------------------------------------------------------------------
1127 Macros can take arguments.
1133 is between 1 and\~9, is replaced by the
1135 argument if the macro is called with arguments;
1136 if there are fewer than
1138 arguments, it is replaced by nothing.
1140 A word containing a left parenthesis where the part of the word
1141 before the left parenthesis has been defined using the
1143 command is recognized as a macro call with arguments; characters
1144 following the left parenthesis up to a matching right parenthesis are
1145 treated as comma-separated arguments; commas inside nested parentheses
1146 do not terminate an argument.
1149 .BI sdefine\ name\ X\ anything\ X
1154 is not recognized if called with arguments.
1157 .BI include\ \(ts file \(ts
1159 .BI copy\ \(ts file \(ts
1160 Include the contents of
1176 .BI ifdef\ name\ X\ anything\ X
1181 (or has been automatically defined because
1183 is the output device) process
1189 can be any character not appearing in
1194 Remove definition of
1196 making it undefined.
1200 Besides the macros mentioned above, the following definitions are available:
1205 (this is the same as
1211 (three dots on the base line), and
1215 .\" --------------------------------------------------------------------
1217 .\" --------------------------------------------------------------------
1220 normally uses at least two fonts to set an equation:
1221 an italic font for letters,
1222 and a roman font for everything else.
1227 changes the font that is used as the italic font.
1229 By default this is\~\c
1231 The font that is used as the roman font can be changed using the new
1237 Set the roman font to\~\c
1244 primitive uses the current italic font set by
1248 primitive uses the current roman font set by
1253 command, which changes the font used by the
1262 primitives to changes fonts within an equation, you can change all the
1263 fonts used by your equations just by using
1272 You can control which characters are treated as letters
1273 (and therefore set in italics) by using the
1275 command described above.
1279 causes a character to be set in italic type.
1283 causes a character to be set in roman type.
1286 .\" --------------------------------------------------------------------
1288 .\" --------------------------------------------------------------------
1290 .Tp \w'\fB@MACRODIR@/eqnrc'u+2n
1292 Initialization file.
1295 .\" --------------------------------------------------------------------
1296 .SH MATHML MODE LIMITATIONS
1297 .\" --------------------------------------------------------------------
1299 MathML is designed on the assumption that it cannot know the exact
1300 physical characteristics of the media and devices on which it will
1303 It does not support fine control of motions and sizes to the same
1310 parameters have no effect on the generated MathML.
1320 operations cannot be implemented, and yield a MathML
1321 \[oq]<merror>\[cq] message instead.
1326 keyword is silently ignored, as centering on the math axis is the
1332 over troff sets extra large \(en notably the integral sign \(en may
1333 appear too small and need to have their \[oq]<mstyle>\[cq] wrappers
1338 As in its troff mode,
1340 in MathML mode leaves the
1344 delimiters in place for displayed equations, but emits no explicit
1345 delimiters around inline equations.
1347 They can, however, be recognized as strings that begin with
1348 \[oq]<math>\[cq] and end with \[oq]</math>\[cq] and do not cross line
1355 section for translation limits specific to
1359 .\" --------------------------------------------------------------------
1361 .\" --------------------------------------------------------------------
1363 Inline equations are set at the point size that is current at the
1364 beginning of the input line.
1372 features don\[aq]t work.
1374 These could, in theory, be implemented with \[oq]<maligngroup>\[cq]
1379 In MathML mode, each digit of a numeric literal gets a separate
1380 \[oq]<mn>\:</mn>\[cq] pair, and decimal points are tagged with
1381 \[oq]<mo>\:</mo>\[cq].
1383 This is allowed by the specification, but inefficient.
1386 .\" --------------------------------------------------------------------
1388 .\" --------------------------------------------------------------------
1390 .BR groff (@MAN1EXT@),
1391 .BR @g@troff (@MAN1EXT@),
1392 .BR @g@pic (@MAN1EXT@),
1393 .BR groff_font (@MAN5EXT@),
1397 .\" --------------------------------------------------------------------
1399 .\" --------------------------------------------------------------------
1404 .\" Local Variables: