Should subscripts in math mode be upright?

In one-letter subscripts, like $x_i$, the subscript is usually typeset italic.

Is this the typographically right thing to do? Consider this case:

The Boltzmann constant is often written as $k_B$, which is short for $k_{Boltzmann}$. But the lengthy Boltzmann looks strange if typeset all italic. So I usually write $k_{\mathrm{Boltzmann}}$.

But shouldn't then, for consistency, the B in $k_B$ also be upright? And how about the i in $x_i$?

• You might be interested in a TUG2010 talk by Johannes Küster called "Math never seen", which gives examples starting approximately at 14:20. – morbusg Oct 31 '11 at 16:03
• I have never seen the "Boltzmann" in the subscript spelled in full. – becko Sep 30 '17 at 15:27

Using "all italics" is unfortunately an often committed sin. You should italicize only variables.

Everything else should be upright. For example:

• function names (sin, cos, log, ln etc...)
• dimensionless numbers (Re, Pr, Ra...)
• exact infinitesimal increments (dx, dy et... in BOTH integrals and differentials)
• descriptive text
• all descriptive variable indices (unless they are also variables)

Exceptions to this rule may still apply, i.e. the Euler-number $e$ is no variable, but still traditionally written in italics.

Some of the above was stolen from the "Please Make A Note" blog. More detailed information can be found in "Typefaces" from NIST.

• The ISO on this says that e, pi, etc. should also be upright (see for example en.wikipedia.org/wiki/ISO_31-11). – Joseph Wright Oct 30 '11 at 15:04
• Correct. Although in the scientific community this is mostly ignored. See tug.org/TUGboat/Articles/tb18-1/tb54becc.pdf Example: physicists run into trouble if they have elementary charge (upright e) and euler's constant (also upright e) in the same article. Furthermore it is custom or tradition to do so. I'd say it is up to personal taste; and I, personally, ignore the ISO here. – Boffin Oct 30 '11 at 15:24
• @Boffin, in my opinion the elementary charge is not upright 'e', but italic. Unless it is used as subindex (ublabel) for an electron-related quantity (such as electron mass $m_\mathrm{e}$). This makes a stronger case for upright 'e' for Euler constant. – alfC Apr 22 '13 at 4:34
• The elementary charge is always (? I have not seen otherwise) written as an italic e, as it should be since it is a measurable quantity. The symbol e for the electron in e.g. the electron mass (by itself it is often e⁻ to distinguish from the positron e⁺) is however written in roman, also as it should be since it is a symbol for a particle. Italic e for Euler's number is still common in math texts, though not "correct" according to authority (see the earlier linked TUGBoat article). It is less common in physics, though, I would say (not least to avoid the clash with the elementary charge). – Daniel Andersson Aug 30 '14 at 13:42
• Avoiding talking about personal taste and more about standards, whenever they exists, I would like to add a reference to APS styleguide for authors. It instructs all single letter abbreviations in math to be in italic: electron mass $m_e$, Coulomb energy $E_C$, Boltzmann constant $k_B$ and thus conflicts ISO nad NIST. – Johu Jul 30 '18 at 10:35

\text is not the right command to use, as its argument will be typeset in the current font, which may be italics.

\usepackage{amsmath} % for extended version of \textup
\newcommand*{\Boltzmann}{k_{\textup{B}}}

$\vec{F}_{\textup{in}}+\vec{F}_{\textup{out}}=\vec{0}$

What subscripts are to be set in upright font and what in italics is well explained by Boffin. (I disagree about the d for the differential, though, but that's another story: be consistent, that's all for this particular aspect.)

• Perhaps it should even be \textnormal as \textup still inherits bold from its surroundings. – Henri Menke Nov 4 '14 at 20:53
• @egreg @Henri Menke: I posted a new answer showing that \textnormal is better – lblb Apr 6 '17 at 20:14

For me it depends on the context. Using your example, I would agree that you should use $k_{\text{B}}$ since it is short for $k_{\text{Boltzmann}}$. Note the use of \text{...} from the amsmath package, that does a decent job of sticking to the math mode font size, depending on the context.

On that note, $k_{Boltzmann}$ "looks strange" because (La)TeX typesets it like it does regular math, which in this case is the variable B, followed by the variable o, followed by the variable l, and so on. My use of the term "variable" may be incorrect. The point I'm trying to make is that each letter is treated on it's own in math mode, rather than combining them like is done in text mode. The spacing is correct as-is in math mode, it just doesn't look like text.

With this discussion in mind, I hope you agree that $x_i$ should remain $x_i$. Of course, if you are referring to i in your text somewhere (instead of $i$), then it should be upright. IMHO, it is all (mostly?) driven by context.

Boffin's answer already provides the correct information. I just want to add to the discussion 'elementary charge' vs. 'Euler number' in the comments:

While physical constants (such as the elementary charge 'e', gravitational constant 'G', speed of light 'c', ...) are typeset italic, all mathematical constants (such as Euler number 'e', imaginary unit 'i', ...) should be typeset upright. This also provides a helpful distinction between, e.g., an index 'i' (italic) and the imaginary unit 'i' (upright).

All in all, the document by NIST which was already linked by @Boffin, provides a concise and complete summary.

• Is this a typo: »While physical constants […] are typeset italic, all mathematical constants […] should be typeset italic«? – clemens Sep 11 '15 at 12:45
• Yes, thanks. I had already changed that but pressed 'ctrl+z' once too often... :) – Aecturus Sep 11 '15 at 13:26

Based on egreg's answer and Henri Menke's comment, here's a comparison between amsmath's \text, \textup, and \textnormal commands. From the three, only \textnormal is immune from the outer text mode format, as the name says.

\documentclass{article}

\usepackage{amsmath} % for extended version of \textup

\begin{document}
\noindent
{\itshape$$\text{text}|\textup{up}|\textnormal{normal}$$}\newline
{\bfseries$$\text{text}|\textup{up}|\textnormal{normal}$$}\newline
\sffamily$$\text{text}|\textup{up}|\textnormal{normal}$$
\end{document} This is matter of personal style. In my own documents, I follow similar rules: if subscript stands for people's name I type it using \text command (defined in amsmath package), e.g. $\varepsilon_\text{F}$ (the Fermi energy), $a_\text{B}$ (the Bohr radius), $r_\text{D}$ (Debye's radius), etc. Russian indexes are usially typed upright: $P_\text{т.и}$ (power of bremsstrahlung).

• You are aware though that \text{} will use any formatting of the outside text mode? For example an italic paragraph will produce italic text inside math mode that way, which is problematic as italic has a special meaning in math notation. See my answer for using \textup or \textnormal instead. – lblb Dec 6 '17 at 19:33