# Math Fonts in Microsoft Office

As you know, Microsoft Office has a new and improved Equation Editor that ROCKS. It is so quick and easy and comes with many benefits. Check out my previous posts on Equation Editor here, here, and here to see why it’s so great.

One issue everyone has with the new Equation Editor, however, is the limited ability to change the font typeface. The default that comes with word, Cambria Math, is nice but doesn’t suit everyone’s needs. If you’re typesetting a document with a font other than Cambria, then it looks a little weird to have your equations in a different font.

After some extensive research, I’ve found three other nice fonts that work with Microsoft Office’s new Equation Editor (these are compatible with Office 2007 or later):

• Asana Math is compatible with Palatino (download here) and if you don’t have Palatino, you can download it here, among other places
• Latin Modern is the LaTeX font of choice. There is a math font (download here) and a whole family of text fonts (download here). Note: these may not look good on screen, but they look just perfect when printed.

To illustrate what these fonts look like, I’ve taken a screenshot below, and I’ve also uploaded the doc file and the pdf file. The doc file won’t render correctly on your machine, however, unless you actually download all the aforementioned fonts.

I hope this helps those who have been searching for alternative fonts for Microsoft Equation Editor. In the comments, please let me know if you find others!

# Microsoft Equation Editor vs LaTeX

I have posted twice about Microsoft Equation Editor recently, and made comparisons to $\LaTeX$, claiming that those who like $\LaTeX$ will be pleased that many beloved shortcuts work in Microsoft Equation Editor as well. If you couldn’t tell, I’ve been becoming a bigger and bigger fan of Microsoft Equation Editor, especially now that I’ve learned that  everything is possible from the keyboard.

I was talking with my good friend (and math professor) Matthew Wright, and I echoed the above sentiment. I said that I’m seeing less and less advantage to doing things in $\LaTeX$, when it’s so easy and fast in Microsoft Equation Editor. His reply, in defense of $\LaTeX$, was clear and helpful (published here with permission):

As much as I appreciate the improvements to Equation Editor, I can think of many reasons to use LaTeX. Here are some:

1. Math fonts: I like to use Palatino, but Word doesn’t support Palatino as a math font. Equation Editor defaults to some particular font, and I don’t know how to change the default setting. In order to use Palatino in equations, I have to convert my equations to “normal text”, but that removes the italics and some other equation formatting, so I then have to manually set the variables to be italics. I like to use a sans-serif font for presentations in PowerPoint, but that also requires a lot of manual font changes. LaTeX can specify all the fonts in the document by loading a single package.

2. LaTeX provides more symbols. The Equation Editor cheat sheet provides an impressive list of symbols, but it doesn’t come close to the amount of symbols available in LaTeX. The Comprehensive LaTeX Symbol List has 100 pages of symbols:

http://www.tex.ac.uk/tex-archive/info/symbols/comprehensive/symbols-letter.pdf

3. LaTeX supports some programming constructs, such as conditional statements and the ability to create new commands. For instance, if you use some expression repeatedly, you can define a new command so that you can easily insert your expression whenever you need it. Conditional formatting is useful to hide or print solutions in a worksheet, for example.

4. LaTeX numbers theorems and equations and lets you refer to them in your document. If you insert a theorem or equation, it automatically renumbers everything. The same applies for lemmas, definitions, chapters, sections, references, etc. (I know that Word has tools for cross-references, table of contents, and such, but I think consistent numbering of theorems and equations is easier in LaTeX.)

5. There are many special packages in LaTeX for a variety of tasks. For example, I use a schedule package to print my schedule each semester. Granted, this did not save time the first time I made a schedule, but saves me time now, since creating a schedule is really easy. I have attached my schedule.

6. Finally, I think that math looks better in LaTeX than in Word. This is subjective, but I like Donald Knuth’s Computer Modern font family.

I guess I knew all of that, but I was glad for his reminders of why $\LaTeX$ is still a very, very powerful tool. I’ve been using it for all my math grad school assignments, and I think Matthew has convinced me to continue doing that. There’s also the obvious additional benefit of $\LaTeX$:

