TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)
share|improve this question
2  
With backend=bibtex it works. – m0nhawk Mar 14 '13 at 11:09
    
Welcome to TeX.SX. – Claudio Fiandrino Mar 14 '13 at 11:21
    
Thanks! Adding backend=bibtex worked great! – petur Mar 14 '13 at 11:31
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 '13 at 10:43
1  
As of today, the biber backend works in sharelatex. – Evpok Jun 6 '14 at 9:06

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.

share|improve this answer
3  
It looks like almost two years later, biber is still not supported by ShareLaTeX. Is that correct? – Christoph Jan 12 '15 at 21:39
4  
Total of humanity's hours lost due to this bug: +1 – jeffalstott Aug 8 '15 at 17:20
    
@Christoph No. ShareLaTeX supports biber. – YAK Jan 29 at 12:02

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.

share|improve this answer
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 '15 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. – Oleg Soloviev Oct 8 '15 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 '15 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... – Oleg Soloviev Oct 8 '15 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 '15 at 6:56

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.