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

The following test code works if I comment out the \setcitestyle line. If I don't it throws a "undefined control sequence error." What's wrong? (I'm using the MacTeX-2011 distribution.)



\setcitestyle{notesep={: },aysep={}}

\ifdefmacro{\bibname}{}{\newcommand{\biname}{References}}   % Default bibliography name
\ifdefmacro{\bibfile}{}{\newcommand{\bibfile}{references}}  % Default name of references file, references.bib

Hello \citep{KandR}

Kernighan wrote, \citet{gary_a._dymski_afterword:_2009}

Goodbye \citep[][222]{gary_a._dymski_afterword:_2009}
share|improve this question
I don't get any error. – egreg May 19 '12 at 19:35

Well, I finally figured this out. Thanks egreg for telling me you didn't get any error. This pointed me in the right direction.

The problem was that a few years ago I had installed the Copernicus package, and it includes a natbib.sty file dating from 2006. Since I installed it in my ~/Library/texmf path, which comes before the directory for the systemwide files in the LaTeX search path, LaTeX was finding this file instead of the up-to-date one that comes with MacTeX-2011.

Once egreg told me it works, I looked more closely at the log file and noticed that a 2006 version of natbib was being loaded, instead of the 2010 version that comes with MacTeX. I'd infer that \setcitestyle was not implemented in 2006.

Lots of lessons here.

Thanks again.

share|improve this answer
+1. I had a quite similar problem! – enderland Nov 26 '12 at 21:58

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.