[Tex/LaTex] What Unicode Font is Best Suited for Math Symbols using Font-Locking under Emacs

auctexemacsunicode-math

I recently installed Emacs + AucTeX on MS Windows using the pre-configured binary available from this CTAN webpage and everything works quite well with the latest MikTeX installation and Ghostscript 8 (both of which need to be installed separately). This is by far the easiest method I have found for getting all of these programs installed and working together under Windows.

One of Emacs' many useful features is "font-locking," which allows certain character sequences in the document to display on-screen as user-specified Unicode symbols. For example, typing the sequence \alpha in the document can be displayed (using the font-locking mechanism) as the Greek letter form alpha on the screen (but not stored as such in the file on disk) if this symbol is available in the font being used for this purpose under Emacs. This capability is very useful when one cannot directly use the Unicode document encoding format for the file on disk (say for compatibility reasons) but still wants to see the Unicode glyphs that correspond to various LaTeX symbols when displaying the document in the Emacs editor window.

An older package that enables this instant on-screen translation of sequence names to corresponding Unicode glyphs under Emacs is called x-symbol. A more recent package (available on this reddit page) that appears to accomplish the same thing is called latex-pretty-symbols.el, which works quite well with the above-described installation.

Unfortunately, many Unicode fonts that are available under Windows appear to support only a meager subset of the LaTeX math symbols that one routinely uses, including the fonts suggested by Xah Lee on his Unicode emacs blog and on this Penn State webpage.

Question:

What options are there for Unicode fonts under Emacs (MS Windows) that contain all of the routinely used LaTeX math symbols?

One would think that perhaps the Computer Modern fonts themselves might exist in some form (encoding + format) that would allow them to be used from within Emacs, and if so has anyone had success using them for this purpose?

How about the STIX fonts?

The Cambria Math fonts can be used from within Emacs, but subscripts and superscripts do not display properly when typing them inside math blocks. Is it somehow possible to configure AucTeX to position sub/superscripts vertically in a visually acceptable manner when using Cambria Math, or is the format of this relatively new font from Microsoft somehow incompatible with what Emacs + AucTeX can handle under Windows at the moment?

Edit: The information on this page helps explain why Emacs is having trouble rendering the Cambria Math font. Apparently Microsoft is utilizing extensions to the OpenType format for math symbols that Emacs (as well as various legacy apps like Word 2000) cannot properly handle. A more detailed explanation is provided by Murray Sargent on his blog.

Best Answer

As suggested by egreg, I will turn my comments into an answer to at least part of your question:

One would think that perhaps the Computer Modern fonts themselves might exist in some form (encoding + format) that would allow them to be used from within Emacs, and if so has anyone had success using them for this purpose?

You could use the CM-Unicode fonts, which are installable under Windows on OS level and therefore usable from all applications using the system fonts. I use these fonts in Inkscape, Word and PowerPoint.

Quoting from the CM-Unicode homepage:

Computer Modern Unicode fonts were converted from metafont sources using mftrace with autotrace backend and fontforge (former pfaedit). Their main purpose is to create free good quality fonts for use in X applications supporting many languages. Currently the fonts contain glyphs from Latin1 (Metafont ec, tc, vnr), Cyrillic (lh) and Greek (cbgreek when available) code sets and IPA extensions (from tipa).

You also ask about STIX fonts. These fonts are also available in otf format, so I would say it should be easy to install these fonts on system level.

Related Question