9

I've just watched some YouTube videos given by ShareLatex. In the video I saw he constructed a Thesis in LaTeX. It is available here.

Now, I downloaded the whole package to see if it would run in my LaTeX editor (TexStudio), but when I ran/compiled it, everything seemed to be working, except the bibliography. It was supposed to be in the end, but nothing shows, and the citing just writes out the keyword of the .bib file.

I haven't touched anything at all, I just clicked Compile and "Build and View" when I opened the main document.

So yeah, why does it work on the ShareLatex website, but not on my computer in TexStudio. I'm obviously doing something wrong, but what ?

Thanks in advance.

5 Answers5

16

The following worked for me. In TeXStudio, go to Options ---> Configure ---> Build and Choose. Check "Build and View". Then in the configuration (for example in the Quick Build) you need to have:

pdflatex (or XeLaTeX)
Biber
pdflatex (or XeLaTeX)
pdflatex (or XeLaTeX)


Default Viewer

The last one (Default Viewer) is not necessary. I think Biber is the key for having it run (at least in my case this was the only way to work).

After doing that (and given that you have chosen a place for your bibliography using the command \printbibliography), you must be able to get the result that you seek.

P.S. Another thing that is important to notice is that use \usepackage[utf8]{inputenc} instead of \usepackage[utf8x]{inputenc}. From what I have read you need to also include \usepackage[T1]{fontenc}.

I hope you will find a solution.

Pantelis Kazakis
  • 1,346
  • 1
  • 12
  • 29
6

In TeXstudio, you can force it to run Biber on your file to rebuild the bibliography. Choose Tools -> Bibliography (the default hotkey is F11). Run this, then compile your document.

This way, you won't have to run PdfLaTeX repeatedly every time you compile. TeXstudio is supposed to automatically detect that you've changed your bibliography, and only then re-run biber, but apparently it sometimes gets confused.

Superbest
  • 1,534
1

I also used \usepackage[backend=biber]{biblatex} (which was not enough itself) and I only needed to change:
Options -> Configure TeXstudio -> Build ( -> Meta Commands) -> Default Bibliography Tools to Biber.
(or to txs:///biber when using the advanced options)

This way, Biber is used when TeXstudio detects that the bibliography needs recompiling, but otherwise the build is quick as usual and not slowed down as in the solution of the accepted answer from @Pantelis Kazakis which always builds the bibliography, even when it did not change.

To find out the problem cause:
I opened the log, changed something in the bib file and recompiled, alternatively choose Tools -> Bibliography, which will always invoke compiling the bibliography. Then you should see relatively at the top if the right tool is launched or the error is something else.

xuiqzy
  • 41
1

For me choosing the default bibliography option via Options -> Configure TexStudio -> Build -> Default Bibliography Tool and choosing BibTex instead of Biber did the trick.

Dai Bowen
  • 6,117
0

A much simpler solution I just discovered is to add backend=biber to the \usepackage options for biblatex:

\usepackage[backend=biber]{biblatex}
sfat
  • 425
  • 3
  • 12