Welcome to MSDN Blogs Sign in | Join | Help

Equations in Word 2007

My name is Jennifer Michelstein, and I'm a Program Manager on the Word team. I mainly work on academic features, like bibliographies and citations (see Joe Friend's blog) and equations.

In Word 2007, we took a ground-up approach to creating a new set of tools for editing and displaying equations. Here's a brief highlight of what's cool about the new Equation Builder:

  • Equations are regular Word text (not objects), so they're integrated with regular Word formatting.
  • High-quality display and typography: we're using TeX standards and a brand-new Math Font to produce great-looking equations
  • Two input methods: UI and Linear Format (keyboard syntax)
  • MathML support: now you can write an equation in Word, paste it into a calculating or graphing application, and get results!

Writing the equation feature was a huge undertaking. We had a highly talented group of individuals contributing, including Murray Sargent, who has written about the inner workings of the feature here.

In this blog entry, I'll introduce you to our two methods of equation input (three, if you include the Equations gallery). In future entries, I'll talk about other components of the feature, including typography, layout, breaking, alignment, and MathML.

UI-Based Entry

We've divided into two categories the types of elements that can be inserted in equations: symbols and structures. Symbols are sorted into categories by subject area, and within each category by frequency of use. (fun fact: in a recent presentation to equation writers, categorization by subject area instead of Unicode value was one of the most heavily applauded items)

Each category of structures is a dropdown gallery containing variants of that type. For example, the integral gallery contains different types of integrals (regular, surface, contour, and volume) with limits positioned in different locations.

Typing Equations via Linear Format

Linear Format, a keyboard-based syntax, is a new method of entering equations in Word. Linear Format uses a TeX-like notation for some mathematical objects and symbols, and the same mathematical syntax you'd see in a linear text entry field in simple cases (for example, a^2 for the superscript , or (a+b)/(b+c) for the fraction ).

It's important to note that there are two separate processes involved in converting strings to Professional format. The first, Math AutoCorrect, converts strings to symbols or groups of characters. Here's a quick demo of Math AutoCorrect.

The second is Formula AutoBuildup. Formula AutoBuildup takes linear strings such as a^2 or _0^1 and converts them to Professional form. Rather than explain how Linear Format works, I'll show you some quick examples of how to write equations in Linear Format, and how it compares in speed to UI-based entry: first, with exponents and fractions, and then with an integral.

I encourage the equation writers out there to play with Linear Format. Since our Help topics on equations have not been posted yet, you may want some assistance learning fluency in Linear Format. Let me know what equations or structures about which you have questions, and I'll post video demos. You can read more about Linear Format and Formula AutoBuildup here.

Inserting a Saved Equation

When we watched users on site visits writing equations, we saw many people open old documents, copy equations, and paste them into their new document. Even if the equations were slightly different, finding these equations and repurposing them often saved time and effort. With that in mind, we used the Building Blocks framework to create a gallery of saved equations. Jon talked about Building Blocks for Cover Pages, Headers, and Footers in this post, and we'll write more about the Building Blocks framework in future posts. Here's a quick demo on inserting a saved equation from the gallery. You can easily save your own equations to the gallery, as is true for all Building Blocks.

Published Wednesday, October 04, 2006 5:15 PM by wrdblog
Filed under: ,

Comments

# re: Equations in Word 2007

How do you insert a line break in these new equations. I like to have my equations on multiple lines centered around the equal sign (something the old equation editor does very easily)

Friday, October 06, 2006 2:32 PM by Asbjørn

# re: Equations in Word 2007

You have a few choices:

1. You can hit enter at the end of an equation to begin one in a new paragraph. When you multi-select the equations, the "Align at =" context menu command will be available.

2. You can Shift+Enter to create a new equation in the same paragraph. Both the "Align at =" and "Align this character" commands will be available depending on what is selected (the group of equations) or where you've clicked (next to the operator you're aligning).

Friday, October 06, 2006 2:38 PM by wrdblog

# re: Equations in Word 2007

