8

I'm writing my thesis with my friend but I'm having serious problems getting biblatex to work with ShareLaTeX, it apparently has support (according to this blog: http://www.clarusft.com/sharelatex/).

However, I can't get it to work properly, or at all to be honest.

I have included this in the top.

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex} % I try to use biber.
\bibliography{ref} % the ref.bib file
\begin{document}

Hi there, Stackoverflowers\cite{lol}
\printbibliography 
\end{document}

And here is my ref.bib file:

@article
{lol,
author = "Anders Ekholm",
title = "Den ljusnande framtid är vård",
year = "2010" 
}

This doesn't work.

I get the errors:

main.tex:55 Citation 'lol' on page 1 undefined. 
main.tex:274 Empty bibliography. 
undefined:undefined There were undefined references.
undefined:undefined [biblatex] Please (re)run Biber on the file: output and rerun LaTeX afterwards. (page 23)
8
  • 3
    With backend=bibtex it works.
    – m0nhawk
    Mar 14, 2013 at 11:09
  • Welcome to TeX.SX. Mar 14, 2013 at 11:21
  • If you haven't seen this already: sharelatex.com/help/discussions/suggestions/… Mar 14, 2013 at 15:10
  • 3
    James from ShareLaTeX here. Sorry that we're a bit behind the times with our lack of biber support. Bibtex should work though. I've bumped this up our todo list since I think it's catching people out. Feel free to drop us a support query directly if you ever have similar problems again.
    – jpallen
    Mar 15, 2013 at 10:43
  • 2
    As of today, the biber backend works in sharelatex.
    – Evpok
    Jun 6, 2014 at 9:06

3 Answers 3

4

Luckily, this answer is outdated, ShareLaTeX now supports biber. See the other answers if you still have problems.


jpallen wrote in the comment:

James from ShareLaTeX here. Sorry that we're a bit behind the times with our lack of Biber support. BibTeX should work though. I've bumped this up our todo list since I think it's catching people out. Feel free to drop us a support query directly if you ever have similar problems again.

3
  • 3
    It looks like almost two years later, biber is still not supported by ShareLaTeX. Is that correct?
    – Christoph
    Jan 12, 2015 at 21:39
  • 5
    Total of humanity's hours lost due to this bug: +1 Aug 8, 2015 at 17:20
  • @Christoph No. ShareLaTeX supports biber.
    – jan-glx
    Jan 29, 2016 at 12:02
2

I've just managed ShareLaTeX (and Overleaf) to work with biber backend. I've found two ways:

  1. Include the content of your .bib file into the main file

    \usepackage{filecontents}
    \begin{filecontents}{bib}
    your bib file contents goes here
    }
    \end{filecontents}
    
    \usepackage[backend=biber]{biblatex}
    \addbibresource{bib}
    
  2. use the path specifier when adding your .bib file

    \addbibresource{./ref.bib}
    

By the way, you should use command \addbibresource{} in BibLaTeX, and not \bibliography{ref}

Here's the link to ShareLaTeX project with your MWE, and here's the same repeated on Overleaf.

5
  • 1
    I don't think the first item is a requirement. In ShareLaTeX you can upload a file to form part of your project. The second option also seems superfluous given that you don't use that notation in the first. The main problem seems to be that the OP used \bibliography instead of \addbibresource.
    – Werner
    Oct 8, 2015 at 14:24
  • I've made a project on ShareLaTeX to illustrate the second option. The same .bib resource is added with and without dot slash. You can try to comment/uncomment the corresponding lines and see what happens. Oct 8, 2015 at 14:30
  • 1
    What I'm trying to point out is that your answer is not consistent. The first option doesn't use ./ while the second does.
    – Werner
    Oct 8, 2015 at 14:32
  • yes, you're true. And I don't know why. And I have just checked once again, to make it work on ShareLatex, I've actually used \bibliography{./ref}. and with \addbibresource{} option 2 seems not to work anyway. I'm puzzled now... Oct 8, 2015 at 14:37
  • Mhhh, I just played around with sharelatex and everything worked fine even if I didn't include the ./ part. Even in your example there was no trouble with \addbibresource{ref.bib}. \bibliography{ref} worked as well (even though it is officially deprecated in biblatex)
    – moewe
    Oct 12, 2015 at 6:56
1

As @Evpoc wrote in the comments, Sharelatex supports biber for quite some time now. However, I several times still received that error message.

I found that changing \addbibresource{ref.bib} to \addbibresource{ref}, compiling, changing it back and compiling again resolves the problem.

I suspect it is caused by some temporary files of biber that Sharelatex does not remove upon clear cached files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .