I have a number of remote related documents, living in own directories, each with a BibLaTeX bibliography, all use common .bib files. I want to generate a collective bibliography, i.e., a bibliography that includes all entries that are cited in one of the documents, without touching the original documents.
To archive this, several approaches has come in my mind, one uglier than the next:
- Generate a cover document that includes with some magic (e.g.,
combine
,docmute
) the documents ignoring their\documentsclass
etc., and suppressing with more magic (collect
,comment
) everything but the bibliography. - Use a shell script with
grep
andawk
to find all kinds of cite-commands, construct a file with corresponding\nocite
commands, that can be used to generate the bibliography. - Use a XML parser to combine all .bcf files to a single one.
Before I start to implement one of these approaches, I want to ask the community: Do exist standard solutions for this problem? If not, are there other ideas?
biber --output-format=bibtex test.bcf
to get the bib entries for the documenttest
intest-biber.bib
. You then only need a small document which uses all this bib's along with a nocite{*} to get a complete bibliography.bibtool
to merge thebib
files into one such file. (bibtool can also do the extraction. But see this )