Mathematical Formulas in Microsoft Word

Formula typesetting can be a tedious work in most typewriter software. Word (here: Version 2003) is no excuse. When you are — like me — forced to use this software for writing technical reports containing formulas, then this tip might be useful for you. The “typical” way of writing formulas is creating formula objects which can be edited by a double click on them. However, as soon as a document contains many of those objects, their handling becomes uncomfortable because they don’t behave like their surrounding text.

But there is another, almost perfectly hidden feature which allows to typeset easy formulas as real text which respects text formatting styles: Equation fields.

Equation fields

Hit Ctrl+F9 and add the following construct: { EQ \f(a;b) }. Then place the cursor on or before this field and hit Shift+F9. You should see a fraction like this: \frac{a}{b}.

The advantage of this technique over Word’s built-in formula editor is that these formulas are styled according to their surround text automatically. The omits much of the hassle involved in placement and handling of the formula objects.

There is just one thing you should not do: Don’t double click on them because they are converted to formula objects this way. If this happens by accident, use Undo (Ctrl+Z) to repair the damage. To edit an equation field, place the cursor on it and hit Shift+F9 again to unveil its code.

Commands

An equation field can contain any sequence of the following commands, mixed with plain text. Nesting is supported. Each command I find useful is presented with a short example of typical use.

Description Example
\a Matrix. Available options: con determines number of columns, hs and vs horizontal and vertical spacing (in pt), the command \al, \ac and \ar allow to determine the horizontal alignment within the cells (\al is default). Example code: \a \co2 \hs3 (a;b;c;d) \begin{matrix} a & b \\  c& d \end{matrix}
\b Braces. Places automatically sized braces around big expressions like fractions or roots. Example code: \b(\f(•;•)) \left ( \frac{\cdot}{\cdot} \right )
\d Positioning. Creates spaces and indentation. I don’t use it.
\f Fraction. Example code: \f(a;b) \frac{a}{b}
\i Integral. Example code: \i(a;b;f(x)dx) \int_a^b f(x)dx
\l List. I don’t use it.
\o Overwrite. Places text in the second argument over the text in the first argument. Options \al, \ac and \ar determine their alignment. Example code: \o\ac(n;\s\up4(•)) \dot{n}
\r Root. Example code: \r(n;a) \sqrt[n]{a}
\s Super- and subscript. Available options are \don and upn. The first one creates subscripts, the second one superscripts. Example code: a\s\up4(n) b\s\do4(i) a^n\ b_i
\x Frame. Places a framed box around its argument. Example code: \x(a) \fbox{a}

Golden path

If you have to write a longer document, like a thesis, which contains vast amounts of formulas, get LaTeX! (Technical remark: the examples above are rendered using a server-based LaTeX-Renderer.)