Citation key options for multiple authors

A place for users to ask each other questions, make suggestions, and discuss Bookends.
somelinguist
Posts: 24
Joined: Mon Apr 10, 2023 12:41 pm

Citation key options for multiple authors

Post by somelinguist »

Hello,

Would it be possible to add an option to configure the author part of BibTeX citation key generation for references with multiple authors such that:

1. If there are two authors, output the last names of both authors separated by a period: lastname1.lastname2
2. If there are more than two authors, output the last name of the first author followed by a period and etal: lastname1.etal
3. If there is only one author, output the last name of the author.

As a use case, I have several references from many authors who publish multiple times a year with multiple different authors, and generating citation keys that only contain the last name of the first author leads to much ambiguity.

I have several existing references previously imported from Zotero’s Better BibTeX plug-in that follow this scheme, but it would be helpful if new references could also follow it if possible.

Thanks!
Jon
Site Admin
Posts: 10070
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Citation key options for multiple authors

Post by Jon »

Maybe. I don't intend to add complex citekey permutations, if they are unique they do the job. I don't want to have a popup menu in preferences that lists variation after variation. And making the names longer and more complex obfuscates them, to my mind. I admit I'm not a BibTeX user, though. What do other BibTeX users think? I can leave the handling of authors as it is, or change how the author(s) name is output to the scheme somelinguist proposes.

Jon
Sonny Software
somelinguist
Posts: 24
Joined: Mon Apr 10, 2023 12:41 pm

Re: Citation key options for multiple authors

Post by somelinguist »

Hi Jon, Thanks so much for considering it. I'll be glad to hear what others have to say as well.

One reason I've personally used citekeys formatted this way is that it includes the relevant parts of the formatted in-text citation as well. So when I'm reading through the LaTeX or Markdown source, seeing doe.smith2022 is similar to reading Doe and Smith 2022 in the formatted text to be output. The same paper might also reference doe.williams2022, doe2022a, doe2022b, etc. Having the relevant parts in the tex/md source helps me keep track of whether I've referenced the correct resource in the right place while I'm writing.

Kevin
Jon
Site Admin
Posts: 10070
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Citation key options for multiple authors

Post by Jon »

It makes sense to me, too. But I've found that BibTeX users are quite opinionated (and vocal) about how things should be done. I've reversed changes before because someone was inconvenienced by them. The gist of my last reply was that I don't intend something as simple as citekeys to become complicated. I don't mind outputting authors as you suggest, but I also don't want to get feedback that this change ruins someone's workflow. I'm hoping other BibTeX users weigh in on this.

Jon
Sonny Software
somelinguist
Posts: 24
Joined: Mon Apr 10, 2023 12:41 pm

Re: Citation key options for multiple authors

Post by somelinguist »

Thanks for the clarification. That makes sense.
iandol
Posts: 465
Joined: Fri Jan 25, 2008 2:31 pm

Re: Citation key options for multiple authors

Post by iandol »

If the default citekey is changed I wouldn't be happy. I do understand some users have lots of papers with the same first author and year, and it makes it hard while writing to disentangle the references, so the underlying reason to want a better identifier is sound. But I don't have such a problem, and I value short citekeys in my writing.

