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

Computers I have known
Aug 29, 2022
Post comments count 0
Post likes count 5

Computers I have known

Murray Sargent
Murray Sargent

A friend recommended that since I got into computers a long time ago, I should post about how computers have changed over the years. Well, here goes a trip down memory lane! Analog and button pushing The first computer I ever used was an Electronics Associates analog computer at the Perkin Elmer Corporation where I worked as an intern in the summers of 1961—1963. I wired up the machines to simulate aspects of the response of control systems that guided the balloon-borne Stratoscope II telescope. The telescope could be pointed to an accuracy of 0.1 arc seconds, which is the angle subtended by a dime at two miles...

Microsoft 365 Modern Comments
Jul 26, 2022
Post comments count 1
Post likes count 3

Microsoft 365 Modern Comments

Murray Sargent
Murray Sargent

The new Modern Comments facility aims to give a similar commenting experience on the web and in native apps. On the desktop in Windows and the Mac, the editor component is RichEdit. The facility is a work in progress, and it is getting very nice. This post gives some background on incorporating RichEdit into the Microsoft 365 commenting experience. The most powerful commenting experience to date was in desktop Word, which used Word text boxes for comments. This allowed users to use most Word features in Word comments. Meanwhile, RichEdit lacks many advanced Word features. So, some Word power users have found t...

RichEdit Autoformatting
Jun 29, 2022
Post comments count 0
Post likes count 1

RichEdit Autoformatting

Murray Sargent
Murray Sargent

RichEdit and Word have had the most elaborate autoformatting ever since Office 2007, namely math formula auto-buildup. A UnicodeMath expression builds up into OfficeMath as soon as it is unambiguous. Word and other programs have also had less ambitious autoformatting since late in the last century. Such functionality includes auto conversion of some simple numeric fractions to composed Unicode numeric fractions, e.g., 1/2 to ½, ordinal superscripts, e.g., 1st to 1st, double dash to long dash, e.g., ab to a—b, smart quotes, e.g., to “word”, and automatic bulleted/numbered lists. Such autoformatting is available i...

Rounded Rectangles and Ellipses
May 22, 2022
Post comments count 0
Post likes count 2

Rounded Rectangles and Ellipses

Murray Sargent
Murray Sargent

In Word, PowerPoint, OneNote and RichEdit, you can enclose text in a rectangle by putting the text into a math “boxed formula” object. To try this out, type alt+= to enter a math zone and then \rect(a+b)<space>. This displays as as The “\rect(a+b)” is the UnicodeMath representation of this boxed formula. In MathML, the boxed formula object is represented by the <menclose notation=”box”> element. The <menclose> documentation mentions other notations as well, notably “roundedbox” and “circle” (which is actually an ellipse). Up through Office 2013, only the “box” option, along with hiding sides an...

OfficeMath
Apr 28, 2022
Post comments count 0
Post likes count 1

OfficeMath

Murray Sargent
Murray Sargent

Microsoft Word 2007 and RichEdit 6.0 introduced the native Office math facility. PowerPoint, Excel, and OneNote followed suit in 2010, and Mac Word followed in 2011. But ironically the native math facility didn’t have a recognizable name. “Microsoft Equation Editor” (MEE) seemed natural, but that's the name of the Design Science math editor that shipped first in Office on Windows and the Mac in 1992 and was discontinued due to security problems. In fact, the post Converting Microsoft Equation Editor Objects to OfficeMath needed a name for the native math facility since it describes how you can convert MEE OLE mat...

Two Phonetic Scripts: Vietnamese and Korean
Mar 2, 2022
Post comments count 3
Post likes count 0

Two Phonetic Scripts: Vietnamese and Korean

Murray Sargent
Murray Sargent

A few years ago, I visited two very interesting countries, Vietnam and South Korea. Being actively involved in writing software (mostly RichEdit) for editing the world’s scripts, I was naturally fascinated to see Vietnamese and Korean text displayed in profusion. The Vietnamese and Korean scripts were designed with a common purpose in mind: enable the languages to be read and written easily by all members of their respective countries. Earlier on, people tried to write Vietnamese and Korean by customizing the Chinese script. But while the Chinese script is well suited to Chinese languages, it’s considerably less ...

Windows 11 Notepad
Feb 22, 2022
Post comments count 55
Post likes count 1

Windows 11 Notepad

Murray Sargent
Murray Sargent

The new Windows 11 Notepad uses RichEdit and runs on up-to-date Windows 11 installations. In addition to a Windows 11 look with rounded corners and a dark-theme option, the new Notepad includes several standard RichEdit editing enhancements, such as Alt+x for entering Unicode characters, Ctrl+} for toggling between matching brackets/parentheses, multilevel undo, drag & drop, color emoji, and autoURL detection. You might guess that using a RichEdit plain-text control in Notepad would be a slam dunk. RichEdit has had plain-text controls ever since Office 97 (last century!) and they’ve been used myriad times. Bu...

Function to get Unicode Fractions
Jan 22, 2022
Post comments count 5
Post likes count 1

Function to get Unicode Fractions

Murray Sargent
Murray Sargent

Do you know that Unicode includes the fraction characters ↉ ½ ⅓ ¼ ⅕ ⅙ ⅐ ⅛ ⅑ ⅒ ⅔ ⅖ ¾ ⅗ ⅜ ⅘ ⅚ ⅞? Well thanks to existing character standards, ½ ⅓ ¼ ⅕ ⅙ ⅛ ⅔ ⅖ ¾ ⅗ ⅜ ⅘ ⅚ ⅞ were added in Unicode 1.1 in 1993, and ↉ ⅐ ⅑ ⅒ were added in Unicode 5.2 in 2009. Programs like Microsoft Word have an “Autoformat as you type” option to convert the linear fractions 1/2, 1/3, 1/4, and 3/4 into the corresponding Unicode fraction ½ ⅓ ¼ and ¾. This post gives a simple C++ function that converts the linear form of all Unicode fractions into the Unicode fraction characters. The function is relatively easy to read and understand, at lea...

UnicodeMath Color
Dec 10, 2021
Post comments count 1
Post likes count 1

UnicodeMath Color

Murray Sargent
Murray Sargent

In slide presentations and elsewhere, it can be handy to have math text color and math background color. In fact, Presentation MathML has the attributes “mathcolor” and “mathbackground”. This post describes the operators Noah Doersing added to his UnicodeMathML implementation to enter text and background color using UnicodeMath. I subsequently added them to the RichEdit math converters. Inputting math using UnicodeMath into Word and other applications typically doesn’t require special text and background color syntax since these applications have user interfaces (UI) to color text. But UnicodeMath is a useful ...