I have a typographical question concerning the use of text in math mode, for example for subscripts or the diff operator. Consider the following example, where I use XeLaTeX with Palatino as main font and Neo Euler as math font:

\setmainfont{TeX Gyre Pagella}    
\setmathfont[Scale={MatchLowercase},math-style=upright]{Neo Euler}

$E_{max}$ or $E_\text{max}$?

$m_e + m_x$ or $m_\text{e} + m_\text{x}$?

$\text{d}x$ or $dx$? 

Math font

What is typographically the correct option? Using the main text font for "max", "e", "x" or "d" or using the Math font?


When the subscript is "textual" it should be in the default upright font, so \text is not sufficient, because it will be influenced by the surrounding font; for instance, in the statement of a theorem the text font would be in italics, but subscript such as "max" should be upright nonetheless:


(loading amsmath before unicode-math should ensure that \textup is redefined so that it respect sizes in subscripts).

For the "d" of the differential there are many opinions. Most mathematicians use the "math font d" (Knuth included), but in some fields the upright "d" is prescribed by ISO regulations. The same holds for mathematical constants such as the Napier-Euler number "e".

The best approach is to define macros for these things:



so that you can change the appearance of the document by only acting on the definitions of \diff and \constant.

"ramuno" is the name used for the square root of –1 by some 16th century mathematicians (*ra*dice di *m*eno uno).

  • Thanks, that answers the issue I have. One thing: in my particular example the commands involving \mathnormal would be output in computer modern. What is the appropriate handling when using fontspec with unicode-math? – Jörg Mar 13 '12 at 13:01
  • It's quite strange that \mathnormal refers to the default math italic family. I believe this should be corrected by the package. – egreg Mar 13 '12 at 13:11
  • If I am not mistaken there is already a bug report (although the latest update is a year old): github.com/wspr/unicode-math/issues/175. – Jörg Mar 13 '12 at 13:24
  • @Jörg I've opened a new issue report. – egreg Mar 13 '12 at 13:38

My (personal) rule of thumb: if it's a word, which actually explains how you define the variable, it's roman, hence, $E_\text{max}$, or $S_\text{lex}$, or whatever. If it's a real subindex, meaning pick indexed variable such-and-such, it's maths, hence, "$E_m$, where m is ..."

I find this rule of thumb helps when reading the document, since the typography helps parse the meaning.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.