When I do:

\vec{p_{\bar p}}

I get:

strange rendering

instead of

proper-ish rendering

with the \vec shifted over a bit. Why does this happen?

(Also, \vec{\mbox{p_{\bar p}}} renders identically, even though \mbox{p_{\bar p}} looks fine, which clashes with my previous mental model of \mbox – I thought that things outside the box don't really affect things inside the box; guess I'm wrong.)

  • 1
    Use \vec{p}_{\bar p} – Marco Daniel Mar 6 '12 at 18:11
  • 1
    @MarcoDaniel: now you win! Its a tie! – Gonzalo Medina Mar 6 '12 at 18:12
  • Sorry, I guess I wasn't quite clear. That's how I got my second image, but what if I want the \vec arrow to be shifted to the right to be centered over the entire p_p "block"? – Sophie Alpert Mar 6 '12 at 18:13
  • (Also not suggesting that this would be the best way to typeset this, but I'm wondering why what I tried breaks.) – Sophie Alpert Mar 6 '12 at 18:14

This seems connected to the bug already examined in the question Why do arguments to nested \tilde or \breve commands reappear when amsmath is used?

Indeed, if amsmath is not loaded, your code works fine.

The solution is to avoid nesting:


which is, in my opinion, more mathematically sound.

  • Gotcha, thanks for the explanation (both here and on the other question)! – Sophie Alpert Mar 6 '12 at 19:20

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.