I have upgraded my TeX Live system to the 2018 version and realized a strange behavior: One can no longer use \mathcal as a subscript or a superscript without brackets. Example:

% !TeX program = xelatex


$a_\mathcal{S}$ % not working

$a^\mathcal{S}$ % not working

$a_{\mathcal{S}}$ % with brackets, working

$a_\mathbf{S}$ % boldface is working

My questions are: Is this a bug or a feature? If it's a bug, then how to fix it? If it's a feature, then why?

Thank you very much in advance!

Update: After posting the question I realized that \mathbf without brackets is also not allowed, if it is followed by something else. For example:

$a^\mathbf{s}(x)$ % not working

$a_\mathbf{s}^x$ % not working

$a^{\mathbf{s}}(x)$ % working

$a_{\mathbf{s}}^x$ % working
  • Can this posting be closed as "has already been solved"? – Mico Jun 2 '18 at 9:30
  • @Mico No my questions are still not answered ;) – Khue Jun 2 '18 at 9:35
  • 2
    Because the argument to _ is not a single token but \mathbf{x}. This is only consistent with other argument parsing. If the argument is more than a single token, you have to enclose it in braces. – Skillmon Jun 2 '18 at 9:40
  • 6
    The syntax without braces is wrong. You only were lucky until now that due to some implementation details it didn't lead to errors. This can happen. Not every input error is punished. – Ulrike Fischer Jun 2 '18 at 10:14
  • 3
    @Mico the unbraced syntax is wrong because documented latex syntax for subscripts is specified as using braces, not by reference to tex primitive behaviour. a_\mathcal{S} works in classic latex and worked in unicode-math until last year github.com/wspr/unicode-math/issues/448 – David Carlisle Jun 2 '18 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.