Thanks alot! Now I can finally use this great new equation editor (though this isn't particularly discoverable)

Friday, October 06, 2006 2:49 PM by Asbjørn

# re: Equations in Word 2007

This is awesome!

I'd like to see some syntax hints in tooltips of the gallery. For example, hovering over "Integral" should show "Linear form: '\int'" in the tooltip. and have a "Press F1 for help" :-)

Also, how about if Word version++ gets intellisense for math auto correct et. al. ?

Friday, October 06, 2006 6:18 PM by snprbob86

# re: Equations in Word 2007

Two great suggestions.

We thought seriously about your tooltip suggestion during the design phase, but as it turns out, most of our math users will rely exclusively on UI for insertion. We decided not to travel down this path so that the tooltips wouldn't be confusing to someone unfamiliar with Linear Format.

That's the great thing about user feedback, though. If we hear enough requests, you never know... :)

Friday, October 06, 2006 6:38 PM by wrdblog

# MathML and Ecma Math (OMML)

Before comparing these two math XMLs, I'm excited to point you at Jennifer Michelstein's nifty post on

Friday, October 06, 2006 7:18 PM by Murray Sargent: Math in Office

# re: Equations in Word 2007

Is there any way to change the font used by the new equation feature? I understand most fonts do not have the necessary characters, but some--the pan-Unicode ones like Arial Unicode MS as well as math variants of other typefaces--seem to.

Friday, October 06, 2006 7:32 PM by Francis

# re: Equations in Word 2007

Saturday, October 07, 2006 2:42 AM by Mike

# re: Equations in Word 2007

I really like the new equation editor, great work!

I would second the request to show the linear form in the tooltip. Maybe it one could make it an option to show it? For people that want to learn the linear form, this would be by far the best way! How else would you go about it? I try to look at the auto correct list from time to time, but that is just VERY unhandy.

I also believe I found a bug. Here is how you do it.

1. Insert a new equation

2. Type "(a+b)\ldiv"

3. Hit space, this will auto correct "\ldiv"

4. Type "c"

5. Hit space, this will auto correct the whole fraction

But, what is shown now will most likely be interpreted as a+(b/c), right? I understand that the fraction replaces brackes on its top, but it really shouldn't do that with \ldiv...

Monday, October 09, 2006 6:50 AM by davidacoder

# Math Fonts

To accompany the new math feature, we've created not only a new font, but a new class of OpenType math fonts. This class of fonts has new OpenType tables for advanced math typography. While the set of symbols may look the same as those contained in some other fonts, there's a lot going on behind the scene that allows us to kern, grow, and stretch characters.

Only math fonts can be used inside equations in Word. Right now, the only font with these tables is Cambria Math, but very shortly the typography team will publish a spec on how to create new math fonts.

Monday, October 09, 2006 1:10 PM by wrdblog

# re: Equations in Word 2007

Thanks for the "second" on the tooltip. Unfortunately it's too late to make this change for Office 2007, but we'll certainly consider it for the version to follow. Since our help topics on Linear Format haven't yet been published, you're correct that right now it's inconvenient to use the Math AutoCorrect dialog as your learning tool. Hopefully

Regarding the bug you report: our engine that converts linear format to professional layout removes the outermost parentheses when building up fractions and exponents. If you had wanted a stacked fraction, the linear format is (a+b)/c, and you'd likely want the parentheses to disappear.

It's too late to change this behavior for linear fractions, but here's the workaround. Since our rule is to delete the outermost parentheses, you can add a second set, and they will not be deleted in professional format.

Monday, October 09, 2006 1:42 PM by wrdblog

# re: Equations in Word 2007

Quite frankly, this is the sort of bug that will drive people away from using the feature. If you get the impression that the equation editor has incorrect conversions in it, it is very bad. If the correct behaviour can't be introduced at this point, I would still suggest to remove the "\ldiv" from the list of things that get automatically expanded, that way at least the error is gone.

It would be a trade-of between "incorrect" (and I don't have to remember you, but people that write equations are somewhat sensitive to that word) and "inconvinient" (because it would not be that easy anymore to create that particular kind of equation).

Monday, October 09, 2006 2:39 PM by davidacoder

# re: Equations in Word 2007

The recommended way to write a linear fraction is \/ for the fraction bar. Typing \ before a character makes it a "literal" - we treat the character literally and don't use it to trigger build up.

If you type (a+b)\/c, then the quotes don't disappear.

Monday, October 09, 2006 5:43 PM by wrdblog

# re: Equations in Word 2007

But the \/ surely is also a hack, right? Because for what would you have \ldiv, if \/ is the recommended way?!?

I actually WOULD like to have the build up into the fraction with two known parts, but in the case of linear fraction (the one caused by \ldiv) the brackes should not disappear, because the mathematical meaning of the equation changes when you remove them. That is simply a bug.

Having proper build up (and not the hack) also seems important in the case of import/export scenarios, be they either via the linear format or the MathML format. Essentially, if I have a third party program that produces the correct linear format, paste it into Word, it will be displayed wrongly. If I use the hack and export the equation, it will probably not export pretty MathML, right? It can't know in that case what things constitute the proper parts of the fraction.

I am further worried by this, because if you don't fix it now but suggest various work arounds, you will most likely never be able to fix it due to backwards compatability. In particular, once people start using "((a+b))\ldiv" you are locked in the current (buggy) solution, because you then cannot revert into not removing the brackes, because it will make exisiting documents look wrong.

Not pretty, the situation, to be honest... It also is such a nasty bug that I am sure it will turn away quite a number of people. It is everything but trivial that Word might actually change the mathematical meaning of a properly formated linear expression during build up. Bugs like that keep people away from programs, since they are subtle and in the end can lead to embarassing situations. If I publish a paper and a wrong equations gets introduced due to this bug, baaad....

Monday, October 09, 2006 6:01 PM by davidacoder

# re: Equations in Word 2007

How i will publish equations on the web?

Will MSIE render OMML equations? or would be converted to MathML using the XSLT before submit and next rendered via the MathML plugin for MSIE?

Juan R.

Tuesday, October 10, 2006 12:36 PM by Juan R.

# re: Equations in Word 2007

What about equations in PowerPoint 2007??

Tuesday, October 10, 2006 6:44 PM by Roger

# re: Equations in Word 2007

Re linear fractions, \/ isn't a hack; it's a very useful way to get just the regular ASCII fraction slash for use in things like exponents where a built-up fraction would be ugly. It displays the way one wants for the vast majority of linear fractions. Admittedly for interoperating with math calculation engines, it would be handy to have the built-up linear fraction. Sadly it's not possible to do everything at once. I've already fixed the \ldiv as you recommend (don't delete the enclosing parens), but the fix won't get into Word until the next version. Since the standard way to save files is in the built-up (Professional) format, hopefully changing the linear format in this way won't generate much backward incompatibility.

Note that the backslash quote is a general mechanism for treating operators literally and it can be quite useful. We don't regard it as a hack. It can be exported to MathML using the <mtext> tag instead of the <mo> tag. I haven't found a way to express the built-up linear fraction in MathML. The <mfrac> tag can take the bevelled attribute, but there isn't any linear attribute listed in http://www.w3.org/TR/2003/REC-MathML2-20031021/chapter3.html#presm.mfrac

Murray Sargent

Tuesday, October 10, 2006 6:44 PM by MurrayS

# re: Equations in Word 2007

I have been playing with the new Equation Editor since Beta 2 and I love it. There is just one thing missing: How do I insert equation numbers (like in LaTeX)? Is it at all possible in Word 2007? In Word 2003 you would simply use a rightaligned tabstop and some fields, but in Word 2007 this is no longer possible...

Wednesday, October 11, 2006 4:11 AM by Teis Johansen

# re: Equations in Word 2007

Ok, good to hear that this will be fixed, and I understand that this can't be in the RTM release. Will this go into SP1?

And generally: The new equation editor rocks! I find it truely amazing, such a step forward!

Wednesday, October 11, 2006 8:05 AM by davidacoder

# re: Equations in Word 2007

Any advice for using MathType or other MathML utilities in PowerPoint 2007? Thanks.

Roger

Wednesday, October 11, 2006 12:22 PM by Roger

# re: Equations in Word 2007

Just installed Office Beta 2 technical refresh and MathType appears to be working with PPT07. Thanks.

Roger

Wednesday, October 11, 2006 12:47 PM by Roger

# re: Equations in Word 2007

PowerPoint 2007 doesn't support the same native editing of equations that Word introduced. You can write an equation in Word and paste it into PowerPoint, or use Equation Editor natively in PowerPoint.

Wednesday, October 11, 2006 12:53 PM by wrdblog

# Equation Numbering

Hi Teis,

Great question. Rather than explain how to do equation numbering here, in my next post I'll include demos on numbering equations.

Wednesday, October 11, 2006 12:55 PM by wrdblog

# re: Equations in Word 2007

First and foremost, let me say a big THANK YOU to the Word team for the revamp of the Equation Editor in Word.  The bugs mentioned in this thread aside, this is a tremendous feature and as I am currently in a college algebra class, it has been a life-saver.

One question, though...what about graphing?  If I needed to graph an equation in Word, I don't see a way to insert the graph.  I'm not suggesting that I simply type the equation and have Word automatically create a graph at the click of a button, (although that would cool) but if there were a way to insert a simple graph where I could plot the points and use the drawing tools to draw the lines?

Thoughts?

Wednesday, October 11, 2006 8:54 PM by Kevin

# re: Equations in Word 2007

Kevin, try the Insert > Chart command. Use the XY (Scatter) With Smooth Lines chart type. Use the Excel sheet to create the data points. This is a vast improvement over the previous versions, where MS Chart was a very limited tool and you really needed to create the chart in Excel first.

If you have one of the heavyweight math engines such as Mathematica, you can do even better there (multivariate surfaces, intersections, tangent planes, etc.).

Sunday, October 15, 2006 3:08 PM by Jay Freedman, Word MVP

# Equation Numbering

In this post, I'm going to talk about equation numbering, one of our most highly-requested features.

Friday, October 20, 2006 6:19 PM by The Microsoft Office Word Team's Blog
New Comments to this post are disabled
 
Page view tracker