Tuesday, April 21, 2020

How to Make BibLaTeX Actually Work

I had a lot of annoying, surprisingly difficult to Google (or Duck) errors when trying to do automatic bibliography management with LaTeX.  Some important things that I learned are:
  • BibTeX and BibLaTeX are two different things.
  • BibLaTeX is the LaTeX package for formatting your citations.
  • BibTeX is a separate program for converting a human-readable .bib file into the database used by a LaTeX processor like pdflatex.
  • Biber is another external processor, like BibTex.  I understand that Biber is actively developed and probably better for most use cases
I got this error when first trying to use BibLaTeX.

!LaTeX Error: File `biblatex.sty' not found

I needed to install the packages texlive-latex-extra and biber.  For your copy-pasting convenience:
sudo apt install texlive-latex-extra biber
Then, you need to run three commands to make your bibliography appear.
pdflatex my_file.tex
biber my_file
pdflatex my_file.tex
Note that unlike pdflatex which allows you to use the name with or without the extension (it will automatically append .tex if you don't), you need to run biber with the filename minus the extension.

This was all on Ubuntu 18.04 or a derivative such as Xubuntu or Gallium OS.

No comments:

Post a Comment