0

I am writing my thesis in overleaf and want to add a bibliography sinced with Mendeley.

However, i'm having issues using biblatex package... Can i overwrite these issues or should I change my entire document type?

This is my code and the errors im facing:

\documentclass{dissertation}

\usepackage[style=authoryear]{biblatex}

\addbibresource{references.bib}

\begin{document}

\include{Introduction/Introduction}

\include{Methods/Methods}

\include{Results/Results}

\printbibliography

\end{document}

Errors

 /usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex.sty, line 462 LaTeX Error: Command \bibhang already defined.

/usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex.sty, line 9791 LaTeX Error: Command \citename already defined.

 /usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex.def, line 270 LaTeX Error: Command \bibfont already defined.

usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex.def, line 2067 LaTeX Error: Command \Citeauthor already defined.


Package biblatex Error: Incompatible package 'chapterbib'.

Package biblatex Error: Incompatible package 'natbib'.
Tess
  • 77
  • 3
    Welcome to TeX.SX! The dissertation class apparently loads the natbib package, which is incompatible with biblatex. Can you please provide a link to the dissertation class or to the template, please? – Phelype Oleinik May 29 '19 at 13:18
  • Assuming the dissertation.cls is this one simply comment out lines 18, 19 and 47 of the class and things should work as long as you don't use the built-in \references macro. – Alan Munn May 29 '19 at 13:31
  • Many signs point to dissertation.cls being a version of the TU Delft dissertation template available at https://www.tudelft.nl/en/tu-delft-corporate-design/downloads/. We had a question about the report template a while ago https://tex.stackexchange.com/q/428377/35864. The general approach is the same, but this time you need to stop natbib and chapterbib from loading and not only natbib. – moewe May 30 '19 at 10:42
  • @moewe, yes it is indeed it is a version from the TU Delft. Thank you, this link helped a lot! However, when following the instructions and adding a line to stop chapterbib from loading, the dissertation doesn't get printend even though the errors are gone and i'm loading \printbibliography.. Any tips? – Tess Jun 03 '19 at 12:15
  • You need to run Biber on your file instead of BIbTeX. Have a look at https://tex.stackexchange.com/q/154751/35864. Make sure to remove all temporary files (.aux, .bbl, .bcf, ...) and then try again to compile with LaTeX, Biber, LaTeX, LaTeX. If it still does not work, please upload the .log and .blg files (on Windows you may have to unhide file extensions to find those files, Windows will also classify a .blg as a performance monitor file, even though it is just a normal text file you can open with your favourite editor). – moewe Jun 03 '19 at 15:57
  • @moewe, I believe I am already doing that whith this line of code:

    \usepackage[backend=biber,style=numeric,natbib=true]{biblatex} \addbibresource{references.bib}

    Furthermore, there are no temporary files in my overleaf workspace. Finally, how do I upload the .log and .blg files? (I use IOS)

    Thanks!

    – Tess Jun 04 '19 at 07:26
  • Ah, sorry I forgot about Overleaf. Biber is an external tool that needs to be run separately from LaTeX, but Overleaf does all that stuff behind the scenes for you, so you don't have to worry about it. First clear the Cache as described in https://tex.stackexchange.com/q/479736/35864. Then recompile and follow the steps from https://tex.stackexchange.com/q/462314/35864 to download the relevant files (the post shows how to download the .bbl, we need the .log and the .blg.) You can just paste the complete contents of the .blg here. You can upload the log to https://pastebin.com/ – moewe Jun 04 '19 at 07:31
  • Here is the uploaded log: https://pastebin.com/YJDEaKnB

    And the .blg file:

    [0] Config.pm:354> INFO - This is Biber 2.7

    [0] Config.pm:357> INFO - Logfile is 'output.blg'

    [47] biber:303> INFO - === Tue Jun 4, 2019, 14:56:09

    [83] Biber.pm:359> INFO - Reading 'output.bcf'

    [219] Biber.pm:835> INFO - Found 0 citekeys in bib section 0

    [233] Utils.pm:164> WARN - The file 'output.bcf' does not contain any citations!

    [247] bbl.pm:608> INFO - Writing 'output.bbl' with encoding 'UTF-8'

    [247] bbl.pm:712> INFO - Output to output.bbl

    [248] Biber.pm:109> INFO - WARNINGS: 1

    – Tess Jun 04 '19 at 15:01
  • Thanks for the files. The .log shows one issue: If you want an ampersand (&) you can't simply write &, because the & symbol is special for TeX, you need to write \&. $&$ is also wrong and should be replaced by a simple \&. Other than that it is fairly uneventful. But you should definitely fix that. ... – moewe Jun 04 '19 at 21:01
  • The .blg warns The file 'output.bcf' does not contain any citations! which suggests that there were no \cite or \nocite instructions in your document. By default biblatex will only print works you actually \cited. If you want to add all entries to the bibliography, regardless of whether they were cited or not, use \nocite{*}. See https://texfaq.org/FAQ-nocitestar – moewe Jun 04 '19 at 21:02
  • Thanks so much @moewe, it finally works!! – Tess Jun 05 '19 at 08:31

0 Answers0