2 Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc.
4 Permission is granted to make and distribute verbatim copies of
5 this manual provided the copyright notice and this permission notice
6 are preserved on all copies.
8 Permission is granted to copy and distribute modified versions of this
9 manual under the conditions for verbatim copying, provided that the
10 entire resulting derived work is distributed under the terms of a
11 permission notice identical to this one.
13 Permission is granted to copy and distribute translations of this
14 manual into another language, under the above conditions for modified
15 versions, except that this permission notice may be included in
16 translations approved by the Free Software Foundation instead of in
19 .ie \n(.V<\n(.v .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
21 .\" Like TP, but if specified indent is more than half
22 .\" the current line-length - indent, use the default indent.
24 .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
27 .\" The BSD man macros can't handle " in arguments to font change macros,
28 .\" so use \(ts instead of ".
30 .TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
32 @g@eqn \- format equations for troff
41 .ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
42 .el .RB "[\ " "\\$1" "\ ]"
52 .RI "[\ " files\|.\|.\|. "\ ]"
56 It is possible to have whitespace between a command line option and its
59 This manual page describes the GNU version of
61 which is part of the groff document formatting system.
63 compiles descriptions of equations embedded within
65 input files into commands that are understood by
67 Normally, it should be invoked using the
71 The syntax is quite compatible with Unix eqn.
72 The output of GNU eqn cannot be processed with Unix troff;
73 it must be processed with GNU troff.
74 If no files are given on the command line, the standard input
78 will cause the standard input to be read.
83 in the directories given with the
86 .BR @SYSTEMMACRODIR@ ,
88 and finally in the standard macro directory
90 If it exists, eqn will process it before the other input files.
95 GNU eqn does not provide the functionality of neqn:
96 it does not support low-resolution, typewriter-like devices
97 (although it may work adequately for very simple input).
105 for the left and right end, respectively, of in-line equations.
108 statements in the source file overrides this.
115 even when followed by a character other than space or newline.
118 Don't allow newlines within delimiters.
121 to recover better from missing closing delimiters.
124 Print the version number.
127 Only one size reduction.
130 The minimum point-size is
132 eqn will not reduce the size of subscripts or superscripts to
137 The output is for device
139 The only effect of this is to define a macro
145 will use this to provide definitions appropriate for the output device.
146 The default output device is
154 before the default directories.
161 This is equivalent to a
166 This is equivalent to a
169 This option is deprecated.
170 eqn will normally set equations at whatever the current point size
171 is when the equation is encountered.
174 This says that subscripts and superscripts should be
176 points smaller than the surrounding text.
177 This option is deprecated.
178 Normally eqn makes sets subscripts and superscripts at 70%
179 of the size of the surrounding text.
181 Only the differences between GNU eqn and Unix eqn are described here.
183 Most of the new features of GNU eqn
185 There are some references to the differences between \*(tx and GNU eqn below;
186 these may safely be ignored if you do not know \*(tx.
187 .SS Automatic spacing
190 gives each component of an equation a type, and adjusts the spacing
191 between components using that type.
193 .TP \w'punctuation'u+2n
195 an ordinary character such as 1 or
199 a large operator such as
201 .if \n(.g .if !c\(*S .ds Su the summation operator
205 a binary operator such as +;
208 a relation such as =;
211 a opening bracket such as (;
214 a closing bracket such as );
217 a punctuation character such as ,;
220 a subformula contained within brackets;
223 spacing that suppresses automatic spacing adjustment.
225 Components of an equation get a type in one of two ways.
228 This yields an equation component that contains
234 is one of the types mentioned above.
244 The name of the type doesn't have to be quoted, but quoting protects
245 from macro expansion.
247 .BI chartype\ t\ text
248 Unquoted groups of characters are split up into individual characters,
249 and the type of each character is looked up;
250 this changes the type that is stored for each character;
251 it says that the characters in
253 from now on have type
259 chartype "punctuation" .,;:
262 would make the characters
264 have type punctuation
265 whenever they subsequently appeared in an equation.
274 changes the font type of the characters.
275 See the Fonts subsection.
278 .IB e1\ smallover\ e2
286 it also puts less vertical space between
290 and the fraction bar.
293 primitive corresponds to the \*(tx
295 primitive in display styles;
299 in non-display styles.
302 This vertically centers
305 The math axis is the vertical position about which characters
306 such as + and - are centered; also it is the vertical position
307 used for the bar of fractions.
314 { type "operator" vcenter size +5 \e(*S }
323 is assumed to be at the correct height for a lowercase letter;
325 will be moved down according if
327 is taller or shorter than a lowercase letter.
343 are also defined using the
353 is assumed to be at the correct height for a character without a descender;
355 will be moved down if
361 as a tilde accent below the baseline.
363 .BI split\ \(ts text \(ts
364 This has the same effect as simply
372 is not subject to macro expansion because it is quoted;
374 will be split up and the spacing between individual characters
378 This has the same effect as
386 is not quoted it will be subject to macro expansion;
389 and the spacing between individual characters will not be adjusted.
394 that acts as an operator on
396 It produces a different result from
399 .BR A\ opprime\ sub\ 1 :
404 will be tucked under the prime as a subscript to the
406 (as is conventional in mathematical typesetting),
411 will be a subscript to the prime character.
414 is the same as that of
418 which is higher than that of everything except
424 that is not the first character will be treated like
428 This constructs a new object from
431 .BR @g@troff (@MAN1EXT@)
434 When the macro is called,
437 will contain the output for
439 and the number registers
446 will contain the width, height, depth, subscript kern, and skew of
450 of an object says how much a subscript on that object should be tucked in;
453 of an object says how far to the right of the center of the object an
454 accent over the object should be placed.)
455 The macro must modify
457 so that it will output the desired result with its origin at the current
458 point, and increase the current horizontal position by the width
460 The number registers must also be modified so that they correspond to the
464 For example, suppose you wanted a construct that `cancels' an expression
465 by drawing a diagonal line through it.
471 define cancel 'special Ca'
474 \&.ds 0s \eZ'\e\e*(0s'\ev'\e\en(0du'\eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\ev'\e\en(0hu'
479 Then you could cancel an expression
484 Here's a more complicated construct that draws a box round an expression:
490 define box 'special Bx'
493 \&.ds 0s \eZ'\eh'1n'\e\e*(0s'\e
494 \eZ'\ev'\e\en(0du+1n'\eD'l \e\en(0wu+2n 0'\eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e
495 \eD'l -\e\en(0wu-2n 0'\eD'l 0 \e\en(0hu+\e\en(0du+2n''\eh'\e\en(0wu+2n'
504 The appearance of equations is controlled by
505 a large number of parameters. These can be set using
526 should assume an x height of 0.45 ems.
529 Possible parameters are as follows.
530 Values are in units of hundredths of an em unless otherwise stated.
531 These descriptions are intended to be expository rather than
533 .TP \w'\fBdefault_rule_thickness'u+2n
536 will not set anything at a smaller point-size than this.
537 The value is in points.
542 primitive emboldens an equation
543 by overprinting two copies of the equation
544 horizontally offset by this amount.
547 A fraction bar will be longer by twice this amount than
548 the maximum of the widths of the numerator and denominator;
549 in other words, it will overhang the numerator and
550 denominator by at least this amount.
557 is applied to a single character,
558 the line will be this long.
563 produces a line whose length is the width of the object to which it applies;
564 in the case of a single character,
565 this tends to produce a line that looks too long.
568 Extensible delimiters produced with the
572 primitives will have a combined height and depth of at least this many
573 thousandths of twice the maximum amount by which the sub-equation that
574 the delimiters enclose extends away from the axis.
576 .B delimiter_shortfall
577 Extensible delimiters produced with the
581 primitives will have a combined height and depth
582 not less than the difference of
583 twice the maximum amount by which the sub-equation that
584 the delimiters enclose extends away from the axis
587 .B null_delimiter_space
588 This much horizontal space is inserted
589 on each side of a fraction.
592 The width of subscripts and superscripts is increased by this amount.
595 This amount of space is automatically inserted after punctuation
599 This amount of space is automatically inserted on either side
603 This amount of space is automatically inserted on either side of
607 The height of lowercase letters without ascenders such as x.
610 The height above the baseline of the center of characters
611 such as \(pl and \(mi.
612 It is important that this value is correct for the font
615 .B default_rule_thickness
616 This should set to the thickness of the
618 character, or the thickness of horizontal lines produced with the
625 command will shift up the numerator by at least this amount.
630 command will shift up the numerator by at least this amount.
635 command will shift down the denominator by at least this amount.
640 command will shift down the denominator by at least this amount.
643 Normally superscripts will be shifted up by at least this amount.
646 Superscripts within superscripts or upper limits
650 will be shifted up by at least this amount.
651 This is usually less than sup1.
654 Superscripts within denominators or square roots
655 or subscripts or lower limits will be shifted up by at least
657 This is usually less than sup2.
660 Subscripts will normally be shifted down by at least this amount.
663 When there is both a subscript and a superscript, the subscript
664 will be shifted down by at least this amount.
667 The baseline of a superscript will be no more
668 than this much amount below the top of the object on
669 which the superscript is set.
672 The baseline of a subscript will be at least this much below
673 the bottom of the object on which the subscript is set.
676 The baseline of an upper limit will be at least this
677 much above the top of the object on which the limit is set.
680 The baseline of a lower limit will be at least this
681 much below the bottom of the object on which the limit is set.
684 The bottom of an upper limit will be at least this much above the
685 top of the object on which the limit is set.
688 The top of a lower limit will be at least this much below
689 the bottom of the object on which the limit is set.
692 This much vertical space will be added above and below limits.
695 The baselines of the rows in a pile or matrix will normally be
697 In most cases this should be equal to the sum of
703 The midpoint between the top baseline and the bottom baseline
704 in a matrix or pile will be shifted down by this much from the axis.
705 In most cases this should be equal to
709 This much space will be added between columns in a matrix.
712 This much space will be added at each side of a matrix.
715 If this is non-zero, lines will be drawn using the
717 escape sequence, rather than with the
719 escape sequence and the
724 The amount by which the height of the equation exceeds this
725 will be added as extra space before the line containing the equation
728 The default value is 85.
731 The amount by which the depth of the equation exceeds this
732 will be added as extra space after the line containing the equation
735 The default value is 35.
753 The default value is 0
754 (This is typically changed to 1 by the
764 A more precise description of the role of many of these
765 parameters can be found in Appendix H of
769 Macros can take arguments.
775 will be replaced by the
777 argument if the macro is called with arguments;
778 if there are fewer than
780 arguments, it will be replaced by nothing.
781 A word containing a left parenthesis where the part of the word
782 before the left parenthesis has been defined using the
785 will be recognized as a macro call with arguments;
786 characters following the left parenthesis
787 up to a matching right parenthesis will be treated as comma-separated
789 commas inside nested parentheses do not terminate an argument.
791 .BI sdefine\ name\ X\ anything\ X
796 will not be recognized if called with arguments.
798 .BI include\ \(ts file \(ts
799 Include the contents of
809 .BI ifdef\ name\ X\ anything\ X
814 (or has been automatically defined because
816 is the output device)
822 can be any character not appearing in
826 normally uses at least two fonts to set an equation:
827 an italic font for letters,
828 and a roman font for everything else.
832 changes the font that is used as the italic font.
835 The font that is used as the roman font can be changed
841 Set the roman font to
846 primitive uses the current italic font set by
850 primitive uses the current roman font set by
854 command, which changes the font used by the
862 primitives to changes fonts within an equation,
863 you can change all the fonts used by your equations
871 You can control which characters are treated as letters
872 (and therefore set in italics) by using the
874 command described above.
877 will cause a character to be set in italic type.
880 will cause a character to be set in roman type.
882 .Tp \w'\fB@MACRODIR@/eqnrc'u+2n
886 Inline equations will be set at the point size that is current at the
887 beginning of the input line.
889 .BR groff (@MAN1EXT@),
890 .BR @g@troff (@MAN1EXT@),
891 .BR groff_font (@MAN5EXT@),