1

Please bear with me, I'm trying to use LaTeX for my thesis and I have no idea how to solve this problem. Found multiple posts here and no solutions worked for me. I'm using TeXstudio and just can't get the bibliography to work, always getting this error message:

This is BibTeX, Version 0.99d (MiKTeX 21.2)
The top-level auxiliary file: document.aux
I found no \citation commands---while reading file document.aux
I found no \bibdata command---while reading file
I found no \bibstyle command---while reading file document.aux
(There were 3 error messages)

Process exited with error(s)

This is my code:

%Dokumentenklasse "scrbook" - Erweitert um den Verweis auf die Verzeichnisse und Texteigenschaften
\documentclass[chapterprefix=false, 12pt, a4paper, oneside, parskip=half, listof=totoc, bibliography=totoc, numbers=noendperiod]{scrbook}

%Indents \setlength{\parindent}{3em} \setlength{\parskip}{1em}

%Sprache %\usepackage[english]{babel}

\usepackage{biblatex}

%Tweaks für scrbook \usepackage{scrhack}

%Blindtext \usepackage{blindtext}

%Erlaubt unter anderem captions \usepackage{caption}

%Kompakte Listen \usepackage{paralist}

%Für NewGeometry auf dem Deckblatt \usepackage{geometry}

%Zitate besser formatieren und darstellen \usepackage{epigraph}

%Anpassung von Kopf- und Fußzeile %beinflusst die erste Seite des Kapitels \usepackage[automark,headsepline]{scrlayer-scrpage} \automark{chapter} \ihead{\leftmark} \chead{} \ohead{\thepage} \ifoot{} \cfoot[\thepage]{} \cfoot{} \ofoot*{} \pagestyle{scrheadings}

%Zeilenabstand 1,5 \usepackage[onehalfspacing]{setspace}

%Verbesserte Darstellung der Buchstaben zueinander \usepackage[stretch=10]{microtype}

%Unterstützung von Umlauten und anderen Sonderzeichen (UTF-8) \usepackage{lmodern} \usepackage[utf8]{luainputenc} \usepackage[T1]{fontenc}

%Grafiken (wie jpg, png, etc.) \usepackage{graphicx}

%Grafiken von Text umlaufen lassen \usepackage{wrapfig}

%Unterstützung der H positionierung (keine automatische Verschiebung eingefügter Elemente) \usepackage{float}

%\usepackage[authoryear]{natbib} \usepackage {hyperref}

\usepackage[american]{babel} \usepackage{csquotes} \usepackage[style=mla-new]{biblatex} \addbibresource{library}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Anpassung der Überschriften \addtokomafont{disposition}{\rmfamily}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document} \include{chapter/title} \include{chapter/abstract}

\tableofcontents

\include{chapter/intro} \include{chapter/two} \include{chapter/three} \include{chapter/four} \include{chapter/five} \printbibliography \include{chapter/eid}

\end{document}

And one of the pages has \nocite{*}

moewe
  • 175,683
Siv
  • 11
  • 2
  • If you use biblatex with default settings then you should not run BibTeX but you should run Biber instead. You can set your editor to do this. I don't have TeXstudio so I can't test it but probably https://tex.stackexchange.com/a/154754/ can help you here. – Marijn Mar 10 '21 at 10:40

1 Answers1

1

There are a few things wrong with your code:

  1. Packages should only be loaded once. Loading packages multiple times with different options will raise errors. You load biblatex twice: Once as \usepackage{biblatex} and once as \usepackage[style=mla-new]{biblatex}. This will throw an error. Load biblatex only once.

  2. \addbibresource takes the file name of your .bib file with file extension. So it should be \addbibresource{library.bib}.

  3. hyperref should generally be the last package you load.

  4. The whole block

    \usepackage{lmodern}
    \usepackage[utf8]{luainputenc}
    \usepackage[T1]{fontenc}
    

    looks suspicious.

    • luainputenc is supposed to be used for LuaLaTeX and only needed for legacy documents that do not use UTF-8 encoding. So loading luainputenc with the utf8 option is already self-defeating in a way. If you are not using LuaLaTeX, luainputenc is an odd choice to start with, since it is supposed to be used with LuaLaTeX (even though it also attempts to work with non-LuaLaTeX engines).
    • \usepackage[T1]{fontenc} on the other hand, should definitely not be used with LuaLaTeX. It is a very good choice, though, if you use pdfLaTeX.

    If you use LuaLaTeX to compile your document, remove the complete code block just highlighted here.

    If you use pdfLaTeX to compile your document, replace it with

    \usepackage{lmodern}
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    

    Though the \usepackage[utf8]{inputenc} is no longer necessary with a modern TeX system.

In general you should make sure that your document compiles without errors. There is no point in trying to get sensible output or a bibliography in your document if it throws errors. Resolve all errors first (one by one, start with the first error: often errors have knock-on effects, so solving the first error might automatically resolve other errors as well), then try to resolve as many warnings as possible. Only then go on to compile the bibliography with additional tools.


But this is not all. The error message from the question shows that you are compiling your document with BibTeX. Since you are using biblatex you should be using Biber instead of BibTeX to compile your document. If you are using an editor, you may want to have a look at Biblatex with Biber: Configuring my editor to avoid undefined citations.

See Question mark or bold citation key instead of citation number for a great explanation why you need to run Biber and bibtex vs. biber and biblatex vs. natbib for a quick explanation of all the different terms flung around in this answer.

moewe
  • 175,683