I am trying to set up Notepad++ on Windows so that I can compile LaTeX documents from it, using this excellent solution, using a batch file to compile my documents.
However, the example given uses bibtex
while I prefer to use biber
.
I tried simply replacing all references to bibtex
in the batch file with biber
, but upon compiling I get errors such as
LaTeX Warning: Empty bibliography on input line 19.
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(main) main
(main) and rerun LaTeX afterwards.
The document compiles correctly apart from the bibliography, which is not found and does not compile.
I know the problem must lie with the batch file, as my MWE compiles fine with TeXStudio and by compiling manually via cmd
using the commands
cd [path to directory]
pdflatex main.tex
biber main
pdflatex main.tex
MWE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber, style=ieee, sorting=ynt]{biblatex}
\addbibresource{bibliography.bib}
\title{A Minimum Working Example}
\date{}
\begin{document}
\maketitle
\tableofcontents
\section{Citing a Thing}
\cite{QuackQuack}
\printbibliography[heading = bibintoc]
\nocite{*}
\end{document}
bibliography:
@article{QuackQuack,
author = {A. Author},
title = {Quack quack quack},
journaltitle = {Journal of Ducks},
volume = {1},
pages = {1},
year = {2016}
}
batch file:
::I don't know what the next line does
%~d1
::sets working directory
cd %1
::calls pdflatex and biber on my file
pdflatex %2
biber %2
pdflatex %2
pdflatex %2
::opens/refreshes the pdf in SumatraPDF
START "" "C:\Program Files\SumatraPDF\SumatraPDF.exe" %3 -reuse-instance
I have checked this question, and have made sure my MiKTeX installation and all packages are up-to-date
I can't find any other solutions to my problem online, and this problem stumps everyone I have asked - any help would be greatly appreciated
bibtex
notbiber
!biber --version
give? If you edit your script and replace allbibtex
s withbiber
what exactly is the problem? Do you get a.blg
file? What does it say?biber
from command line manually and it works fine, references generate perfectly, including being added to contents. I cannot see any.blg
files being generated.blg
that means that your script failed to run Biber. Is there some way you can check that the script actually runs the commands it claims to run?