Equation Numbering in Office 2016
Word 2016 and PowerPoint 2016 join OneNote 2010 (and later) in offering a way to display equation numbers flushed to the right margin. To enter an equation number using the linear format (see Section 3.21), type the equation followed by a # (U+0023) followed by the desired equation number text and hit Enter. For example, E=mc^2#(30) ⏎ renders as
Internally this layout is created with an equation array in which the # character acts as a marker telling the LineServices math handler to flush what follows the # to the right margin. Because equation arrays allow you to align parts of multiple equations vertically, you can use a nested equation array with line breaks and appropriate &’s to get arbitrary inter-equation alignments as explained in the equation-array post.
Flushing the equation number to the right margin is key, but in addition, one needs a way to number the equations automatically and refer to them in the text. Chapter 6 of the book Creating Research and Scientific Documents using Microsoft Word gives a method for doing just that. The approach inserts a center tab before the equation and a right tab before the equation number. While this works well for simple equations, it currently forces the equation to use inline typography, for which integral signs and the like are small rather than large as in display-mode typography (TeX $...$ vs $$...$$). This behavior is illustrated in the earlier post. So for Word 2016, the book approach can be updated to use the equation array # option instead of the flush-right tab.
The book explains how to number equations in Word automatically using the Equation Caption, which is based on Word’s handy SEQ Equation field. The other Office applications don’t have this feature unfortunately. The way it works is as follows. On the REFERENCES ribbon tab
1) Click on “Insert Caption”
2) Choose the Equation label
3) Check the “Exclude label from caption” box
4) Hit the OK button
5) Insert a ( in front of your equation number and a ) after the number
6) Change the formatting as desired preferably using an equation style with the formatting you like
The book notes that some publishers don’t want parenthesized equation-number references, so it’s a good idea to have the parentheses outside of the field. You can copy/paste this parenthesized equation number to insert equation numbers for other equations in your paper. Word automatically numbers all such entries sequentially.
To refer to an equation number, you first need to bookmark it. Select its Equation Caption with or without the enclosing parentheses and in the INSERT ribbon tab click on Bookmark. Give the equation number a name starting with “eq” so that you can tell equation numbers apart from other kinds of bookmarks and click on Add.
Wherever you want to reference an equation number, insert a Cross reference to the equation number’s bookmark. Specifically, on the INSERT ribbon tab
1) Click on the Cross-reference button
2) In the Reference type box, choose Bookmark
3) Select the bookmark you want to refer to
4) Ensure the “Insert reference to:” box contains “Bookmark text”
5) Click Insert
If the bookmark doesn’t include the parentheses and you want them in the cross reference, you can enclose the cross reference in parentheses. If you don’t need flexible publishing style requirements, it’s simpler to include the parentheses in the bookmark itself. To update the cross references, type ctrl+a to Select All and F9 to update all the fields.
If you want to include chapter numbers in the equation numbers, in the Insert Caption dialog, click on Numbering… and check the “Include chapter number” box. The dialog gives options for how the chapters are defined using heading styles.
The equation handlers used in Microsoft Office have an elegant layout mechanism for equation numbers using the math paragraph, which also supports automatic equation wrapping and flexible equation alignments. The equation numbers can be placed on the left side or the right side and positioned vertically in various ways. In this connection, it might be worth modifying Word to treat a math zone that fills the [soft] paragraph aside from an optional leading center tab and a trailing right tab followed by text (the equation caption) as a display math zone. This would allow equation wrapping, something that has to be done a bit by hand with the equation-array approach. This “tabbed” math zone could be a way to represent the basic math-paragraph equation-number functionality in files. Another nice feature would be if inserting a cross reference, you could use Equation instead of Bookmark and see the current equation numbers without any surrounding text so that you wouldn’t have to create bookmarks. Inserting a caption always wants to include extra text unless the equation number is alone on a line. The bookmark lets you select the precise text you want in the cross reference.
The equation-array approach can also have arbitrary equation wrapping and alignments, but line wrapping isn’t automatic and you may need to insert appropriate markers to get what you want. So it’d be nice to follow through with the math paragraph approach someday. The present approach does work well for most purposes and is pretty easy to use. Enjoy!