2 Copyright (C) 1989-2000, 2001, 2004, 2005 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
22 . ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
27 .\" Like TP, but if specified indent is more than half
28 .\" the current line-length - indent, use the default indent.
30 . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
42 .\" The BSD man macros can't handle " in arguments to font change macros,
43 .\" so use \(ts instead of ".
47 .TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
51 @g@eqn \- format equations for troff
62 . ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
63 . el .RB "[\ " "\\$1" "\ ]"
73 .RI "[\ " files\|.\|.\|. "\ ]"
78 It is possible to have whitespace between a command line option and its
83 This manual page describes the GNU version of
85 which is part of the groff document formatting system.
87 compiles descriptions of equations embedded within
89 input files into commands that are understood by
91 Normally, it should be invoked using the
95 The syntax is quite compatible with Unix eqn.
98 cannot be processed with Unix troff;
99 it must be processed with GNU troff.
100 If no files are given on the command line, the standard input
104 will cause the standard input to be read.
108 searches for the file
110 in the directories given with the
112 option first, then in
113 .BR @SYSTEMMACRODIR@ ,
114 .BR @LOCALMACRODIR@ ,
115 and finally in the standard macro directory
119 will process it before the other input files.
122 option prevents this.
127 does not provide the functionality of neqn:
128 it does not support low-resolution, typewriter-like devices
129 (although it may work adequately for very simple input).
139 for the left and right end, respectively, of in-line equations.
142 statements in the source file overrides this.
150 even when followed by a character other than space or newline.
153 Don't allow newlines within delimiters.
156 to recover better from missing closing delimiters.
160 Print the version number.
164 Only one size reduction.
168 The minimum point-size is\~\c
171 will not reduce the size of subscripts or superscripts to
172 a smaller size than\~\c
177 The output is for device
179 The only effect of this is to define a macro
185 will use this to provide definitions appropriate for the output device.
186 The default output device is
195 before the default directories.
204 This is equivalent to a
210 This is equivalent to a
213 This option is deprecated.
215 will normally set equations at whatever the current point size
216 is when the equation is encountered.
220 This says that subscripts and superscripts should be
222 points smaller than the surrounding text.
223 This option is deprecated.
226 makes sets subscripts and superscripts at 70%
227 of the size of the surrounding text.
231 Only the differences between GNU
233 and Unix eqn are described here.
236 Most of the new features of GNU
239 There are some references to the differences between \*(tx and GNU
242 these may safely be ignored if you do not know \*(tx.
244 .SS Automatic spacing
246 gives each component of an equation a type, and adjusts the spacing
247 between components using that type.
251 .TP \w'punctuation'u+2n
253 an ordinary character such as `1' or `\c
258 a large operator such as
260 .if \n(.g .if !c\(*S .ds Su the summation operator
265 a binary operator such as `\(pl';
269 a relation such as `=';
273 a opening bracket such as `(';
277 a closing bracket such as `)';
281 a punctuation character such as `,';
285 a subformula contained within brackets;
288 spacing that suppresses automatic spacing adjustment.
292 Components of an equation get a type in one of two ways.
296 This yields an equation component that contains\~\c
298 but that has type\~\c
302 is one of the types mentioned above.
314 The name of the type doesn't have to be quoted, but quoting protects
315 from macro expansion.
318 .BI chartype\ t\ text
319 Unquoted groups of characters are split up into individual characters,
320 and the type of each character is looked up;
321 this changes the type that is stored for each character;
322 it says that the characters in
324 from now on have type\~\c
331 chartype "punctuation" .,;:
335 would make the characters `.,;:' have type punctuation
336 whenever they subsequently appeared in an equation.
345 changes the font type of the characters.
352 .IB e1\ smallover\ e2
360 it also puts less vertical space between
364 and the fraction bar.
367 primitive corresponds to the \*(tx
369 primitive in display styles;
373 in non-display styles.
377 This vertically centers
380 The math axis is the vertical position about which characters
381 such as `\(pl' and `\(mi' are centered; also it is the vertical position
382 used for the bar of fractions.
390 { type "operator" vcenter size +5 \e(*S }
400 is assumed to be at the correct height for a lowercase letter;
402 will be moved down according if
404 is taller or shorter than a lowercase letter.
422 are also defined using the
433 is assumed to be at the correct height for a character without a descender;
435 will be moved down if
441 as a tilde accent below the baseline.
444 .BI split\ \(ts text \(ts
445 This has the same effect as simply
455 is not subject to macro expansion because it is quoted;
457 will be split up and the spacing between individual characters
462 This has the same effect as
472 is not quoted it will be subject to macro expansion;
475 and the spacing between individual characters will not be adjusted.
481 that acts as an operator on\~\c
483 It produces a different result from
486 .BR A\ opprime\ sub\ 1 :
491 will be tucked under the prime as a subscript to the\~\c
493 (as is conventional in mathematical typesetting),
498 will be a subscript to the prime character.
501 is the same as that of
505 which is higher than that of everything except
509 In unquoted text a\~\c
511 that is not the first character will be treated like
516 This constructs a new object from\~\c
519 .BR @g@troff (@MAN1EXT@)
522 When the macro is called,
525 will contain the output for\~\c
527 and the number registers
534 will contain the width, height, depth, subscript kern, and skew of\~\c
538 of an object says how much a subscript on that object should be tucked in;
541 of an object says how far to the right of the center of the object an
542 accent over the object should be placed.)
543 The macro must modify
545 so that it will output the desired result with its origin at the current
546 point, and increase the current horizontal position by the width
548 The number registers must also be modified so that they correspond to the
552 For example, suppose you wanted a construct that `cancels' an expression
553 by drawing a diagonal line through it.
562 define cancel 'special Ca'
574 \eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\e
583 Then you could cancel an expression\~\c
586 .BI \%cancel\ {\ e\ }
589 Here's a more complicated construct that draws a box round an expression:
597 define box 'special Bx'
605 \eZ'\eh'1n'\e\e*(0s'\e
611 \eD'l \e\en(0wu+2n 0'\e
613 \eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e
615 \eD'l -\e\en(0wu-2n 0'\e
617 \eD'l 0 \e\en(0hu+\e\en(0du+2n'\e
635 A positive value of the integer\~\c
637 (in hundredths of an em) sets the vertical spacing before the equation,
638 a negative value sets the spacing after the equation, replacing the
640 This primitive provides an interface to
643 escape (but with opposite sign).
646 This keyword has no effect if the equation is part of a
650 .SS Extended primitives
652 .BI col\ n\ {\ .\|.\|.\ }
654 .BI ccol\ n\ {\ .\|.\|.\ }
656 .BI lcol\ n\ {\ .\|.\|.\ }
658 .BI rcol\ n\ {\ .\|.\|.\ }
660 .BI pile\ n\ {\ .\|.\|.\ }
662 .BI cpile\ n\ {\ .\|.\|.\ }
664 .BI lpile\ n\ {\ .\|.\|.\ }
666 .BI rpile\ n\ {\ .\|.\|.\ }
667 The integer value\~\c
669 (in hundredths of an em) increases the vertical spacing between rows,
674 Negative values are possible but have no effect.
675 If there is more than a single value given in a matrix, the biggest one
679 The appearance of equations is controlled by a large number of parameters.
680 These can be set using
687 This sets parameter\~\c
704 should assume an x\~height of 0.45\~ems.
708 Possible parameters are as follows.
709 Values are in units of hundredths of an em unless otherwise stated.
710 These descriptions are intended to be expository rather than
714 . TP \w'\fBdefault_rule_thickness'u+2n
719 will not set anything at a smaller point-size than this.
720 The value is in points.
726 primitive emboldens an equation
727 by overprinting two copies of the equation
728 horizontally offset by this amount.
732 A fraction bar will be longer by twice this amount than
733 the maximum of the widths of the numerator and denominator;
734 in other words, it will overhang the numerator and
735 denominator by at least this amount.
743 is applied to a single character,
744 the line will be this long.
749 produces a line whose length is the width of the object to which it applies;
750 in the case of a single character,
751 this tends to produce a line that looks too long.
755 Extensible delimiters produced with the
759 primitives will have a combined height and depth of at least this many
760 thousandths of twice the maximum amount by which the sub-equation that
761 the delimiters enclose extends away from the axis.
764 .B delimiter_shortfall
765 Extensible delimiters produced with the
769 primitives will have a combined height and depth
770 not less than the difference of
771 twice the maximum amount by which the sub-equation that
772 the delimiters enclose extends away from the axis
776 .B null_delimiter_space
777 This much horizontal space is inserted
778 on each side of a fraction.
782 The width of subscripts and superscripts is increased by this amount.
786 This amount of space is automatically inserted after punctuation
791 This amount of space is automatically inserted on either side
796 This amount of space is automatically inserted on either side of
801 The height of lowercase letters without ascenders such as `x'.
805 The height above the baseline of the center of characters
806 such as `\(pl' and `\(mi'.
807 It is important that this value is correct for the font
811 .B default_rule_thickness
812 This should set to the thickness of the
814 character, or the thickness of horizontal lines produced with the
822 command will shift up the numerator by at least this amount.
828 command will shift up the numerator by at least this amount.
834 command will shift down the denominator by at least this amount.
840 command will shift down the denominator by at least this amount.
844 Normally superscripts will be shifted up by at least this amount.
848 Superscripts within superscripts or upper limits
852 will be shifted up by at least this amount.
853 This is usually less than sup1.
857 Superscripts within denominators or square roots
858 or subscripts or lower limits will be shifted up by at least
860 This is usually less than sup2.
864 Subscripts will normally be shifted down by at least this amount.
868 When there is both a subscript and a superscript, the subscript
869 will be shifted down by at least this amount.
873 The baseline of a superscript will be no more
874 than this much amount below the top of the object on
875 which the superscript is set.
879 The baseline of a subscript will be at least this much below
880 the bottom of the object on which the subscript is set.
884 The baseline of an upper limit will be at least this
885 much above the top of the object on which the limit is set.
889 The baseline of a lower limit will be at least this
890 much below the bottom of the object on which the limit is set.
894 The bottom of an upper limit will be at least this much above the
895 top of the object on which the limit is set.
899 The top of a lower limit will be at least this much below
900 the bottom of the object on which the limit is set.
904 This much vertical space will be added above and below limits.
908 The baselines of the rows in a pile or matrix will normally be
910 In most cases this should be equal to the sum of
917 The midpoint between the top baseline and the bottom baseline
918 in a matrix or pile will be shifted down by this much from the axis.
919 In most cases this should be equal to
924 This much space will be added between columns in a matrix.
928 This much space will be added at each side of a matrix.
932 If this is non-zero, lines will be drawn using the
934 escape sequence, rather than with the
936 escape sequence and the
942 The amount by which the height of the equation exceeds this
943 will be added as extra space before the line containing the equation
946 The default value is 85.
950 The amount by which the depth of the equation exceeds this
951 will be added as extra space after the line containing the equation
954 The default value is 35.
973 The default value is\~0
974 (This is typically changed to\~1 by the
985 A more precise description of the role of many of these
986 parameters can be found in Appendix\~H of
987 .IR "The \*(txbook" .
991 Macros can take arguments.
997 will be replaced by the
999 argument if the macro is called with arguments;
1000 if there are fewer than
1002 arguments, it will be replaced by nothing.
1003 A word containing a left parenthesis where the part of the word
1004 before the left parenthesis has been defined using the
1007 will be recognized as a macro call with arguments;
1008 characters following the left parenthesis
1009 up to a matching right parenthesis will be treated as comma-separated
1011 commas inside nested parentheses do not terminate an argument.
1014 .BI sdefine\ name\ X\ anything\ X
1019 will not be recognized if called with arguments.
1022 .BI include\ \(ts file \(ts
1024 .BI copy\ \(ts file \(ts
1025 Include the contents of
1040 .BI ifdef\ name\ X\ anything\ X
1045 (or has been automatically defined because
1047 is the output device)
1053 can be any character not appearing in
1058 Remove definition of
1060 making it undefined.
1063 Besides the macros mentioned above, the following definitions are available:
1068 (this is the same as
1074 (three dots on the base line),
1080 normally uses at least two fonts to set an equation:
1081 an italic font for letters,
1082 and a roman font for everything else.
1086 changes the font that is used as the italic font.
1087 By default this is\~\c
1089 The font that is used as the roman font can be changed
1096 Set the roman font to\~\c
1102 primitive uses the current italic font set by
1106 primitive uses the current roman font set by
1110 command, which changes the font used by the
1118 primitives to changes fonts within an equation,
1119 you can change all the fonts used by your equations
1128 You can control which characters are treated as letters
1129 (and therefore set in italics) by using the
1131 command described above.
1134 will cause a character to be set in italic type.
1137 will cause a character to be set in roman type.
1141 .Tp \w'\fB@MACRODIR@/eqnrc'u+2n
1143 Initialization file.
1147 Inline equations will be set at the point size that is current at the
1148 beginning of the input line.
1152 .BR groff (@MAN1EXT@),
1153 .BR @g@troff (@MAN1EXT@),
1154 .BR @g@pic (@MAN1EXT@),
1155 .BR groff_font (@MAN5EXT@),
1158 .\" Local Variables: