8

I have found, unintentionally, that if you write

$\mathcal{P_1}$

you obtain the same as

$\mathcal{P}_{\infty}$ , i.e.,

enter image description here

Is this a bug or a Latex functionality unknown to me?

  • 4
    it is user error. \mathcal should only be used with captial letters. If you use anything else you get whatever symbols happen to be in those positions in the font – David Carlisle Jan 21 '23 at 11:31
  • 4
    It's the same problem as in https://tex.stackexchange.com/q/84041/4427. – egreg Jan 21 '23 at 11:33
  • 2
    It’s a bug that users invested in TeX will insist should not be fixed. – user3840170 Jan 22 '23 at 14:00

2 Answers2

16

It is not a bug or feature in LaTeX, it is user error. \mathcal should only be used with capital letters. If you use anything else you get whatever symbols happen to be in those positions in the font

See texdoc encguide. \mathcal is documented to work with only uppercase letters for classic tex math fonts. Technically it switches to the OMS encoded symbol font which has this layout: enter image description here

As you will see A-Z positions have A-Z calligraphic, but all other slots have math symbols unrelated to the ASCII positions.

user202729
  • 7,143
David Carlisle
  • 757,742
5

Just out of interest, I notice that using unicode-math changes the output here. Using xelatex or lualatex, I find that if I compile the (incorrect) OP example, I get:

enter image description here

as shown in the question, but if I add unicode-math, like this:

\documentclass[border=5mm]{standalone}
\usepackage{unicode-math}
\begin{document}
$\mathcal{P_1}$
\end{document}

the output is

enter image description here

which is the same if I correct it to $\mathcal{P}_1$.

Thruston
  • 42,268