I am using Biblatex to produce a bibliography. Some Inbook entries have a crossref-field pointing at a book entry.
What I want to achieve is:
If only one of the child (inbook) entries is cited => inherit all available fields from the parent (book) entry.
If more than one of the child (inbook) entries are cited => print the parent (book) entry; only inherit some fields (e.g. bookauthor and title) to the child (inbook) entries.
I have tried to modify the Inheritance Setup via \DeclareDataInheritance
. What I did was to add a \ifentryseen
test, but this is not allowed in Inheritance Setups. Now, I have added to same test to the bibliography-driver. But \nocite
doesn't seem to affect the \ifentryseen
test.
Does someone have an idea what I could try next?
I have shortened the inbook bibliography driver a bit to make things easier. If both items are cited both inbook entries shoould output "..., in: Short Title"; if only one is cited: "..., in: Complete Title". Until now, \ifentryseen
always expands to false.
MWE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=authortitle-ibid,backend=biber]{biblatex}
\bibliography{bib}
\usepackage{filecontents}
\begin{filecontents}{bib.bib}
@book{AGS,
author = {Adorno, Theodor W.},
title = {Gesammelte Schriften},
editor = {Tiedemann, Rolf},
location = {Frankfurt},
year = {2003},
}
@inbook{DDA,
author = {Horkheimer, Max and Adorno, Theodor W.},
title = {Dialektik der Aufklärung},
crossref = {AGS},
volume = {3},
}
@inbook{ND,
author = {Adorno, Theodor W.},
title = {Negative Dialektik},
crossref = {AGS},
volume = {6},
}
\end{filecontents}
\DeclareBibliographyDriver{inbook}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{in:}%
\ifentryseen{\thefield{crossref}}%
{Shortreference}
{Complete Reference}
\usebibmacro{finentry}}
\begin{document}
\cite{DDA}
\cite{ND}
\printbibliography
\end{document}