13

I'm relatively new to latex, and I'm trying to get a test bibliography working. I'm just going through the sharelatex section on biblatex (https://www.sharelatex.com/learn/Bibliography_management_with_biblatex) and am just running their example code. However, instead of showing a few lines of text with citations within and then a list of references, I only get the text with citations. The list of references is not shown at all.

I'm using TexStudio, if that means anything.

The code in question is as follows:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{biblatex}
\addbibresource{sample.bib}

\begin{document}
    Let's cite! The Einstein's journal paper \cite{einstein} and the Dirac's 
    book \cite{dirac} are physics related items. 

    \printbibliography

\end{document}

and sample.bib contains:

@article{einstein,
author =       "Albert Einstein",
title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]",
journal =      "Annalen der Physik",
volume =       "322",
number =       "10",
pages =        "891--921",
year =         "1905",
DOI =          "http://dx.doi.org/10.1002/andp.19053221004",
keywords =     "physics"
}

@book{dirac,
title={The Principles of Quantum Mechanics},
author={Paul Adrien Maurice Dirac},
isbn={9780198520115},
series={International series of monographs on physics},
year={1981},
publisher={Clarendon Press},
keywords = {physics}
}

@online{knuthwebsite,
author    = "Donald Knuth",
title     = "Knuth: Computers and Typesetting",
url       = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
keywords  = "latex,knuth"
}

@inbook{knuth-fa,
author = "Donald E. Knuth",
title = "Fundamental Algorithms",
publisher = "Addison-Wesley",
year = "1973",
chapter = "1.2",
keywords  = "knuth,programming"
}

EDIT: Just to clarify, Actual Output Output Expected Output Expected Output

EDIT 2:

Adding biber as the default bibliography still gives the same output, but also gives the following messages:

    Process started: biber.exe "test"

Use of uninitialized value $llabel in concatenation (.) or string at C:\Users\~\AppData\Local\Temp\par-5072696d617263682d4956\cache-6bef6bfac2f8155f13b160f6720d3dbe6a10b684\inc\lib/Biber.pm line 675.

Use of uninitialized value in string eq at C:\Users\~\AppData\Local\Temp\par-5072696d617263682d4956\cache-6bef6bfac2f8155f13b160f6720d3dbe6a10b684\inc\lib/Biber/SortLists.pm line 77.

INFO - This is Biber 1.8
INFO - Logfile is 'test.blg'
INFO - Reading 'test.bcf'
WARN - Warning: Found biblatex control file version 2.7, expected version 2.5
INFO - Found 2 citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'sample.bib' for section 0
INFO - Decoding LaTeX character macros into UTF-8
INFO - Found BibTeX data source 'sample.bib'

Process exited with error(s)

With bibtex it gives the following:

    Process started: bibtex.exe "test"

This is BibTeX, Version 0.99d (MiKTeX 2.9)
The top-level auxiliary file: test.aux
I found no \citation commands---while reading file test.aux
I found no \bibdata command---while reading file test.aux
I found no \bibstyle command---while reading file test.aux
(There were 3 error messages)
  • Welcome to TeX.SX! Did you run either biber or bibtex after the first compilation and then compile again? – Adam Liter Jun 07 '15 at 01:45
  • I believe so. I went to Tool->Commands->bibtex/biber, let that run and then recompiled and built. No difference. – HappyPrime Jun 07 '15 at 02:29
  • 2
    Just to be clear. What output exactly are you seeing? Are you seeing in-line citations that are formatted properly, and you're just missing the bibliography, or are you seeing the cite keys in bold in-line? It might be helpful if you were to post a picture. See this answer about how to post a picture when you don't have enough reputation. – Adam Liter Jun 07 '15 at 02:57
  • Since biblatex is specified without specific backend, biber is used. TeXStudio must be configured to use biber then. The example works out of the box for me (doing Linux command line compilation, not using editor stuff) –  Jun 07 '15 at 04:32
  • Maybe Biblatex with Biber: Configuring my editor to avoid undefined citations helps you to make TexStudio use Biber. Other than that a more detailed description of the symptoms would be quite helpful to investigate the problem further. – moewe Jun 07 '15 at 05:51
  • Adding the biber backend doesn't make anything difference. I'll try it on a linux machine when I can, but as I'm switching between linux and windows all the time I also need to get it to work with TexStudio. – HappyPrime Jun 07 '15 at 06:42
  • 2
    This may be the well known and unresolved biblatex cache bug. Try deleting the cache -- see for example http://tex.stackexchange.com/questions/140814/biblatex-biber-fails-with-a-strange-error-about-missing-recode-data-xml-file as to where to find it. Here is another link which will help you find cache http://tex.stackexchange.com/questions/216191/biber-biblatax-problem-no-such-file-or-directory-in-cache – Aubrey Blumsohn Jun 07 '15 at 07:13
  • If you don't specify a backend via the backend option you will have to use Biber, so running BibTeX will not help at all. If you want to use BibTeX, go with backend=bibtex. I would, however, use Biber if possible. There seem to be several problems, first your Biber and biblatex versions don't match please update both and make sure their versions match. Secondly you seem to experience this classic Biber problem. – moewe Jun 07 '15 at 07:18
  • Thanks guys! After updating biber etc. some missing packages were installed. After that I needed to remove the cache, but everything is working properly now. – HappyPrime Jun 07 '15 at 07:49
  • 2
    I voted to close as a duplicate of http://tex.stackexchange.com/q/140814/35864 since the problem seems to have been resolved by deleting the cache and updating Biber (see OP's self-answer below). – moewe Jun 07 '15 at 08:00
  • Sure. How do I do that? Or will the mods take care of it? – HappyPrime Jun 07 '15 at 08:59
  • Normally, the review process on this site takes care of that. If you agree, with the close vote however, I think you can also vote to close your own question (not entirely sure here). – moewe Jun 07 '15 at 09:10
  • I would vote not to close this. Enough folk are experiencing this bug repeatedly without any resolution that it needs to be kept on the agenda. I earlier tried to debug this, a lot of people put in effort and then it was closed. – Aubrey Blumsohn Jun 08 '15 at 22:19

1 Answers1

3

Update packages (I was using MikTex as a package manager), and then remove the cache as explained here. Compile, compile bibliography, recompile and build. Thanks to Aubrey Blumsohn and moewe.