0

In environmental science (and probably also other disciplines), it is a fairly common practice to use multi-character symbols for variables (often these may be descriptive acronyms of what the variable is). For example, carbon use efficiency might be given the symbol CUE.

Multi-character symbols are typically typeset using an upright font rather than italics. For example, $\mathrm{FOO}$. Unfortunately this (possibly frowned upon by purists) practice plays havoc with the spacing in math mode. This is particularly evident when two upright symbols are multiplied together.

An example:

\documentclass[12pt]{article}
\begin{document}
This has no spacing: $x = \mathrm{FOO} \mathrm{BAR}$

This has too much spacing: $x = \mathrm{FOO} \quad \mathrm{BAR}$
\end{document}

produces

enter image description here

What is the best practice for typesetting multi-character symbols in math to avoid this issue?

Note that using math italics does not help (even if it were corresct to do so) as this introduces space between each character as though they were each separate variables.

9
  • 1
    do you really often juxtapose two multi-letter identifiers with no intervening operator? (there is no need to use a massive space like \quad of course \, would be more suitable, but I am surprised it often occurs. (In my field I almost always use \mathrm for variable names but don't think I have ever had two together) Mar 1, 2018 at 20:33
  • See this for some options. Mar 1, 2018 at 20:34
  • @DavidCarlisle - maybe not often. I've managed to avoid this problem up to now. But I am facing this issue now.
    – dww
    Mar 1, 2018 at 20:34
  • \, it is then:-) Mar 1, 2018 at 20:35
  • 2
    I find FOO<thin space>BAR ambiguous anyway, better using an explicit multiplication sign.
    – egreg
    Mar 1, 2018 at 21:29

1 Answer 1

4

enter image description here

Depending on the real use case a math class such as \mathop used here may result in correct spacing being applied automatically.

\documentclass[12pt]{article}
\usepackage{amsmath}
\DeclareMathOperator\FOO{FOO}
\DeclareMathOperator\BAR{BAR}
\begin{document}
This has no spacing: $x = \mathrm{FOO} \mathrm{BAR}$

This some spacing: $x = \mathrm{FOO} \,\mathrm{BAR}$


This automatic spacing: $x = \FOO\BAR$
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .