Word
From Better Practices
Contents |
[edit] Math in Microsoft Word 2007
[edit] Overview
If you have every tried to create a mathematical document with Word, you'll be happy to know that Microsoft has dumped the awful Equation Editor in Word 2007 in favor of native support for mathematics. Almost anything that Microsoft does becomes a de-facto standard, whether we like it or not, whether we use it or not. Given that fact, we should be pleased when Microsoft does something well.
In a Word document, Mathematical expressions are entered into special Math Zones that can be created from the Insert Ribbon or via the keyboard shortcut alt=. The Insert Ribbon? Yes, another change throughout the Office suite is that toolbars and menus have been integrated and replaced with ribbons. It's actually another nice change, once you get used to it.
When you're in a Math Zone, the Math Ribbon is displayed, which allows you to create a mathematical expression by clicking on symbols and templates. It's very easy to create a mathematical expression this way, but as I have already noted, point and click templates are much too slow for serious mathematics. Anything that forces you to take your fingers from the keys is bad.
The really great feature in Word 2007 is the linear input language for mathematics, developed by Murray Sargent who is also a member of the W3C Math Working group. The input language is closer to calculator-style input than it is to LaTeX, so it's very easy to read and understand. But you won't see the input language for long, because as soon as any part of the mathematical expression is unambiguously defined, it is automatically displayed in correct, built-up form. This feature, appropriately enough, is called Formula Auto-Buildup (FAB).
[edit] Examples
Let's look at some examples. If you were to type
(x+y)/2 + sin x + \sqrt(a^2 + b^2)
The result would be
Moreover, here's how FAB would work:
- The fraction would display correctly as soon as you hit the space bar after typing the denominator. Note that the parentheses are omitted. To force parentheses, just type another pair.
- The second term would display correctly as soon as you hit the space bar after the x.
- The \sqrt would be replaced by the square root symbol as soon as you type "(". The surd would be added as soon as you type ")"
- The a^2 would display correctly as soon as you hit the space bar or + after the exponent.
- etc.
To get the quadratic formula, type
x = (-b +- \sqrt(b^2-4ac))/2a
The result is
Compare the markup here with the markup we used for Presentation MathML, or the markup needed in LaTeX:
x = \frac{- b \plusmn \sqrt{b^2-4ac}}{2a}
The Word markup is certainly the easiest to type and read.
For an example with an integral, type
\int_\-infty ^\infty e^(-1/2 z^2) \dd z = \sqrt(2\pi)
to get
Compare this with the markup needed we used for Content MathML.
[edit] Resources
- Murray Sargent's Math in Office blog
This blog has a number of special tips and suggestions as well as some insight into the history of encoding and displaying mathematics with computers.
- Unicode Nearly Plain-Text Encoding of Mathematics
This is the technical specification, written by Murray Sargent, for the new input language in Word 2007.
--Kyle 14:30, 14 July 2007 (EDT)

