## LaTeX forum ⇒ TeXworks ⇒ Bibliography Problems

Information and discussion about TeXworks, an integrated LaTeX environment for several platforms
edstevens
Posts: 2
Joined: Tue Oct 07, 2014 4:20 am

### Bibliography Problems

I know that I am supposed to reproduce the code of a problem, but I am having problems even generating a reproduction.

I had to re-install my operating system due to a Windows crash. I managed to recover my documents but can't get my working paper in Latex to compile correctly.

The error looks like this:

("C:\MyArticle.bbl"! Undefined control sequence.<argument> \protect \citeauthoryear                                      {Smith}{Smith...l.4   Smith}{1999}]{Smith98}

I opened up C:\MyArticle.bbl and it looks like this:

\begin{thebibliography}{} \bibitem[\protect\citeauthoryear{Smith}{Smith}{1999}]{Smith98}Smith (1999).\newblock Article name article name.\newblock {\em Journal Journal\/}~{\em 89}, 605--618. \end{thebibliography}

In previous, working versions, C:\MyArticle.bbl looked like this:

\begin{thebibliography}{10} \bibitem{Smith98}Smith\newblock Article name article name.\newblock {\em Journal Journal}, 89:605--618, 1999. \end{thebibliography}

So it looks like TeXworks inserted the extra \protect\citeauthoryear tags. How can I get the bibliography when it compiles back to the old state, or get TexWorks to read the \protect\citeauthoryear tags?

Thanks!
Last edited by Stefan Kottwitz on Fri Oct 10, 2014 11:43 am, edited 1 time in total.
Reason: code marked

Johannes_B
Site Moderator
Posts: 3644
Joined: Thu Nov 01, 2012 4:08 pm
Make sure to have an updated TeX-distribution, delete all the auxiliary files and try again.

Right now, it is impossible for me to see a reason for the behaviour described for a lack of information.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 8708
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi Ed,

welcome to the forum!

It seems that \citeauthoryear is undefined. This is a command of the natbib package. So ensure that you are loading natbib, if not existent add this line to your document preamble:

\usepackage{natbib}

Stefan

edstevens
Posts: 2
Joined: Tue Oct 07, 2014 4:20 am
Dear Stefan_K,

I could kiss you right now! Your recommended solution worked perfectly. Amazing how a little knowledge can shortcut hours of frustration.

Thanks so much.

Ed