2

I would like to generate a .bbl file once and then reuse that instead of re-running biber for each file. This way all the references should have same numbering. I have a file complete-bibliography.tex, which has all my .bib entries. I run

pdflatex complete-bibliography.tex
biber complete-bibliography 
pdflatex complete-bibliography.tex

This yields complete-bibliography.bbl and the bibliography, as desired: enter image description here

However, when I attempt to use complete-bibliography.bbl in test.tex via

\input{complete-bibliography.bbl}

I get

Undefined control sequence. \datalist

Seems like I am missing something very obvious, but not seeing it...

complete-bibliography.tex

\begin{filecontents*}{complete-bibliography.bib}
@book{goossens93,
    author   ={Michel Goossens},
    title    ={The {LaTeX} Companion},
    year     ={1993},
    publisher={Addison-Wesley},
    address  ={Reading, Massachusetts},
}

@article{greenwade93, author ={George D. Greenwade}, title ={The {C}omprehensive {TeX} {A}rchive {N}etwork ({CTAN})}, year ={1993}, journal={TUGBoat}, volume ={14}, number ={3}, pages ={342--351}, url ={www.ctan.org}, }

@book{knuth79, author ={Donald E. Knuth}, title ={{TeX} and Metafont, New Directions in Typesetting}, year ={1979}, publisher={American Mathematical Society and Digital Press}, address ={Stanford}, } \end{filecontents*}

\documentclass{article}

\usepackage{biblatex} \addbibresource{complete-bibliography.bib}

\begin{document} This is a dummy document used to generate the .bbl file for \emph{all} references.

\nocite{*}

\printbibliography \end{document}

test.tex

\documentclass{article}

\usepackage{biblatex} %\addbibresource{complete-bibliography.bib}% <-- Not needed here

\begin{document} This document reads the previously generated .bbl file.

%% Other .tex files should be able to use this .bbl \IfFileExists{complete-bibliography.bbl}{% \input{complete-bibliography.bbl} }{}% \fullcite{knuth79} \end{document}

Peter Grill
  • 223,288
  • Have a look at https://tex.stackexchange.com/q/426964/35864 and https://tex.stackexchange.com/q/473444/35864. – moewe Nov 09 '22 at 06:13
  • why don't you use once \nocite{*} in the document? – Ulrike Fischer Nov 09 '22 at 08:29
  • ah sorry, you want to read in a bbl with a different name. Well you could try to redefine \jobname before begin document, but imho the time gain is not worth the trouble. It would be easier to use a small script which first copy your bbl and give it the name of your current document (and this assumes that the biblatex version didn't change). – Ulrike Fischer Nov 09 '22 at 10:42
  • @UlrikeFischer: Copying the file seems to work. So what magic happens if the .bbl file has a same name? I'd prefer not to make thousands of copies of the file if I can avoid it. – Peter Grill Nov 11 '22 at 03:03
  • @moewe: Looks like that works as well. Not sure why that is not needed if the .bbl has the same file name as \jobname though. – Peter Grill Nov 11 '22 at 03:06
  • 1
    Like with other auxiliary files (.aux, .toc etc.), biblatex just tries to input \jobname.bbl if it is there. So if your file has the right name, it is read. If it has the right data format and contains the necessary information, everything will work regardless of how the file was produced. If it does not have the predefined name, tricks like the one in the linked Q&A are necessary to load the differently named file. – moewe Nov 11 '22 at 05:48
  • @UlrikeFischer: Can you add an answer as the copying the .bbl file may be helpful to others. If you add it to the How to import / print a bibliography created from a separate / external document?, this question can be closed as a duplicate. – Peter Grill Nov 14 '22 at 05:09

0 Answers0