Math in Office
User, developer, and accessibility info on math editing/display in Microsoft Office and Windows. New features and specifications of the RichEdit editor. Getting OfficeMath onto web apps
Latest posts

Math Accessibility Trees

This post discusses aspects of making mathematical equations accessible to blind people. Equations that are simple typographically, such as 𝐸 = 𝑚𝑐², are accessible with the use of standard left and right arrow key navigation and with each variable and two-dimensional construct being spoken or felt when the insertion point is moved to them. At an insertion point, the user can edit the equation using the regular keyboard input methods, perhaps based on UnicodeMath or LaTeX, or using a refreshable braille display using Nemeth Braille. But it can be hard to visualize a more typographically complex equation, let alone...

Some UnicodeMath Enhancements

In the years since UnicodeMath 3.1 was published, some improvements have been made. The converter that converts UnicodeMath to OfficeMath also converts LaTeX and Nemeth math braille to OfficeMath. The converter needs ways to provide OfficeMath math-object arguments even when these arguments are not marked as such in the math format. The resulting infrastructure is available for converting all three formats to OfficeMath. n-aryands With all three formats, the n-aryand, e.g., integrand or summand, may not be identified by surrounding delimiters. But OfficeMath and MathType have n-aryand arguments as described in ...

RichEdit Emoticon Shortcuts

Seems many email messages and IM’s include emoji smiley faces like 😊. You just type :-) and you get 😉 whether you want it or not! About a year ago, the Microsoft 365 RichEdit started offering such a facility. This post describes the built-in emoticon shortcut strings and the corresponding emoji characters and the APIs for enabling the conversions. For a substantially larger set of emoticons, see https://en.wikipedia.org/wiki/List_of_emoticons. That list includes both Western and Eastern emoticons. The RichEdit emoticon shortcuts currently include only Western emoticons. The build-in emoticon shortcuts are defi...

RichEdit Hot Keys

In the early microcomputer days, MS-DOS editors like pmate and teco depended on hot keys for navigation and other tasks. With the great support for the mouse, touch, and graphical interface aids like ribbons incorporated into later personal computers, the need for navigation hot keys was greatly diminished. But there are other hot keys that can be incredibly handy, and some navigation keys are still used a lot. This post summarizes the hot keys built into RichEdit. A previous post published a summary of all RichEdit hot keys as of 2013, but that post got truncated, it’s missing some hot keys that were added re...

MathML and OMML User Selection Attributes

Some assistive technology (AT) programs use MathML or OMML as conduits for generating math speech and braille from math-enabled apps. In addition, they would like to use these formats for editing math text as well as speaking it and displaying it on refreshable braille displays. To this end, the formats need selection attributes that identify where the user selection is or should be within the MathML or OMML. These selection attributes are intended for accessibility purposes; MathML/OMML in copy, paste, and files ordinarily wouldn’t contain such attributes. User Selection A user selection can be degenerate, tha...

Displaying Enlarged Images in Popup Window

RichEdit clients may want to zoom images that the user clicks on. To satisfy this need, the Microsoft 365 version of RichEdit supports the EN_IMAGE notification, which notifies the RichEdit client when the mouse moves over an image or the image is clicked on. The client can then display an enlarged image in a new window by sending the RichEdit control an EM_DISPLAYIMAGE message. This approach is efficient since the image is already in the RichEdit control's memory and doesn't have to be streamed out and back into another control. RichEdit calls the Windows Imaging Component (WIC) to create a bitmap scaled to the ...

RichEditD2D Window Controls

This post is for desktop programmers who use RichEdit window controls in their applications and would like to have more display functionality. Examples of such controls include the desktop Outlook To, Cc, and Subject lines as well as WinForms RichTextBox controls, WordPad, and myriad other programs. It’s easy to create a RichEdit window control by calling CreateWindowEx(dwExStyle, lpClassName, …), where lpClassName identifies the class of RichEdit control. Up to January 2020, all RichEdit window controls use the RichEdit GDI/Uniscribe code path. Accordingly, they cannot benefit from the many improvements only ava...

MathML mfenced element deprecated on web

The MathML working group is planning to deprecate the <mfenced> element as well as the <mo> fence and separator attributes for use on the web. The justification is to simplify web implementations by deprecating MathML features that are redundant. This post explains how <mfenced> and the fence and separator attributes can be handled in other ways and it discusses the implications for OfficeMath. Emulating <mfenced> with <mrow> The MathML <mfenced> element is handy for representing a variety of delimited expressions, such as parenthesized, braced, and bracketed expressions. The...

How I got into technical word processing

This post is an update of an early post that doesn't appear to be archived. It 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. I was a Yale grad student in theoretical physics working with Nobel Laureate Willis Lamb on laser theory. We needed to give presentations and we even made computer movies, back before anyone else had made them. After all, this was early in the days of computing! Grey’s program offered draftsman qua...