tags:

views:

1229

answers:

2

I need to embed the bibliography information from the .bbl file in the .tex source file. This, according to any number of places from Google, should be as easy as copying the contents of the .bbl file to the .tex file, replace the \bibliography{} command.

However, when I do this, I get the following error:

./Witmer.tex:82: Undefined control sequence.
<argument> \@listctr 

l.82 \bibitem{bhole-ner_over_time}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

./source.tex:82: You can't use `\relax' after \the.
<recently read> \c@ 

l.82 \bibitem{bhole-ner_over_time}

I'm forgetting what you said and using zero instead.

I have no idea what the problem is at this point. I'm including the cite package, and all is well when I use the .bbl file.

I'm generating the bbl file with bibtex. The relevant section of the document:

\bibliographystyle{plain}
\begin{thebibliography}{9}
...trimmed for size...

\bibitem{geo-spatialexpressions}
Annette Herskovits.
\newblock {\em Representation and processing of spatial expressions}.
\newblock Lawrence Erlbaum Associates, Inc., Mahwah, NJ, USA, 1998.

\end{thebibliography}

Update:

Here's the problem and the proposed fix: The error basically means that the bibliography generation code is expecting that there should be some arguments to each \bibitem:

\bibitem[\protect\citeauthoryear{Herskovits}{1998}]{geo-spatialexpressions}
Herskovits, A.
\newblock 1998.
\newblock {\em Representation and processing of spatial expressions}.
\newblock Mahwah, NJ, USA: Lawrence Erlbaum Associates, Inc.

I was actually trying to use a style file that was messing with the definitions of \cite and the bibliography generation.

+1  A: 

Is the contents of the .bbl file surrounded by a

\begin{thebibliography}
 ...
\end{thebibliography}

environment? I think that's necessary if you're going to include bibliography entries directly. (I always use bibtex so I'm not very familiar with that environment myself)

David Zaslavsky
A: 

You're right, it should just work.

I don't think the cite package will influence anything here. There's a post on comp.text.tex that mentions a similar error, involving the use of jurabib without an appropriate bibliography style, but I think we need more information before your problem can be solved.


After your edit I took another look; based on what you wrote originally, this works fine:

\documentclass[12pt]{article}
\usepackage{cite}
\begin{document}
\bibliographystyle{plain}
\begin{thebibliography}{1}
\bibitem{geo-spatialexpressions}
Annette Herskovits.
\newblock {\em Representation and processing of spatial expressions}.
\newblock Lawrence Erlbaum Associates, Inc., Mahwah, NJ, USA, 1998.
\end{thebibliography}
\end{document}

Hence highlighting the need to provide in the question what packages you're loading and what bibliography style you are using.

Regardless, it's good that you've managed to fix the problem :)

Will Robertson