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
even when followed by a character other than space or newline.
108
Don't allow newlines within delimiters.
111
to recover better from missing closing delimiters.
114
Print the version number.
117
Only one size reduction.
120
The minimum point-size is
122
eqn will not reduce the size of subscripts or superscripts to
127
The output is for device
129
The only effect of this is to define a macro
135
will use this to provide definitions appropriate for the output device.
136
The default output device is
144
before the default directories.
151
This is equivalent to a
156
This is equivalent to a
159
This option is deprecated.
160
eqn will normally set equations at whatever the current point size
161
is when the equation is encountered.
164
This says that subscripts and superscripts should be
166
points smaller than the surrounding text.
167
This option is deprecated.
168
Normally eqn makes sets subscripts and superscripts at 70%
169
of the size of the surrounding text.
171
Only the differences between GNU eqn and Unix eqn are described here.
173
Most of the new features of GNU eqn
175
There are some references to the differences between \*(tx and GNU eqn below;
176
these may safely be ignored if you do not know \*(tx.
177
.SS Automatic spacing
180
gives each component of an equation a type, and adjusts the spacing
181
between components using that type.
183
.TP \w'punctuation'u+2n
185
an ordinary character such as 1 or
189
a large operator such as
191
.if \n(.g .if !c\(*S .ds Su the summation operator
195
a binary operator such as +;
198
a relation such as =;
201
a opening bracket such as (;
204
a closing bracket such as );
207
a punctuation character such as ,;
210
a subformula contained within brackets;
213
spacing that suppresses automatic spacing adjustment.
215
Components of an equation get a type in one of two ways.
218
This yields an equation component that contains
224
is one of the types mentioned above.
234
The name of the type doesn't have to be quoted, but quoting protects
235
from macro expansion.
237
.BI chartype\ t\ text
238
Unquoted groups of characters are split up into individual characters,
239
and the type of each character is looked up;
240
this changes the type that is stored for each character;
241
it says that the characters in
243
from now on have type
249
chartype "punctuation" .,;:
252
would make the characters
254
have type punctuation
255
whenever they subsequently appeared in an equation.
264
changes the font type of the characters.
265
See the Fonts subsection.
268
.IB e1\ smallover\ e2
276
it also puts less vertical space between
280
and the fraction bar.
283
primitive corresponds to the \*(tx
285
primitive in display styles;
289
in non-display styles.
292
This vertically centers
295
The math axis is the vertical position about which characters
296
such as + and - are centered; also it is the vertical position
297
used for the bar of fractions.
304
{ type "operator" vcenter size +5 \e(*S }
313
is assumed to be at the correct height for a lowercase letter;
315
will be moved down according if
317
is taller or shorter than a lowercase letter.
333
are also defined using the
343
is assumed to be at the correct height for a character without a descender;
345
will be moved down if
351
as a tilde accent below the baseline.
353
.BI split\ \(ts text \(ts
354
This has the same effect as simply
362
is not subject to macro expansion because it is quoted;
364
will be split up and the spacing between individual characters
368
This has the same effect as
376
is not quoted it will be subject to macro expansion;
379
and the spacing between individual characters will not be adjusted.
384
that acts as an operator on
386
It produces a different result from
389
.BR A\ opprime\ sub\ 1 :
394
will be tucked under the prime as a subscript to the
396
(as is conventional in mathematical typesetting),
401
will be a subscript to the prime character.
404
is the same as that of
408
which is higher than that of everything except
414
that is not the first character will be treated like
418
This constructs a new object from
421
.BR @g@troff (@MAN1EXT@)
424
When the macro is called,
427
will contain the output for
429
and the number registers
436
will contain the width, height, depth, subscript kern, and skew of
440
of an object says how much a subscript on that object should be tucked in;
443
of an object says how far to the right of the center of the object an
444
accent over the object should be placed.)
445
The macro must modify
447
so that it will output the desired result with its origin at the current
448
point, and increase the current horizontal position by the width
450
The number registers must also be modified so that they correspond to the
454
For example, suppose you wanted a construct that `cancels' an expression
455
by drawing a diagonal line through it.
461
define cancel 'special Ca'
464
\&.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'
469
Then you could cancel an expression
474
Here's a more complicated construct that draws a box round an expression:
480
define box 'special Bx'
483
\&.ds 0s \eZ'\eh'1n'\e\e*(0s'\e
484
\eZ'\ev'\e\en(0du+1n'\eD'l \e\en(0wu+2n 0'\eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e
485
\eD'l -\e\en(0wu-2n 0'\eD'l 0 \e\en(0hu+\e\en(0du+2n''\eh'\e\en(0wu+2n'
494
The appearance of equations is controlled by
495
a large number of parameters. These can be set using
516
should assume an x height of 0.45 ems.
519
Possible parameters are as follows.
520
Values are in units of hundredths of an em unless otherwise stated.
521
These descriptions are intended to be expository rather than
523
.TP \w'\fBdefault_rule_thickness'u+2n
526
will not set anything at a smaller point-size than this.
527
The value is in points.
532
primitive emboldens an equation
533
by overprinting two copies of the equation
534
horizontally offset by this amount.
537
A fraction bar will be longer by twice this amount than
538
the maximum of the widths of the numerator and denominator;
539
in other words, it will overhang the numerator and
540
denominator by at least this amount.
547
is applied to a single character,
548
the line will be this long.
553
produces a line whose length is the width of the object to which it applies;
554
in the case of a single character,
555
this tends to produce a line that looks too long.
558
Extensible delimiters produced with the
562
primitives will have a combined height and depth of at least this many
563
thousandths of twice the maximum amount by which the sub-equation that
564
the delimiters enclose extends away from the axis.
566
.B delimiter_shortfall
567
Extensible delimiters produced with the
571
primitives will have a combined height and depth
572
not less than the difference of
573
twice the maximum amount by which the sub-equation that
574
the delimiters enclose extends away from the axis
577
.B null_delimiter_space
578
This much horizontal space is inserted
579
on each side of a fraction.
582
The width of subscripts and superscripts is increased by this amount.
585
This amount of space is automatically inserted after punctuation
589
This amount of space is automatically inserted on either side
593
This amount of space is automatically inserted on either side of
597
The height of lowercase letters without ascenders such as x.
600
The height above the baseline of the center of characters
601
such as \(pl and \(mi.
602
It is important that this value is correct for the font
605
.B default_rule_thickness
606
This should set to the thickness of the
608
character, or the thickness of horizontal lines produced with the
615
command will shift up the numerator by at least this amount.
620
command will shift up the numerator by at least this amount.
625
command will shift down the denominator by at least this amount.
630
command will shift down the denominator by at least this amount.
633
Normally superscripts will be shifted up by at least this amount.
636
Superscripts within superscripts or upper limits
640
will be shifted up by at least this amount.
641
This is usually less than sup1.
644
Superscripts within denominators or square roots
645
or subscripts or lower limits will be shifted up by at least
647
This is usually less than sup2.
650
Subscripts will normally be shifted down by at least this amount.
653
When there is both a subscript and a superscript, the subscript
654
will be shifted down by at least this amount.
657
The baseline of a superscript will be no more
658
than this much amount below the top of the object on
659
which the superscript is set.
662
The baseline of a subscript will be at least this much below
663
the bottom of the object on which the subscript is set.
666
The baseline of an upper limit will be at least this
667
much above the top of the object on which the limit is set.
670
The baseline of a lower limit will be at least this
671
much below the bottom of the object on which the limit is set.
674
The bottom of an upper limit will be at least this much above the
675
top of the object on which the limit is set.
678
The top of a lower limit will be at least this much below
679
the bottom of the object on which the limit is set.
682
This much vertical space will be added above and below limits.
685
The baselines of the rows in a pile or matrix will normally be
687
In most cases this should be equal to the sum of
693
The midpoint between the top baseline and the bottom baseline
694
in a matrix or pile will be shifted down by this much from the axis.
695
In most cases this should be equal to
699
This much space will be added between columns in a matrix.
702
This much space will be added at each side of a matrix.
705
If this is non-zero, lines will be drawn using the
707
escape sequence, rather than with the
709
escape sequence and the
714
The amount by which the height of the equation exceeds this
715
will be added as extra space before the line containing the equation
718
The default value is 85.
721
The amount by which the depth of the equation exceeds this
722
will be added as extra space after the line containing the equation
725
The default value is 35.
743
The default value is 0
744
(This is typically changed to 1 by the
754
A more precise description of the role of many of these
755
parameters can be found in Appendix H of
759
Macros can take arguments.
765
will be replaced by the
767
argument if the macro is called with arguments;
768
if there are fewer than
770
arguments, it will be replaced by nothing.
771
A word containing a left parenthesis where the part of the word
772
before the left parenthesis has been defined using the
775
will be recognized as a macro call with arguments;
776
characters following the left parenthesis
777
up to a matching right parenthesis will be treated as comma-separated
779
commas inside nested parentheses do not terminate an argument.
781
.BI sdefine\ name\ X\ anything\ X
786
will not be recognized if called with arguments.
788
.BI include\ \(ts file \(ts
789
Include the contents of
799
.BI ifdef\ name\ X\ anything\ X
804
(or has been automatically defined because
806
is the output device)
812
can be any character not appearing in
816
normally uses at least two fonts to set an equation:
817
an italic font for letters,
818
and a roman font for everything else.
822
changes the font that is used as the italic font.
825
The font that is used as the roman font can be changed
831
Set the roman font to
836
primitive uses the current italic font set by
840
primitive uses the current roman font set by
844
command, which changes the font used by the
852
primitives to changes fonts within an equation,
853
you can change all the fonts used by your equations
861
You can control which characters are treated as letters
862
(and therefore set in italics) by using the
864
command described above.
867
will cause a character to be set in italic type.
870
will cause a character to be set in roman type.
872
.Tp \w'\fB@MACRODIR@/eqnrc'u+2n
876
Inline equations will be set at the point size that is current at the
877
beginning of the input line.
879
.BR groff (@MAN1EXT@),
880
.BR @g@troff (@MAN1EXT@),
881
.BR groff_font (@MAN5EXT@),