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
bibtexnotbiber! – Joseph Wright Jan 17 '17 at 18:37biber --versiongive? If you edit your script and replace allbibtexs withbiberwhat exactly is the problem? Do you get a.blgfile? What does it say? – moewe Jan 18 '17 at 15:42biberfrom command line manually and it works fine, references generate perfectly, including being added to contents. I cannot see any.blgfiles being generated – Utumno Jan 18 '17 at 17:02.blgthat 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? – moewe Jan 19 '17 at 08:35nppexecs console output, I getINFO - This is Biber 2.7 INFO - Logfile is 'main.tex.blg' ERROR - Cannot find control file 'main.tex.bcf'! - did you pass the "backend=biber" option to BibLaTeX? INFO - ERRORS: 1I checked the file directory, and while there isn't a main.tex.bcf there is a main.bcf – Utumno Jan 19 '17 at 12:34