> On Jun 15, 2024, at 6:39 PM, Alexander,J wrote: > > Is there a way to export a bibliography with all of the cross-references > removed, so that each individual entry is a complete, stand-alone entry with > no dependencies? > > I ask because I’ve been writing some JavaScript to automatically create and > format bibliographies in webpages using citation.js, but it seems > cross-references make things much more complicated — so it would be much more > convenient to be able to save a version with the crossrefs removed. > > Best wishes, > > Jason
I do this with bibtool, a command-line tool by Gerd Neugebauer. The relevant argument in bibtool is expand.crossref. After installing bibtool (with Homebrew, MacPorts, etc.), run a command of the form: bibtool -- expand.crossref=on -i input.bib -o output.bib There are also many other arguments/commands in bibtool. For example, there are commands for sorting entries, deleting fields, renaming fields, and rewriting fields with regular expressions. You can list many commands in a separate text file called a resource file and instruct bibtool to read and execute them all at once, with the following command form (where options.rsc, for example, is the name of a resource file with a list of commands): bibtool -r options.rsc -i input.bib -o output.bib It's a very fast and useful tool. Let me know if you have any questions about it; I can probably help. Some links for bibtool: CTAN: https://ctan.org/pkg/bibtool GitHub: https://github.com/ge-ne/bibtool _______________________________________________ Bibdesk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bibdesk-users
