The title says it all. I would like to typeset the time-derivative of a vector whose symbol shall be \hat{x}
. The documentclass svjour3 is used in Springer journals. The following MWE reproduces the behaviour in the article class:
\documentclass{article}
\if@mathematic
\def\vec#1{\ensuremath{\mathchoice
{\mbox{\boldmath$\displaystyle\mathbf{#1}$}}
{\mbox{\boldmath$\textstyle\mathbf{#1}$}}
{\mbox{\boldmath$\scriptstyle\mathbf{#1}$}}
{\mbox{\boldmath$\scriptscriptstyle\mathbf{#1}$}}}}
\else
\def\vec#1{\ensuremath{\mathchoice
{\mbox{\boldmath$\displaystyle#1$}}
{\mbox{\boldmath$\textstyle#1$}}
{\mbox{\boldmath$\scriptstyle#1$}}
{\mbox{\boldmath$\scriptscriptstyle#1$}}}}
\fi
\usepackage{amsmath}
\begin{document}
\begin{equation}
\dot{\vec{\hat{x}}} % Failure
\vec{\dot{\hat{x}}} % OK
\dot{\hat{\vec{x}}} % OK
\end{equation}
\end{document}
Pdflatex output contains
! Undefined control sequence.
\macc@adjust ->\dimen@ \macc@kerna
\advance \dimen@ \macc@kernb \kern -\dimen@
How can I typeset such a vector in the svjour3 class?
Best Answer
The
svjour3
class uses a wrong way for redefining\vec
.Just load the class and do
Full example
If you prefer bold italic vectors, add
\usepackage{bm}
and doinstead.