# Murray Sargent: Math in Office

I'm a software development engineer in Microsoft Office and have been working mostly on the RichEdit editor since 1994. In this blog I focus on mathematics in Office along with some posts on RichEdit and the early Windows days
• #### Math Selection

Selection of text in a math zone obeys some special rules concerning built-up math objects, such as fractions and integrals. First some background on how these objects are stored helps to clarify the rules. In memory, math objects start with a special...
• #### Automatic arguments

The arguments of math display objects are either optional or essential. Examples of essential arguments are the numerator and denominator of a fraction. For a legitimate fraction, both are nonempty. Hence if either or both are empty, they should be represented...
• #### Cool Equation Number Macros for Word 2007

Dong Yu of Microsoft's Speech Research Group reports: "Office 2007 comes with a very nice equation editor and bibliography manager. However, it does not support equation number management. To work around this problem. I have developed a set of macros...
• #### How I got into technical WP

This post tells a bit of how I started in technical word processing back in the middle of the last century. More precisely it was in 1965 that I started using a nifty (for that time) vector plotting program by Grey Freeman at the Yale Computer Center...
• #### Using RichEdit 6.0 for Math

A number of readers have asked how to use the RichEdit 6.0 shipped with Office 2007 to edit and display mathematical text. This post explains one way to do so. The code assumes that you already have an application that knows how to instantiate a RichEdit...
• #### Article/Video on Murray Sargent and Math in Office

The article Professor's Laser Focus Gets Math into Office tells some of the story behind the Math in Office project. It also gives a link to a video that includes a sequence of me showing how easy it is to type in the binomial theorem. Hope you like it...
• #### Math Greek Letter Bug Fixed

When Word 2007 and later versions write an RTF file that includes math alphanumeric symbols (see U+1D400..U+1D7FF ), they convert the symbols back to ASCII or Greek in the BMP (basic multilingual plane) and then write the characters out using the appropriate...
• #### Symbols and Emoji

The emoji symbols (literally picture characters ) introduced by Japanese cell phone carriers have captured the imaginations of computer users around the world. So much so that occasionally many symbols created long before the emoji are now being treated...
• #### RichEdit 8.0 Touch Support

Windows 8 introduced substantially better touch facilities than those available in Windows 7. One cool thing is the new touch on-screen keyboard, which is enabled if you have a touch screen. To see it, swipe in from the right side, touch the cog icon...
• #### Ligatures, Clusters, Combining Marks and Variation Sequences

On the surface, Unicode appears to be a just large collection of characters. But before Unicode text is displayed, substantial “shaping” can occur. This shaping is the process of mapping the Unicode characters to glyphs and placing them correctly...
• #### Flyweight RichEdit Controls

Back when RichEdit 2.0 was being designed, Christian Fortini had a dream that every text string in a Forms^3 form or dialog would be a light-weight RichEdit control. That way there would be no display glitches in switching from static display to edit...
• #### Equation Arrays

One user (Leperkawn) commented "There is basically no documentation on the \eqarray command so I'll post a quick example that I had to figure out from trial and error." Before looking at his interesting example, here's the text in Section 3.19 of the...
• #### The Math Paragraph

The earlier post Breaking Equations into Multiple Lines describes equation line breaking and alignment. In particular, l ong equations often do not fit on a single line and need to be broken up for display on multiple lines. Word 2007 offers two approaches...
• #### Default Document Math Properties

A number of math display properties have document defaults. These are the ones used if you don’t explicitly override them, which you can usually do by invoking a math context-menu option. The properties all pertain to “displayed” math...
• #### More on Math Context Menus

An earlier post describes math context menus (right click somewhere in a math zone) for changing the display characteristics of math objects, like fractions and integrals. For example context menus offer options to convert a stacked fraction into a linear...
• #### Subscript and Superscript Bases

For proper math typography, it’s important to know the base of a subscript or superscript expression. For example, in Einstein’s equation E = mc 2 , the superscript expression c 2 appears and c is the base, not mc . Knowing what the base is allows proper...
• #### A neat opportunity...

Okay, the Math In Office blog isn't about advertising. But just in case you're someone who really likes RichEdit and editing and wants to work on it (as I did and do J ) and related text processing, here's a pretty fine opportunity. If you're not interested...

One handy way to edit mathematical text is to use math context menus. These menus are displayed when you depress the right mouse button with the mouse pointing inside a math zone. In addition to the usual Font and Paragraph options, in a math zone you...
• #### Updated RTF Specification

An updated RTF Specification is available for downloading here . I already blogged about the new version in the MS Word blog, but wanted to add a few words about math in Math in Office blog. The RTF specification includes a thorough discussion of the...
• #### Mathematical RTF

This post discusses the Word 2007 math RTF control words. A good way to understand these control words is to note that they are actually OMML tag names written with RTF syntax. Hence you can refer to the very thorough OMML documentation for more detailed...
• #### Office Math RTF and OMML Documentation

The RTF 2007 specification is now available. Word 2007 added as many control words as Word 2000, XP and 2003 combined ! The .doc spec is 4.4 MB, while the .docx is only 881KB. Admittedly a zipped version of the .doc spec is somewhat smaller than the ...
• #### User Spaces in Math Zones

Spacing in mathematical expressions involves well defined rules. For example, in the expression a+b=c, a good math display engine automatically inserts 4/18 em on each side of the binary operator + and 5/18 em on each side of the relational operator ...