Math Ribbon Entry of Subscripts and Superscripts

As noted in the previous post Keyboard Entry of Subscripts and Superscripts, the preferred way to enter subscripts and superscripts is by using the keyboard, rather than the math ribbon. For example, type alt+= to insert a math zone followed by a^2+b^2=c^2<space> to enter the Pythagorean Theorem. This method is a lot faster than clicking on the superscript template in the Script dropdown on the math ribbon and then filling in the desired superscript bases and superscripts. But if you don’t know about the linear format, at least you’re likely to discover the math ribbon approach, so it is useful. Interestingly enough, for PowerPoint 2010, OneNote 2010, and Excel 2010, the math ribbon structure images are all created by RichEdit from the corresponding linear format expressions. To see the latter, insert a math structure and click on the Linear option (on the math ribbon, context menu or Word’s math zone box dropdown). This will convert the built-up (Professional) form to the built-down (Linear) form.

You may want to have a base with both a subscript and a superscript. You can type it as, for example, a_j^n, which is a sub j to the nth power. You can also use the subsup template in the math ribbon Script dropdown. When you enter the subscript or the superscript, the dotted box for that “empty” script argument is replaced by what you type there. Now here comes a problem: with the subsup template in all apps except Word, the other dotted box vanishes. There’s a reason for this, but with hindsight, the implementation is pretty confusing as a number of users have noted via Send-a-Frown feedback (thanks for the feedback). The reason involves ease in entering hypergeometric functions, as explained below. But first note that the empty script can be entered: use the left or right arrow key to put the insertion point (IP) inside the empty script and type the desired text. In OneNote 2010, this is pretty sweet, since when the IP is inside an empty argument, the dotted box appears, inviting you to type something in (see Automatic Arguments). In PowerPoint 2010, the dotted box doesn’t appear. It was too hard to implement automatic arguments at the time we realized we needed it, but you can still type in the desired text. We’re very sorry for the confusion and heartily recommend you type in such things using the nice simple linear format J.

So how about the reason behind this “feature”, namely ease in entering confluent hypergeometric functions, which you probably do at least once a week. (Okay, you’ve never heard of them!) These functions have a pre subscript as well as a post subscript. The Office math rendering model has subscript, superscript, and subsup math objects for post scripts, but it only has the leftsubsup object for pre scripts. So to enter the hypergeometric-function pre subscript, you end up using a leftsubsup math object. In Word, the way to suppress the dotted box for the left superscript is to put a zero-width space (U+200B) into it. That’s a handy trick. You can type \zwsp to enter the U+200B, or you can type 200B followed by alt+x (in Word and OneNote) to enter it. Since this is kind of inconvenient, I came up with the approach that as soon as one script is entered, the dotted boxes for both scripts disappear. With hindsight, I realize we need richer subsup objects that don’t do this for the two subsup templates. And that richer object needs a file format extension, so it was postponed to Office 15.

The linear format for a simple confluent hypergeometric function is _1 F_2. The parser associates the _1 subscript with the base that follows (in this case F_2), unless the _1 directly follows some math variable. In this last case, if you want the _1 to associate with the base that follows, put a space before it and the space will be removed upon build up. There’s one more little problem: if you use a subscript instead of a subsup for the post subscript, it displays about one pixel higher than the pre subscript. Hopefully we can fix this in the next version. In the interim, use a left subsup for the pre subscript and a right subsup for the post subscript and, in Word, enter \zwsp in the corresponding superscripts to suppress the dotted boxes.


