Flag of the United Kingdom
Andreas Rejbrands webbplats

Aktuellt

Advanced authoring in Microsoft Word – Part 13: Math AutoCorrect

The formula editor in Microsoft Word 2007 and later is great out of the box, but some manual tuning can make it suit your personal needs better.

To change math settings, you click the small button in the bottom-right corner of the Tools group in the Design (Equation Tools) tab of the ribbon to bring up the Equation Options dialog box.

The Equation Options dialog box in Microsoft Word 2010

Personally, I have changed the operator line-break option so that binary and relational operators are duplicated, but your mileage may vary. By clicking the ‘Recognized Functions…’ button, you can add identifiers that you want Word to recognise as functions (like sin). The ‘Math AutoCorrect…’ button opens the following dialog box.

The Math AutoCorrect tab in the AutoCorrect dialog box in Microsoft Word 2010

Here you can add, change, and delete the tokens that Word will automatically replace, like \int which is replaced by ∫. You should make this dialog box your friend.

First, it requires super-human patience to write \doubleR, \doubleC etc. every time you need the symbols ℝ, ℂ etc. To remedy this, you should add \R, \C etc. to the list:

\N
\Z
\Q
\R
\C

Also, I find it very convenient to enable the ‘Use Math AutoCorrect rules outside of math regions’ option. This way, the mathematical list of tokens to be automatically replaced will be used everywhere in Word, and not only inside formulae.

Moving on, Math AutoCorrect can be used to enter fancy arrows. The following is a screenshot from one of my math texts:

A screenshot of a mathematics text containing large equivalence arrows.

How did I achieve these long arrows? The answer is that I have put (literal) whitespace above the arrows; they will stretch to match the length of the text above. Also, I surround the arrows with (literal) whitespace to create the spacing. (Yes, this is semantically nonsensical, but this is Word. It works perfect in practice, and there is not really any better solution.)

In detail, I use the following text to create the arrows:

"            " ⇔┴"              "  "            "

The ┴ character comes from \above. I use Math AutoCorrect to insert the above string in response to the token \cooleq. Similarly, I use \coolimp to insert an implication arrow. To summarise,

\cooleq
"            " ⇔┴"              "  "            "
\coolimp
"            " ⇒┴"              "  "            "

This way, I only have to write \cooleq (say) and press Space twice in order to obtain the nice arrow. (Exercise: Why twice?)

In the screenshot, I also use curly brackets to enclose systems of equations (the semantics is that the individual lines within a bracket are to be combined via the logical ∧ operator). The same notational device is used when defining functions piecewise. To create these brackets conveniently, I have added the following Math AutoCorrect item:

\pw
{┤

┤ is inserted by \close; it closes the bracket. {┤ and a space will create an empty bracket list, to be filled-in in WYSIWYG mode. This is probably the easiest way, but you can also write the entire structure manually at once, like in {\eqarray(a@b@c)\close.


Visa alla tidigare notiser.

Visa enbart de senaste notiserna.