3

I am attempting to use Biber with BibLaTeX from the command line on osx. When I compile my .tex file I get

No file print_bibliography.bbl.

LaTeX Warning: Citation 'Huse2007' on page 1 undefined on input line 19.


LaTeX Warning: Empty bibliography on input line 20.

[1{/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./print_bibliography.aux)

LaTeX Warning: There were undefined references.


Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                print_bibliography
(biblatex)                and rerun LaTeX afterwards.

This errors appear to be common and are described in this wikibook, but the solutions given depend on the editor that one is using and there is no solution for my case. I am using pycharm as my editor and calling latex from the terminal.

At the terminal I type:

pdflatex print_bibliography.tex

My MWE for the print_bibliography.tex file is

\documentclass{article}
\usepackage[backend=biber, natbib=true]{biblatex}
\addbibresource{references.bib}
\begin{document}
This sentence should be cited\cite{Huse2007}
\printbibliography
\end{document}

And for references.bib file is:

@article{Huse2007,
    title = {Localization of interacting fermions at high temperature},
    author = {Oganesyan, Vadim and Huse, David A.},
    journal = {Phys. Rev. B},
    volume = {75},
    issue = {15},
    pages = {155111},
    numpages = {5},
    year = {2007},
    month = {Apr},
    publisher = {American Physical Society},
    doi = {10.1103/PhysRevB.75.155111},
    url = {https://link.aps.org/doi/10.1103/PhysRevB.75.155111}
}

Related questions: How to use Biber with BibLaTeX from the command line This was solved by fixing a version incompatibility between biber and biblatex. This does not appear to apply to my case.

Thanks.

3
  • Welcome to TeX.SX! You have to run biber, which is an external tool. From the command line you can just type biber <name_of_your_tex_file_without_extension>, which in your case is biber print_bibliography. – Phelype Oleinik Apr 20 '19 at 0:11
  • Thanks. If you make it an answer I'll accept it. Is there a simple way to put this command inside my .tex file and automate the biber / pdflatex / pdflatex terminal calls? – Canaryyellow Apr 20 '19 at 0:15
  • I posted some alternatives to automate the compilation process. There are many more, (rubber, texify, etc.), if you search the site you will find more alternatives if you don't like the ones I showed. – Phelype Oleinik Apr 20 '19 at 0:32
4

The warning biblatex is showing you:

Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                print_bibliography
(biblatex)                and rerun LaTeX afterwards.

means that you changed something (usually adding some reference) to your document and you need to run biber, which is an external tool.

From the command line you can just type

biber <name_of_your_tex_file_without_extension>

which in your case is:

biber print_bibliography

There are several ways to automate the processing of bibliography, most of them rely on external tools as well. I know of two, but there are more.

Arara

This is my favourite :-)

To use Arara you have to tell it what to do in the preamble of your document. I usually write it before \documentclass. You can use this:

% arara: pdflatex
% arara: biber
% arara: pdflatex
\documentclass{article}% or whatever class you use

this will run pdflatex once, biber once, and pdflatex once more every time you run Arara. To run it you have but to call it from the command line:

arara print_bibliography.tex

and it will do its thing. If you want to get all fancy you can tell Arara to run things only when necessary. This is the header I'm currently using for my dissertation project:

% arara: lualatex: { draft: yes }
% arara: biber if found ('log', 'Please \\(re\\)run Biber on the file')
% arara: -->   || changed (toFile('bibliography.bib'))
% arara: lualatex until !found('log', '\\(?(R|r)e\\)?run (to get|LaTeX)')
\documentclass{article}% or whatever class you use

it will run lualatex (if you use pdflatex just change it) on draft mode once, just to get the auxiliary files. Then it will run biber only if that message from before is found in the log or if I changed the bibliography.bib file. Finally, it will run lualatex as many times as necessary to get all cross references right (usually once or twice more).

LaTeXmk

Contrary to Arara, which you need to explicitly say what to do, LaTeXmk tries to guess what to do from the contents of your log file. You just have to run it in your document:

latexmk print_bibliography.tex

Pros: it's certainly easier to use.

Cons: in my opinion it not always knows the right thing to do, leading to more compilation time than necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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