37

When copying bibtex entries from journal websites, they usually include a lot of information, and not all of it is necessary depending on the journal you are submitting the paper too.

Currently I have two bib files, one with the full citation as taken from the journal page, and the other with the shorthand that I manually entered.

Is there an automatic way to get bibtex to refactor bibliographies? The citation list is starting to get rather large, and so I would like to avoid just copying the main bib file and trimming down the fields by hand. I've heard of people holding on to 4 or 5 bib files with different citation styles, but if you have 30-40 references, keeping track of 150+ references becomes untenable.

More specifically I want the bibliography to ignore title entries and automagically replace 4+ authors with the first author + et al.

If it matters, I'm looking to submit to an AIP journal and want to follow their style manual.

  • Related question – Lev Bishop Nov 19 '10 at 23:46
  • 11
    You don't normally alter the .bib file for this: the job of the BibTeX style is to choose what information to include in the bibliography. If the journal style uses all authors, then it does: that is a decision they've made. (I'm a chemist, and we always include all authors as the lead author is always last in the list!) – Joseph Wright Nov 20 '10 at 7:08
20

As the comments have mentioned, I would recommend against maintaining a bibliography with the abbreviations done by hand. This is exactly the sort of automatic thing that bibtex should be doing for you. That said, I don't know how to control this sort of thing with bibtex. I seem to remember that natbib did automatically truncate author lists, but I can't remember how much control it gave you. (indeed, this could well have been one of the things that made me move to biblatex...)

The biblatex solution would simply be to set maxnames=4 as a package option. Incidentally, biblatex is no longer in beta: v1.0 was uploaded to CTAN yesterday.

  • 1
    Could you provide some example latex code please? – Alex Lenail Nov 1 '17 at 4:30
  • 1
    I used the following: \usepackage[backend=biber,style=ieee, maxnames=10]{biblatex}. Just set the number to suit your needs. – martinarroyo Jan 23 '18 at 12:35
10

I feel a little guilty answering my own question, but this is for the sake of people looking this up in the future.

Bibliography style files dictate how the bibliography is typeset and which fields are kept/modified. As such you simply have to select the right \bibliographystyle{style} before calling \bibliography{bibfilename}

In my case, I had left over boilerplate code from the template I start from for all my latex articles. Revtex sets the style automatically when specifying the document class (and the journal substyle), however I still had a \bibliographystyle{plain} left over from my template. All I had to do was remove that line in order to let revtex select the bib style automagically.

  • Nothing wrong with answering your own question, but note that this doesn't seem to work generally. – Jess Riedel Jan 15 '15 at 5:49
  • 1
    Unfortunately this is out of date. On journals.aps.org/revtex/revtex-faq#b9 it says "The BibTeX style files distributed with REVTeX 4.1 and 4.2 no longer truncate the author lists of references (REVTeX 4's .bst files would truncate the list if there were more than 10 authors). APS editors prefer full author lists be used for references with 15 or less authors. For longer lists, use the phrase "and others" in place of the authors you want to omit." – Winther Jan 31 at 17:47
6

A quick search for "et~al." in the .bst file will reveal the code where this is done. In my case (apsrev.bst) I found that the code will look for the key word "other" in the author list and replace with "et~al."

This means I just have to modify the bibitem author to replace all the other authors with "and others". It's not really the correct fix, if it requires modifying the bibtex database file. But it helps, if you want to add your own entry where, for certain reasons, you want or have to truncate the author list.

5

I came across such issue today, and this is my solution. Since I use Endnote as my daily reference manager, so I intend to export the references as Bibtex format from Endnote. The default output style of BibTeX Export in Endnote is listing all the authors; definitely, you can edit the author key one by one in the .bib output file, but it takes a lot of time if you have several tens of references. The best way is to modify the export style, that is edit the BibTeX Export style in Endnote, find Bibliograpy sub-panel, edit Author Lists and Templates as the means they appear, e.g. you can control the author list by editing the number of authors wish to appear and the others with et al.

1

I know that this is an ancient post, but I've found myself returning to this page more than once. After having had enough with too much manual fiddling, I discovered a nice python package to parse the bibliography file. This gist can be used to convert a long bibliography file into a short one (it explicitly truncates long author lists) https://gist.github.com/zimmerst/9cb2ccad69b5f55a0a222c01b1d8e183

  • The code runs into the following errors: --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) ~/Google/shortauthor/shortenAuthors.py in <module> 6 # usage: python shortenAuthors.py <bibfile> <number of names> 7 from argparse import ArgumentParser ----> 8 from bibtexparser import loads as bib_loads, dumps as bib_dumps 9 from bibtexparser.bwriter import BibTexWriter 10 ModuleNotFoundError: No module named 'bibtexparser' – Everett You Feb 2 at 23:55
0

From https://tex.stackexchange.com/a/482291/113143

You can use the unsrt2authabbrvpp.bst to reduce the author's list without changing anything in the bib file. I have tested it with only IEEE template.

Download it from here: https://gitlab.com/tanwirahmad/ieee-abrv-names

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.