Labeling equations in Microsoft Word

I recently published a video about equation labels in Microsoft Word. It explains that it is easy to get displays like these. (The dashed line represents the right margin) This post also describes how to create these layouts.

Sample equations

The additional steps needed to make the labels count in sequence is a topic that this post doesn’t cover. The emphasis here is in creating expressions with Word.

To get these label results, I put a pound character (#) in an equation region at the end of the main equation. When I follow the # with the label and hit enter, the equation label will be separated and shifted to the right. Even though # is a reserved character in stock LaTeX, this use of # works when you are entering the equation with both Word’s LaTeX syntax as well as the less verbose Unicode formatting.

When you have text in an equation, it is created with a math font. Cambria Math is the default. When you change the font size, it affects the whole equation. If you change the font, it also affects the whole equation. Only math fonts are allowed. If you try to change the normally entered equation to a regular (non-math) font, the change is ignored. [Fonts for Mathematics, Johannes Küster describes some characteristics of a math font.] Several math fonts are available online.

Other attributes can be adjusted on a sub-expression by sub-expression basis. For example, bold and underline as well as color and highlighting can be changed with fine grain control. An interesting puzzle is to discover how to make a calculus integral expression with the integral sign in red and the rest of the equation black.

However, by enclosing text in double quotes and then accepting them, the quoted text can display different fonts and font sizes without changing the rest of the equation. The quotes are hidden when the equation is finished. This is possible in any part of an equation.

The labels are part of the equation so, unless the text after the # is enclosed in double quotes, it has the same features and limitations of any other equation. To put an expression such as \(\pi^2\) in the label, don’t include that part in double quotes so that the equation formatting syntax works there.

I am using Microsoft 365 current in May 2022 with the “Conversions” group of the Equation tab set to Unicode.

How I made these:

The rest of the article shows how I made the formulas above with minimal use of the mouse. The blue marks are created by a Windows accessibility option that highlights the location of the cursor.

Most of the work could also be done with the menus for those who make equations only rarely. I found that after doing several homework assignments with Word equations, I wanted to be faster than I could be with the menus.

Quadratic equation:

This equation is built-in, but in the example, I created it manually.

I’m diagraming the expression from the inside out. I marked ‘*’ where I used the spacebar. This equation does not require the mouse.

The chart shows the sub-expressions broken out to show what each piece displays. The appearance column shows what you display with each part composed on its own.

In the end, the last line of the table is enough. I would enter that text in sequence to create the final result. Hitting the enter key at the end of the entry finished the formatting.

AppearanceEquation text
b^2-4ac
\sqrt(b^2-4ac)*
-b+-\sqrt(b^2-4ac)*
(-b+-\sqrt(b^2-4ac)*)/2a*
x=(-b+-\sqrt(b^2-4ac)*)/2a*
x=(-b+-\sqrt(b^2-4ac)*)/2a*#(eq. 1)
quadratic equation steps

N choose k

For this example, I’ll diagram it as it’s enetered from left to right. I needed to use the mouse for a couple of steps.

I build the expressions as fractions. Then I used the context menus to hide the fraction bars, leaving the “n choose k” formatted conventionally.

Appearancetext to enter
(n/k)
=
(n/(n-k)
[hit space]
)
[hit space]
Select first numerator, right click and use menu
Select second numerator, right click and use menu
#(eq. 2)
[enter]
n choose k steps

Inequality

I used double quotes to input normal text in the middle of the equation (the “iff”). It treat the “iff” text as literal so that it isn’t italicized. To accomplish that, I create it in double quotes. In general, quote-escaped text is not italicized like other parts of a math expression.

In this example, I’m showing the steps in the order I took them.

typed a<b “iff”

typed [space]

typed a

Selected “Neither Greater Than nor Equal To” operator from the Operators subset of the Symbols group of the Equation tab

typed b#”and then?”

Hit [enter] to separate the label

selected the word “then” with the mouse

Changed the Arial Black font from the font pulldown on the Home tab

Final expression.


Answer

To color only the integral sign red, select the integral sub-expression; make the selection red; then select each sub-sub-expression and restore them to black.