3

I have two bib files: publications-crossref.bib and ref.bib. The first file contains crossref(s) to the second file. I want to expand the first file publications-crossref.bib with the second file. For example, I give an entry of publications-crossref.bib, other of ref.bib, and my expected output:

publications-crossref.bib:

@inproceedings{key:icfp2006,
  author = {john wayne},
  title  = {Very Good},
  crossref = {icfp2006},
  pages = {580--681},
}

ref.bib:

@proceedings{icfp2006,
  key = {ICFP 2006},
  booktitle = {Proceedings of the 11th ACM SIGPLAN Conference on Functional Programming (ICFP 2006)},
  year = 2006,
  address = {Portland, Oregon, USA},
  month = sep,
  publisher = acm,
}

output.bib:

@inproceedings{key:icfp2006,
      author = {john wayne},
      title  = {Very Good},
      booktitle = {Proceedings of the 11th ACM SIGPLAN Conference on Functional Programming (ICFP 2006)},
      year = 2006,
      address = {Portland, Oregon, USA},
      month = sep,
      publisher = acm,
      pages = {580--681},
    }
3

The functionality required is provided by the bibexport tool, and the command

bibexport -ec ref.bib -es string.bib -n -o output.bib -a publication-crossref.bib 
  • the -e switch instructs to use an additional file (for both strings and crossefs, or -ec for only crossfefs, and -es for only strings);

  • the -n switch is for not including crossers in the output (specified by the -o switch);

  • finally, the -a switch is to consider all references in the bib file.

bibexport, by default, exports only the standard fields (those defined in plain.bst), but it is possible to add and remove additional fields, but one has to modify the export.bst file.

  • Perfect!... But I realize that I also depend on another file: "string.bib". To sum up, I have my main file "publication-crossref.bib", but this bib file depends on "ref.bib" (cross-references) and "string.bib". In addition, Is it possible to remove some fields ("key" from "ref.bib") when the command is executing? Thanks a lot! – Naive Developer Aug 4 '18 at 22:00

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.