Penguin
Annotated edit history of eqn(1) version 4, including all changes. View license author blame.
Rev Author # Line
1 perry 1 EQN
2 !!!EQN
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 USAGE
8 FILES
9 BUGS
10 SEE ALSO
11 ----
12 !!NAME
13
14
15 eqn - format equations for troff
16 !!SYNOPSIS
17
18
19 __eqn__ [[ __-rvCNR__ ] [[ __-d__''cc'' ] [[
20 __-T__''name'' ] [[ __-M__''dir'' ] [[
21 __-f__''F'' ] [[ __-s__''n'' ] [[
22 __-p__''n'' ] [[ __-m__''n'' ] [[ ''files...''
23 ]
24
25
26 It is possible to have whitespace between a command line
27 option and its parameter.
28 !!DESCRIPTION
29
30
31 This manual page describes the GNU version of __eqn__,
32 which is part of the groff document formatting system.
33 __eqn__ compiles descriptions of equations embedded
34 within __troff__ input files into commands that are
35 understood by __troff__. Normally, it should be invoked
36 using the __-e__ option of __groff__. The syntax is
37 quite compatible with Unix eqn. The output of GNU eqn cannot
38 be processed with Unix troff; it must be processed with GNU
39 troff. If no files are given on the command line, the
40 standard input will be read. A filename of __-__ will
41 cause the standard input to be read.
42
43
44 __eqn__ searches for the file __eqnrc__ in the
45 directories given with the __-M__ option first, then in
46 __/usr/lib/groff/site-tmac__,
47 __/usr/share/groff/site-tmac__, and finally in the
48 standard macro directory
49 __/usr/share/groff/1.17.2/tmac__. If it exists, eqn will
50 process it before the other input files. The __-R__
51 option prevents this.
52
53
54 GNU eqn does not provide the functionality of neqn: it does
55 not support low-resolution, typewriter-like devices
56 (although it may work adequately for very simple
57 input).
58 !!OPTIONS
59
60
61 __-C__
62
63
64 Recognize __.EQ__ and __.EN__ even when followed by a
65 character other than space or newline.
66
67
68 __-N__
69
70
71 Don't allow newlines within delimiters. This option allows
72 __eqn__ to recover better from missing closing
73 delimiters.
74
75
76 __-v__
77
78
79 Print the version number.
80
81
82 __-r__
83
84
85 Only one size reduction.
86
87
88 __-m__''n''
89
90
91 The minimum point-size is ''n''. eqn will not reduce the
92 size of subscripts or superscripts to a smaller size than
93 ''n''.
94
95
96 __-T__''name''
97
98
99 The output is for device ''name''. The only effect of
100 this is to define a macro ''name'' with a value of
101 __1__. Typically __eqnrc__ will use this to provide
102 definitions appropriate for the output device. The default
103 output device is __ps__.
104
105
106 __-M__''dir''
107
108
109 Search ''dir'' for __eqnrc__ before the default
110 directories.
111
112
113 __-R__
114
115
116 Don't load __eqnrc__.
117
118
119 __-f__''F''
120
121
122 This is equivalent to a __gfont__ ''F''
123 command.
124
125
126 __-s__''n''
127
128
129 This is equivalent to a __gsize__ ''n'' command. This
130 option is deprecated. eqn will normally set equations at
131 whatever the current point size is when the equation is
132 encountered.
133
134
135 __-p__''n''
136
137
138 This says that subscripts and superscripts should be
139 ''n'' points smaller than the surrounding text. This
140 option is deprecated. Normally eqn makes sets subscripts and
141 superscripts at 70% of the size of the surrounding
142 text.
143 !!USAGE
144
145
146 Only the differences between GNU eqn and Unix eqn are
147 described here.
148
149
150 Most of the new features of GNU eqn are based on TeX. There
151 are some references to the differences between TeX and GNU
152 eqn below; these may safely be ignored if you do not know
153 TeX.
154
155
156 __Automatic spacing__
157
158
159 __eqn__ gives each component of an equation a type, and
160 adjusts the spacing between components using that type.
161 Possible types are:
162
163
164 ordinary
165
166
167 an ordinary character such as 1 or ''x'';
168
169
170 operator
171
172
173 a large operator such as the summation
174 operator;
175
176
177 binary
178
179
180 a binary operator such as +;
181
182
183 relation
184
185
186 a relation such as =;
187
188
189 opening
190
191
192 a opening bracket such as (;
193
194
195 closing
196
197
198 a closing bracket such as );
199
200
201 punctuation
202
203
204 a punctuation character such as ,;
205
206
207 inner a subformula contained within brackets;
208
209
210 suppress
211
212
213 spacing that suppresses automatic spacing
214 adjustment.
215
216
217 Components of an equation get a type in one of two
218 ways.
219
220
221 __type__ ''t e''
222
223
224 This yields an equation component that contains ''e'' but
225 that has type ''t'', where ''t'' is one of the types
226 mentioned above. For example, __times__ is defined
227 as
228
229
230 __type __
231
232
233 The name of the type doesn't have to be quoted, but quoting
234 protects from macro expansion.
235
236
237 __chartype__ ''t text''
238
239
240 Unquoted groups of characters are split up into individual
241 characters, and the type of each character is looked up;
242 this changes the type that is stored for each character; it
243 says that the characters in ''text'' from now on have
244 type ''t''. For example,
245
246
247 __chartype __
248
249
250 would make the characters __.,;:__ have type punctuation
251 whenever they subsequently appeared in an equation. The type
252 ''t'' can also be __letter__ or __digit__; in these
253 cases __chartype__ changes the font type of the
254 characters. See the Fonts subsection.
255
256
257 __New primitives__
258
259
260 ''e1'' __smallover__ ''e2''
261
262
263 This is similar to __over__; __smallover__ reduces the
264 size of ''e1'' and ''e2''; it also puts less vertical
265 space between ''e1'' or ''e2'' and the fraction bar.
266 The __over__ primitive corresponds to the TeX __over__
267 primitive in display styles; __smallover__ corresponds to
268 __over__ in non-display styles.
269
270
271 __vcenter__ ''e''
272
273
274 This vertically centers ''e'' about the math axis. The
275 math axis is the vertical position about which characters
276 such as + and - are centered; also it is the vertical
277 position used for the bar of fractions. For example,
278 __sum__ is defined as
279
280
281 __{ type
282 __
283
284
285 ''e1'' __accent__ ''e2''
286
287
288 This sets ''e2'' as an accent over ''e1''. ''e2''
289 is assumed to be at the correct height for a lowercase
290 letter; ''e2'' will be moved down according if ''e1''
291 is taller or shorter than a lowercase letter. For example,
292 __hat__ is defined as
293
294
295 __accent { __
296
297
298 __dotdot__, __dot__, __tilde__, __vec__ and
299 __dyad__ are also defined using the __accent__
300 primitive.
301
302
303 ''e1'' __uaccent__ ''e2''
304
305
306 This sets ''e2'' as an accent under ''e1''. ''e2''
307 is assumed to be at the correct height for a character
308 without a descender; ''e2'' will be moved down if
309 ''e1'' has a descender. __utilde__ is pre-defined
310 using __uaccent__ as a tilde accent below the
311 baseline.
312
313
314 __split __''text''____
315
316
317 This has the same effect as simply
318
319
320 ''text''
321
322
323 but ''text'' is not subject to macro expansion because it
324 is quoted; ''text'' will be split up and the spacing
325 between individual characters will be adjusted.
326
327
328 __nosplit__ ''text''
329
330
331 This has the same effect as
332
333
334 ____''text''____
335
336
337 but because ''text'' is not quoted it will be subject to
338 macro expansion; ''text'' will not be split up and the
339 spacing between individual characters will not be
340 adjusted.
341
342
343 ''e'' __opprime__
344
345
346 This is a variant of __prime__ that acts as an operator
347 on ''e''. It produces a different result from
348 __prime__ in a case such as __A opprime sub 1__: with
349 __opprime__ the __1__ will be tucked under the prime
350 as a subscript to the __A__ (as is conventional in
351 mathematical typesetting), whereas with __prime__ the
352 __1__ will be a subscript to the prime character. The
353 precedence of __opprime__ is the same as that of
354 __bar__ and __under__, which is higher than that of
355 everything except __accent__ and __uaccent__. In
356 unquoted text a __'__ that is not the first character
357 will be treated like __opprime__.
358
359
360 __special__ ''text e''
361
362
363 This constructs a new object from ''e'' using a
364 troff(1) macro named ''text''. When the macro is
365 called, the string __0s__ will contain the output for
366 ''e'', and the number registers __0w__, __0h__,
367 __0d__, __0skern__ and __0skew__ will contain the
368 width, height, depth, subscript kern, and skew of ''e''.
369 (The ''subscript kern'' of an object says how much a
370 subscript on that object should be tucked in; the
371 ''skew'' of an object says how far to the right of the
372 center of the object an accent over the object should be
373 placed.) The macro must modify __0s__ so that it will
374 output the desired result with its origin at the current
375 point, and increase the current horizontal position by the
376 width of the object. The number registers must also be
377 modified so that they correspond to the result.
378
379
380 For example, suppose you wanted a construct that `cancels'
381 an expression by drawing a diagonal line through
382 it.
383
384
385 __.EQ
386 define cancel 'special Ca'
387 .EN
388 .de Ca
389 .ds 0s Z'\*(0s'v'\n(0du'D'l \n(0wu -\n(0hu-\n(0du'v'\n(0hu'
390 ..
391 __
392
393
394 Then you could cancel an expression ''e'' with __cancel
395 {__ ''e'' __}__
396
397
398 Here's a more complicated construct that draws a box round
399 an expression:
400
401
402 __.EQ
403 define box 'special Bx'
404 .EN
405 .de Bx
406 .ds 0s Z'h'1n'\*(0s'\
407 Z'v'\n(0du+1n'D'l \n(0wu+2n 0'D'l 0 -\n(0hu-\n(0du-2n'\
408 D'l -\n(0wu-2n 0'D'l 0 \n(0hu+\n(0du+2n''h'\n(0wu+2n'
409 .nr 0w +2n
410 .nr 0d +1n
411 .nr 0h +1n
412 ..
413 __
414
415
416 __Customization__
417
418
419 The appearance of equations is controlled by a large number
420 of parameters. These can be set using the __set__
421 command.
422
423
424 __set__ ''p n''
425
426
427 This sets parameter ''p'' to value ''n ; n'' is an
428 integer. For example,
429
430
431 __set x_height 45__
432
433
434 says that __eqn__ should assume an x height of 0.45
435 ems.
436
437
438 Possible parameters are as follows. Values are in units of
439 hundredths of an em unless otherwise stated. These
440 descriptions are intended to be expository rather than
441 definitive.
442
443
444 __minimum_size__
445
446
447 __eqn__ will not set anything at a smaller point-size
448 than this. The value is in points.
449
450
451 __fat_offset__
452
453
454 The __fat__ primitive emboldens an equation by
455 overprinting two copies of the equation horizontally offset
456 by this amount.
457
458
459 __over_hang__ A fraction bar will be longer by twice this
460 amount than the maximum of the widths of the numerator and
461 denominator; in other words, it will overhang the numerator
462 and denominator by at least this amount.
463
464
465 __accent_width__
466
467
468 When __bar__ or __under__ is applied to a single
469 character, the line will be this long. Normally, __bar__
470 or __under__ produces a line whose length is the width of
471 the object to which it applies; in the case of a single
472 character, this tends to produce a line that looks too
473 long.
474
475
476 __delimiter_factor__
477
478
479 Extensible delimiters produced with the __left__ and
480 __right__ primitives will have a combined height and
481 depth of at least this many thousandths of twice the maximum
482 amount by which the sub-equation that the delimiters enclose
483 extends away from the axis.
484
485
486 __delimiter_shortfall__
487
488
489 Extensible delimiters produced with the __left__ and
490 __right__ primitives will have a combined height and
491 depth not less than the difference of twice the maximum
492 amount by which the sub-equation that the delimiters enclose
493 extends away from the axis and this amount.
494
495
496 __null_delimiter_space__
497
498
499 This much horizontal space is inserted on each side of a
500 fraction.
501
502
503 __script_space__
504
505
506 The width of subscripts and superscripts is increased by
507 this amount.
508
509
510 __thin_space__
511
512
513 This amount of space is automatically inserted after
514 punctuation characters.
515
516
517 __medium_space__
518
519
520 This amount of space is automatically inserted on either
521 side of binary operators.
522
523
524 __thick_space__
525
526
527 This amount of space is automatically inserted on either
528 side of relations.
529
530
531 __x_height__ The height of lowercase letters without
532 ascenders such as x.
533
534
535 __axis_height__
536
537
538 The height above the baseline of the center of characters
539 such as + and -. It is important that this value is correct
540 for the font you are using.
541
542
543 __default_rule_thickness__
544
545
546 This should set to the thickness of the _____ character,
547 or the thickness of horizontal lines produced with the
548 __D__ escape sequence.
549
550
551 __num1__ The __over__ command will shift up the
552 numerator by at least this amount.
553
554
555 __num2__ The __smallover__ command will shift up the
556 numerator by at least this amount.
557
558
559 __denom1__ The __over__ command will shift down the
560 denominator by at least this amount.
561
562
563 __denom2__ The __smallover__ command will shift down
564 the denominator by at least this amount.
565
566
567 __sup1__ Normally superscripts will be shifted up by at
568 least this amount.
569
570
571 __sup2__ Superscripts within superscripts or upper limits
572 or numerators of __smallover__ fractions will be shifted
573 up by at least this amount. This is usually less than
574 sup1.
575
576
577 __sup3__ Superscripts within denominators or square roots
578 or subscripts or lower limits will be shifted up by at least
579 this amount. This is usually less than sup2.
580
581
582 __sub1__ Subscripts will normally be shifted down by at
583 least this amount.
584
585
586 __sub2__ When there is both a subscript and a
587 superscript, the subscript will be shifted down by at least
588 this amount.
589
590
591 __sup_drop__ The baseline of a superscript will be no
592 more than this much amount below the top of the object on
593 which the superscript is set.
594
595
596 __sub_drop__ The baseline of a subscript will be at least
597 this much below the bottom of the object on which the
598 subscript is set.
599
600
601 __big_op_spacing1__
602
603
604 The baseline of an upper limit will be at least this much
605 above the top of the object on which the limit is
606 set.
607
608
609 __big_op_spacing2__
610
611
612 The baseline of a lower limit will be at least this much
613 below the bottom of the object on which the limit is
614 set.
615
616
617 __big_op_spacing3__
618
619
620 The bottom of an upper limit will be at least this much
621 above the top of the object on which the limit is
622 set.
623
624
625 __big_op_spacing4__
626
627
628 The top of a lower limit will be at least this much below
629 the bottom of the object on which the limit is
630 set.
631
632
633 __big_op_spacing5__
634
635
636 This much vertical space will be added above and below
637 limits.
638
639
640 __baseline_sep__
641
642
643 The baselines of the rows in a pile or matrix will normally
644 be this far apart. In most cases this should be equal to the
645 sum of __num1__ and __denom1__.
646
647
648 __shift_down__
649
650
651 The midpoint between the top baseline and the bottom
652 baseline in a matrix or pile will be shifted down by this
653 much from the axis. In most cases this should be equal to
654 __axis_height__.
655
656
657 __column_sep__
658
659
660 This much space will be added between columns in a
661 matrix.
662
663
664 __matrix_side_sep__
665
666
667 This much space will be added at each side of a
668 matrix.
669
670
671 __draw_lines__
672
673
674 If this is non-zero, lines will be drawn using the __D__
675 escape sequence, rather than with the __l__ escape
676 sequence and the _____ character.
677
678
679 __body_height__
680
681
682 The amount by which the height of the equation exceeds this
683 will be added as extra space before the line containing the
684 equation (using __x__.) The default value is
685 85.
686
687
688 __body_depth__
689
690
691 The amount by which the depth of the equation exceeds this
692 will be added as extra space after the line containing the
693 equation (using __x__.) The default value is
694 35.
695
696
697 __nroff__ If this is non-zero, then __ndefine__ will
698 behave like __define__ and __tdefine__ will be
699 ignored, otherwise __tdefine__ will behave like
700 __define__ and __ndefine__ will be ignored. The
701 default value is 0 (This is typically changed to 1 by the
702 __eqnrc__ file for the __ascii__, __latin1__,
703 __utf8__, and __cp1047__ devices.)
704
705
706 A more precise description of the role of many of these
707 parameters can be found in Appendix H of ''The
3 perry 708 !TeXbook''.
1 perry 709
710
711 __Macros__
712
713
714 Macros can take arguments. In a macro body, __$__''n''
715 where ''n'' is between 1 and 9, will be replaced by the
716 ''n-th'' argument if the macro is called with arguments;
717 if there are fewer than ''n'' arguments, it will be
718 replaced by nothing. A word containing a left parenthesis
719 where the part of the word before the left parenthesis has
720 been defined using the __define__ command will be
721 recognized as a macro call with arguments; characters
722 following the left parenthesis up to a matching right
723 parenthesis will be treated as comma-separated arguments;
724 commas inside nested parentheses do not terminate an
725 argument.
726
727
728 __sdefine__ ''name X anything X''
729
730
731 This is like the __define__ command, but ''name'' will
732 not be recognized if called with arguments.
733
734
735 __include __''file''____
736
737
738 Include the contents of ''file''. Lines of ''file''
739 beginning with __.EQ__ or __.EN__ will be
740 ignored.
741
742
743 __ifdef__ ''name X anything X''
744
745
746 If ''name'' has been defined by __define__ (or has
747 been automatically defined because ''name'' is the output
748 device) process ''anything''; otherwise ignore
749 ''anything''. ''X'' can be any character not appearing
750 in ''anything''.
751
752
753 __Fonts__
754
755
756 __eqn__ normally uses at least two fonts to set an
757 equation: an italic font for letters, and a roman font for
758 everything else. The existing __gfont__ command changes
759 the font that is used as the italic font. By default this is
760 __I__. The font that is used as the roman font can be
761 changed using the new __grfont__ command.
762
763
764 __grfont__ ''f''
765
766
767 Set the roman font to ''f''.
768
769
770 The __italic__ primitive uses the current italic font set
771 by __gfont__; the __roman__ primitive uses the current
772 roman font set by __grfont__. There is also a new
773 __gbfont__ command, which changes the font used by the
774 __bold__ primitive. If you only use the __roman__,
775 __italic__ and __bold__ primitives to changes fonts
776 within an equation, you can change all the fonts used by
777 your equations just by using __gfont__, __grfont__ and
778 __gbfont__ commands.
779
780
781 You can control which characters are treated as letters (and
782 therefore set in italics) by using the __chartype__
783 command described above. A type of __letter__ will cause
784 a character to be set in italic type. A type of __digit__
785 will cause a character to be set in roman type.
786 !!FILES
787
788
789 __/usr/share/groff/1.17.2/tmac/eqnrc__
790
791
792 Initialization file.
793 !!BUGS
794
795
796 Inline equations will be set at the point size that is
797 current at the beginning of the input line.
798 !!SEE ALSO
799
800
4 perry 801 groff(1), troff(1), groff_font(5),
3 perry 802 ''The !TeXbook''
1 perry 803 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.