Flag of Sweden
Andreas Rejbrand’s Website

Advanced authoring in Microsoft Word – Part 14: Equation numbering

Neither the old Microsoft Equation 3.0 editor nor the new integrated formula editor offers automatic equation numbering. It is a bit sad that the new editor – which is really well-designed otherwise – cannot do this, because equation numbering is very important in most math-heavy texts.

However, in the old days, you could easily number Microsoft Equation 3.0 objects manually. The approach was to create a centred tab stop at the middle of the page (often at 8 cm) and a right-aligned tab stop at the right margin (often at 16 cm). Then you simply put the formula at the first tab stop and the equation number at the second tab stop, producing results like this:

A Microsoft Equation 3.0 equation object numbered using tab stops.

This is extremely robust and the visual appearance is perfect (if you disregard the fact that the old equation editor was very limited in functionality and didn’t produce very pretty results at all).

Now we get to the bad news. If you use the new formula editor, this approach does not work anymore. In fact, there is no reasonably simple way to number equations (not even manually). Why is this? To understand the problem, we must digress a bit.

Formulae created by the new editor can be displayed in two modes. First, there is the ‘standard’ mode which is used if the formula is alone on its line (alone in a paragraph in the technical sense, or alone on a line created using one or two soft line breaks within a paragraph). This mode is also called ‘display’ mode. But then there is also a special ‘inline’ mode, used if the formula is included together with other (normal, non-math) text in a line. In this mode, the formula is automatically typeset in a more compact way, as illustrated in the following two examples:

Microsoft Word 2010: formula on its own line vs. in-line

Microsoft Word 2010: formula on its own line vs. in-line

This is not a bug, but a great feature. Indeed, in math-heavy texts, formulae are used both ways. Large and central formulae are put in their own paragraphs (visually), while smaller formulae are included within ordinary paragraphs without this visual emphasis. And in the latter case, you do want the formula to be a nice citizen within the paragraph. In the example above, the different typesetting is fairly obvious. However, in practice, in-line formulae are most often smaller than the one above. A typical example might be the following:

Microsoft Word 2010: formula on its own line vs. in-line (a more typical example)

Still, occasionally you do ‘need’ to include larger formulae together with ordinary text within a paragraph, and so Word’s automatic reduction of format is very helpful, indeed.

Let us return to the question of equation numbering. Now we know why the old-school approach of manual equation numbering does no longer work. If you try to number a formula this way, you insert two horizontal tab characters and the equation number within the same paragraph as the formula, so Word will (incorrectly) assume the formula is used ‘in-line’ and display it as such. Hence, the formula will be displayed in the ‘compact’ way, even though it is effectively used alone in its paragraph. The result is this:

Microsoft Word 2010: A formula is numbered using tab stops. The formula is displayed in the compact format, which is undesired.

Notice that the integral sign is too compact. (An even more severe catastrophe will result if you do this to a sum or to 1/(1/a+1/b).)

This is all very sad. The new formula editor in Microsoft Word 2007 and later is awesome, but it clearly lacks a very important feature. It is almost like designing a really luxurious car, and forgetting to add doors to it. Fortunately, there is a way to number equations manually (using the modern editor), but it is certainly not convenient. Rather, it is horrible, but the end result (which you get to after quite some effort) looks perfect.

The trick is to create a 1×3 table and put the formula in the middle cell and the equation number in the right-most cell. This way the formula becomes alone in its paragraph, but the visual result is as if you used the tab stop method. To do this, follow these steps:

  1. Create a 1×3 table.

  2. Set the width of the table to 100 % (using the Table Properties dialog box).

  3. Set the column widths of the table to 10 %, 80 %, and 10 %, respectively (using the Table Properties dialog box).

  4. Set the alignment of the middle cell to ‘Align Center’ (using the Alignment group in the Layout Table Tools tab of the ribbon).

  5. Set the alignment of the rightmost cell to ‘Align Center Right’ (using the Alignment group in the Layout Table Tools tab of the ribbon).

  6. Disable the table border (using the Borders button in the Table Styles group in the Design Table Tools tab of the ribbon).

  7. Select the entire table and set the ‘Space After’ paragraph setting to 10 pt, or whatever is used for normal body text in the document (using the Paragraph group in the Page Layout tab of the ribbon).

  8. Put the formula in the middle cell and the equation number in the right-most cell. (Well, obviously...)

The following is what you get:

Microsoft Word 2010: A formula is numbered using the table method.

If you skipped Step 7, the space between the formula and the line after would be too small (well, none, actually). If you enable the display of hidden formatting characters and table gridlines, you see more clearly the structure of this construction:

Microsoft Word 2010: A formula is numbered using the table method. Hidden formatting characters and the table gridlines are displayed.


Show all news items.

Only show the most recent news items.