TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the pss(b) template, which starts with,

\documentclass[pss]{wiley2sp} % provides pss two-column style
%\usepackage{bm}              % uncomment these two packages if you
%\usepackage{w-greek}         % need extended greek-letter functionality in math mode

I always got this warning:

Package amsmath Warning: Unable to redefine math accent \vec.

Does anyone know how to fix this problem?

share|improve this question

migrated from stackoverflow.com Mar 14 '13 at 17:56

This question came from our site for professional and enthusiast programmers.

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:


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\@tempb#1>#2#3 #4\@nil#5{%
      Unable to redefine math accent \string#5}%

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
\let\vec\oldvec% Restore \vec from \oldvec

Note that, if this is a publisher-related style or class, they most likely want their \vectors printed in a specific format. So, removing this formatting of \vectors is probably not advised.

share|improve this answer
It seems that this way can go around the problem. But it has new problem:! LaTeX Error: Option clash for package graphicx. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.9 \usepackage {color} ? Here are my codes: \let\oldvec\vec% Store \vec in \oldvec \documentclass[pss]{wiley2sp} % provides pss two-column style \let\vec\oldvec% Restore \vec from \oldvec \usepackage{amsmath} \usepackage[dvips]{graphicx}% Include figure files % \usepackage{amsmath,array} \usepackage{color} – user2045447 Mar 13 '13 at 6:56
Looks like it complains the packages I used below amsmath. – user2045447 Mar 13 '13 at 7:00
@user2045447: Drop the [dvips] option for graphicx. It will figure out what driver you need based on the compilation sequence. For example, if you are using pdflatex, you can't use [dvips]. – Werner Mar 13 '13 at 14:13

load amsmath first:

\documentclass[pss]{wiley2sp} % provides pss two-column style

Then amsmath defines the \vec at first and wiley2sp will redefine it.

share|improve this answer
Your answer was flagged as too short. Could you edit and give some more information? Thanks. – LaRiFaRi Jun 23 '15 at 9:00
This also fixes a similar problem with the llncs document style. Many thanks (: – drevicko Mar 12 at 9:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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