I am creating a format file using mylatexformat. This allows me to precompile my (extremely lengthy preamble, shortening compile time.
However, biber does not respond to addbibresource, complaining either
WARN - I didn't find a database entry for '...'
or, if no bibresource at all was included in the format file:
WARN - No data sources defined!
How can I addbibresource and have a precompiled preamble?
Minimum working example
foo.tex
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{foo.bib}
\endofdump
\addbibresource{foo2.bib}
\begin{document}
This is just a test. With a citation: \textcite{test1}.
And another: \textcite{test2}.
\printbibliography
\end{document}
foo.bib
@article{test1,
title = {Some title},
journaltitle = {Some journal},
author = {Rob, London},
date = {2018-01-01}
}
foo2.bib
@article{test2,
title = {Some title 2},
journaltitle = {Some journal},
author = {Rob, London},
date = {2018-01-02}
}
If I first compile the preamble using:
pdftex -ini -jobname="foo" "&pdflatex" mylatexformat.ltx foo.tex
Then I comment (or delete) the preamble and add %&foo as the first line:
foo.tex (after compiling preamble):
%&foo
\addbibresource{foo2.bib}
\begin{document}
\maketitle
This is just a test. With a citation: \textcite{test1}.
And another: \textcite{test2}.
\printbibliography
\end{document}
biber will now complain:
> biber foo
.
.
.
WARN - I didn't find a database entry for 'test2' (section 0)
pdftexuse your format usingpdftex -fmt="foo" foo.tex. But bibliography files where never a problem for me. – Skillmon Jan 10 '18 at 20:02%&foofile is ignored. You can see this if you add an obviously undefined command like\zzzfooo: No error is produced. – moewe Jan 10 '18 at 22:13