Thursday, September 27, 2012

Word 2010: Linear format equations tips and tricks

Word 2010 has a nifty, almost LaTeX-like equation typesetting interface (as opposed to Equation Editor in previous versions).  To insert an equation using the keyboard, press ALT+=, and then type the equation. The most up-to-date documentation is available online (it's also viewable in Word help files under Equations in Windows, but does not appear on Mac Office 2011).

Word uses "Unicode Nearly Plain-Text Encoding for Mathematics" for mathematical expressions. It follows "Unicode Technical Note 28" convention. Whereas one can wing it without learning Unicode syntax and by mostly sticking to LaTeX, there is definitely more to this.

Today we resolved two more complex issues. One was how to typeset multi-line equations, and the second one was how to add equation numbering.

Q1:  How to typeset multi-line equaions? 
A1:  Turns out, it's quite simple within the \eqarray environment. Similar to LaTeX.  Use & to indicate where to align, and @ to indicated where to line break. It's now well documented, see the very first example. An explanation of how this works and more complex examples can be found in Murray Sargent's blog post.

Q2:  How to number equations?
A2:  As Technical Note 28 suggests, inserting #(1), or \eqno(1),  after the equation should add a right-justified equation number (Section 3.21).  However, it doesn't work. At least not in Word.  It does, however, work in PowerPoint (and supposedly in Excel and OneNote).  See here for an explanation of how numbering should work.  See comment from user Nali (26nov2009) about how to do it in other Office products. On a related note, \eqno is not listed in the "Math AutoCorrect symbols" in Word equaion documentation, so it's clearly not supported.

Q3:  Ok then, so what if I'm using Word?
A3:  To get equation numbering for equations in display mode:
  1. Insert a 3 x 1 table with gridlines but no borders. Set table to take 100% of page width, and columns to take roughly 10%, 80% and 10%, respectively. Set vertical alignment of columns to center, so that for a multi-line equation, the equation number remains centered.
  2. To insert the equation number, simply add a numbered item to the rightmost (or leftmost) cell. Since "(#)" is not a built-in numbering format, you may need to create it first. This will provide automatic numbering of subsequent equations. Alternatively, you can simply specify the equation numbers manually.
  3. The limitation with (2) is that you cannot cross-reference the equation number. An alternative approach is to add a caption, and then drag it into the cell of the table (by default, it will initially appear either above or below the table). This will also increment automatically, and you should be able to cross-reference it. However, I have had mixed luck with this approach.
  4. If necessary, add spacing after the paragraph(s) inside the table, so that the equation is vertically centered between the paragraph above and the paragraph below.
  5. To save the resulting table for repeated use, there are (at least) two possibilities. First, you should be able to use Insert -> AutoText -> New... to save the table as an AutoText item. Second, I believe there is something called the Table Gallery that you can add to (this may only be available under Windows). Unfortunately, I have not been able to get either of these to work.

Subscribe via email

Enter your email address:

Delivered by FeedBurner

Followers

google analytics