Imported Upstream version 1.22.3
[platform/upstream/groff.git] / src / preproc / eqn / eqn.man
1 .TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
2 .SH NAME
3 @g@eqn \- format equations for troff or MathML
4 .
5 .
6 .\" license (copying)
7 .de co
8 Copyright \[co] 1989-2014 Free Software Foundation, Inc.
9
10 Permission is granted to make and distribute verbatim copies of
11 this manual provided the copyright notice and this permission notice
12 are preserved on all copies.
13
14 Permission is granted to copy and distribute modified versions of this
15 manual under the conditions for verbatim copying, provided that the
16 entire resulting derived work is distributed under the terms of a
17 permission notice identical to this one.
18
19 Permission is granted to copy and distribute translations of this
20 manual into another language, under the above conditions for modified
21 versions, except that this permission notice may be included in
22 translations approved by the Free Software Foundation instead of in
23 the original English.
24 ..
25 .
26 .ie \n(.V<\n(.v \
27 .  ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
28 .el \
29 .  ds tx TeX
30 .
31 .
32 .\" Like TP, but if specified indent is more than half
33 .\" the current line-length - indent, use the default indent.
34 .de Tp
35 .  ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
36 .  el .TP "\\$1"
37 ..
38 .
39 .\" The BSD man macros can't handle " in arguments to font change macros,
40 .\" so use \(ts instead of ".
41 .tr \(ts"\""
42 .
43 .
44 .\" --------------------------------------------------------------------
45 .SH SYNOPSIS
46 .\" --------------------------------------------------------------------
47 .
48 .SY @g@eqn
49 .OP \-rvCNR
50 .OP \-d xy
51 .OP \-T name
52 .OP \-M dir
53 .OP \-f F
54 .OP \-s n
55 .OP \-p n
56 .OP \-m n
57 .RI [ files\|.\|.\|. ]
58 .YS
59 .
60 .
61 .\" --------------------------------------------------------------------
62 .SH DESCRIPTION
63 .\" --------------------------------------------------------------------
64 .
65 This manual page describes the GNU version of
66 .BR eqn ,
67 which is part of the groff document formatting system.
68 .
69 .B eqn
70 compiles descriptions of equations embedded within
71 .B troff
72 input files into commands that are understood by
73 .BR troff .
74 .
75 Normally, it should be invoked using the
76 .B \-e
77 option of
78 .BR groff .
79 .
80 The syntax is quite compatible with Unix eqn.
81 .
82 The output of GNU
83 .B eqn
84 cannot be processed with Unix troff;
85 it must be processed with GNU troff.
86 .
87 If no files are given on the command line, the standard input is read.
88 .
89 A filename of
90 .B \-
91 causes the standard input to be read.
92 .
93 .
94 .LP
95 .B eqn
96 searches for the file
97 .B eqnrc
98 in the directories given with the
99 .B \-M
100 option first, then in
101 .BR @SYSTEMMACRODIR@ ,
102 .BR @LOCALMACRODIR@ ,
103 and finally in the standard macro directory
104 .BR @MACRODIR@ .
105 .
106 If it exists,
107 .B eqn
108 processes it before the other input files.
109 .
110 The
111 .B \-R
112 option prevents this.
113 .
114 .
115 .LP
116 GNU
117 .B eqn
118 does not provide the functionality of neqn:
119 it does not support low-resolution, typewriter-like devices
120 (although it may work adequately for very simple input).
121 .
122 .
123 .\" --------------------------------------------------------------------
124 .SH OPTIONS
125 .\" --------------------------------------------------------------------
126 .
127 .LP
128 It is possible to have whitespace between a command line option and its
129 parameter.
130 .
131 .TP
132 .BI \-d xy
133 Specify delimiters
134 .I x
135 and\~\c
136 .I y
137 for the left and right end, respectively, of in-line equations.
138 .
139 Any
140 .B delim
141 statements in the source file overrides this.
142 .
143 .TP
144 .B \-C
145 Recognize
146 .B .EQ
147 and
148 .B .EN
149 even when followed by a character other than space or newline.
150 .
151 Also, the statement
152 .RB \[oq] "delim on" \[cq]
153 is not handled specially.
154 .
155 .TP
156 .B \-N
157 Don\[aq]t allow newlines within delimiters.
158 .
159 This option allows
160 .B eqn
161 to recover better from missing closing delimiters.
162 .
163 .TP
164 .B \-v
165 Print the version number.
166 .
167 .TP
168 .B \-r
169 Only one size reduction.
170 .
171 .TP
172 .BI \-m n
173 The minimum point-size is\~\c
174 .IR n .
175 .
176 .B eqn
177 does not reduce the size of subscripts or superscripts to
178 a smaller size than\~\c
179 .IR n .
180 .
181 .TP
182 .BI \-T name
183 The output is for device
184 .IR name .
185 .
186 Normally, the only effect of this is to define a macro
187 .I name
188 with a value of\~\c
189 .BR 1 ;
190 .B eqnrc
191 uses this to provide definitions appropriate for the output device.
192 .
193 However, if the specified device is \[lq]MathML\[rq], the output is
194 MathML markup rather than troff commands, and
195 .B eqnrc
196 is not loaded at all.
197 .
198 The default output device is
199 .BR @DEVICE@ .
200 .
201 .TP
202 .BI \-M dir
203 Search
204 .I dir
205 for
206 .B eqnrc
207 before the default directories.
208 .
209 .TP
210 .B \-R
211 Don\[aq]t load
212 .BR eqnrc .
213 .
214 .TP
215 .BI \-f F
216 This is equivalent to a
217 .BI gfont\  F
218 command.
219 .
220 .TP
221 .BI \-s n
222 This is equivalent to a
223 .BI gsize\  n
224 command.
225 .
226 This option is deprecated.
227 .B eqn
228 normally sets equations at whatever the current point size
229 is when the equation is encountered.
230 .
231 .TP
232 .BI \-p n
233 This says that subscripts and superscripts should be
234 .I n\~\c
235 points smaller than the surrounding text.
236 .
237 This option is deprecated.
238 .
239 Normally
240 .B eqn
241 sets subscripts and superscripts at 70% of the size of the surrounding
242 text.
243 .
244 .
245 .\" --------------------------------------------------------------------
246 .SH USAGE
247 .\" --------------------------------------------------------------------
248 .
249 Only the differences between GNU
250 .B eqn
251 and Unix eqn are described here.
252 .
253 .
254 .LP
255 GNU
256 .B eqn
257 emits Presentation MathML output when invoked with the
258 .B "-T\~MathML"
259 option.
260 .
261 .
262 .LP
263 GNU eqn sets the input token
264 .B \&"..."
265 as three periods or low dots, rather than the three centered dots of
266 classic eqn.  To get three centered dots, write
267 .B "cdots"
268 or
269 .BR "cdot cdot cdot".
270 .
271 .
272 .LP
273 Most of the new features of the GNU
274 .B eqn
275 input language are based on \*(tx.
276 .
277 There are some references to the differences between \*(tx and GNU
278 .B eqn
279 below;
280 these may safely be ignored if you do not know \*(tx.
281 .
282 .
283 .\" --------------------------------------------------------------------
284 .SS Controlling delimiters
285 .\" --------------------------------------------------------------------
286 .
287 If not in compatibility mode,
288 .B eqn
289 recognizes
290 .
291 .RS
292 .LP
293 .B delim on
294 .RE
295 .
296 .LP
297 to restore the delimiters which have been previously disabled
298 with a call to
299 .RB \[oq] "delim off" \[cq].
300 .
301 If delimiters haven\[aq]t been specified, the call has no effect.
302 .
303 .
304 .\" --------------------------------------------------------------------
305 .SS Automatic spacing
306 .\" --------------------------------------------------------------------
307 .
308 .B eqn
309 gives each component of an equation a type, and adjusts the spacing
310 between components using that type.
311 .
312 Possible types are:
313 .
314 .RS
315 .TP \w'punctuation'u+2n
316 ordinary an ordinary character such as \[oq]1\[cq] or \[oq]\c
317 .IR x \[cq];
318 .
319 .TP
320 operator
321 a large operator such as
322 .ds Su \[oq]\s+5\(*S\s0\[cq]
323 .if \n(.g .if !c\(*S .ds Su the summation operator
324 \*(Su;
325 .
326 .TP
327 binary
328 a binary operator such as \[oq]\[pl]\[cq];
329 .
330 .TP
331 relation
332 a relation such as \[oq]=\[cq];
333 .
334 .TP
335 opening
336 a opening bracket such as \[oq](\[cq];
337 .
338 .TP
339 closing
340 a closing bracket such as \[oq])\[cq];
341 .
342 .TP
343 punctuation
344 a punctuation character such as \[oq],\[cl];
345 .
346 .TP
347 inner
348 a subformula contained within brackets;
349 .
350 .TP
351 suppress spacing
352 that suppresses automatic spacing adjustment.
353 .RE
354 .
355 .
356 .LP
357 Components of an equation
358 get a type in one of two ways.
359 .
360 .TP
361 .BI type\  t\ e
362 This yields an equation component that contains\~\c
363 .I e
364 but that has type\~\c
365 .IR t ,
366 where
367 .I t
368 is one of the types mentioned above.
369 .
370 For example,
371 .B times
372 is defined as
373 .
374 .RS
375 .IP
376 .B
377 type "binary" \e(mu
378 .RE
379 .
380 .IP
381 The name of the type doesn\[aq]t have to be quoted, but quoting protects
382 from macro expansion.
383 .
384 .TP
385 .BI chartype\  t\ text
386 Unquoted groups of characters are split up into individual characters,
387 and the type of each character is looked up;
388 this changes the type that is stored for each character;
389 it says that the characters in
390 .I text
391 from now on have type\~\c
392 .IR t .
393 For example,
394 .
395 .RS
396 .IP
397 .B
398 chartype "punctuation" .,;:
399 .RE
400 .
401 .IP
402 would make the characters \[oq].,;:\[cq] have type punctuation
403 whenever they subsequently appeared in an equation.
404 .
405 The type\~\c
406 .I t
407 can also be
408 .B letter
409 or
410 .BR digit ;
411 in these cases
412 .B chartype
413 changes the font type of the characters.
414 .
415 See the
416 .B Fonts
417 subsection.
418 .
419 .
420 .\" --------------------------------------------------------------------
421 .SS New primitives
422 .\" --------------------------------------------------------------------
423 .
424 .TP
425 .BI big\  e
426 Enlarges the expression it modifies; intended to have semantics like
427 CSS \[oq]large\[cq].
428 .
429 In troff output, the point size is increased by\~5; in MathML output,
430 the expression uses
431 .
432 .RS
433 .IP
434 .EX
435 <mstyle \%mathsize='big'>
436 .EE
437 .RE
438 .
439 .TP
440 .IB e1\  smallover\  e2
441 This is similar to
442 .BR over ;
443 .B smallover
444 reduces the size of
445 .I e1
446 and
447 .IR e2 ;
448 it also puts less vertical space between
449 .I e1
450 or
451 .I e2
452 and the fraction bar.
453 .
454 The
455 .B over
456 primitive corresponds to the \*(tx
457 .B \eover
458 primitive in display styles;
459 .B smallover
460 corresponds to
461 .B \eover
462 in non-display styles.
463 .
464 .TP
465 .BI vcenter\  e
466 This vertically centers
467 .I e
468 about the math axis.
469 .
470 The math axis is the vertical position about which characters such as
471 \[oq]\[pl]\[]cq and \[oq]\[mi]\[cq] are centered; also it is the
472 vertical position used for the bar of fractions.
473 .
474 For example,
475 .B sum
476 is defined as
477 .
478 .RS
479 .IP
480 .B
481 { type "operator" vcenter size +5 \e(*S }
482 .RE
483 .
484 .IP
485 (Note that vcenter is silently ignored when generating MathML.)
486 .
487 .TP
488 .IB e1\  accent\  e2
489 This sets
490 .I e2
491 as an accent over
492 .IR e1 .
493 .I e2
494 is assumed to be at the correct height for a lowercase letter;
495 .I e2
496 is moved down according to whether
497 .I e1
498 is taller or shorter than a lowercase letter.
499 .
500 For example,
501 .B hat
502 is defined as
503 .
504 .RS
505 .IP
506 .B
507 accent { "^" }
508 .RE
509 .
510 .IP
511 .BR dotdot ,
512 .BR dot ,
513 .BR tilde ,
514 .BR vec ,
515 and
516 .B dyad
517 are also defined using the
518 .B accent
519 primitive.
520 .
521 .TP
522 .IB e1\  uaccent\  e2
523 This sets
524 .I e2
525 as an accent under
526 .IR e1 .
527 .I e2
528 is assumed to be at the correct height for a character without a descender;
529 .I e2
530 is moved down if
531 .I e1
532 has a descender.
533 .
534 .B utilde
535 is pre-defined using
536 .B uaccent
537 as a tilde accent below the baseline.
538 .
539 .TP
540 .BI split\ \(ts text \(ts
541 This has the same effect as simply
542 .
543 .RS
544 .IP
545 .I text
546 .RE
547 .
548 .IP
549 but
550 .I text
551 is not subject to macro expansion because it is quoted;
552 .I text
553 is split up and the spacing between individual characters is adjusted.
554 .
555 .TP
556 .BI nosplit\  text
557 This has the same effect as
558 .
559 .RS
560 .IP
561 .BI \(ts text \(ts
562 .RE
563 .
564 .IP
565 but because
566 .I text
567 is not quoted it is subject to macro expansion;
568 .I text
569 is not split up
570 and the spacing between individual characters is not adjusted.
571 .
572 .TP
573 .IB e\  opprime
574 This is a variant of
575 .B prime
576 that acts as an operator on\~\c
577 .IR e .
578 .
579 It produces a different result from
580 .B prime
581 in a case such as
582 .BR A\ opprime\ sub\ 1 :
583 with
584 .B opprime
585 the\~\c
586 .B 1
587 is tucked under the prime as a subscript to the\~\c
588 .B A
589 (as is conventional in mathematical typesetting),
590 whereas with
591 .B prime
592 the\~\c
593 .B 1
594 is a subscript to the prime character.
595 .
596 The precedence of
597 .B opprime
598 is the same as that of
599 .B bar
600 and
601 .BR under ,
602 which is higher than that of everything except
603 .B accent
604 and
605 .BR uaccent .
606 .
607 In unquoted text a\~\c
608 .B \[aq]
609 that is not the first character is treated like
610 .BR opprime .
611 .
612 .TP
613 .BI special\  text\ e
614 This constructs a new object from\~\c
615 .I e
616 using a
617 .BR @g@troff (@MAN1EXT@)
618 macro named
619 .IR text .
620 .
621 When the macro is called,
622 the string
623 .B 0s
624 contains the output for\~\c
625 .IR e ,
626 and the number registers
627 .BR 0w ,
628 .BR 0h ,
629 .BR 0d ,
630 .BR 0skern ,
631 and
632 .BR 0skew
633 contain the width, height, depth, subscript kern, and skew of\~\c
634 .IR e .
635 .
636 (The
637 .I "subscript kern"
638 of an object says how much a subscript on that object should be tucked in;
639 the
640 .I skew
641 of an object says how far to the right of the center of the object an
642 accent over the object should be placed.)
643 .
644 The macro must modify
645 .B 0s
646 so that it outputs the desired result with its origin at the current
647 point, and increase the current horizontal position by the width
648 of the object.
649 .
650 The number registers must also be modified so that they correspond to the
651 result.
652 .
653 .IP
654 For example, suppose you wanted a construct that \[oq]cancels\[cq] an
655 expression by drawing a diagonal line through it.
656 .
657 .RS
658 .IP
659 .ft B
660 .if t .ne 6+\n(.Vu
661 .br
662 \&.EQ
663 .br
664 define cancel 'special Ca'
665 .br
666 \&.EN
667 .br
668 \&.de Ca
669 .br
670 \&.\ \ ds 0s \e
671 .br
672 \eZ'\e\e*(0s'\e
673 .br
674 \ev'\e\en(0du'\e
675 .br
676 \eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\e
677 .br
678 \ev'\e\en(0hu'
679 .br
680 \&..
681 .ft
682 .RE
683 .
684 .IP
685 Then you could cancel an expression\~\c
686 .I e
687 with
688 .BI \%cancel\ {\  e\  }
689 .
690 .IP
691 Here\[aq]s a more complicated construct that draws a box round an
692 expression:
693 .
694 .RS
695 .IP
696 .ft B
697 .if t .ne 11+\n(.Vu
698 \&.EQ
699 .br
700 define box 'special Bx'
701 .br
702 \&.EN
703 .br
704 \&.de Bx
705 .br
706 \&.\ \ ds 0s \e
707 .br
708 \eZ'\eh'1n'\e\e*(0s'\e
709 .br
710 \eZ'\e
711 .br
712 \ev'\e\en(0du+1n'\e
713 .br
714 \eD'l \e\en(0wu+2n 0'\e
715 .br
716 \eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e
717 .br
718 \eD'l -\e\en(0wu-2n 0'\e
719 .br
720 \eD'l 0 \e\en(0hu+\e\en(0du+2n'\e
721 .br
722 \&'\e
723 .br
724 \eh'\e\en(0wu+2n'
725 .br
726 \&.\ \ nr 0w +2n
727 .br
728 \&.\ \ nr 0d +1n
729 .br
730 \&.\ \ nr 0h +1n
731 .br
732 \&..
733 .ft
734 .RE
735 .
736 .TP
737 .BI space\  n
738 A positive value of the integer\~\c
739 .I n
740 (in hundredths of an em) sets the vertical spacing before the
741 equation, a negative value sets the spacing after the equation,
742 replacing the default values.
743 .
744 This primitive provides an interface to
745 .BR groff \[aq]s
746 .B \ex
747 escape (but with opposite sign).
748 .
749 .IP
750 This keyword has no effect if the equation is part of a
751 .B pic
752 picture.
753 .
754 .
755 .\" --------------------------------------------------------------------
756 .SS Extended primitives
757 .\" --------------------------------------------------------------------
758 .
759 .TP
760 .BI col\  n\  {\  .\|.\|.\  }
761 .TQ
762 .BI ccol\  n\  {\  .\|.\|.\  }
763 .TQ
764 .BI lcol\  n\  {\  .\|.\|.\  }
765 .TQ
766 .BI rcol\  n\  {\  .\|.\|.\  }
767 .TQ
768 .BI pile\  n\  {\  .\|.\|.\  }
769 .TQ
770 .BI cpile\  n\  {\  .\|.\|.\  }
771 .TQ
772 .BI lpile\  n\  {\  .\|.\|.\  }
773 .TQ
774 .BI rpile\  n\  {\  .\|.\|.\  }
775 The integer value\~\c
776 .I n
777 (in hundredths of an em) increases the vertical spacing between rows,
778 using
779 .BR groff \[aq]s
780 .B \ex
781 escape (the value has no effect in MathML mode).
782 Negative values are possible but have no effect.
783 If there is more than a single value given in a matrix, the biggest one
784 is used.
785 .
786 .
787 .\" --------------------------------------------------------------------
788 .SS Customization
789 .\" --------------------------------------------------------------------
790 .
791 When
792 .B eqn
793 is generating troff markup, the appearance of equations is controlled
794 by a large number of parameters.
795 .
796 They have no effect when generating MathML mode, which pushes
797 typesetting and fine motions downstream to a MathML rendering engine.
798 .
799 These parameters can be set using the
800 .B set
801 command.
802 .
803 .TP
804 .BI set\  p\ n
805 This sets parameter\~\c
806 .I p
807 to value\~\c
808 .IR n ;
809 .I n\~\c
810 is an integer.
811 .
812 For example,
813 .
814 .RS
815 .IP
816 .B
817 set x_height 45
818 .RE
819 .
820 .IP
821 says that
822 .B eqn
823 should assume an x\~height of 0.45\~ems.
824 .
825 .
826 .RS
827 .LP
828 Possible parameters are as follows.
829 .
830 Values are in units of hundredths of an em unless otherwise stated.
831 .
832 These descriptions are intended to be expository rather than
833 definitive.
834 .
835 .ie t \
836 .  TP \w'\fBdefault_rule_thickness'u+2n
837 .el \
838 .  TP
839 .B minimum_size
840 .B eqn
841 doesn\[aq]t set anything at a smaller point-size than this.
842 .
843 The value is in points.
844 .
845 .TP
846 .B fat_offset
847 The
848 .B fat
849 primitive emboldens an equation by overprinting two copies of the
850 equation horizontally offset by this amount.
851 .
852 This parameter is not used in MathML mode; instead, fat text uses
853 .
854 .RS
855 .IP
856 .EX
857 <mstyle mathvariant='double-struck'>
858 .EE
859 .RE
860 .
861 .TP
862 .B over_hang
863 A fraction bar is longer by twice this amount than
864 the maximum of the widths of the numerator and denominator;
865 in other words, it overhangs the numerator and
866 denominator by at least this amount.
867 .
868 .TP
869 .B accent_width
870 When
871 .B bar
872 or
873 .B under
874 is applied to a single character,
875 the line is this long.
876 .
877 Normally,
878 .B bar
879 or
880 .B under
881 produces a line whose length is the width of the object to which it applies;
882 in the case of a single character,
883 this tends to produce a line that looks too long.
884 .
885 .TP
886 .B delimiter_factor
887 Extensible delimiters produced with the
888 .B left
889 and
890 .B right
891 primitives have a combined height and depth of at least this many
892 thousandths of twice the maximum amount by which the sub-equation that
893 the delimiters enclose extends away from the axis.
894 .
895 .TP
896 .B delimiter_shortfall
897 Extensible delimiters produced with the
898 .B left
899 and
900 .B right
901 primitives have a combined height and depth not less than the
902 difference of twice the maximum amount by which the sub-equation that
903 the delimiters enclose extends away from the axis and this amount.
904 .
905 .TP
906 .B null_delimiter_space
907 This much horizontal space is inserted on each side of a fraction.
908 .
909 .TP
910 .B script_space
911 The width of subscripts and superscripts is increased by this amount.
912 .
913 .TP
914 .B thin_space
915 This amount of space is automatically inserted after punctuation
916 characters.
917 .
918 .TP
919 .B medium_space
920 This amount of space is automatically inserted on either side of
921 binary operators.
922 .
923 .TP
924 .B thick_space
925 This amount of space is automatically inserted on either side of
926 relations.
927 .
928 .TP
929 .B x_height
930 The height of lowercase letters without ascenders such as \[oq]x\[cq].
931 .
932 .TP
933 .B axis_height
934 The height above the baseline of the center of characters such as
935 \[oq]\[pl]\[cq] and \[oq]\[mi]\[cq].
936 .
937 It is important that this value is correct for the font
938 you are using.
939 .
940 .TP
941 .B default_rule_thickness
942 This should set to the thickness of the
943 .B \e(ru
944 character, or the thickness of horizontal lines produced with the
945 .B \eD
946 escape sequence.
947 .
948 .TP
949 .B num1
950 The
951 .B over
952 command shifts up the numerator by at least this amount.
953 .
954 .TP
955 .B num2
956 The
957 .B smallover
958 command shifts up the numerator by at least this amount.
959 .
960 .TP
961 .B denom1
962 The
963 .B over
964 command shifts down the denominator by at least this amount.
965 .
966 .TP
967 .B denom2
968 The
969 .B smallover
970 command shifts down the denominator by at least this amount.
971 .
972 .TP
973 .B sup1
974 Normally superscripts are shifted up by at least this amount.
975 .
976 .TP
977 .B sup2
978 Superscripts within superscripts or upper limits
979 or numerators of
980 .B smallover
981 fractions are shifted up by at least this amount.
982 .
983 This is usually less than sup1.
984 .
985 .TP
986 .B sup3
987 Superscripts within denominators or square roots
988 or subscripts or lower limits are shifted up by at least
989 this amount.
990 .
991 This is usually less than sup2.
992 .
993 .TP
994 .B sub1
995 Subscripts are normally shifted down by at least this amount.
996 .
997 .TP
998 .B sub2
999 When there is both a subscript and a superscript, the subscript is
1000 shifted down by at least this amount.
1001 .
1002 .TP
1003 .B sup_drop
1004 The baseline of a superscript is no more than this much amount below
1005 the top of the object on which the superscript is set.
1006 .
1007 .TP
1008 .B sub_drop
1009 The baseline of a subscript is at least this much below the bottom of
1010 the object on which the subscript is set.
1011 .
1012 .TP
1013 .B big_op_spacing1
1014 The baseline of an upper limit is at least this much above the top of
1015 the object on which the limit is set.
1016 .
1017 .TP
1018 .B big_op_spacing2
1019 The baseline of a lower limit is at least this much below the bottom
1020 of the object on which the limit is set.
1021 .
1022 .TP
1023 .B big_op_spacing3
1024 The bottom of an upper limit is at least this much above the top of
1025 the object on which the limit is set.
1026 .
1027 .TP
1028 .B big_op_spacing4
1029 The top of a lower limit is at least this much below the bottom of the
1030 object on which the limit is set.
1031 .
1032 .TP
1033 .B big_op_spacing5
1034 This much vertical space is added above and below limits.
1035 .
1036 .TP
1037 .B baseline_sep
1038 The baselines of the rows in a pile or matrix are normally this far
1039 apart.
1040 .
1041 In most cases this should be equal to the sum of
1042 .B num1
1043 and
1044 .BR denom1 .
1045 .
1046 .TP
1047 .B shift_down
1048 The midpoint between the top baseline and the bottom baseline in a
1049 matrix or pile is shifted down by this much from the axis.
1050 .
1051 In most cases this should be equal to
1052 .BR axis_height .
1053 .
1054 .TP
1055 .B column_sep
1056 This much space is added between columns in a matrix.
1057 .
1058 .TP
1059 .B matrix_side_sep
1060 This much space is added at each side of a matrix.
1061 .
1062 .TP
1063 .B draw_lines
1064 If this is non-zero, lines are drawn using the
1065 .B \eD
1066 escape sequence, rather than with the
1067 .B \el
1068 escape sequence and the
1069 .B \e(ru
1070 character.
1071 .
1072 .TP
1073 .B body_height
1074 The amount by which the height of the equation exceeds this is added
1075 as extra space before the line containing the equation (using
1076 .BR \ex ).
1077 .
1078 The default value is 85.
1079 .
1080 .TP
1081 .B body_depth
1082 The amount by which the depth of the equation exceeds this is added as
1083 extra space after the line containing the equation (using
1084 .BR \ex ).
1085 .
1086 The default value is 35.
1087 .
1088 .TP
1089 .B nroff
1090 If this is non-zero,
1091 then
1092 .B ndefine
1093 behaves like
1094 .B define
1095 and
1096 .B tdefine
1097 is ignored, otherwise
1098 .B tdefine
1099 behaves like
1100 .B define
1101 and
1102 .B ndefine
1103 is ignored.
1104 .
1105 The default value is\~0 (This is typically changed to\~1 by the
1106 .B eqnrc
1107 file for the
1108 .BR ascii ,
1109 .BR latin1 ,
1110 .BR utf8 ,
1111 and
1112 .B cp1047
1113 devices.)
1114 .
1115 .
1116 .LP
1117 A more precise description of the role of many of these
1118 parameters can be found in Appendix\~H of
1119 .IR "The \*(txbook" .
1120 .RE
1121 .
1122 .
1123 .\" --------------------------------------------------------------------
1124 .SS Macros
1125 .\" --------------------------------------------------------------------
1126 .
1127 Macros can take arguments.
1128 .
1129 In a macro body,
1130 .BI $ n
1131 where
1132 .I n
1133 is between 1 and\~9, is replaced by the
1134 .IR n-th
1135 argument if the macro is called with arguments;
1136 if there are fewer than
1137 .I n\~\c
1138 arguments, it is replaced by nothing.
1139 .
1140 A word containing a left parenthesis where the part of the word
1141 before the left parenthesis has been defined using the
1142 .B define
1143 command is recognized as a macro call with arguments; characters
1144 following the left parenthesis up to a matching right parenthesis are
1145 treated as comma-separated arguments; commas inside nested parentheses
1146 do not terminate an argument.
1147 .
1148 .TP
1149 .BI sdefine\  name\ X\ anything\ X
1150 This is like the
1151 .B define
1152 command, but
1153 .I name
1154 is not recognized if called with arguments.
1155 .
1156 .TP
1157 .BI include\ \(ts file \(ts
1158 .TQ
1159 .BI copy\ \(ts file \(ts
1160 Include the contents of
1161 .I file
1162 .RB ( include
1163 and
1164 .B copy
1165 are synonyms).
1166 .
1167 Lines of
1168 .I file
1169 beginning with
1170 .B .EQ
1171 or
1172 .B .EN
1173 are ignored.
1174 .
1175 .TP
1176 .BI ifdef\  name\ X\ anything\ X
1177 If
1178 .I name
1179 has been defined by
1180 .B define
1181 (or has been automatically defined because
1182 .I name
1183 is the output device) process
1184 .IR anything ;
1185 otherwise ignore
1186 .IR anything .
1187 .
1188 .I X
1189 can be any character not appearing in
1190 .IR anything .
1191 .
1192 .TP
1193 .BI undef\  name
1194 Remove definition of
1195 .IR name ,
1196 making it undefined.
1197 .
1198 .
1199 .LP
1200 Besides the macros mentioned above, the following definitions are available:
1201 .BR Alpha ,
1202 .BR Beta ,
1203 \&.\|.\|.,
1204 .B Omega
1205 (this is the same as
1206 .BR ALPHA ,
1207 .BR BETA ,
1208 \&.\|.\|.,
1209 .BR OMEGA ),
1210 .B ldots
1211 (three dots on the base line), and
1212 .BR dollar .
1213 .
1214 .
1215 .\" --------------------------------------------------------------------
1216 .SS Fonts
1217 .\" --------------------------------------------------------------------
1218 .
1219 .B eqn
1220 normally uses at least two fonts to set an equation:
1221 an italic font for letters,
1222 and a roman font for everything else.
1223 .
1224 The existing
1225 .B gfont
1226 command
1227 changes the font that is used as the italic font.
1228 .
1229 By default this is\~\c
1230 .BR I .
1231 The font that is used as the roman font can be changed using the new
1232 .B grfont
1233 command.
1234 .
1235 .TP
1236 .BI grfont\  f
1237 Set the roman font to\~\c
1238 .IR f .
1239 .
1240 .
1241 .LP
1242 The
1243 .B italic
1244 primitive uses the current italic font set by
1245 .BR gfont ;
1246 the
1247 .B roman
1248 primitive uses the current roman font set by
1249 .BR grfont .
1250 .
1251 There is also a new
1252 .B gbfont
1253 command, which changes the font used by the
1254 .B bold
1255 primitive.
1256 .
1257 If you only use the
1258 .BR roman ,
1259 .B italic
1260 and
1261 .B bold
1262 primitives to changes fonts within an equation, you can change all the
1263 fonts used by your equations just by using
1264 .BR gfont ,
1265 .B grfont
1266 and
1267 .B gbfont
1268 commands.
1269 .
1270 .
1271 .LP
1272 You can control which characters are treated as letters
1273 (and therefore set in italics) by using the
1274 .B chartype
1275 command described above.
1276 .
1277 A type of
1278 .B letter
1279 causes a character to be set in italic type.
1280 .
1281 A type of
1282 .B digit
1283 causes a character to be set in roman type.
1284 .
1285 .
1286 .\" --------------------------------------------------------------------
1287 .SH FILES
1288 .\" --------------------------------------------------------------------
1289 .
1290 .Tp \w'\fB@MACRODIR@/eqnrc'u+2n
1291 .B @MACRODIR@/eqnrc
1292 Initialization file.
1293 .
1294 .
1295 .\" --------------------------------------------------------------------
1296 .SH MATHML MODE LIMITATIONS
1297 .\" --------------------------------------------------------------------
1298 .
1299 MathML is designed on the assumption that it cannot know the exact
1300 physical characteristics of the media and devices on which it will
1301 be rendered.
1302 .
1303 It does not support fine control of motions and sizes to the same
1304 degree troff does.
1305 .
1306 Thus:
1307 .
1308 .IP *
1309 .B eqn
1310 parameters have no effect on the generated MathML.
1311 .
1312 .IP *
1313 The
1314 .BR special,
1315 .BR up ,
1316 .BR down ,
1317 .BR fwd ,
1318 and
1319 .B back
1320 operations cannot be implemented, and yield a MathML
1321 \[oq]<merror>\[cq] message instead.
1322 .
1323 .IP *
1324 The
1325 .B vcenter
1326 keyword is silently ignored, as centering on the math axis is the
1327 MathML default.
1328 .
1329 .IP *
1330 Characters that
1331 .B eqn
1332 over troff sets extra large \(en notably the integral sign \(en may
1333 appear too small and need to have their \[oq]<mstyle>\[cq] wrappers
1334 adjusted by hand.
1335 .
1336 .
1337 .LP
1338 As in its troff mode,
1339 .B eqn
1340 in MathML mode leaves the
1341 .B .EQ
1342 and
1343 .B .EN
1344 delimiters in place for displayed equations, but emits no explicit
1345 delimiters around inline equations.
1346 .
1347 They can, however, be recognized as strings that begin with
1348 \[oq]<math>\[cq] and end with \[oq]</math>\[cq] and do not cross line
1349 boundaries.
1350 .
1351 .
1352 .LP
1353 See the
1354 .B BUGS
1355 section for translation limits specific to
1356 .BR eqn .
1357 .
1358 .
1359 .\" --------------------------------------------------------------------
1360 .SH BUGS
1361 .\" --------------------------------------------------------------------
1362 .
1363 Inline equations are set at the point size that is current at the
1364 beginning of the input line.
1365 .
1366 .
1367 .LP
1368 In MathML mode, the
1369 .B mark
1370 and
1371 .B lineup
1372 features don\[aq]t work.
1373 .
1374 These could, in theory, be implemented with \[oq]<maligngroup>\[cq]
1375 elements.
1376 .
1377 .
1378 .LP
1379 In MathML mode, each digit of a numeric literal gets a separate
1380 \[oq]<mn>\:</mn>\[cq] pair, and decimal points are tagged with
1381 \[oq]<mo>\:</mo>\[cq].
1382 .
1383 This is allowed by the specification, but inefficient.
1384 .
1385 .
1386 .\" --------------------------------------------------------------------
1387 .SH "SEE ALSO"
1388 .\" --------------------------------------------------------------------
1389 .
1390 .BR groff (@MAN1EXT@),
1391 .BR @g@troff (@MAN1EXT@),
1392 .BR @g@pic (@MAN1EXT@),
1393 .BR groff_font (@MAN5EXT@),
1394 .I The\ \*[tx]book
1395 .
1396 .
1397 .\" --------------------------------------------------------------------
1398 .SH COPYING
1399 .\" --------------------------------------------------------------------
1400 .
1401 .co
1402 .
1403 .
1404 .\" Local Variables:
1405 .\" mode: nroff
1406 .\" End: