## Advanced authoring in Microsoft Word – Part 12: Mathematics

Before Microsoft Word 2007, you had to use Microsoft Equation 3.0 that shipped with Word or some third-party formula editor to add formulae to documents; in any case, formulae were included as OLE objects because there was no native math support in Word.

However, Microsoft Word 2007 and later include an integrated formula editor, so that math can be edited as directly as ordinary text (formulae are no longer OLE objects). In addition, the new formula editor is vastly superior to the old Microsoft Equation 3.0 editor. In fact, it is completely brilliant when it works.

The new editor allows very convenient and rapid formula input using only the keyboard. It is very easy to include even rather advanced content (again, using only the keyboard) using a LaTeX-like notation with some additional shortcuts. Also, the WYSIWYG nature of Microsoft Word makes it much easier to navigate and maintain formulae in Word compared to plain LaTeX.

Here are some hints to get you started:

• You insert a new formula by pressing Alt+=.

• Special characters are inserted using the \chr syntax. Try \alpha, \Gamma, \cdot, \oplus, \partial, etc. (The token is replaced by the actual character when you press Space or when you you enter some suitable operator or punctuation after the code.)

• In addition, you can try differently styled characters: \scriptD, \scriptO, \doubleR, \frakturR, etc.

• a^b is automatically transformed to ab (when you press space or enter a binary operator, for instance). If your exponential contains several terms, write a^(b+c) which will be transformed to ab + c. If you really do want a(b + c), write a^((b+c)).

• The same remarks apply to subscripts, like \epsilon_0.

• The same remarks apply to fractions. 1/2 and 1/(a+b) will both be transformed to what you expect.

• To insert a sin x, make sure to insert a space between a and sin. Otherwise the sin function will not be recognised, and thus it will be in italics (which is incorrect).

• To modify a character, try v\bar, f\hat, x\dot, x\ddot, etc., followed by two spaces (the first one will replace the token, and the second one will format the structure).

• To modify a group of terms, try (x+iy)\bar or \begin x+iy\end\bar and two spaces. (The parentheses in the first case will be removed.) However, the bar will hide the dot above the i, which is undesirable. Better is to use \overline(x+iy) followed by a space.

• To write a n-ary sum, simply write \sum_(k=1)^\infty followed by a1 space to automatically get the sum symbol with k = 1 below and the infinity sign above. This also works with \prod, \int, \iint, \iiint, \oint, \oiint, \bigotimes, \bigcup, etc. (1 Actually, you need to press space twice. The first space will replace \infty by ∞ and the other one will set up the sum.)

• To write a square root, write \sqrt followed by a space, or a parenthesised expression (and press space when you are done). To write the nth root of a, write \sqrt(n&a) followed by a space.

• Binomial coefficients can be written (n\atop k).

• Brackets of different kinds are automatically recognised in simple cases. For instance, you can write [a, b] and get a true bracket (after you press space or a binary operator, for instance). You can also try \bra \phi_1 | \phi_2 \ket and the vertical bar will be interpreted correctly as a separator.

• You can also write ’strange’ brackets like [0, 1[ (which is how Swedes write [0, 1)), with only little more effort: [0, 1\right[ and a space.

• To toggle bold/italic on/off, use Ctrl+B/Ctrl+I (this is Microsoft Word, remember?).

• To insert a 3×3 matrix, write \matrix(@@&&) followed by a space. To get the parentheses, write (\matrix(@@&&)) and a space. You can also enter the elements directly (guess how!), but it is often easier to do that after the matrix ‘skeleton’ has been created.

• You might find Shift+Return useful in some cases where you want to align formulae. Also, you have probably already realised that (x+4)^2 >= 0,  \forall x\in\doubleR looks very good on its own row if you put two spaces after the comma!

• To enter plain text in a formula, write the text inside double quotation marks: For instance, a =\above("by the lemma") 0 and E_"before"; end by pressing space once or twice (or enter a binary operator or something else you need).

As examplified above, Word automatically replaces tokens (such as \int) when you press Space or some suitable operator or punctuation mark, and automatically formats structures like fractions, superscripts, large operators and brackets when you press Space or enter some suitable operator or punctuation mark. In the sequel, I will not explicitly point out the need to trigger these actions. For example, I will write ‘enter a^b’ instead of ‘enter a^b followed by a space, a binary operator, or some suitable punctuation’.

Finally, do not forget the context (right-click) menu. This is highly context sensitive, and has a lot of convenient commands (set degree of root, remove accent, add lower/upper limit, remove limit, remove exponent, add argument, remove brackets, etc.). If you have a Menu key on your keyboard, this will come in very handy (you should also learn the letter that activates each menu item). If you do not have a menu key on your keyboard, consider buying a new keyboard with such a key.

Visa alla tidigare notiser.

Visa enbart de senaste notiserna.