1

I would like to know, why there is a gap between Rep and Q but not between Rep and S. How can I get a gap between Rep and S as long as for Rep Q?

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\usepackage{mathbbol}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\DeclareMathOperator{\Q}{\mathsf{Q}}
\DeclareMathOperator{\RQ}{\mathbf{Rep}\Q}

\begin{document}
$\RQ\quad\mathbf{Rep}\mathsf{S}$
\end{document}

1 Answers1

1

In the following, the notation (<object>)_{[mathord]} means that "(<object>)" (or "atom") is of type "mathord" ("math-ordinary"), etc.

  • \RQ gets expanded to (\mathbf{Rep})_{[mathop]}(\mathbf{Q})_{[mathord], i.e, the first object "Rep" is of type mathop ("math-operator") and the second object ("Q") is of type mathord.

  • \mathbf{Rep}\mathsf{S} contains two objects of type mathord -- "Rep" and "S".

  • TeX does not insert whitespace between adjacent atoms of type mathord.

  • In contrast, TeX automatically inserts a thinspace (1/6 of an emspace) if a mathop atom is followed by a \mathord atom. Two easy examples of such a pairwise combination are \sin x and \log y.

TeX knows 8 different types of math objects. These types are mathord, mathop, mathbin, mathrel, mathopen, mathclose, mathpunct, and mathinnner. See this answer by @egreg for a detailed table of all pairwise spacing rules.

Mico
  • 506,678