# Automatic nested biblatex bibliographies

I am using biblatex to maintain a database of persons. Using biblatex's \printbibliography command I am able to print a list of those persons and to take advantage of biblatex's sorting mechanism. The example below has the persons sorted by birth date.

Those persons are also linked to bibliographic references (they are authors). The references are indicated in bib entries using the usera field. Through a \DeclareBibliographyDriver command, I am able to print those references in list form under the person's name.

What I would like to accomplish is avoid being forced to manually list the linked entries in the usera field and get biblatex to print them automatically.

It would mean having biblatex search the bib file for entries with the corresponding author and populate the usera field with the results. Ideally, I would need to be able to determine how those entries would be printed, using the sorting mechanism (for example: print all entries by this author sorted by date).

I have no idea how to go about doing that or if it's even possible, any help would be much appreciated. It seems to me this kind of 'nested bibliographies' would be a very powerful tool.

MWE, not automated

\documentclass{article}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{sources.bib}
@article{testart1,
author          = {Author, Albert},
title           = {First Article Title},
journaltitle    = {Something Times},
date            = {1964-02-01},
}

@article{testart2,
author          = {Buthor, Billy},
title           = {Second Article Title},
journaltitle    = {Another Times},
date            = {1975-05-10},
}

@article{testart3,
author          = {Author, Albert},
title           = {Third Article Title},
journaltitle    = {Something Else Times},
date            = {1970-04-21},
}

@person{author_albert,
namea           = {Author, Albert},
date            = {1920/1975},
usera           = {testart1,testart3},
}

@person{buthor_billy,
namea           = {Buthor, Billy},
date            = {1930/1990},
usera           = {testart2},
}

@person{cuthor_charly,
namea           = {Cuthor, Charly},
date            = {1900/1950},
}
\end{filecontents}

\addbibresource{sources.bib}

\newcommand*{\itemcite}[1]{\item \fullcite{#1}\finentry}% goes with below

\DeclareBibliographyDriver{person}{% custom person driver
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\mkbibbold{\printnames{namea}%
\addspace%
\mkbibparens{\printdate}%
\addspace%
\iffieldundef{usera}{}% if nothing in usera, print nothing
{\vskip\bibitemsep\scriptsize% otherwise print list of publications
\begin{itemize}%
\forcsvfield{\itemcite}{usera}%
\end{itemize}}}%
%\usebibmacro{finentry}%
}%

\begin{document}

Lorem.

\nocite{*}%

\printbibliography[type=person,title=Persons,sorting=ynt]%

\end{document}

• You probably want to look at the documentation for Biber rather than Biblatex, at least in the first instance. Biblatex never even looks at your .bib file: it wants nothing to do with it ;). – cfr Jun 24 '15 at 0:24
• As far as I know it goes even further: Biber only looks at those entries that have been cited, so if an entry has not been cited (explicitly or via \nocite) there is no chance we are ever going to know the author. It might be possible to do this if a nocite was issued but then would somehow have to loop over all citekeys and take only those whose authors match the namehash. (Incidentally, I would have thought one would have to do this from within biblatex as Biber just provides the data, but I'm not sure whether this "looping" is possible at all.) – moewe Jun 24 '15 at 6:31
• I think it could be possible. But it would take some time and thinking to get the data model and the data processing right -- one wouldn't want to loop over all entries again and again for each person, so one has to do something first to collect the data. I would probably use a suitable \citeall to build up property lists. But imho the main problem is that whatever one does it will work only if the authors names are really identical. Differences like Author, A. instead of Author, Albert shouldn't be in the bib. – Ulrike Fischer Jun 24 '15 at 8:18