.lm .ifnot hlp .lm.hl 1 Equation formatting .else hlp .HELPB EQUATIONS .endif hlp .f.p An equation formatting routine designed to format multiple nested fractions has been added to RUNOFF (not available in DSR). To use this facility, the equation flag must be enabled with the _.FLAGS EQUATION command. Braces _{ _} are used as flags to describe how an equation is to be formatted. If a brace must appear in the text of the equation, it must be preceded by the underscore __. Subscripts or superscripts are handled properly in formatting fractions, but you may wish to add extra space between the fraction line and the numerator or denominator. This can be done with the command _.ENABLE EQUATION 1 to add 1/2 line, or _.ENABLE EQUATION 2 to add 1 whole line. .p.text Fractions are formatted in the following manner: express the fraction as .i10; {NUMERATOR}/{DENOMINATOR} .br;and RUNOFF will output: .nf.lm+10; NUMERATOR ______________________ DENOMINATOR .end text .f.lm-10 .if HLP .if RSX.ts 25,45,55.nj Subtopics available: .s;note features nesting spacing vertical__spacing Warning commands .j .endif RSX .endif hlp .HELPC NOTE .p Some operating systems modify text before sending it to the output file. In particular, VMS swallows some backspaces! This can cause equations not to appear properly. If you are having problems formatting equations, try having RUNOFF send the output directly to your terminal or to the printer rather than to a file. .HELPC FEATURES .p;Inside an equation, the following features are disabled: .list0.le Underline flags .le Fill .le Underlining .le Break flags - No break is caused; the line is continued. .le Hyphenation - Hyphenation flags can be used to continue a line. .le Autobreak .le Tabs .els 0 .p If an equation will not fit on a single line, it will be continued on the next line. .HELPC NESTING .tp3.p Fractions can be nested inside each other. .i5;For example {{A}/{B}#+#{C}/{D}}/{DENOMINATOR}. .i5;A/B and C/D are both nested to the second level. .br;The maximum nesting is about 6 deep. If the nesting is all in numerators, then it is limited to a depth of 12. If it is all in denominators, it is limited to a depth of 6. .p.i5;Example of 4 levels of nesting in numerators: .i5;{1+{2+{3+{4}/{D}}/{C}}/{B}}/{A} .i5;Example of 6 levels of nesting in denominators: .p.i5;{1}/{A+ {2}/{B+{3}/{C+{4}/{D+{5}/{E+{6}/{F}}}}}} .HELPC SPACING .p Spaces or tabs can be freely used between numerators and denominators outside the braces for clarity; they will not appear in the final output. For example, {A}/{B} will format the same as {A}#/#{B}. In addition, tabs and spaces are treated as non-expandable spaces. As a result, fractions are never expanded to right justify the text. If an equation is imbedded inside a normal line of text and FILL is enabled, only the text outside the equation is filled. The commands _.CENTER and _.RIGHT will center or right justify equations. In addition, centered and right justified tab stops can be used to line up equations. .HELPC VERTICAL__SPACING .p If a fraction occupies too much space to fit within the current line spacing, the _.SEPARATED FRACTION command can be used to automatically generate enough space to separate fractions. If you prefer to manually adjust the spacing, then the _.FIGURE command should be used. .p;You may wish to put equation numbers along the right margin opposite the equation. This can be done by by resetting the tab stops, and setting tab right. A single tab should precede the number to be justified. .text;The following example shows the commands necessary to do this: .i5; _.TAB STOPS _.TAB RIGHT .i5; {A + B}/{C + D} eq.___#5 .c;Is printed as: .i5;A + B .tab stops .tab right.i5;__________ eq._#5 .i5;C + D .end text.s.tab left .HELPC WARNING .note WARNING A fraction cannot be split between 2 lines. If a fraction imbedded in text is too big to fit on the current line, it is moved down to the next line. If the fraction is still too big, then RUNOFF will try to break it. The break will probably result in the error message: .c;RNO -- Missing right brace in equation A string of other error messages will probably follow the first one and the output text will usually look very strange. The extra error messages should be ignored. The solution to this problem is to break the fraction up into 2 separate fractions. .end note .HELPC COMMANDS .p The commands used to control equation formatting are: .list 0 .le _.FLAGS EQUATION .le _.NO FLAGS EQUATION .le _.ENABLE EQUATION n .LE _.DISABLE EQUATION .le _.SEPARATED EQUATION .le _.END SEPARATED EQUATION .END LIST .note The equation formatting routine will only work properly with word processing style hard copy printers that support sub/superscript escape sequences and backspacing. If the sub/superscripting escape sequences are not the same as used by DIABLO printers, they must be defined first by the _.DEFINE SUBSCRIPT and _.DEFINE SUPERSCRIPT commands. Care must also be taken with some printers to see that the paper doesn't slip, as this will produce unacceptable output. If the top margin is not large enough, equations inside titles or subtitles can cause problems. .en