(Wording of UI elements may deviate slightly, due to my
Version being in German. I googled, what the terms should be
in English.).
Contents
------
1. Adding a “display” style equation
2. Inserting an equation number field
3. Referencing auto-numbered equations
4. Subequation numbering
5. Open Issues
1. Adding a “display” style equation
Use “Insert→Equation→New Equation” for creating a new
equation. For making it a display-style equation instead of
an inline equation, simply put it on a new line. Such
equations should differ in several way, by
- Being centered, and
- Having superscripts and subscripts of operators like
the ∑ and ∫ placed above and below instead of to the
side of the operator.
as would be the case with the LaTeX constructs
\begin{equation} .. \end{equation}
$$ .. $$
\[ .. \]
If it behaves differently. This might be disable in a
given document, especially when working with collaborators
or third-party templates.
The setting can be found by placing the cursor inside an
equation or creating a new equation through the ribbon
“Insert→Equation→NewEquation” and then accessing the
Equation options through the ribbon “EquationTools/Design”,
where the options are hidden in the ↘ button of
the "Tools" section at the left of the ribbon.
In the options the section "Display math" these settings are
controlled. In doubt just use the "defaults" button at the
bottom.
Additionally, this dialog allows customizing
display-math formatting consistently.
2. Inserting an equation number field
Word 2016 has support for manual equation numbering, similar
to using the \tag
command in LaTeX. For instance typing
x=1#(23)<Enter>
will produce
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
sed diam nonumy eirmod tempor invidunt ut labore
x = 1 (23)
et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores.
An automatic number can be generated using “References →
Insert Caption” (ger. “Verweise → Beschriftung einfügen”),
but this is grayed out inside equations. Instead,
Create the equation number field outside an equation
with “References → Insert Caption”. Select the type
“Equation” (if it doesn't exist yet or has been deleted
use the “New Label” button to create it and select the
option “Exclude label from caption”.
This creates an auto-numbered field. It also sets the
paragraph style to “Caption”; Change it back to “Text
Body” or “Standard” in the “Home” ribbon.
Cut the field (Ctrl+X) and use it as
equation number using the #(number)<Enter>
pattern,
but instead of <number>
paste the field with
Ctrl+V.
For future convenience, it is helpful to store the equation
number as reuseable text snippet (ger. "Schnellbausteine")
in the “Insert” ribbon, or to store a numbered equation as
template in the “Insert → Equation” interface. You can also
just copy-paste previous equations; The numbers will be the
same only until updating the fields.
3. Referencing auto-numbered equations
I found a common recommendation to just copy/paste the
generated equation numbers. This is wrong. Doing so
will break the reference, when updating the numbering,
because it doesn't insert a reference to the equation
number, but a new auto-numbered field, that just hasn't been
updated yet.
Normally, you'd insert cross-references with “Insert → Cross
Reference”. However, this interface considers everything
left of the number as part of the category label, and Word
2016 offers no choice to insert only the number, so using
this directly will insert the whole equation instead of the
numberical reference.
Instead, we need to create a named bookmark (ger.
“Textmarke”) by selecting the equation number field – only
the number, without surrounding braces – and using “Insert →
Bookmark”.
We can then insert a self-updating and hyperlinked copy of the
marked text, i.e. the equation number, using “Insert → Cross
Reference” using the reference type “Bookmark” using the
“Bookmark content” (ger. “Textmarkeninhalt”) option for the
reference contents.
Surrounding naming like "Eq. (...)" has to be done by hand.
Here it comes in handy to use a “protected space” inserted
with Ctrl+Shift+Space to prevent unwanted line
breaking like
yada yada yada yada See Eq.
(1) and yada yada yada yada yada yada
LaTeX equivalents would be Eq.\,(\ref{NAME})
or
Eq.~(\ref{NAME})
. I'm not sure if there is a
straight-forward way of inserting a thin protected space
(\,
) in Word.
4. Subequation numbering
This doesn't seem to be directly supported, but it can be
worked around using the features already used.
Insert an auto-numbered equation as before. Manually
add a
after the number field.
In subsequent lines, do not add the auto-numbered
equation and do not copy paste the field; These would
result in new, differing equation numbers being
assigned upon Ctrl+A, F9.
Instead, create a bookmark for field-part of the first
equation number and use a cross-reference to repeat the
number. Add b
, c
, d
etc. manually. (Automatic
creation of the letters could be possible, but since
this numbering is very local it is not work the
effort.)
The result will be something like
sed diam nonumy eirmod tempor invidunt ut labore
x = f(a,b) (2a)
y = g(c,d) (2b)
n = z(x,y) (2c)
et ea rebum. Stet clita kasd gubergren, no sea takimata
where the 2
in (2a)
is an auto-numbered field, the
2
in (2b)
and (2c)
is a reference to a bookmark
to this field, and a
,b
,c
are manually added letters.
For referencing the whole equation, use the bookmark
created for the number in (2). For referencing
subequations, create new bookmarks, that include number
and letter of the subequation.
5. Open Issues
In LaTeX, it is trivial to create multi-line equations that
are both aligned at some symbol and have numbers usable for
cross-references with the align
environment, with
\begin{align}
x &= hello + world \\
y &= foo + bar
\end{align}
Resulting in
sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat,
x = hello + world (42)
y = foo + bar (43)
sed diam voluptua. At vero eos et accusam et justo duo
dolores et ea rebum. Stet clita kasd gubergren, no sea
For unnumbered equations, word has an alignment feature,
that can either be used by selecting a symbol for alignment
and setting it as alignment element through the context
menu, or by typing LaTeX-style input where &=
will be
converted to an aligning =
.
However, inserting a number with the #()
method breaks all
such alignment.