Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

\documentclass{scrartcl}  
\usepackage{amsmath}    
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}    
\usepackage{unicode-math}
\setmathfont[Scale={MatchLowercase},math-style=upright]{Neo Euler}

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

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

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

Math font

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

share|improve this question
add comment

2 Answers

up vote 8 down vote accepted

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:

$E_\textup{max}$

(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:

\newcommand{\diff}{\mathop{}\!d}

\newcommand{\constant}[1]{\mathnormal{#1}}
\newcommand{\e}{\constant{e}}
\newcommand{\ramuno}{\constant{i}}

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).

share|improve this answer
    
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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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