7. Geek cred 🙂

Do you have any to add?

# More on Microsoft Equation Editor

As some of you know, I recently posted about Microsoft Equation Editor (here) and the way it’s been totally upgraded. I’ve been using Microsoft’s Equation Editor more and more, and I’ve learned a lot of new things, but I also still have questions (for instance, how do you force it to do display or in-line mode?).

Before, when I had questions, it seemed like Microsoft had no answers. I searched their website and found minimal help. I found help from third-parties, like this wonderful cheat-sheet which I still highly recommend. But today when I went searching for some more answers, I found this page on Microsoft’s website, which I swear wasn’t online two months ago.

The most interesting thing is that they mention their use of Unicode Nearly Plain-text Encoding of Mathematics and they claim that the Microsoft Equation editor adheres to the standards set forth in Unicode Technical Note 28.  I’ve now completely read this Unicode guide and it was very helpful.

I think I can finally use the new Microsoft Equation Editor without ever leaving the keyboard.

In particular, here are a few things I learned how to do. Hopefully this will save you the time of having to read through it all yourself:

## Tips & Tricks with the new Microsoft Equation Editor

To start with, here are a handful of things I didn’t know how to do without visiting the toolbar. Now I can do them just by typing.

Boxed formula:   \rect(a/b) produces

Matrix:   (\matrix(a&b@&c&d))   produces

Equation arrays are something I found hard to do in Microsoft Equation Editor. In their documentation, I learned you can type “Shift+Enter” to keep the next line as part of the same equation array. But here’s the more finely-grained method:

\eqarray(x+1&=2@1+2+3+y&=z@3/x&=6)

resolves to this:

A more complicated example of alignment, and a description of how it is interpreted comes from the Unicode page:

3.19 Equation Arrays
To align one equation relative to another vertically, one can use an equation array, such as

which has the linear format █(10&x+&3&y=2@3&x+&13&y=4), where █ is U+2588. Here the meaning of the ampersands alternate between align and spacer, with an implied spacer at the start of the line. So every odd & is an alignment point and every even & is a place where space may be added to align the equations. This convention is used in AmSTeX.

Instead of █, one can type \eqarray in Microsoft office. Also, to include a numbered equation is simple:  E=mc^2#(30).

Another nice thing I learned is how to quickly include text in your equations, without having to visit the toolbar (in retrospect, it’s somewhat obvious):

“rate”=”distance”/”time”

resolves to

$\text{rate}=\frac{\text{distance}}{\text{time}}$

Like I said, one unresolved issue I still have is how to force math to be displayed in ‘in-line’ or ‘display’ mode. This is very easy in $\LaTeX$ with the use of \$ or $$. Section 3.20 of the Unicode notes isn’t very satisfying: Note that although there’s no way to specify display versus inline modes (TeX ‘s  versus$$), a useful convention for systems that mark math zones is that a paragraph a paragraph consisting of a math zone is in display mode.  If any part of the paragraph isn’t in a math zone including a possible terminating period, then inline rendering is used.

So there you have it–more of what I’ve learned about the Microsoft Equation Editor. Please do share if you have other useful information.

# Math Comic rage

I’ve been enjoying following this youtube channel about math, LaTeX, and juggling. It’s authored by an acquaintance of mine (Joe) that I know from the juggling community, actually. Here’s one Joe posted this week that I particularly liked:

# Microsoft Office Equation Editor

Even though I’d love to say I use $\LaTeX$ for everything, I actually only use it for my grad school assignments. I don’t use it for all my worksheets and assessments. There is a teacher in our math department who does use $\LaTeX$ for everything, but it’s not me.

That being said, Microsoft has made a significant upgrade to its equation editor with the release of Office 2007 (I know, pretty stale news–but my school just upgraded this past year) and $\LaTeX$ lovers will love it if they haven’t tried it yet. The old Microsoft Equation 3.0 which shipped with earlier Office products had a few shortcuts, but it was still pretty hard to type equations without using the toolbar. Color-coding was problematic, and equation objects didn’t respond to font-size changes or other formatting properties. Animations in powerpoint were also difficult.

