1

I have a large number of .bib files, some of which include many `@String{a="B"} definitions, and there are many cross referencing dependencies.

In the days of Mendeley and Google scholar, I find maintaining this not so worth the trouble. Is there a simple way to consolidate them all into one large file, with all @CrossRef{key,values} entries fetched and `@String{..} definitions resolved and fully expanded. I hear that BibCard can do the job. Is there a simple way for doing it, preferably with a shell script rather than GUI, or should I experiment and study the manual?

  • 1
    I realise it may seem odd to suggest an MWE in this case, but not everybody uses @string and crossref etc. For me, it is easy to set up an example to experiment with because I use these myself. But, for others, it would be a considerable pain. – cfr Aug 25 '16 at 21:20
  • Sure, I will try to make an abbreviated example, to demonstrate the problem. – Yossi Gil Aug 25 '16 at 21:26
1

Assuming you use a sane Unix-ish system and a bash shell ...

mkdir /tmp/bibs
cat <path to filename1>.bib <path to filename2>.bib ... <path to filenameN>.bib > /tmp/bibs/tmp.bib
pushd /tmp/bibs
biber --tool --output_format=bibtex --output_resolve -O big.bib tmp.bib 
rm tmp.bib
mv big.bib <directory where you want the combined bib>/
popd
rmdir /tmp/bibs

If you have separate files to define strings, you may need to list these first when concatenating the files. Note that this will resolve xdata, crossref etc. as well as strings.

For further information

biber --help

is the most useful source of information on the use of 'tool' mode which I found when looking into this a while ago.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.