2 Copyright (C) 1989-2000, 2001, 2004 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
35 .\" The BSD man macros can't handle " in arguments to font change macros,
36 .\" so use \(ts instead of ".
40 .TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
44 @g@eqn \- format equations for troff
55 . ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
56 . el .RB "[\ " "\\$1" "\ ]"
66 .RI "[\ " files\|.\|.\|. "\ ]"
71 It is possible to have whitespace between a command line option and its
76 This manual page describes the GNU version of
78 which is part of the groff document formatting system.
80 compiles descriptions of equations embedded within
82 input files into commands that are understood by
84 Normally, it should be invoked using the
88 The syntax is quite compatible with Unix eqn.
91 cannot be processed with Unix troff;
92 it must be processed with GNU troff.
93 If no files are given on the command line, the standard input
97 will cause the standard input to be read.
101 searches for the file
103 in the directories given with the
105 option first, then in
106 .BR @SYSTEMMACRODIR@ ,
107 .BR @LOCALMACRODIR@ ,
108 and finally in the standard macro directory
112 will process it before the other input files.
115 option prevents this.
120 does not provide the functionality of neqn:
121 it does not support low-resolution, typewriter-like devices
122 (although it may work adequately for very simple input).
132 for the left and right end, respectively, of in-line equations.
135 statements in the source file overrides this.
143 even when followed by a character other than space or newline.
146 Don't allow newlines within delimiters.
149 to recover better from missing closing delimiters.
153 Print the version number.
157 Only one size reduction.
161 The minimum point-size is\~\c
164 will not reduce the size of subscripts or superscripts to
165 a smaller size than\~\c
170 The output is for device
172 The only effect of this is to define a macro
178 will use this to provide definitions appropriate for the output device.
179 The default output device is
188 before the default directories.
197 This is equivalent to a
203 This is equivalent to a
206 This option is deprecated.
208 will normally set equations at whatever the current point size
209 is when the equation is encountered.
213 This says that subscripts and superscripts should be
215 points smaller than the surrounding text.
216 This option is deprecated.
219 makes sets subscripts and superscripts at 70%
220 of the size of the surrounding text.
224 Only the differences between GNU
226 and Unix eqn are described here.
229 Most of the new features of GNU
232 There are some references to the differences between \*(tx and GNU
235 these may safely be ignored if you do not know \*(tx.
237 .SS Automatic spacing
239 gives each component of an equation a type, and adjusts the spacing
240 between components using that type.
244 .TP \w'punctuation'u+2n
246 an ordinary character such as `1' or `\c
251 a large operator such as
253 .if \n(.g .if !c\(*S .ds Su the summation operator
258 a binary operator such as `\(pl';
262 a relation such as `=';
266 a opening bracket such as `(';
270 a closing bracket such as `)';
274 a punctuation character such as `,';
278 a subformula contained within brackets;
281 spacing that suppresses automatic spacing adjustment.
285 Components of an equation get a type in one of two ways.
289 This yields an equation component that contains\~\c
291 but that has type\~\c
295 is one of the types mentioned above.
307 The name of the type doesn't have to be quoted, but quoting protects
308 from macro expansion.
311 .BI chartype\ t\ text
312 Unquoted groups of characters are split up into individual characters,
313 and the type of each character is looked up;
314 this changes the type that is stored for each character;
315 it says that the characters in
317 from now on have type\~\c
324 chartype "punctuation" .,;:
328 would make the characters `.,;:' have type punctuation
329 whenever they subsequently appeared in an equation.
338 changes the font type of the characters.
345 .IB e1\ smallover\ e2
353 it also puts less vertical space between
357 and the fraction bar.
360 primitive corresponds to the \*(tx
362 primitive in display styles;
366 in non-display styles.
370 This vertically centers
373 The math axis is the vertical position about which characters
374 such as `\(pl' and `\(mi' are centered; also it is the vertical position
375 used for the bar of fractions.
383 { type "operator" vcenter size +5 \e(*S }
393 is assumed to be at the correct height for a lowercase letter;
395 will be moved down according if
397 is taller or shorter than a lowercase letter.
415 are also defined using the
426 is assumed to be at the correct height for a character without a descender;
428 will be moved down if
434 as a tilde accent below the baseline.
437 .BI split\ \(ts text \(ts
438 This has the same effect as simply
448 is not subject to macro expansion because it is quoted;
450 will be split up and the spacing between individual characters
455 This has the same effect as
465 is not quoted it will be subject to macro expansion;
468 and the spacing between individual characters will not be adjusted.
474 that acts as an operator on\~\c
476 It produces a different result from
479 .BR A\ opprime\ sub\ 1 :
484 will be tucked under the prime as a subscript to the\~\c
486 (as is conventional in mathematical typesetting),
491 will be a subscript to the prime character.
494 is the same as that of
498 which is higher than that of everything except
502 In unquoted text a\~\c
504 that is not the first character will be treated like
509 This constructs a new object from\~\c
512 .BR @g@troff (@MAN1EXT@)
515 When the macro is called,
518 will contain the output for\~\c
520 and the number registers
527 will contain the width, height, depth, subscript kern, and skew of\~\c
531 of an object says how much a subscript on that object should be tucked in;
534 of an object says how far to the right of the center of the object an
535 accent over the object should be placed.)
536 The macro must modify
538 so that it will output the desired result with its origin at the current
539 point, and increase the current horizontal position by the width
541 The number registers must also be modified so that they correspond to the
545 For example, suppose you wanted a construct that `cancels' an expression
546 by drawing a diagonal line through it.
555 define cancel 'special Ca'
567 \eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\e
576 Then you could cancel an expression\~\c
579 .BI \%cancel\ {\ e\ }
582 Here's a more complicated construct that draws a box round an expression:
590 define box 'special Bx'
598 \eZ'\eh'1n'\e\e*(0s'\e
604 \eD'l \e\en(0wu+2n 0'\e
606 \eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e
608 \eD'l -\e\en(0wu-2n 0'\e
610 \eD'l 0 \e\en(0hu+\e\en(0du+2n'\e
627 The appearance of equations is controlled by a large number of parameters.
628 These can be set using
635 This sets parameter\~\c
652 should assume an x\~height of 0.45\~ems.
656 Possible parameters are as follows.
657 Values are in units of hundredths of an em unless otherwise stated.
658 These descriptions are intended to be expository rather than
662 . TP \w'\fBdefault_rule_thickness'u+2n
667 will not set anything at a smaller point-size than this.
668 The value is in points.
674 primitive emboldens an equation
675 by overprinting two copies of the equation
676 horizontally offset by this amount.
680 A fraction bar will be longer by twice this amount than
681 the maximum of the widths of the numerator and denominator;
682 in other words, it will overhang the numerator and
683 denominator by at least this amount.
691 is applied to a single character,
692 the line will be this long.
697 produces a line whose length is the width of the object to which it applies;
698 in the case of a single character,
699 this tends to produce a line that looks too long.
703 Extensible delimiters produced with the
707 primitives will have a combined height and depth of at least this many
708 thousandths of twice the maximum amount by which the sub-equation that
709 the delimiters enclose extends away from the axis.
712 .B delimiter_shortfall
713 Extensible delimiters produced with the
717 primitives will have a combined height and depth
718 not less than the difference of
719 twice the maximum amount by which the sub-equation that
720 the delimiters enclose extends away from the axis
724 .B null_delimiter_space
725 This much horizontal space is inserted
726 on each side of a fraction.
730 The width of subscripts and superscripts is increased by this amount.
734 This amount of space is automatically inserted after punctuation
739 This amount of space is automatically inserted on either side
744 This amount of space is automatically inserted on either side of
749 The height of lowercase letters without ascenders such as `x'.
753 The height above the baseline of the center of characters
754 such as `\(pl' and `\(mi'.
755 It is important that this value is correct for the font
759 .B default_rule_thickness
760 This should set to the thickness of the
762 character, or the thickness of horizontal lines produced with the
770 command will shift up the numerator by at least this amount.
776 command will shift up the numerator by at least this amount.
782 command will shift down the denominator by at least this amount.
788 command will shift down the denominator by at least this amount.
792 Normally superscripts will be shifted up by at least this amount.
796 Superscripts within superscripts or upper limits
800 will be shifted up by at least this amount.
801 This is usually less than sup1.
805 Superscripts within denominators or square roots
806 or subscripts or lower limits will be shifted up by at least
808 This is usually less than sup2.
812 Subscripts will normally be shifted down by at least this amount.
816 When there is both a subscript and a superscript, the subscript
817 will be shifted down by at least this amount.
821 The baseline of a superscript will be no more
822 than this much amount below the top of the object on
823 which the superscript is set.
827 The baseline of a subscript will be at least this much below
828 the bottom of the object on which the subscript is set.
832 The baseline of an upper limit will be at least this
833 much above the top of the object on which the limit is set.
837 The baseline of a lower limit will be at least this
838 much below the bottom of the object on which the limit is set.
842 The bottom of an upper limit will be at least this much above the
843 top of the object on which the limit is set.
847 The top of a lower limit will be at least this much below
848 the bottom of the object on which the limit is set.
852 This much vertical space will be added above and below limits.
856 The baselines of the rows in a pile or matrix will normally be
858 In most cases this should be equal to the sum of
865 The midpoint between the top baseline and the bottom baseline
866 in a matrix or pile will be shifted down by this much from the axis.
867 In most cases this should be equal to
872 This much space will be added between columns in a matrix.
876 This much space will be added at each side of a matrix.
880 If this is non-zero, lines will be drawn using the
882 escape sequence, rather than with the
884 escape sequence and the
890 The amount by which the height of the equation exceeds this
891 will be added as extra space before the line containing the equation
894 The default value is 85.
898 The amount by which the depth of the equation exceeds this
899 will be added as extra space after the line containing the equation
902 The default value is 35.
921 The default value is\~0
922 (This is typically changed to\~1 by the
933 A more precise description of the role of many of these
934 parameters can be found in Appendix\~H of
935 .IR "The \*(txbook" .
939 Macros can take arguments.
945 will be replaced by the
947 argument if the macro is called with arguments;
948 if there are fewer than
950 arguments, it will be replaced by nothing.
951 A word containing a left parenthesis where the part of the word
952 before the left parenthesis has been defined using the
955 will be recognized as a macro call with arguments;
956 characters following the left parenthesis
957 up to a matching right parenthesis will be treated as comma-separated
959 commas inside nested parentheses do not terminate an argument.
962 .BI sdefine\ name\ X\ anything\ X
967 will not be recognized if called with arguments.
970 .BI include\ \(ts file \(ts
971 Include the contents of
982 .BI ifdef\ name\ X\ anything\ X
987 (or has been automatically defined because
989 is the output device)
995 can be any character not appearing in
1000 normally uses at least two fonts to set an equation:
1001 an italic font for letters,
1002 and a roman font for everything else.
1006 changes the font that is used as the italic font.
1007 By default this is\~\c
1009 The font that is used as the roman font can be changed
1016 Set the roman font to\~\c
1022 primitive uses the current italic font set by
1026 primitive uses the current roman font set by
1030 command, which changes the font used by the
1038 primitives to changes fonts within an equation,
1039 you can change all the fonts used by your equations
1048 You can control which characters are treated as letters
1049 (and therefore set in italics) by using the
1051 command described above.
1054 will cause a character to be set in italic type.
1057 will cause a character to be set in roman type.
1061 .Tp \w'\fB@MACRODIR@/eqnrc'u+2n
1063 Initialization file.
1067 Inline equations will be set at the point size that is current at the
1068 beginning of the input line.
1072 .BR groff (@MAN1EXT@),
1073 .BR @g@troff (@MAN1EXT@),
1074 .BR groff_font (@MAN5EXT@),
1077 .\" Local Variables: