I use \includeonly to do the page layout for single chapters. I worked an our one a lengthy chapter only to find out that it does not work with the whole document. After some search I found the reason. A single letter caused a cascade of different page layouts. When I did the layout with only one chapter included there was just one paper by Müller from 2004 in this chapter and the following was the result:
In the full book, I had four papers and I got a reference to Müller (2004d) instead of Müller (2004). This single letter caused the paragraph to take an extra line, which caused two lines floating to the next page, which ruined everything I did so far.
So, question: Can I make biblatex to include everthing it finds cited in aux files?
Edit 1:
I adapted https://tex.stackexchange.com/a/418639/18561 to biblatex, but it does not work. It only cites one reference. bibtex works out of the box without any additional mechanisms.
\documentclass{report}
\usepackage{filecontents}
\usepackage{pgffor}
\usepackage{lipsum}
\usepackage[backend=biber]{biblatex}
%\bibliographystyle{apalike}
\bibliography{bibliography}
\def\mincludeonly#1{\foreach \file in {#1} {\xdef\temp{#1}\global\expandafter\let\csname fileincluded\file\endcsname\temp}}
\newsavebox{\mybox}
\def\savecitations#1{\savebox\mybox{\vbox{\noindent\begin{minipage}[inner sep=0]{\textwidth}\include{#1}\end{minipage}}}}
\def\minclude#1{\ifcsname fileincluded#1\endcsname\include{#1}\else\savecitations{#1}%More needed commands
\addtocounter{chapter}{-1}%
\fi}
\mincludeonly{chap1}
\begin{filecontents}{bibliography.bib}
@article{item1,
title = {Title Item 1},
year = {1998},
author = {Author},
}
@article{item2,
title = {Title Item 1},
year = {1998},
author = {Author},
}
\end{filecontents}
\begin{filecontents}{chap1.tex}
\chapter{test 1}
This is a citation:\cite{item1}
\end{filecontents}
\begin{filecontents}{chap2.tex}
\chapter{test 2}
This is a citation:\cite{item2}
\lipsum[1-20]
\end{filecontents}
\begin{document}
\tableofcontents
\minclude{chap1}
%\minclude{chap2}
\printbibliography
\end{document}
Edit 2:
MWE based on the code above:
\documentclass{report}
\usepackage{filecontents}
\usepackage{lipsum}
\usepackage[backend=biber]{biblatex}
\bibliography{bibliography}
\includeonly{chap1}
\begin{filecontents}{bibliography.bib}
@article{item1,
title = {Title Item 1},
year = {1998},
author = {Author},
}
@article{item2,
title = {Title Item 1},
year = {1998},
author = {Author},
}
\end{filecontents}
\begin{filecontents}{chap1.tex}
\chapter{test 1}
This is a citation:\cite{item1}
\end{filecontents}
\begin{filecontents}{chap2.tex}
\chapter{test 2}
This is a citation:\cite{item2}
\lipsum[1-20]
\end{filecontents}
\begin{document}
\tableofcontents
\include{chap1}
%\include{chap2}
\printbibliography
\end{document}




\nocite{*}somewhere on the code? Seems simple solution too me (It could be included in the\includeonlycommand if you want) – koleygr Mar 05 '18 at 20:56filecontentsfor the\included chapters) that shows the behaviour. I wanted to look at this just now, but the fact that I have to set up all this stuff means I'll probably wait until tomorrow. – moewe Mar 05 '18 at 21:45\mincludewas commented out. Fixed that and mede the code easy to test usibg a variable\testonbiblatex(1 for biblatex other integer for bibtex) – koleygr Mar 06 '18 at 13:05