9

I have the following setup

 \documentclass[oneside,12pt]{Classes/CUEDthesisPSnPDF}

\usepackage{bibentry}

\begin{document}

\nobibliography*

\section{Introduction}

\begin{itemize}
\item \bibentry{bob}
\end{itemize}

\end{document}

However when I try to compile I get the following error.

! File ended while scanning use of \BR@c@bibitem.<inserted text>\par \nobibliography

I assumed this was a missing } somewhere in my bib file but I have had a look and there are no such errors. I'm at a bit of a loss as to what the issue could be. Could anyone point me in the right direction?

  • You should provide a link to CUEDthesisPSnPDF.cls, at least... – Werner Aug 23 '13 at 19:48
  • Hi Werner, thanks for the comment, would the class make much difference in this situation? it compiles fine untill I add the \nobibliography command.

    the full class is at this link http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/ - Thanks again

    – Chris Headleand Aug 23 '13 at 19:51
  • 2
    It could be that there is a conflict between hyperref's backref and bibentry. A workaround is to use lualatex and luabibentry. – koppor Oct 24 '13 at 12:20

1 Answers1

8

The command \nobibliography* can be used only if you are going to use \bibliography{mybib} later in the document (supposing mybib.bib is your bibliography file).

In your case you have to use

\nobibliography{mybib}

Also remember that it is needed to declare a bibliography style, e.g.

\bibliographystyle{plain}

Thus, modifying your MWE to

\documentclass[oneside,12pt]{Classes/CUEDthesisPSnPDF}

\usepackage{bibentry}

\begin{document}

\bibliographystyle{plain}
\nobibliography{mybib}

\section{Introduction}

\begin{itemize}
\item \bibentry{bob}
\end{itemize}

\end{document}

will give the expected result.

P.S. Remember to run pdflatex -> bibtex -> pdflatex -> pdlatex


A compilable example just to show that the above code works:

\documentclass[oneside,12pt]{article}

\usepackage{bibentry}

\begin{document}

\bibliographystyle{plain}
\nobibliography{biblatex-examples}

\section{Introduction}

\begin{itemize}
\item \bibentry{angenendt}
\end{itemize}

\end{document} 

enter image description here

karlkoeller
  • 124,410