1

For my bachelor thesis I downloaded a template made available by my university. However the standard bibliography part was using

\begin{thebibliography}
\end{thebibliography}

Since I had already prepared a .bib file for my bibliography I wanted to use that so I tried the following code

\nocite{*}
\bibliography{BachelorBib}
\bibliographystyle{apalike}

I put my bib-file in the same folder as everything else and I tried putting the code above in the file prepared for the bibliography (which is then included in the main file) and bibtex-compiling that file, I tried just bibtex-compiling the main file. And I tried putting the code above directly in my main file and the bibtex-compiling that main file.

However each time I try to compile my main file to get an output I still don't get my bibliography.

The error-message I get after bibtex-compiling is:

This is BibTeX, Version 0.99d (TeX Live 2013) The top-level auxiliary file: boek.aux
A level-1 auxiliary file: titel.aux A level-1 auxiliary file: voorwoord.aux
A level-1 auxiliary file: hoofdstuk1.aux The style file: apalike.bst
A level-1 auxiliary file: referenties.aux Multiple inclusions of entire database
---line 2 of file referenties.aux : \citation{* : }
I'm skipping whatever remains of this command Illegal,
another \bibdata command---line 3 of file referenties.aux :
\bibdata : {BachelorBib} I'm skipping whatever remains of this command
Illegal, another \bibstyle command---line 4 of file referenties.aux :
\bibstyle : {apalike} I'm skipping whatever remains of this command
Database file #1: BachelorBib.bib (There were 3 error messages)

Can somebody help me with this?

1

Try using your commands in reverse order:

\usepackage[square,numbers,sort&compress]{natbib}


\bibliographystyle{apalike}    
\bibliography{BachelorBib}

I have done in that way and it worked for me. I believe it didn't have anything to do with package which I used. My bibliography style was ieeetr. Just give it a try.

  • Thank you, putting it in that order in the References.tex file and then including it in the main file worked for me! – Chocolate_Althea Apr 5 '15 at 21:02
  • Great to know that it worked for you. Cheers! – Tarun Apr 5 '15 at 21:37
1

Try deleting all the .aux and .bbl files generated before, leaving only .tex and .bib. Recompile main file first, then compile bibtex.

It seems to be like the old thebibliography command generated aux files that are not compatible with \bibliography. If that still doesn't work, double check your .bib using some other tool like JabRef.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.