2

I was trying to typeset the time derivative of \vec{r}_\alpha, and naively, I put it as an argument to \dot. This does not work: the arrow is not on r anymore. Here is a minimal example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\dot{\vec{r}_\alpha}
\]
\end{document}

Note that there is a better way to typeset it (and it works): \dot{\vec{r}}_\alpha. I am asking out of curiosity.

  • I'd use all sorts of "beautifiers" (\dot, \hat, etc.) only on the main symbol (in your case, "r") and not on the whole object (r_\alpha). Unless the \dot is e.g. absolute time derivative, or a similar operator that is to be applied on the whole term. – Martin Tapankov Jan 25 '11 at 13:14
  • from physical view it is wrong to have the dot over r and alpha. It should only be over the r, the reason why your own solution is the only correct one. –  Jan 25 '11 at 13:44
  • @Herbert, I of course agree that the correct thing to do is \dot{\vec{r}}_\alpha. I was mostly asking because amsmath changes the output unexpectedly. – Bruno Le Floch Jan 25 '11 at 13:56
  • you are absolutely right, it should work ... –  Jan 25 '11 at 15:03

2 Answers2

3

To me it looks like a bug: It works as expected if you omit \usepackage{amsmath}. However, it's somewhat strange what you're trying to do. You should not expect \dot{\vec{r}_\alpha} and \dot{\vec{r}}_\alpha to produce the same output; in the first case, the \dot should be centered over \vec{r}_\alpha, and over \vec{r} in the second case:

And I have no idea why you'd want to achieve the first version: If you want the \dot over everything, then maybe you should also put the \vec over everything, as in \dot{\vec{r_\alpha}}. This again works with amsmath.

As to why amsmath changes things (see comment below): amsmath contains a fix for producing nice double accents, and this seems to go wrong here. (Incidentally, you get almost the same unexpected behaviour if you use accents instead of amsmath.)

Hendrik Vogt
  • 37,935
2

Have a look at the mattens package. I have written it to "overcome" these problems

\documentclass{article}
\usepackage{mattens} % use [noformat] for non-bold symbols
\usepackage{bm}
\begin{document}
  $\aS[\Dot]{r}_\alpha$

  or some other examples where \TeX\ makes a real mess on its own

  $\bS[\Dot]{f}^i_j$
\end{document}
Danie Els
  • 19,694