WYSIWYG formula typesetting in Word 95, 97, & 00 is done by using
Preparing Equations in MS Word page 1
WYSIWYG formula typesetting in Word is done by using field codes (select "Fields" under Insert Menu and select EQ field type. Select "Options" under Tools menu and toggle field codes on/off within page layout view). Alt & F9 keys will also toggle the Field Codes on and off. Ctrl &F9 inserts a blank field. Note: The graphical "Equation Editor" in MS Word is not recommended for creating equations. It does not
allow global editing which is a fatal flaw. In addition, it is very slow and substantially increases the size of a document due to the addition of a graphical object for each equation prepared.
EQ (Equation) as a “field type”
{eq Switches} produces a mathematical equation. Word displays a new result when you edit the equation switches. If you accidentally double-click an EQ field, Word irreversibly converts the field into an embedded Equation Editor graphic object. Please make backups so that you can restore lost EQ fields.
Switches specify how to build the equation using the element or list of elements, enclosed in parentheses, that follow each switch. You can modify any switch with the appropriate switch options. For more information on available switches and their options, see the rest of this document.
The comma, open parentheses, and backslash characters have special uses in EQ fields. If you want one of these symbols to appear in the result, you must precede the symbol with a backslash, as follows: \, or \( or \\.
Note: Some switches require elements separated by a separator character. The appropriate separator character to use depends on the decimal character set for your operating environment. If the decimal character is a period, use a comma as the separator character; if the decimal character is a comma, use a semicolon as the separator character. The examples in this topic assume a period decimal character and a comma separator character.
Equation Switches
Word uses the following switches for equations: \a() \b() \d() \f(,) \i(,,) \o() \r(,) \s() and \x() . Array: \a()
Draws a two-dimensional array using any number of elements. In a multiple-column array, elements appear in order by rows. Any number of the following options can modify the \a switch.
Option Description
\al Align left within columns
\ac Align center within columns
\ar Align right within columns
\con Number of columns (default is 1)
\vsn Points of vertical spacing between lines
\hsn Points of horizontal spacing between columns
12
for example, { eq \a \ac \co2\vs4\hs6(1,2,3,4)} produces 34
Bracket: \b()
The \b switch brackets a single element in a size appropriate to the element. The default brackets are parentheses. The following options can modify the \b switch.
Option Description
\lc\c Draws the left bracket character using the character specified for c.
\rc\c Draws the right bracket character using the character specified for c.
\bc\c Draws both bracket characters using the character specified for c.
If the character you specify for the bracket character is {, [, (, or <, then Word uses that character as the left bracket and the corresponding closing character as the right bracket. If you specify any other character for the bracket character, Word uses that character for both brackets.
12,,for example, { eq \b \lc\{ \rc\](12)} produces 12 and {eq \b\bc\[(\a\ac\co2\vs6\hs6(1,2,3,4))} produces ,, {]34,,
Displace: \d()
Preparing Equations in MS Word page 2
With the \d switch, you can precisely control where the next character is drawn. The following options can modify the \d switch. Note that empty parentheses must follow only the last option in the instructions.
Option Description
\fon () Draws forward n points.
\ban () Draws back n points.
\li () Draws a line from the end of the displaced character to the beginning of the next character. for example, { eq \d \fo10 \li()} produces
Fraction: \f(,)
The \f switch creates a fraction with the numerator and denominator centered above and below the division line. This code takes two elements separated by a separator character. The first element represents the numerator, the second the denominator . The separator character is a comma unless you use it as a decimal character; in that case, use a semicolon. Fractions work equally well with text, graphics, or numbers.
2for example, { eq \f(2,3)} produces 3
Integral: \i(,,)
The \i switch creates an integral, using the specified or default symbol and three elements. The first element is the lower limit, the second is the upper limit, and the third is the integrand.
The following options can modify the \i switch
Option Description
\su Changes the symbol to a capital sigma (S) and creates a summation.
\pr Changes the symbol to a capital pi (p) and creates a product.
\in Creates the inline format with the limits displayed to the right of the symbol instead of above and below. \fc\c Substitutes a fixed-height character specified by c for the symbol.
\vc\c Substitutes a variable-height character specified by c for the symbol (matches height of the 3rd element)
55
for example, { eq \i \su(i=1,5, X)} produces X and { eq \i (t=0,5, Xdt)} produces Xdt ,iii i ,,
i=1t=0
Overstrike: \o()
The \o switch overstrikes each successive element on top of the previous ones. Any number of elements is permitted. Each character is printed within an invisible character box. Options align the boxes on top of one another. The following options can modify the \o switch
Option Description
\al Aligns the left edges of the characters' boxes.
\ac Aligns the centers of the characters' boxes. This is the default.
\ar Aligns the right edges of the characters' boxes.
--for example, { eq \o(e,)} with 6 points of "character raise" applied to the hyphen results in the text " e"
Radical: \r(,)
The \r switch draws a radical using one or two elements. A single element is drawn inside the radical, forming a square root. With two elements, the first element -- the exponent -- is drawn above the radical, and the second element is drawn inside. 2for example, { eq \r(2,3)} produces 3
Superscript or Subscript: \s() (Use MS Word Character Spacing (Format menu-Fonts-Char Spacing- Position)
for subscripts or superscripts, i.e., use this Field Code feature only for simultaneous super/subscripts).
The \s switch positions elements as superscripts or subscripts. Each \s code can have one or more elements. If more than one element is specified, the elements are stacked and left-aligned. The following options can follow the \s switch with single elements.
Option Description
\ain () Adds space above a line in a paragraph by the number of points specified by n.
Preparing Equations in MS Word page 3
\upn () Moves a single element up the number of points specified by n. The default is 2 points. \din () Adds space below a line in a paragraph by the number of points specified by n. \don () Moves a single element down the number of points specified by n. The default is 2 points.
e Nfor example, { eq \s \up4(N) \s \do4(2)} results in and i{ eq \o(\s\up8(e),\s\do8(dq))} results in i 2dq
Box: \x()
The \x switch creates a border for an element. When used without options, this code draws a box around the element. The following options can be combined to modify the \x switch .
Option Description
\to Draws a top border.
\bo Draws a bottom border.
\le Draws a left border.
\ri Draws a right border.
for example{ eq \x(Step One)} results in Step One and { eq \x \le \ri(5)} results in 5