This "problem" is inherent to the class you're using.
Here's what's happening: You load wiley2sp
, which sets up the document structure. It also (re)defines the macro \vec
:
\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
This will print \vec{<stuff>}
in bold math font. Yes, it actually redefines the macro from a former \mathaccent
to the above.
Now you load amsmath
, which cycles through a number of math accents and reconfigures them. Here's an extract from the actual code:
\def\@tempa#1{\@xp\@tempb\meaning#1\@nil#1}
\def\@tempb#1>#2#3 #4\@nil#5{%
\@xp\ifx\csname#3\endcsname\mathaccent
\@tempc#4?"7777\@nil#5%
\else
\PackageWarningNoLine{amsmath}{%
Unable to redefine math accent \string#5}%
\fi
}
\def\@tempc#1"#2#3#4#5#6\@nil#7{%
\chardef\@tempd="#3\relax\set@mathaccent\@tempd{#7}{#2}{#4#5}}
\@tempa{\hat}
\@tempa{\check}
\@tempa{\tilde}
\@tempa{\acute}
\@tempa{\grave}
\@tempa{\dot}
\@tempa{\ddot}
\@tempa{\breve}
\@tempa{\bar}
\@tempa{\vec}
The above code is prefaced by the following documentation:
We redefine the standard math accent commands call \mathaccentV
, using the mathgroup/encoding-number information embedded in their previous definitions. If the definition of an accent command does not have the expected form, we leave the accent command alone, but give a warning.
You'll notice the set of redefinitions require the former definition of the math accent to start with \mathaccent
(as part of the \ifx
condition in \@tempb
). Since wiley2sp
redefined \vec
to mean something completely different (not a \mathaccent
anymore), amsmath
reports the warning.
A way around this would be to capture the definition of \vec
before wiley2sp
redefines it, and restore it before amsmath
checks to redefine it. The following achieves this:
\let\oldvec\vec% Store \vec in \oldvec
\documentclass{wiley2sp}
\let\vec\oldvec% Restore \vec from \oldvec
Note that, if this is a publisher-related style or class, they most likely want their \vec
tors printed in a specific format. So, removing this formatting of \vec
tors is probably not advised.