Comments (22)
  1. Antun Szavits says:

    I am an admirer of formula editing in Word 2007. Few days ago I moved to a new computer with Windows 7. After installing Word 2007 I was bitterly surprised that Formula AutoBuildup doesnt work as before: I have to go from linear to professional display manuallly; instaed in Cambria math, Math zone starts with MS Mincho font so I have to apply proper font format manually. Could someone help me to solve these problems

    Sincerely Antun

  2. MurrayS3 says:

    It seems that your math document default options are set incorrectly somehow. To change them, type alt+= to insert a math zone and click on the Tools button on the math ribbon to see the Equation Options dialog. Change the "Default font for math regions" to be Cambria Math and check the box for "Automatically convert expressions to professional format". You may notice other defaults that look strange. Conceivably your normal.dotx file is corrupted. If these changes don’t work, let me know and I’ll query to Word folks.

  3. Antun Szavits says:

    Math zone problems

    Thank you for your kind help. Formula Autobuildup worked perfectly. But after first inserting the math zone, any charater typed displays as a quadrangle in font MS Mincho. Only after manualy selecting and converting typed characters to linear format, the proper Cambria Math font appears. Next typing is then OK.

  4. MurrayS3 says:

    What font was active when you typed alt+=? There was a problem with the Cambria font shipped with early Windows 7: it claimed to be a math font. This doesn’t appear to be your problem, but knowing more might help isolate the problem.

  5. Steven Macomber says:

    I have been learning to use equations in Office 2010 beta. I really like it much better than MathType/Word 2003. One thing I have had a problem with is getting equations to show in pdf or xps documents. Only lines from fractions are displayed. No other symbols appear.

  6. MurrayS3 says:

    I think the pdf writing is working in the version that will be released. I have a new version of the linear format paper (Unicode Technical Note #28) ready and it displays correctly including the U+2146 differential d character. More about this in a later post.

  7. Antun Szavits says:

    Math zone font problem

    When typing alt+= the document active font was Cambria (body) and Calibri (Headings). It seems I solved the problem by saving "normal" (in Microsoft VB) the VBA macros for equation numbering provided by Mr Dong Yu from his web site ( – which, it seems, I forgot to save after copying it into macros (I just closed Microsoft VB and returned to Word). I don’t know if this is relevant, but math zone appears now to work properly (to my great satisfaction). By the way, if Cambria and Cambria Math font are suspicious, where can I download a correct file?

  8. MurrayS3 says:

    The Cambria font that ships with Windows 7 now and with Office 2010 doesn’t claim to be a math font, so that problem should go away with an update to the released Office 2010. Beta versions can have problems (but unfortunately, so can released versions!)

  9. Wang says:

    Microsoft produces some product that renders equations as low resolution pictures. It is ugly and inefficient. The world would be a lot better if Microsoft did not create Word and a lot of other confusing and closed formats.

  10. Steven Macomber says:

    The ctl–right arrow and ctl–left arrow keystrokes are useful for fast navigation through documents. It jumps one word at a time so that you can quickly zoom in on a place you want to edit. But the ctl-arrow technique slows down when there are lots of complicated in-line equations: it only moves one symbol at a time within an equation zone—the same as a plain arrow keystroke. It would faster if ctl-arrow instead made the cursor jump out of the equation zone to the next/previous word in the document.

  11. MurrayS3 says:

    Good point that ctrl+→ and ctrl+← move relatively slowly through math zones since a "word" in math text is often only a single symbol. One thought would be to treat subscript and superscript objects as "words". Your suggestion of moving across whole inline math zones is also interesting. But since the current behavior shipped with Word 2007 and is accessible programmatically, changing their behavior could cause existing programs to fail. Probably such a change would have to be treated as an option.

  12. MurrayS3 says:

    Re Wang’s comment about equations rendered as low resolution pictures, pictures are only used AFAIK in compatibility scenarios, e.g., displaying Word 2007 math zones in older Word documents or in browsers. The former is fixed by upgrading to a more current version of Office. Fixing zoomed browser displays still requires some evolution in browser support for MathML. One interesting development is HTML5, which includes MathML.

    Re Microsoft formats, Microsoft Office 2007/2010 use OOXML and odf formats, which are both international standards having extensive documentation.

  13. contextfree says:

    The ribbon is a good way to find things, while the linear format is a better way to smoothly and efficiently enter them — if you already know how to do so.  Therefore, I wish it was easy to discover the linear-format keyword associated with a symbol/accent/whatever you’ve found through the ribbon.  There doesn’t seem to be any tooltip or right-click option that shows me this, but maybe I’ve missed something.

  14. MurrayS3 says:

    One of the new math features in Office 2010 is the addition of autocorrect entries in the math-ribbon symbol tooltips. So if you browse a symbol on the math ribbon, you’ll see what you can type to enter that symbol with the keyboard. You can also see the linear format for any equation by choosing the Linear option on the context menu.

  15. AhMath says:

    How can we convert any mathtype or microsoft equation 3.0 equation into math zone in ms word?

  16. MurrayS3 says:

    One way would be to copy the equation as MathML and paste it into a Word math zone. I'd imagine that one could write a Word macro to do this, but I haven't seen one yet. The Microsoft Equation 3.0 facility doesn't have MathML export AFAIK, but MathType does.

  17. AhMath says:

    GrindEQ MathType-to-Equation do this but it's €29, not free unfortunately.

    i tried "One way would be to copy the equation as MathML and paste it into a Word math zone." but it doesn't work :-((

    i wonder if there is any "cut and copy preference" in mathtype for ms word. There are cut and copy preferences for lots of applications or websites but the list doesn't contain ms word as i see..

  18. AhMath says:

    is there any way to get the negativity sign. when we want to use a negativity sign in fron of a number the math zone use the subtraction sign (the negativity sign must be shorter than the subtraction sign).

  19. MurrayS3 says:

    You could try using a different "minus sign", e.g., the Unicode EN DASH (U+2013). To enter this, type 2013 alt+x. If you like it, you might want to add it to your math autocorrect list.

  20. CSMR says:

    I'm always running into a problem with subscripts and superscripts. In PowerPoint 2010 if you enter an equation, type x, select x, and then click the superscript button, you get x followed by the two superscript containers. OTOH Word 2010 works as expected: when you click the superscript button the x is put into the first container.

    As an aside, it would be great if it were possible to enter mathematics in the same way in different programs. Office, LyX, other Latex programs, Mathematica, all have their own methods. If Microsoft were feeling exceptionally helpful, it could allow more than one (selectable) method of input.

  21. MurrayS3 says:

    Nice Word superscript feature. I can add it to the other applications. I always use ^ to insert superscripts, e.g., a^2+b^2+c^2 gives the Pythagorean Theorem. It's faster than using the ribbon. But still, it's nice ribbon functionality to do what you've done.

    We have the code for using TeX as an input/output language. It needs some testing and polishing, but it should be really nice for people with TeX in their fingers.

  22. MurrayS3 says:

    Whoops! Typo in the Pythagorean Theorem above. Should be a^2+b^2=c^2. Sorry about that. The same works in TeX, but in the linear format (Unicode Technical Note #28), the superscript can be more than one character, e.g., a^20+b^20≠c^20.

Comments are closed.

Skip to main content