Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
eqn(1)
Edit
PageHistory
Diff
Info
LikePages
EQN !!!EQN NAME SYNOPSIS DESCRIPTION OPTIONS USAGE FILES BUGS SEE ALSO ---- !!NAME eqn - format equations for troff !!SYNOPSIS __eqn__ [[ __-rvCNR__ ] [[ __-d__''cc'' ] [[ __-T__''name'' ] [[ __-M__''dir'' ] [[ __-f__''F'' ] [[ __-s__''n'' ] [[ __-p__''n'' ] [[ __-m__''n'' ] [[ ''files...'' ] It is possible to have whitespace between a command line option and its parameter. !!DESCRIPTION This manual page describes the GNU version of __eqn__, which is part of the groff document formatting system. __eqn__ compiles descriptions of equations embedded within __troff__ input files into commands that are understood by __troff__. Normally, it should be invoked using the __-e__ option of __groff__. 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. __eqn__ searches for the file __eqnrc__ in the directories given with the __-M__ option first, then in __/usr/lib/groff/site-tmac__, __/usr/share/groff/site-tmac__, and finally in the standard macro directory __/usr/share/groff/1.17.2/tmac__. If it exists, eqn will process it before the other input files. The __-R__ option prevents this. GNU eqn does not provide the functionality of neqn: it does not support low-resolution, typewriter-like devices (although it may work adequately for very simple input). !!OPTIONS __-C__ Recognize __.EQ__ and __.EN__ even when followed by a character other than space or newline. __-N__ Don't allow newlines within delimiters. This option allows __eqn__ to recover better from missing closing delimiters. __-v__ Print the version number. __-r__ Only one size reduction. __-m__''n'' The minimum point-size is ''n''. eqn will not reduce the size of subscripts or superscripts to a smaller size than ''n''. __-T__''name'' The output is for device ''name''. The only effect of this is to define a macro ''name'' with a value of __1__. Typically __eqnrc__ will use this to provide definitions appropriate for the output device. The default output device is __ps__. __-M__''dir'' Search ''dir'' for __eqnrc__ before the default directories. __-R__ Don't load __eqnrc__. __-f__''F'' This is equivalent to a __gfont__ ''F'' command. __-s__''n'' This is equivalent to a __gsize__ ''n'' command. This option is deprecated. eqn will normally set equations at whatever the current point size is when the equation is encountered. __-p__''n'' 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. !!USAGE Only 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 you do not know TeX. __Automatic spacing__ __eqn__ gives 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 the summation operator; 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 one of two ways. __type__ ''t e'' This yields an equation component that contains ''e'' but that has type ''t'', where ''t'' is one of the types mentioned above. For example, __times__ is defined as __type __ The name of the type doesn't have to be quoted, but quoting protects from macro expansion. __chartype__ ''t text'' Unquoted groups of characters are split up into individual characters, 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 ''text'' from now on have type ''t''. For example, __chartype __ would make the characters __.,;:__ have type punctuation whenever they subsequently appeared in an equation. The type ''t'' can also be __letter__ or __digit__; in these cases __chartype__ changes the font type of the characters. See the Fonts subsection. __New primitives__ ''e1'' __smallover__ ''e2'' This is similar to __over__; __smallover__ reduces the size of ''e1'' and ''e2''; it also puts less vertical space between ''e1'' or ''e2'' and the fraction bar. The __over__ primitive corresponds to the TeX __over__ primitive in display styles; __smallover__ corresponds to __over__ in non-display styles. __vcenter__ ''e'' 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, __sum__ is defined as __{ type __ ''e1'' __accent__ ''e2'' 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 ''e1'' is taller or shorter than a lowercase letter. For example, __hat__ is defined as __accent { __ __dotdot__, __dot__, __tilde__, __vec__ and __dyad__ are also defined using the __accent__ primitive. ''e1'' __uaccent__ ''e2'' 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 ''e1'' has a descender. __utilde__ is pre-defined using __uaccent__ as a tilde accent below the baseline. __split __''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 up and the spacing between individual characters will be adjusted. __nosplit__ ''text'' 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 up and the spacing between individual characters will not be adjusted. ''e'' __opprime__ This is a variant of __prime__ that acts as an operator on ''e''. It produces a different result from __prime__ in a case such as __A opprime sub 1__: with __opprime__ the __1__ will be tucked under the prime as a subscript to the __A__ (as is conventional in mathematical typesetting), whereas with __prime__ the __1__ will be a subscript to the prime character. The precedence of __opprime__ is the same as that of __bar__ and __under__, which is higher than that of everything except __accent__ and __uaccent__. In unquoted text a __'__ that is not the first character will be treated like __opprime__. __special__ ''text e'' This constructs a new object from ''e'' using a troff(1) macro named ''text''. When the macro is called, the string __0s__ will contain the output for ''e'', and the number registers __0w__, __0h__, __0d__, __0skern__ and __0skew__ will 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; 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 modify __0s__ so 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. __.EQ define 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'' with __cancel {__ ''e'' __}__ Here's a more complicated construct that draws a box round an expression: __.EQ define 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 .. __ __Customization__ The appearance of equations is controlled by a large number of parameters. These can be set using the __set__ command. __set__ ''p n'' This sets parameter ''p'' to value ''n ; n'' is an integer. For example, __set x_height 45__ says that __eqn__ should assume an x height of 0.45 ems. Possible parameters are as follows. Values are in units of hundredths of an em unless otherwise stated. These descriptions are intended to be expository rather than definitive. __minimum_size__ __eqn__ will not set anything at a smaller point-size than this. The value is in points. __fat_offset__ The __fat__ primitive emboldens an equation by overprinting two copies of the equation horizontally offset by this amount. __over_hang__ A fraction bar will be longer by twice this amount than the maximum of the widths of the numerator and denominator; in other words, it will overhang the numerator and denominator by at least this amount. __accent_width__ When __bar__ or __under__ is applied to a single character, the line will be this long. Normally, __bar__ or __under__ produces a line whose length is the width of the object to which it applies; in the case of a single character, this tends to produce a line that looks too long. __delimiter_factor__ Extensible delimiters produced with the __left__ and __right__ primitives will have a combined height and depth of at least this many thousandths of twice the maximum amount by which the sub-equation that the delimiters enclose extends away from the axis. __delimiter_shortfall__ Extensible delimiters produced with the __left__ and __right__ primitives will have a combined height and depth not less 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_space__ This much horizontal space is inserted on each side of a fraction. __script_space__ The width of subscripts and superscripts is increased by this amount. __thin_space__ This amount of space is automatically inserted after punctuation characters. __medium_space__ This amount of space is automatically inserted on either side of binary operators. __thick_space__ This amount of space is automatically inserted on either side of relations. __x_height__ The height of lowercase letters without ascenders such as x. __axis_height__ The height above the baseline of the center of characters such as + and -. It is important that this value is correct for the font you are using. __default_rule_thickness__ This should set to the thickness of the _____ character, or the thickness of horizontal lines produced with the __D__ escape sequence. __num1__ The __over__ command will shift up the numerator by at least this amount. __num2__ The __smallover__ command will shift up the numerator by at least this amount. __denom1__ The __over__ command will shift down the denominator by at least this amount. __denom2__ The __smallover__ command will shift down the denominator by at least this amount. __sup1__ Normally superscripts will be shifted up by at least this amount. __sup2__ Superscripts within superscripts or upper limits or numerators of __smallover__ fractions will be shifted up by at least this amount. This is usually less than sup1. __sup3__ Superscripts within denominators or square roots or subscripts or lower limits will be shifted up by at least this amount. This is usually less than sup2. __sub1__ Subscripts will normally be shifted down by at least this amount. __sub2__ When there is both a subscript and a superscript, the subscript will be shifted down by at least this amount. __sup_drop__ The 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_drop__ The baseline of a subscript will be at least this much below the bottom of the object on which the subscript is set. __big_op_spacing1__ The 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_spacing2__ The 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_spacing3__ The 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_spacing4__ The 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_spacing5__ This much vertical space will be added above and below limits. __baseline_sep__ The baselines of the rows in a pile or matrix will normally be this far apart. In most cases this should be equal to the sum of __num1__ and __denom1__. __shift_down__ The midpoint between the top baseline and the bottom baseline in a matrix or pile will be shifted down by this much from the axis. In most cases this should be equal to __axis_height__. __column_sep__ This much space will be added between columns in a matrix. __matrix_side_sep__ This much space will be added at each side of a matrix. __draw_lines__ If this is non-zero, lines will be drawn using the __D__ escape sequence, rather than with the __l__ escape sequence and the _____ character. __body_height__ The 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_depth__ The 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. __nroff__ If this is non-zero, then __ndefine__ will behave like __define__ and __tdefine__ will be ignored, otherwise __tdefine__ will behave like __define__ and __ndefine__ will be ignored. The default value is 0 (This is typically changed to 1 by the __eqnrc__ file for the __ascii__, __latin1__, __utf8__, and __cp1047__ devices.) A more precise description of the role of many of these parameters can be found in Appendix H of ''The !TeXbook''. __Macros__ Macros can take arguments. In a macro body, __$__''n'' where ''n'' is between 1 and 9, will be replaced by the ''n-th'' argument if the macro is called with arguments; if 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 the __define__ command will be recognized as a macro call with arguments; characters following the left parenthesis up to a matching right parenthesis will be treated as comma-separated arguments; commas inside nested parentheses do not terminate an argument. __sdefine__ ''name X anything X'' This is like the __define__ command, but ''name'' will not be recognized if called with arguments. __include __''file''____ Include the contents of ''file''. Lines of ''file'' beginning with __.EQ__ or __.EN__ will be ignored. __ifdef__ ''name X anything X'' If ''name'' has been defined by __define__ (or has been automatically defined because ''name'' is the output device) process ''anything''; otherwise ignore ''anything''. ''X'' can be any character not appearing in ''anything''. __Fonts__ __eqn__ normally uses at least two fonts to set an equation: an italic font for letters, and a roman font for everything else. The existing __gfont__ command changes the font that is used as the italic font. By default this is __I__. The font that is used as the roman font can be changed using the new __grfont__ command. __grfont__ ''f'' Set the roman font to ''f''. The __italic__ primitive uses the current italic font set by __gfont__; the __roman__ primitive uses the current roman font set by __grfont__. There is also a new __gbfont__ command, which changes the font used by the __bold__ primitive. If you only use the __roman__, __italic__ and __bold__ primitives to changes fonts within an equation, you can change all the fonts used by your equations just by using __gfont__, __grfont__ and __gbfont__ commands. You can control which characters are treated as letters (and therefore set in italics) by using the __chartype__ command described above. A type of __letter__ will cause a character to be set in italic type. A type of __digit__ will cause a character to be set in roman type. !!FILES __/usr/share/groff/1.17.2/tmac/eqnrc__ Initialization file. !!BUGS Inline equations will be set at the point size that is current at the beginning of the input line. !!SEE ALSO groff(1), troff(1), groff_font(5), ''The !TeXbook'' ----
12 pages link to
eqn(1)
:
Man1e
roff(7)
troff(1)
groff(1)
groff_man(7)
groff_mm(7)
groff_mmse(7)
groff_ms(7)
grog(1)
mmroff(7)
neqn(1)
man(7)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.