1

Hello and thanks to begin with for reading my question.

I'm trying to do an important project in LaTeX, but I am finding some trouble. It has a heavy bibliography that I was hoping biber could help me with, but the format wasn't working and \printbibliography didn't print anything. So I made a simplified test file and the same happened.

I run the test on a separate file with a separate .bib. TeXworks didn't show any errors while running it on XeLaTeX or pdfLaTeX, but the bibliographic refferences still didn't work after a few compilations.

After searching this page for similar problems, I tried running it from PowerShell, and there I was told the .bcf file was missing. I checked my original file and, sure enough, no .bcf file had been generated.

The only problem is I don't know why. I have biber well installed.

\documentclass[11pt,leqno]{article}
\linespread{1.6}

\pdfpagewidth=\paperwidth \pdfpageheight=\paperheight

\usepackage[english]{babel} \usepackage{hyperref} \usepackage{graphicx} \usepackage{amsfonts} \usepackage{kvoptions} \usepackage{etoolbox} \usepackage{logreq} \usepackage{pdftexcmds} \usepackage{amsmath} \usepackage{textcomp}

\usepackage[backend=biber]{biblatex} \usepackage{hyperref} \addbibresource{bib.bib} \author{author} \date{date/date/date} \title{Titleing}

\begin{document}

\maketitle University \pagebreak \begin{abstract} Abstract \end{abstract} \pagebreak \section{Section 1} Testing the waters~\cite{test1}. Then we make another one~\cite{test2}. \pagebreak \printbibliography Failed \end{document}

And this is the .bib file

@article{test1,
    author = "Autor Aleatorio",
    title = "Titulo Titulado",
    journaltitle = "Jornal la Jornada",
    year = 2023}

@book{test2, author = "Donio Donde", title = "Liber libertas", year = 2023, editor = "Donde Donio", edition = 7, publisher = "publi"}

csust
  • 11
  • 2
  • Not only run pdflatex or xelatex, but biber too. See here for a basic example that should work. – Fran Jan 09 '24 at 20:19
  • Are you using some setting that moves the bcf into some build folder? – Ulrike Fischer Jan 09 '24 at 20:20
  • I tried running biber too, but it wouldn't work because of the missing .bcf file. Speaking of which, I wouldn't know if I had some setting that moved it inro another folder. At least I haven't actively done anything of the sort. What sort of setting would that be? – csust Jan 09 '24 at 22:25
  • 1
    check in menu edit->preferences->typesetting->processing tools if your tools (the one beside the green arrow has an option --clean or something with output directly, if yes remove them. – Ulrike Fischer Jan 09 '24 at 22:55
  • The .bcf file is produced by a LaTeX (pdfLaTeX, LuaLaTeX, XeLaTeX, depending on your document and your preferences) run on your main .tex file. This file should be in the same directory as your main .tex file after the run. It is very unusual for this file not to be produced at all - you'd have to have had fatal errors along your LaTeX run if that is the case. Some editors try to be clever and move temporary files like the .bcf to a different '"build" location'. So check if there is a subdirectory in the directory of your .tex file that contains the .bcf. Check your editor settings – moewe Jan 10 '24 at 05:56
  • You can only run Biber after a successful LaTeX run has produced the .bcf file. You run Biber on the base name (the name without file extension) of your main .tex file. (In particular Biber is not run on the .bib file name). After the successful Biber run you should run LaTeX twice more. So assuming your document is called mydoc.tex you can run both LaTeX and Biber on mydoc, e.g. pdflatex mydoc, biber mydoc, pdflatex mydoc, pdflatex mydoc. You can read more about this at https://tex.stackexchange.com/q/63852/35864. – moewe Jan 10 '24 at 05:59
  • Definitely double check your editor configurations against https://tex.stackexchange.com/q/154751/35864. But if you can't get the editor to work, try PowerShell/the command line again and just run the compile sequence as shown in my last comment manually. – moewe Jan 10 '24 at 06:00
  • Unrelated to the issue, but you shouldn't load packages multiple times. One \usepackage{hyperref} is enough. Because hyperref has to work together with so many packages, it should usually be loaded last (save for a couple of exceptions). So you should remove your first \usepackage{hyperref}. ... – moewe Jan 10 '24 at 06:03
  • ... You also do not need to load the required packages of biblatex yourself in the preamble. biblatex will take care of that. There is generally no need to pollute your preamble with \usepackage{logreq}, \usepackage{kvoptions}, \usepackage{etoolbox}, \usepackage{pdftexcmds}, unless you need to use features of these packages before biblatex is loaded (unlikely for most). – moewe Jan 10 '24 at 06:03
  • Thanks to everyone. I used the same preamble as my original work. I didn't know there were detriments to bringing \usepackage{x} to the preamble instead of before it is used, I thought that's how it was supposed to go.Anyways, I checked and in TeXworks the problem was the processing tools. It had BibTeX alongside the pdfLaTeX and XeLaTeX when I used it, and separating them solved the problem. – csust Jan 10 '24 at 12:00
  • What I still don't understand is why it wasn't working from PowerShell. I tried the '''pdflatex mydoc''' '''biber mydoc''' '''pdflatex mydoc''' '''pdflatex mydoc''' before posting here and it didn't work. It still doesn't work and still doesn't produce a .bcf file. Only .bbl and .blg. I don't strictly need to get this working, but I am curious now – csust Jan 10 '24 at 12:02
  • It's not generally harmful to load packages you don't explicitly use in your preamble (especially packages that are loaded as requirements later on), but it makes your preamble longer and harder to read. That's why I normally recommend you load as little packages as possible. The PowerShell invocations should have definitely worked. But you can only expect anything if the pdflatex mydoc call went through without an error. If that's not the case, you can't expect any result. (Not sure if that's the case here, but it's the only issue I can imagine at the moment.) – moewe Jan 11 '24 at 05:49

0 Answers0