When working on an additional answer to this question of mine, I stumbled across the following problem with \mathpalette. For simplicity I give an example where in practice it is ridiculous to use \mathpalette: \mathpalette{}{B}_b gives the output , whereas the straightforward B_b gives . Note that in the latter version the subscript is closer to the "B", which is good. If instead of \mathpalette one uses the version \mathchoice{B}{B}{B}{B}_b, one (of course) has the same problem.

Is there a way around this problem? (I mean other than \mathpalette{}{B_b}, which is not an option for what I need.)

2 Answers 2


Short answer: no. If you use \mathchoice, this is unavoidable.

Luatex offers a way to do \mathstyle-based typesetting without having to fall back on \mathchoice, see my answer to this question for details.

  • You have the habit of posting negative answers to my questions ;-). I fear that again I'll have to accept your answer. Still this property of \mathchoice is a bit annoying, isn't it? Oct 8, 2010 at 9:35
  • I really am sorry about those negative answers, but then, that is one reason for the existence of luatex. See my answer to tex.stackexchange.com/questions/1223 for a luatex-based solution to this problem. Oct 8, 2010 at 9:42
  • OK, that question is indeed very much related to my question, and your LuaTeX-answer looks quite good indeed. I think the link should go into your answer here; then the answer would be a lot less negative! Oct 8, 2010 at 10:00

As I understand it the \mathchoice gives you choice item in the math list; the _b gives you an ord atom with no nucleus or superscript. In contrast, B_b gives you a single ord atom with a nucleus and subscript.

You can look at this by using \showlists in TeX.


Then in the log, you see for the first math list,

D.\fam1 B
T.\fam1 B
S.\fam1 B
s.\fam1 B
_\fam1 b

and for the second, you get

.\fam1 B
_\fam1 b

Note the \mathord in the penultimate line of the first list.

This is described in Chapters 17 and 26 of the TeXbook.

  • @TH: This doesn't really answer my question, but it nicely explains the behaviour I observed. Thank you! Now I'm a bit uncertain which answer to accept ... Oct 8, 2010 at 9:52
  • @Hendrik Vogt: Taco answered your question. I just looked up why the answer was no. :)
    – TH.
    Oct 8, 2010 at 10:03

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.