0

For a project I am using my 32-bit windows 10 notebook with TeXmaker and MikTeX. I updated MikTeX and manually installed the biber-doc package. In configure TeXmaker "biber %" is typed in for Bib(la)tex. Still I get the following error message:

INFO - This is Biber 2.12
INFO - Logfile is 'test 1.blg'
ERROR - Cannot find control file 'test 1.bcf'! - Did latex run successfully on your .tex file before you ran biber?
INFO - ERRORS: 1

The simple file I am trying to run is depicted below and it works on my 64 computer at home.

\documentclass[12pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\usepackage[backend=biber]{biblatex}
\addbibresource{bib.bib}

\begin{document}
blabla \cite{1}
\printbibliography
\end{document}

I have the feeling something is up with the installation but I am quite new to all this so let me know if you have any suggestions.

moewe
  • 175,683
  • 4
    All looks OK-ish so far. Double-check your configuration with https://tex.stackexchange.com/q/154751/35864 to be absolutely sure. Then run LaTeX, Biber, LaTeX, LaTeX on your main document file and report the warning and error messages. Note that sometimes LaTeX and related programs have issues with spaces in file names, so you may want to try to rename your file to test1 instead of test 1. – moewe Jan 22 '19 at 09:51
  • Thanks for the reply! I checked using the link and downloaded the 32-bit biber.exe. I refererred to this file in options>configure texmaker>Bib(la)tex>biber.exe. It still gives the same error message when compile using biber. – user179990 Jan 22 '19 at 11:12
  • 2
    Do not download and install Biber from sourceforge or elsewhere. Only use the Biber version that comes with or can be installed through your TeX distribution (MikTeX's Console or TeX live's tlmgr). Otherwise you risk version incompatibilities and all sorts of other confusion. – moewe Jan 22 '19 at 11:20
  • Note that the Biber run only makes sense after a successful and error-less LaTeX run on your main document. Clean up all temporary files (.aux, .bbl, .bcf, ...). Then run LaTeX on your main file and make sure that no errors are raised. If there are errors, resolve them before you proceed. If there are warnings not related to the bibliography and labels, try to resolve those as well. Then proceed to call Biber on you main file. Do not clean up any files between the LaTeX and the Biber run. Then run LaTeX twice more. – moewe Jan 22 '19 at 11:23
  • 1
    One last guess (please do work through the steps in my comment above if this does not help: Do you have an option like "use a 'build' subsdirectory", "separate folder for auxiliary files" or "clean up temporary files" enabled? If so, I strongly suggest disabling that option. Can you please share a full screenshot of your TeXmaker compiler settings? – moewe Jan 22 '19 at 11:28
  • I disabled "use build subdirectory" it worked!! Thanks so much for the suggestion! I was foam-mouthing over this issue for 2 days. – user179990 Jan 22 '19 at 11:41

1 Answers1

3

As confirmed in the comments the issue was the

Use a "build" subdirectory for output files

setting that can be enabled in TeXmaker.

This option moves temporary auxiliary files like .aux and .bcf into a "build" subdirectory. This approach is problematic if auxiliary programs like Biber, makeindex, ... have to be run on the document, because those programs usually communicate with LaTeX via those auxiliary files and expect them in the same directory as the main .tex file.

In the example Biber was unable to find the important .bcf file because it was hidden in the "build" subdirectory and could therefore not run properly.


While the idea of a "build" subdirectory sounds appealing at first I firmly believe that this option causes more harm than it does good. You pay for a slightly cleaner folder by having to make sure that all auxiliary programs are configured correctly to work with the unusual setup. As seen here, the error messages can be quite unclear and don't really tell you what is going on.

My suggestion, therefore is to disable the Use a "build" subdirectory for output files option. Then everything should work as expected out of the box. If you like clean directories, you can keep things reasonably clean by creating a new directory for each of your documents.

See also bibtex aux-files directory. Prevent pdflatex from writing a bunch of files contains a more general discussion about this feature.


If you insist on a "build" directory, you can try to configure Biber to search for the .bcf file there.

biber --output_directory build %

See also Texstudio + Biber + build folder

moewe
  • 175,683