1

I'm trying to put a bibliography in my LaTeX document, but I get various errors when I run it in BibTeX (saying no \citation found etc.), and no bibliography is printed in the PDF when I typeset it in LaTeX. My code reads as follows:

\documentclass[12pt]{report}
...
\usepackage{biblatex}
\addbibresource{SUSYBib.bib}
...
\begin{document}
...\cite{1}...
...\cite{2}...
\nocite{*}
\printbibliography
\end{document}

And my .bib file reads as

@book{1,
title={The Schrödinger Equation},
author={F. A. Berezin, M. A. Shubin},
year={1983},
publisher={Moscow State University, Moscow},
pages={57-59}
}
@book{2,
title={An Introduction to Measure Theory},
author={Terence Tao},
year={2011},
publisher={American Mathematical Society},
pages={91}
}
moewe
  • 175,683
CS1994
  • 113
  • 3
    With your set-up you need to run Biber on the file and not BibTeX. Refer to Biblatex with Biber: Configuring my editor to avoid undefined citations for hints on how to make your editor run Biber for you. – moewe Feb 02 '17 at 17:52
  • Either you need to use biber rather than bibtex (generally recommended) or pass the option backend=bibtex to biblatex. – Dai Bowen Feb 02 '17 at 17:53
  • 1
    After adding in \usepackage[backend=biber]{biblatex} into my preamble still didn't work. Is that not correct? – CS1994 Feb 02 '17 at 17:57
  • 1
    \usepackage[backend=biber]{biblatex} is correct, but with a modern biblatex it is more or less equivalent to \usepackage{biblatex}. What you really need to do is to make sure that your run Biber and not BibTeX. Please refer to the link in my first comment for a solution for that. – moewe Feb 02 '17 at 18:00
  • For some reason the problem I am now having is that it won't recognise any of my equation/theorem references throughout my script. – CS1994 Feb 02 '17 at 18:04
  • Equation and theorem references are generally separate and should work as long as you're doing multiple compiles of pdflatex. Have you set auxiliary files to be deleted after compilation perhaps (or try deleting the aux file and recompiling) – Dai Bowen Feb 02 '17 at 18:25
  • Just tried that and it didn't work - before changing my engine to biber from bibtex it all worked fine. After changing that it then came up with all of these errors, but it still does the same after changing back to bibtex. – CS1994 Feb 02 '17 at 18:27
  • If things were working (for equations references) and none of the code has changed, delete all auxiliary files and recompile multiple times, if things were working and nothing has changed on the code this should be all you need to do to fix equations references. – Dai Bowen Feb 02 '17 at 20:04
  • Place the line % !TEX TSprogram = pdflatexmk at the top of you file. Then typeset using Typeset->Typeset (Cmd-T). This will run the pdflatexmk engine which will automatically know it needs to run biber and enough runs of pdflatex to completely typeset you document. – Herb Schulz Feb 02 '17 at 20:21

1 Answers1

1

I think you are missing the inputenc package in your preamble. It's needed to tell your (La)TeX which character encoding you use, eg. for the ö in your bibliography:

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}

\usepackage[backend = biber]{biblatex}
\addbibresource{SUSYBib.bib}
\begin{document}
\cite{ab}
\cite{bc}
\nocite{*}
\printbibliography
\end{document}

You need to configure your TeXShop to compile the document properly, for me:

  1. Configuring TeXShop to run biber: tex.stackexchange.com/questions/154751/…
  2. and selecting "pdflatexmk" from the dropdown menu (to the left of the typset button)

worked.

Surprisingly, adding % !TEX TSprogram = pdflatexmk as first line in the .tex file (as suggested in the comments) did not work (TeXShop 3.62, texlive 2016).

Wiebke
  • 923
  • 7
  • 19