There are endless ways to generate BibTeX citekeys, and dedicated tools like Jabref or Better BibTeX have elaborate template engines (see e.g. https://retorque.re/zotero-better-bibte ... -generator). I'm not sure what an optimal template is; for example for multiple authors I would prefer first and last surnames rather than etal (at least in biomedical papers last author is usually group leader) — there are endless subtle permutations.

In an ideal world, I wonder if perhaps the format manager could allow some customisation here, as you already do for the intext citation template and pdf name template? I don't know how it could handle name collision though (currently solved by appending letters a-z), perhaps this would just be added after the format was applied. BUT using the format manager still implies some preferences UI, which is what Jon wants to avoid. Does Bookend have "hidden" preferences (macOS defaults command), this may be a way to apply uncommon prefs without UI?
somelinguist
Posts: 24
Joined: Mon Apr 10, 2023 12:41 pm

Re: Citation key options for multiple authors

Post by somelinguist »

Thanks iandol for the perspective. I think you’re right that no one way will meet everyone’s preferences, especially given the varying implications of author order. I wasn’t aware of the info about biomedical papers. In linguistics, it’s often the first author who is the lead contributor but I’ve also seen some papers where they are just alphabetically ordered.

Interestingly, I finally got around to creating a custom format to handle renaming attachments this afternoon, and the same thought occurred to me that something similar might work for citekeys as well. Doesn’t file renaming also need to handle collisions given how Bookends looks for attachments? Though, there are also other possible restrictions on valid citekeys depending on what will be used to process them, if I’m not mistaken? It would still need options I presume, unfortunately.

Thanks again!
Dellu
Posts: 268
Joined: Sun Mar 27, 2016 5:30 am

Re: Citation key options for multiple authors

Post by Dellu »

iandol wrote: Tue Apr 18, 2023 8:41 pm If the default citekey is changed I wouldn't be happy.
Same here.
I rely on the citekey to do a lot of other things. A change on it means I have to re-do every configuration I built around it (file renaming for example).

As to the identification of the right papers, there are a couple of strategies you can use:

1) use BibKeys along with the Title of the paper as a file name. When you are in doubt, you can search the citekey and find the title (via Alfred, for example) with show up with it.

2) Texstudio's autocomplete feature: When you cite using Texstudio, the autocomplete feature displays the complete reference information for you. That way, you can easily disambiguate the papers.

3) Bookends Floating Citation: this one can also show the full reference info associated with a certain citekey. If the paper has two authors, both authors are shown there. So, you won't have an issue of identifying which paper is which.
somelinguist
Posts: 24
Joined: Mon Apr 10, 2023 12:41 pm

Re: Citation key options for multiple authors

Post by somelinguist »

Thanks, Dellu, for describing how it would disrupt your workflow. I'm definitely not advocating for a kind of change that would mess things up for other people.

I am already aware of other ways of checking the reference information for a citation in Texstudio and other apps.

The request for an additional option was a matter of preference for my existing workflow, having used another reference manager previously, just as your format is a matter of preference that fits your workflow.
Jon
Site Admin
Posts: 10070
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Citation key options for multiple authors

Post by Jon »

No promises, but I'll look into adding the ability to use a format for generating citekeys.

Jon
Sonny Software
somelinguist
Posts: 24
Joined: Mon Apr 10, 2023 12:41 pm

Re: Citation key options for multiple authors

Post by somelinguist »

Thanks, Jon for considering it!
DrJJWMac
Posts: 348
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Re: Citation key options for multiple authors

Post by DrJJWMac »

I imagine the OP is not asking to change the four default cite key options (Author + Year, Author + Year + UniqueID, ...). Rather, the request is to provide customizable options beyond the existing four defaults. With the flexibility that I have learned in using formats across other cases, I can support an approach that provides customizations using formats. Having an option in the current Citekey pull down menu (in Settings) to access the customizations for this seems to be a logical next step. Perhaps, to manage the additional formats effectively, the names for formats that are to be used for cite keys should be required to begin with CiteKey as a prefix. This would parallel how we can now use the prefix Markdown on a format name as a toggle for exporting content that follows that format style as mark down formatted text automatically. It would also avoid having the Citekey popup menu listing variation after variation after variation of otherwise irrelevant format styles.
--
JJW
Jon
Site Admin
Posts: 10070
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Citation key options for multiple authors

Post by Jon »

I have been working on a build that does just that, and have written to the op about beta testing it. The idea of requiring that the format name begin with Citekey is interesting...

Jon
Sonny Software
somelinguist
Posts: 24
Joined: Mon Apr 10, 2023 12:41 pm

Re: Citation key options for multiple authors

Post by somelinguist »

Thanks so much for adding the option to use a custom Format for Citekeys. It works exactly as I had hoped.
iandol
Posts: 465
Joined: Fri Jan 25, 2008 2:31 pm

Re: Citation key options for multiple authors

Post by iandol »

Wow Jon, really nice implementation (and thanks to DrJJWMac for the naming idea, simple and neat!)

EDIT: you are also doing amazing things with links in the recent releases, great stuff!
Post Reply