4 Copyright (c) 2014 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
6 Copyright (C) 1989 - 2001, 2004, 2005, 2007
7 Free Software Foundation, Inc.
9 Permission is granted to make and distribute verbatim copies of
10 this manual provided the copyright notice and this permission notice
11 are preserved on all copies.
13 Permission is granted to copy and distribute modified versions of this
14 manual under the conditions for verbatim copying, provided that the
15 entire resulting derived work is distributed under the terms of a
16 permission notice identical to this one.
18 Permission is granted to copy and distribute translations of this
19 manual into another language, under the above conditions for modified
20 versions, except that this permission notice may be included in
21 translations approved by the Free Software Foundation instead of in
27 . ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
32 .\" Like TP, but if specified indent is more than half
33 .\" the current line-length - indent, use the default indent.
35 . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
40 .\" The BSD man macros can't handle " in arguments to font change macros,
41 .\" so use \(ts instead of ".
45 .TH @U_P_EQN@ @MAN1EXT@ "@MDATE@" "@T_ROFF@ v@VERSION@"
49 @L_P_EQN@ \- format equations for @T_ROFF@ or MathML
62 .RI [ files\|.\|.\|. ]
66 It is possible to have whitespace between a command line option and its
71 This manual page describes
73 which is part of the @T_ROFF@ document formatting system.
75 compiles descriptions of equations embedded within
77 input files into commands that are understood by
79 Normally, it should be invoked using the
83 The syntax is quite compatible with Unix eqn;
84 its output cannot be processed with Unix troff, however,
85 it must be processed with @L_TROFF@.
86 If no files are given on the command line, the standard input is read.
89 causes the standard input to be read.
95 in the directories given with the
98 .BR @SYSTEMMACRODIR@ ,
100 and finally in the standard macro directory
104 processes it before the other input files.
107 option prevents this.
111 does not provide the functionality of neqn:
112 it does not support low-resolution, typewriter-like devices
113 (although it may work adequately for very simple input).
124 for the left and right end, respectively, of in-line equations.
127 statements in the source file overrides this.
135 even when followed by a character other than space or newline.
138 Don't allow newlines within delimiters.
141 to recover better from missing closing delimiters.
145 Print the version number.
149 Only one size reduction.
153 The minimum point-size is\~\c
156 does not reduce the size of subscripts or superscripts to
157 a smaller size than\~\c
162 The output is for device
164 Normally, the only effect of this is to define a macro
169 uses this to provide definitions appropriate for the output device.
170 However, if the specified device is \[lq]MathML\[rq], the output is
171 MathML markup rather than troff commands, and
173 is not loaded at all.
174 The default output device is
183 before the default directories.
192 This is equivalent to a
198 This is equivalent to a
201 This option is deprecated.
203 normally sets equations at whatever the current point size
204 is when the equation is encountered.
208 This says that subscripts and superscripts should be
210 points smaller than the surrounding text.
211 This option is deprecated.
214 sets subscripts and superscripts at 70% of the size of the
219 Only the differences between
221 and Unix eqn are described here.
225 emits Presentation MathML output when invoked with the
230 @L_P_EQN@ sets the input token
232 as three periods or low dots, rather than the three centered dots of
233 classic eqn. To get three centered dots, write
236 .BR "cdot cdot cdot".
239 Most of the new features of the
241 input language are based on \*(tx.
242 There are some references to the differences between \*(tx and
245 these may safely be ignored if you do not know \*(tx.
247 .SS Automatic spacing
249 gives each component of an equation a type, and adjusts the spacing
250 between components using that type.
254 .TP \w'punctuation'u+2n
256 an ordinary character such as `1' or `\c
261 a large operator such as
263 .if \n(.g .if !c\(*S .ds Su the summation operator
268 a binary operator such as `\(pl';
272 a relation such as `=';
276 a opening bracket such as `(';
280 a closing bracket such as `)';
284 a punctuation character such as `,';
288 a subformula contained within brackets;
291 spacing that suppresses automatic spacing adjustment.
295 Components of an equation get a type in one of two ways.
299 This yields an equation component that contains\~\c
301 but that has type\~\c
305 is one of the types mentioned above.
317 The name of the type doesn't have to be quoted, but quoting protects
318 from macro expansion.
321 .BI chartype\ t\ text
322 Unquoted groups of characters are split up into individual characters,
323 and the type of each character is looked up;
324 this changes the type that is stored for each character;
325 it says that the characters in
327 from now on have type\~\c
334 chartype "punctuation" .,;:
338 would make the characters `.,;:' have type punctuation
339 whenever they subsequently appeared in an equation.
348 changes the font type of the characters.
356 Enlarges the expression it modifies; intended to have semantics like
358 In troff output, the point size is increased by\~5;
359 in MathML output, the expression uses
364 <mstyle \%mathsize='big'>
369 .IB e1\ smallover\ e2
377 it also puts less vertical space between
381 and the fraction bar.
384 primitive corresponds to the \*(tx
386 primitive in display styles;
390 in non-display styles.
394 This vertically centers
397 The math axis is the vertical position about which characters
398 such as `\(pl' and `\(mi' are centered; also it is the vertical position
399 used for the bar of fractions.
407 { type "operator" vcenter size +5 \e(*S }
411 (Note that vcenter is silently ignored when generating MathML.)
420 is assumed to be at the correct height for a lowercase letter;
422 is moved down according to whether
424 is taller or shorter than a lowercase letter.
442 are also defined using the
453 is assumed to be at the correct height for a character without a descender;
461 as a tilde accent below the baseline.
464 .BI split\ \(ts text \(ts
465 This has the same effect as simply
475 is not subject to macro expansion because it is quoted;
477 is split up and the spacing between individual characters is adjusted.
481 This has the same effect as
491 is not quoted it is subject to macro expansion;
494 and the spacing between individual characters is not adjusted.
500 that acts as an operator on\~\c
502 It produces a different result from
505 .BR A\ opprime\ sub\ 1 :
510 is tucked under the prime as a subscript to the\~\c
512 (as is conventional in mathematical typesetting),
517 is a subscript to the prime character.
520 is the same as that of
524 which is higher than that of everything except
528 In unquoted text a\~\c
530 that is not the first character is treated like
535 This constructs a new object from\~\c
538 .BR @L_TROFF@ (@MAN1EXT@)
541 When the macro is called,
544 contains the output for\~\c
546 and the number registers
553 contain the width, height, depth, subscript kern, and skew of\~\c
557 of an object says how much a subscript on that object should be tucked in;
560 of an object says how far to the right of the center of the object an
561 accent over the object should be placed.)
562 The macro must modify
564 so that it outputs the desired result with its origin at the current
565 point, and increase the current horizontal position by the width
567 The number registers must also be modified so that they correspond to the
571 For example, suppose you wanted a construct that `cancels' an expression
572 by drawing a diagonal line through it.
581 define cancel 'special Ca'
593 \eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\e
602 Then you could cancel an expression\~\c
605 .BI \%cancel\ {\ e\ }
608 Here's a more complicated construct that draws a box round an expression:
616 define box 'special Bx'
624 \eZ'\eh'1n'\e\e*(0s'\e
630 \eD'l \e\en(0wu+2n 0'\e
632 \eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e
634 \eD'l -\e\en(0wu-2n 0'\e
636 \eD'l 0 \e\en(0hu+\e\en(0du+2n'\e
654 A positive value of the integer\~\c
656 (in hundredths of an em) sets the vertical spacing before the equation,
657 a negative value sets the spacing after the equation, replacing the
659 This primitive provides an interface to
662 escape (but with opposite sign).
665 This keyword has no effect if the equation is part of a
669 .SS Extended primitives
671 .BI col\ n\ {\ .\|.\|.\ }
673 .BI ccol\ n\ {\ .\|.\|.\ }
675 .BI lcol\ n\ {\ .\|.\|.\ }
677 .BI rcol\ n\ {\ .\|.\|.\ }
679 .BI pile\ n\ {\ .\|.\|.\ }
681 .BI cpile\ n\ {\ .\|.\|.\ }
683 .BI lpile\ n\ {\ .\|.\|.\ }
685 .BI rpile\ n\ {\ .\|.\|.\ }
686 The integer value\~\c
688 (in hundredths of an em) increases the vertical spacing between rows,
692 escape (the value has no effect in MathML mode).
693 Negative values are possible but have no effect.
694 If there is more than a single value given in a matrix, the biggest one
700 is generating troff markup, the appearance of equations is controlled
701 by a large number of parameters. They have no effect when generating
702 MathML mode, which pushes typesetting and fine motions downstream to
703 a MathML rendering engine.
704 These parameters can be set using the
710 This sets parameter\~\c
727 should assume an x\~height of 0.45\~ems.
731 Possible parameters are as follows.
732 Values are in units of hundredths of an em unless otherwise stated.
733 These descriptions are intended to be expository rather than
737 . TP \w'\fBdefault_rule_thickness'u+2n
742 doesn't set anything at a smaller point-size than this.
743 The value is in points.
749 primitive emboldens an equation
750 by overprinting two copies of the equation
751 horizontally offset by this amount.
752 This parameter is not used in MathML mode; instead, fat text uses
757 <mstyle mathvariant='double-struck'>
763 A fraction bar is longer by twice this amount than
764 the maximum of the widths of the numerator and denominator;
765 in other words, it overhangs the numerator and
766 denominator by at least this amount.
774 is applied to a single character,
775 the line is this long.
780 produces a line whose length is the width of the object to which it applies;
781 in the case of a single character,
782 this tends to produce a line that looks too long.
786 Extensible delimiters produced with the
790 primitives have a combined height and depth of at least this many
791 thousandths of twice the maximum amount by which the sub-equation that
792 the delimiters enclose extends away from the axis.
795 .B delimiter_shortfall
796 Extensible delimiters produced with the
800 primitives have a combined height and depth
801 not less than the difference of
802 twice the maximum amount by which the sub-equation that
803 the delimiters enclose extends away from the axis
807 .B null_delimiter_space
808 This much horizontal space is inserted
809 on each side of a fraction.
813 The width of subscripts and superscripts is increased by this amount.
817 This amount of space is automatically inserted after punctuation
822 This amount of space is automatically inserted on either side
827 This amount of space is automatically inserted on either side of
832 The height of lowercase letters without ascenders such as `x'.
836 The height above the baseline of the center of characters
837 such as `\(pl' and `\(mi'.
838 It is important that this value is correct for the font
842 .B default_rule_thickness
843 This should set to the thickness of the
845 character, or the thickness of horizontal lines produced with the
853 command shifts up the numerator by at least this amount.
859 command shifts up the numerator by at least this amount.
865 command shifts down the denominator by at least this amount.
871 command shifts down the denominator by at least this amount.
875 Normally superscripts are shifted up by at least this amount.
879 Superscripts within superscripts or upper limits
883 are shifted up by at least this amount.
884 This is usually less than sup1.
888 Superscripts within denominators or square roots
889 or subscripts or lower limits are shifted up by at least
891 This is usually less than sup2.
895 Subscripts are normally shifted down by at least this amount.
899 When there is both a subscript and a superscript, the subscript
900 is shifted down by at least this amount.
904 The baseline of a superscript is no more
905 than this much amount below the top of the object on
906 which the superscript is set.
910 The baseline of a subscript is at least this much below
911 the bottom of the object on which the subscript is set.
915 The baseline of an upper limit is at least this
916 much above the top of the object on which the limit is set.
920 The baseline of a lower limit is at least this
921 much below the bottom of the object on which the limit is set.
925 The bottom of an upper limit is at least this much above the
926 top of the object on which the limit is set.
930 The top of a lower limit is at least this much below
931 the bottom of the object on which the limit is set.
935 This much vertical space is added above and below limits.
939 The baselines of the rows in a pile or matrix are normally
941 In most cases this should be equal to the sum of
948 The midpoint between the top baseline and the bottom baseline
949 in a matrix or pile is shifted down by this much from the axis.
950 In most cases this should be equal to
955 This much space is added between columns in a matrix.
959 This much space is added at each side of a matrix.
963 If this is non-zero, lines are drawn using the
965 escape sequence, rather than with the
967 escape sequence and the
973 The amount by which the height of the equation exceeds this
974 is added as extra space before the line containing the equation
977 The default value is 85.
981 The amount by which the depth of the equation exceeds this
982 is added as extra space after the line containing the equation
985 The default value is 35.
1004 The default value is\~0
1005 (This is typically changed to\~1 by the
1016 A more precise description of the role of many of these
1017 parameters can be found in Appendix\~H of
1018 .IR "The \*(txbook" .
1022 Macros can take arguments.
1027 is between 1 and\~9,
1030 argument if the macro is called with arguments;
1031 if there are fewer than
1033 arguments, it is replaced by nothing.
1034 A word containing a left parenthesis where the part of the word
1035 before the left parenthesis has been defined using the
1038 is recognized as a macro call with arguments;
1039 characters following the left parenthesis
1040 up to a matching right parenthesis are treated as comma-separated
1042 commas inside nested parentheses do not terminate an argument.
1045 .BI sdefine\ name\ X\ anything\ X
1050 is not recognized if called with arguments.
1053 .BI include\ \(ts file \(ts
1055 .BI copy\ \(ts file \(ts
1056 Include the contents of
1071 .BI ifdef\ name\ X\ anything\ X
1076 (or has been automatically defined because
1078 is the output device)
1084 can be any character not appearing in
1089 Remove definition of
1091 making it undefined.
1094 Besides the macros mentioned above, the following definitions are available:
1099 (this is the same as
1105 (three dots on the base line),
1111 normally uses at least two fonts to set an equation:
1112 an italic font for letters,
1113 and a roman font for everything else.
1117 changes the font that is used as the italic font.
1118 By default this is\~\c
1120 The font that is used as the roman font can be changed
1127 Set the roman font to\~\c
1133 primitive uses the current italic font set by
1137 primitive uses the current roman font set by
1141 command, which changes the font used by the
1149 primitives to changes fonts within an equation,
1150 you can change all the fonts used by your equations
1159 You can control which characters are treated as letters
1160 (and therefore set in italics) by using the
1162 command described above.
1165 causes a character to be set in italic type.
1168 causes a character to be set in roman type.
1172 .Tp \w'\fB@MACRODIR@/eqnrc'u+2n
1174 Initialization file.
1176 .SH MATHML MODE LIMITATIONS
1177 MathML is designed on the assumption that it cannot know the exact
1178 physical characteristics of the media and devices on which it will
1180 It does not support fine control of motions and sizes to the same
1186 parameters have no effect on the generated MathML.
1196 operations cannot be implemented, and yield a
1197 MathML `<merror>' message instead.
1202 keyword is silently ignored, as centering on the math axis is the
1208 over troff sets extra large \(en notably the integral sign \(en
1209 may appear too small and need to have their `<mstyle>' wrappers
1213 As in its troff mode,
1215 in MathML mode leaves the
1219 delimiters in place for displayed equations, but emits no explicit
1220 delimiters around inline equations.
1221 They can, however, be recognized as strings that begin with `<math>'
1222 and end with `</math>' and do not cross line boundaries.
1227 section for translation limits specific to
1232 Inline equations are set at the point size that is current at the
1233 beginning of the input line.
1239 features don't work.
1240 These could, in theory, be implemented with `<maligngroup>' elements.
1242 In MathML mode, each digit of a numeric literal gets a separate
1243 `<mn>\:</mn>' pair, and decimal points are tagged with `<mo>\:</mo>'.
1244 This is allowed by the specification, but inefficient.
1248 .BR @L_ROFF@ (@MAN1EXT@),
1249 .BR @L_TROFF@ (@MAN1EXT@),
1250 .BR @L_P_PIC@ (@MAN1EXT@),
1251 .BR @L_ROFF@_font (@MAN5EXT@),