Q: how do I set a specific separator in bibtex-mode
's autokey
generator?
Background
I am working
with
bibtex-mode
.
It has a feature
to
auto-generate the entry key,
which is customizable.
Goal
My goal is to get the autokey to work as follows:
- One author: authorname:year.
- Two authors: authorname1-authorname2:year.
- Three or more authors: authorname1-etal:year.
Almost There
The following settings almost get me there:
(setf bibtex-autokey-additional-names "etal"
bibtex-autokey-name-separator "-"
bibtex-autokey-name-year-separator ":"
bibtex-autokey-year-length 4
bibtex-autokey-names 1
bibtex-autokey-names-stretch 1
bibtex-autokey-titlewords 0)
The Specific Problem
It works for one and two authors. However, for three or more authors, the generated key is:
authorname1etal:year
rather than the desired, hyphen-separated
authorname1-etal:year
How do I get the hyphen separator between the author name and the etal?
Examples
@Article{,
author = {Bob Smith},
title = {A title},
journal = {A journal},
year = 2014
}
produces smith:2014
@Article{,
author = {Bob Smith and Frank Jones},
title = {A title},
journal = {A journal},
year = 2015
}
produces smith-jones:2015
@Article{,
author = {Bob Smith and Frank Jones and Joe Johnson},
title = {A title},
journal = {A journal},
year = 2016
}
produces smithetal:2016
(and I want smith-etal:2016
)