The new equation editor is much better for the following reasons:

1. The shortcuts are amazing, and most simple $\LaTeX$ commands work. For a complete list of shortcuts go here for a great pdf cheat sheet. You can even add your own custom commands if you go into your options to Proofing > AutoCorrect Options and click on the “Math AutoCorrect” tab. Also, pressing Alt+= will immediately launch the editor. So inserting an equation is fast and you never need to leave the keyboard.

2. Most calculator-style syntax is accepted as well. So typing 3^x [space] / 4^y [space][space] results in $\frac{3^x}{3^y}$, without any extra effort. Tapping the spacebar will automatically convert your calculator syntax into pretty display math. For a more complicated example, consider this:

$\lim_{n\to\infty} \frac{(2n+1)(3n-2)}{4n^2}=\frac{3}{2}$

produced by typing “lim_(n\to\infty)[space]((2n+1)(3n-2))/(4n^2)[space]=3/2[space].”

3. As hinted above, the new equation editor responds to all the normal font formatting options in Microsoft Office. You can color your formulas, you can change the font size, and you can apply any other text effect like shadow/glow/outline/etc. [edit: Though you can change all those things, no, you cannot change the font face. There are a limited number of fonts available for use, and the only one I know of is the default, Cambria Math–if you know of another one, please share!]

4. In powerpoint, animations are quite a bit easier, since you can do all the equations in-line as part of the text, rather than juggling scads of different text and equation objects.

For more on Microsoft’s new  Equation Editor, please check out my more recent post here!

# LaTeX in HTML using a Perl script

Writing a paper in LaTeX will always result in beautiful output, but if you’d like to put that document up on the web you’re limited to two reasonable options: serve the document as a .PDF (with the horrors involves, although Chrome makes things much more palatable), or relying on third-party browser plugins like TeX The World. Now that [Todd Lehman] has finally cooked up a perl script to embed LaTeX in HTML documents, there’s no reason to type e^i*pi + 1 = 0 anymore.

(more)

There are a few other options for getting $\LaTeX$ into your webpages, but they all feel like hacks. In particular, I like the Code Cogs Equation Editor which is a WYSIWYG $\LaTeX$ editor. But of course, if you have a WordPress blog like this one, you can include code inline without much work at all (though WordPress hasn’t implemented a full-fledged interpreter, it’s still pretty decent).

A few weeks ago, I blogged about a calculator giveaway at Wild About Math. Since then, Sol has posted a submitted solution here (and here’s the direct link to the pdf solution by Nate Burchell).

Here’s the problem for those who didn’t see it:

One can create a triangle of consecutive positive integers as follows:

 1
2  3
4  5  6
7  8  9 10
11 12 13 14 15
16 17 18 19 20 21
. . .

Each row, R, has R numbers. Each column, C, has infinitely many numbers. Rows and columns begin at 1. We define a function F(R,C) for row R and column C such that F(R,C) gives us a value in the triangle. Thus, F(1,1) = 1, F(2,1) = 2, and F(2,2) = 3. Note that F(R,C) is only defined when 1 < = C <= R.

Part 1: Come up with a formula that computes F(R,C) in terms of R and C for any positive values of R and C when 1 < = C <= R. Show your work.

Part 2: Come up with a formula or algorithm that, given a positive integer n, determines R and C.

I also solved the problem and submitted a solution but I didn’t win. Here’s my own solution.

$\LaTeX$ has been available in Google Docs before, but now it’s been revamped a bit. Jury’s still out on the changes, but those of us who are fans of $\LaTeX$ at least appreciate the attempt at implementation. I just played around with it, and it’s still not perfect. There are plenty of things left to be desired. It won’t allow you to use some of your favorite $\LaTeX$ packages, for instance. For more info, see the Google Docs blog post from last week.