TeXworksBibliography Problems

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

Bibliography Problems

Post by edstevens »

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:

Code: Select all

("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:

Code: Select all

\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:

Code: Select all

\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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Bibliography Problems

Post by Johannes_B »

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.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10311
Joined: Mon Mar 10, 2008 9:44 pm

Bibliography Problems

Post by Stefan Kottwitz »

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:

Code: Select all

\usepackage{natbib}
Stefan
LaTeX.org admin
edstevens
Posts: 2
Joined: Tue Oct 07, 2014 4:20 am

Re: Bibliography Problems

Post by edstevens »

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
Post Reply