`
([section] manual, -k keyword, -K [section] search, -f whatis)
man
plain
no title
`

EQN(1) EQN(1)NAMEeqn - format equations for troffSYNOPSISeqn[-rvCNR] [-dxy ] [-Tname ] [-Mdir ] [-fF ] [-sn ] [-pn ] [-mn ] [ files... ] It is possible to have whitespace between a command line option and its parameter.DESCRIPTIONThis manual page describes the GNU version(1,3,5) ofeqn, which is part of the groff(1,7) document formatting system.eqncompiles descriptions of equa- tions embedded withintroffinput files into commands that are under- stood bytroff. Normally, it should be invoked using the-eoption ofgroff(1,7). The syntax is quite compatible with Unix eqn. The output of GNU eqn cannot be processed with Unix troff; it must be processed with GNU troff. If no files are given on the command line, the standard input will be read. A filename of-will cause the standard input to be read.eqnsearches for the file(1,n)eqnrcin(1,8) the directories given with the-Moption first, then in(1,8)/usr/lib/groff(1,7)/site-tmac,/usr/share/groff(1,7)/site-tmac, and finally in(1,8) the standard macro directory/usr/share/groff(1,7)/1.19.1/tmac. If it exists, eqn will process it before the other input files. The-Roption prevents this. GNU eqn does not provide the functionality of neqn: it does not support low-resolution, typewriter-like devices (although it may work ade- quately for very simple input).OPTIONS-dxy Specify delimiters x and y for the left and right end, respec- tively, of in-line equations. Anydelimstatements in(1,8) the source file(1,n) overrides this.-CRecognize.EQand.ENeven when followed by a character other than space or newline.-NDon't allow newlines within delimiters. This option allowseqnto recover better from missing closing delimiters.-vPrint the version(1,3,5) number.-rOnly one size reduction.-mn The minimum point-size is n. eqn will not reduce the size of subscripts or superscripts to a smaller size than n.-Tname The output is for device name. The only effect of this is to define a macro name with a value of1. Typicallyeqnrcwill use this to provide definitions appropriate for the output device. The default output device isps.-Mdir Search dir foreqnrcbefore the default directories.-RDon't load(7,n)eqnrc.-fF This is equivalent to agfontF command.-sn This is equivalent to agsizen command. This option is depre- cated. eqn will normally set(7,n,1 builtins) equations at whatever the current point size is when the equation is encountered.-pn This says that subscripts and superscripts should be n points smaller than the surrounding text. This option is deprecated. Normally eqn makes sets subscripts and superscripts at 70% of the size of the surrounding text.USAGEOnly the differences between GNU eqn and Unix eqn are described here. Most of the new features of GNU eqn are based on TeX. There are some references to the differences between TeX and GNU eqn below; these may safely be ignored if(3,n) you do not know TeX.Automatic spacingeqngives each component of an equation a type, and adjusts the spacing between components using that type. Possible types are: ordinary an ordinary character such as 1 or x; operator a large operator such as _>; binary a binary operator such as +; relation a relation such as =; opening a opening bracket such as (; closing a closing bracket such as ); punctuation a punctuation character such as ,; inner a subformula contained within brackets; suppress spacing that suppresses automatic spacing adjustment. Components of an equation get a type in(1,8) one of two ways.typet e This yields an equation component that contains e but that has type t, where t is one of the types mentioned above. For exam- ple,timesis defined astype "binary" \(muThe name of the type doesn't have to be quoted, but quoting pro- tects from macro expansion.chartypet text Unquoted groups of characters are split(1,n) up into individual char- acters, and the type of each character is looked up; this changes the type that is stored for each character; it says that the characters in(1,8) text from now on have type t. For example,chartype "punctuation" .,;:would make the characters.,;:have type punctuation whenever they subsequently appeared in(1,8) an equation. The type t can also beletterordigit; in(1,8) these caseschartypechanges the font type of the characters. See the Fonts subsection.New primitivese1smallovere2 This is similar toover;smalloverreduces the size of e1 and e2; it also puts(3,n) less(1,3) vertical space between e1 or e2 and the fraction bar. Theoverprimitive corresponds to the TeX\overprimitive in(1,8) display styles;smallovercorresponds to\overin(1,8) non-display styles.vcentere This vertically centers e about the math axis. The math axis is the vertical position about which characters such as + and - are centered; also it is the vertical position used for the bar of fractions. For example,sumis defined as{ type "operator" vcenter size +5 \(*S }e1accente2 This sets e2 as an accent over e1. e2 is assumed to be at the correct height for a lowercase letter; e2 will be moved down according if(3,n) e1 is taller or shorter than a lowercase letter. For example,hatis defined asaccent { "^" }dotdot,dot,tilde,vecanddyadare also defined using theaccentprimitive. e1uaccente2 This sets e2 as an accent under e1. e2 is assumed to be at the correct height for a character without a descender; e2 will be moved down if(3,n) e1 has a descender.utildeis pre-defined usinguaccentas a tilde accent below the baseline.split(1,n) "text"This has the same effect as simply text but text is not subject to macro expansion because it is quoted; text will be split(1,n) up and the spacing between individual charac- ters will be adjusted.nosplittext This has the same effect as"text"but because text is not quoted it will be subject to macro expansion; text will not be split(1,n) up and the spacing between individual characters will not be adjusted. eopprimeThis is a variant ofprimethat acts as an operator on e. It produces a different result fromprimein(1,8) a case such asA opprime sub 1: withopprimethe1will be tucked under the prime as a subscript to theA(as is conventional in(1,8) mathemati- cal typesetting), whereas withprimethe1will be a subscript to the prime character. The precedence ofopprimeis the same as that ofbarandunder, which is higher than that of every- thing exceptaccentanduaccent. In unquoted text a'that is not the first character will be treated likeopprime.specialtext e This constructs a new object from e using atroff(1) macro named(5,8) text. When the macro is called, the string(3,n)0swill contain the output for e, and the number registers0w,0h,0d,0skernand0skewwill contain the width, height, depth, subscript kern, and skew of e. (The subscript kern of an object says how much a subscript on that object should be tucked in(1,8); the skew of an object says how far to the right of the center of the object an accent over the object should be placed.) The macro must modify0sso that it will output the desired result with its origin at the current point, and increase the current horizontal position by the width of the object. The number registers must also be modified so that they correspond to the result. For example, suppose you wanted a construct that `cancels' an expression by drawing a diagonal line through it..EQdefine cancel 'special Ca'.EN.de Ca.ds 0s \Z'\\*(0s'\v'\\n(0du'\D'l \\n(0wu -\\n(0hu-\\n(0du'\v'\\n(0hu'..Then you could cancel an expression e withcancel {e}Here's a more complicated construct that draws a box round an expression:.EQdefine box 'special Bx'.EN.de Bx.ds 0s \Z'\h'1n'\\*(0s'\\Z'\v'\\n(0du+1n'\D'l \\n(0wu+2n 0'\D'l 0 -\\n(0hu-\\n(0du-2n'\\D'l -\\n(0wu-2n 0'\D'l 0 \\n(0hu+\\n(0du+2n''\h'\\n(0wu+2n'.nr 0w +2n.nr 0d +1n.nr 0h +1n..CustomizationThe appearance of equations is controlled by a large number of parame- ters. These can be set(7,n,1 builtins) using theset(7,n,1 builtins)command.set(7,n,1 builtins)p n This sets parameter p to value n ; n is an integer. For exam- ple,set(7,n,1 builtins) x_height 45says thateqnshould assume an x height of 0.45 ems. Possible parameters are as follows. Values are in(1,8) units(1,7) of hun- dredths of an em unless otherwise stated. These descriptions are intended to be expository rather than definitive.minimum_size eqnwill not set(7,n,1 builtins) anything at a smaller point-size than this. The value is in(1,8) points.fat_offsetThefatprimitive emboldens an equation by overprinting two copies of the equa- tion horizontally offset by this amount.over_hangA fraction bar will be longer by twice this amount than the maximum of the widths of the numerator and denominator; in(1,8) other words, it will overhang the numerator and denominator by at least this amount.accent_widthWhenbarorunderis applied to a single character, the line will be this long. Normally,barorunderproduces a line whose length is the width of the object to which it applies; in(1,8) the case of a single character, this tends to produce a line that looks too long.delimiter_factorExtensible delimiters produced with theleftandrightprimitives will have a combined height and depth of at least this many thousandths of twice the maxi- mum amount by which the sub-equation that the delimiters enclose extends away from the axis.delimiter_shortfallExtensible delimiters produced with theleftandrightprimitives will have a combined height and depth not less(1,3) than the difference of twice the maximum amount by which the sub-equation that the delimiters enclose extends away from the axis and this amount.null_delimiter_spaceThis much horizontal space is inserted on each side of a fraction.script_spaceThe width of subscripts and superscripts is increased by this amount.thin_spaceThis amount of space is automatically inserted after punctuation characters.medium_spaceThis amount of space is automatically inserted on either side of binary opera- tors.thick_spaceThis amount of space is automatically inserted on either side of relations.x_heightThe height of lowercase letters without ascenders such as x.axis_heightThe height above the baseline of the center of characters such as + and -. It is important that this value is cor- rect for the font you are using.default_rule_thicknessThis should set(7,n,1 builtins) to the thickness of the\(rucharacter, or the thickness of hor- izontal lines produced with the\Descape sequence.num1Theovercommand will shift up the numerator by at least this amount.num2Thesmallovercommand will shift up the numerator by at least this amount.denom1Theovercommand will shift down the denominator by at least this amount.denom2Thesmallovercommand will shift down the denominator by at least this amount.sup1Normally superscripts will be shifted up by at least this amount.sup2Superscripts within superscripts or upper limits or numerators ofsmalloverfractions will be shifted up by at least this amount. This is usually less(1,3) than sup1.sup3Superscripts within denominators or square roots or subscripts or lower lim- its will be shifted up by at least this amount. This is usually less(1,3) than sup2.sub1Subscripts will normally be shifted down by at least this amount.sub2When there is both a subscript and a superscript, the subscript will be shifted down by at least this amount.sup_dropThe baseline of a superscript will be no more than this much amount below the top of the object on which the superscript is set.sub_dropThe baseline of a subscript will be at least this much below the bottom of the object on which the subscript is set.big_op_spacing1The baseline of an upper limit will be at least this much above the top of the object on which the limit is set.big_op_spacing2The baseline of a lower limit will be at least this much below the bottom of the object on which the limit is set.big_op_spacing3The bottom of an upper limit will be at least this much above the top of the object on which the limit is set.big_op_spacing4The top of a lower limit will be at least this much below the bottom of the object on which the limit is set.big_op_spacing5This much vertical space will be added above and below limits.baseline_sepThe baselines of the rows in(1,8) a pile or matrix will normally be this far apart. In most cases this should be equal to the sum ofnum1anddenom1.shift_downThe midpoint between the top baseline and the bottom baseline in(1,8) a matrix or pile will be shifted down by this much from the axis. In most cases this should be equal toaxis_height.column_sepThis much space will be added between columns in(1,8) a matrix.matrix_side_sepThis much space will be added at each side of a matrix.draw_linesIf this is non-zero, lines will be drawn using the\Descape sequence, rather than with the\lescape sequence and the\(rucharacter.body_heightThe amount by which the height of the equation exceeds this will be added as extra space before the line containing the equation (using\x.) The default value is 85.body_depthThe amount by which the depth of the equation exceeds this will be added as extra space after the line containing the equation (using\x.) The default value is 35.nroffIf this is non-zero, thenndefinewill behave likedefineandtdefinewill be ignored, otherwisetdefinewill behave likedefineandndefinewill be ignored. The default value is 0 (This is typi- cally changed to 1 by theeqnrcfile(1,n) for theascii(1,7),latin1,utf8, andcp1047devices.) A more precise description of the role of many of these parame- ters can be found in(1,8) Appendix H of The TeXbook.MacrosMacros can take arguments. In a macro body,$n where n is between 1 and 9, will be replaced by the n-th argument if(3,n) the macro is called with arguments; if(3,n) there are fewer than n arguments, it will be replaced by nothing. A word containing a left parenthesis where the part of the word before the left parenthesis has been defined using thedefinecommand will be recognized as a macro call with arguments; char- acters following the left parenthesis up to a matching right parenthe- sis will be treated as comma-separated arguments; commas inside nested parentheses do not terminate an argument.sdefinename X anything X This is like thedefinecommand, but name will not be recognized if(3,n) called with arguments.include "file(1,n)"Include the contents of file(1,n). Lines of file(1,n) beginning with.EQor.ENwill be ignored.ifdefname X anything X If name has been defined bydefine(or has been automatically defined because name is the output device) process anything; otherwise ignore anything. X can be any character not appearing in(1,8) anything.Fontseqnnormally uses at least two fonts to set(7,n,1 builtins) an equation: an italic font for letters, and a roman font for everything else. The existinggfontcommand changes the font that is used as the italic font. By default this isI. The font that is used as the roman font can be changed using the newgrfontcommand.grfontf Set the roman font to f. Theitalicprimitive uses the current italic font set(7,n,1 builtins) bygfont; theromanprimitive uses the current roman font set(7,n,1 builtins) bygrfont. There is also a newgbfontcommand, which changes the font used by theboldprimitive. If you only use theroman,italicandboldprimitives to changes fonts within an equation, you can change all the fonts used by your equations just by usinggfont,grfontandgbfontcommands. You can control which characters are treated as letters (and therefore set(7,n,1 builtins) in(1,8) italics) by using thechartypecommand described above. A type ofletterwill cause a character to be set(7,n,1 builtins) in(1,8) italic type. A type ofdigitwill cause a character to be set(7,n,1 builtins) in(1,8) roman type.FILES/usr/share/groff(1,7)/1.19.1/tmac/eqnrcInitialization file.BUGSInline equations will be set(7,n,1 builtins) at the point size that is current at the beginning of the input line.SEE ALSOgroff(1,7)(1),troff(1),groff_font(5), The TeXbook Groff Version 1.19.1 5 October 2001 EQN(1)