Duplicated citation keys
Duplicated citation keys
This problem has been bugging me for a long time.
I have three BE libraries.
BE is smart enough to keep the bibtex keys unique within a single library. But, it has no capacity to compare across libraries.
So, I am getting a lot of duplicated citation keys, and the latex compiler is constantly annoying me.
Has anyone came up with any way around this problem?
(please don't tell me to use one library; that is out of question).
I have three BE libraries.
BE is smart enough to keep the bibtex keys unique within a single library. But, it has no capacity to compare across libraries.
So, I am getting a lot of duplicated citation keys, and the latex compiler is constantly annoying me.
Has anyone came up with any way around this problem?
(please don't tell me to use one library; that is out of question).
Re: Duplicated citation keys
It would seem that the field Preferences->BibTex->Precede with: would offer you a chance to make each citation key in each library unique.
--
JJW
JJW
Re: Duplicated citation keys
Thank you for the suggestion dear @DrJJWMac
The most ideal situation would be provide a format like the attachment renaming format.
That way, I would program the format to use different patterns just like in Jabref and many other reference managers. or, we can attach some suffixes to each reference type:
Articles would have their keys with @ suffix;
and the books would have another suffix_b,
and the collection would have _c another suffix, etc.
As every library/entry type would have different types of suffix, there would never be a cross-library duplicate.
I can currently suffix them using find and replace system, manually. I have tried that one a couple of times. But, the problem is Be cannot keep them unique once I modify them manually (and, I have no way of keeping them unique).
This task of keeping the bibtex keys unique is probably what makes the implementation of the format difficult for John as well.
The most ideal situation would be provide a format like the attachment renaming format.
That way, I would program the format to use different patterns just like in Jabref and many other reference managers. or, we can attach some suffixes to each reference type:
Articles would have their keys with @ suffix;
and the books would have another suffix_b,
and the collection would have _c another suffix, etc.
As every library/entry type would have different types of suffix, there would never be a cross-library duplicate.
I can currently suffix them using find and replace system, manually. I have tried that one a couple of times. But, the problem is Be cannot keep them unique once I modify them manually (and, I have no way of keeping them unique).
This task of keeping the bibtex keys unique is probably what makes the implementation of the format difficult for John as well.
Re: Duplicated citation keys
Using a format to generate the key would apply to all libraries, so it wouldn't necessarily help. Having said that, with a format you can output the name of the library, and if you included that in the key field it would be unique across all of your libraries. Another approach you could use now is to do a Global Change -> Change Field and insert a library-specific tag in front of or after the key Bookends generates. The downside is that you'd have to do this periodically for new references and be careful to not touch references that have already been altered.
Jon
Sonny Software
Jon
Sonny Software
Re: Duplicated citation keys
I have tied that one by suffixing @ on articles; to differentiate them from books and collections.Jon wrote: ↑Sat Apr 09, 2022 8:21 am Another approach you could use now is to do a Global Change -> Change Field and insert a library-specific tag in front of or after the key Bookends generates. The downside is that you'd have to do this periodically for new references and be careful to not touch references that have already been altered.
Jon
Sonny Software
Note that I am organizing my libraries by types: articles are in one library; books are in another library etc.
The system was able protect cross-library duplication because all keys from articles would have @ suffixes. That suffix made them unique.
But, it created library-internal duplication.
Here is how the library internal duplication is created:
Assume I have two papers authored by John, published in a year 2012; and assume that i have imported them to my library last year.
When I suffixed the @ symbol, the first paper will be: John2012@ and the second one will be John2012a@ .
Now, assume that i have found another (third) paper by the same author (or, another author with same last name) published in the same year, 2012.
Now, I am importing that third paper.
Bookends will assign John2012 to that one because the first two have been renamed. Now, I am going to add @ on this new paper. It will be John2012@; which is an exact duplicate of the first paper. Since I am manually inserting suffixes, BE cannot keep the keys unique.
Last edited by Dellu on Sat Apr 09, 2022 9:28 am, edited 1 time in total.
Re: Duplicated citation keys
Make it a prefix, not a suffix. @ may not be the best choice because BibTeX uses it, too. Maybe something like $
$John2012
$John2012a
$John2012b
Jon
Sonny Software
$John2012
$John2012a
$John2012b
Jon
Sonny Software
Re: Duplicated citation keys
I don't think the prefix makes a difference.
First round renaming:
John2012 -- > $John2012
John2012a --> $John2012a
Second round renaming:
John2012 --> $John2012
Still, the first and the third end up being identical.
First round renaming:
John2012 -- > $John2012
John2012a --> $John2012a
Second round renaming:
John2012 --> $John2012
Still, the first and the third end up being identical.
Re: Duplicated citation keys
You're right. I think the only way to ensure uniqueness across libraries is to create the key yourself. Building on DrJJWMac's suggestion, you can use Copy Citation to generate one for you with a format, then paste it into the key field. The format can include the database name (use !). So this format
!_a_d
might generate
Library1_John_2012
Jon
Sonny Software
!_a_d
might generate
Library1_John_2012
Jon
Sonny Software
Re: Duplicated citation keys
The in-library duplication will still be there so far as I am doing it manually.
1. Having a format would have been great because the format can be programmed to assign those prefixes and suffixes we want; and then, the housekeeper (the feature which makes the keys unique in the current system) will suffix the letters on those keys that end up being duplicated.
A key generator format would have ad (John2012), for example, for a journal article; and simple a_d (John_2012) for books; and a-b (John-2012) for other things, etc.
Once the format generates these keys. The house keeper will check them if they will be unique in the library. Surely, they will be unique across libraries/types because each type would have a special suffix/prefix/pattern.
2. A second alternative is to hard code the above kinds of patterns into BE (if including a format into the key generating system is difficult to program).
The current patterns is ad across the board. So, if it is not hard to program, it would be an option to include patterns into the keys:
ad = articles
a-d = books
a_d = incollection
-ad= book chapter
3. Manually fixing a key is messy and is going to be a struggle to keep up with it as the libraries grow. I don't like this. But, if we have to do manual assignment of keys, adding the key field to the Remove Duplicates tool would be a great help. Once I have searched the references with duplicate keys, I can then change the duplicated keys to sth else manually. The manual suffixation/prefixation would work with this method.
Dear @Jon, I know I have been pushing you into the latex sphere too much. I promise this will be the last feature request I will make. BE is almost perfect to me. It has been like that since you add the Bibsync feature. I cannot think of anything else to add on this app. And, it doesn't have to be now. You can think about it; and can include it probably to the next big release of BE (BE15).
1. Having a format would have been great because the format can be programmed to assign those prefixes and suffixes we want; and then, the housekeeper (the feature which makes the keys unique in the current system) will suffix the letters on those keys that end up being duplicated.
A key generator format would have ad (John2012), for example, for a journal article; and simple a_d (John_2012) for books; and a-b (John-2012) for other things, etc.
Once the format generates these keys. The house keeper will check them if they will be unique in the library. Surely, they will be unique across libraries/types because each type would have a special suffix/prefix/pattern.
2. A second alternative is to hard code the above kinds of patterns into BE (if including a format into the key generating system is difficult to program).
The current patterns is ad across the board. So, if it is not hard to program, it would be an option to include patterns into the keys:
ad = articles
a-d = books
a_d = incollection
-ad= book chapter
3. Manually fixing a key is messy and is going to be a struggle to keep up with it as the libraries grow. I don't like this. But, if we have to do manual assignment of keys, adding the key field to the Remove Duplicates tool would be a great help. Once I have searched the references with duplicate keys, I can then change the duplicated keys to sth else manually. The manual suffixation/prefixation would work with this method.
Dear @Jon, I know I have been pushing you into the latex sphere too much. I promise this will be the last feature request I will make. BE is almost perfect to me. It has been like that since you add the Bibsync feature. I cannot think of anything else to add on this app. And, it doesn't have to be now. You can think about it; and can include it probably to the next big release of BE (BE15).
Re: Duplicated citation keys
How would the format ensure the keys were unique between libraries? Two different libraries could generate the same key if it's simply John2012. I think you would need to include the library name in the key. Maybe you segregate libraries by reference Type? Then it would work for you, but no one else.
Jon
Sonny Software
Jon
Sonny Software
Re: Duplicated citation keys
Here's a thought. What if there was an option to include the unique ID in the citekey. Like this
John2012_54243
That would be unique among all libraries.
If I were to add an option like this, via a popup menu in preferences, what other option would people like? Here are the first two I'm thinking of:
authordate
authordate_uniqueid
Jon
Sonny Software
John2012_54243
That would be unique among all libraries.
If I were to add an option like this, via a popup menu in preferences, what other option would people like? Here are the first two I'm thinking of:
authordate
authordate_uniqueid
Jon
Sonny Software
Re: Duplicated citation keys
I vote to provide an option field for the user to format the cite key using notations.
a - first author, last name
s - second author, last name (or blank)
e - etal if more than one author
y - publication year
u - unique ID (0 + time stamp hhmm)
! - library name
[sometext] - direct use of sometext
By example
ay --> John2012
asy --> JohnSmith2012
ae_u --> Johnetal_02000
!-ay --> books-John2012
ay_[book] --> John2012_book
ay_[book]u --> John2012_book01955
Default is ay.
a - first author, last name
s - second author, last name (or blank)
e - etal if more than one author
y - publication year
u - unique ID (0 + time stamp hhmm)
! - library name
[sometext] - direct use of sometext
By example
ay --> John2012
asy --> JohnSmith2012
ae_u --> Johnetal_02000
!-ay --> books-John2012
ay_[book] --> John2012_book
ay_[book]u --> John2012_book01955
Default is ay.
--
JJW
JJW
Re: Duplicated citation keys
Yes, the unique id would definitely work.
I second DrJJWMac's proposal.
If his proposal is too much to include, adding the library name is very smart solution. If anyone is not interested in suffixing the 5 digit number (the unique id) into her keys, she can assign short library names (such as B for the library for books, A for the library for the Articles etc ) and then, attach those names on the keys. That is smart and simple solution.
If including the library name is hard, I would propose the "types" to be included.
Type-authordate
a-John2012 <if the type is article
b-John2012 <for books
c-John2012 <collection/conference
i-John2010 >incollection
ib->inbook
p- > for proceeding
mt > master thesis
ph >phd
u> unpublished
m>misc
These are the standard types:
I second DrJJWMac's proposal.
If his proposal is too much to include, adding the library name is very smart solution. If anyone is not interested in suffixing the 5 digit number (the unique id) into her keys, she can assign short library names (such as B for the library for books, A for the library for the Articles etc ) and then, attach those names on the keys. That is smart and simple solution.
If including the library name is hard, I would propose the "types" to be included.
Type-authordate
a-John2012 <if the type is article
b-John2012 <for books
c-John2012 <collection/conference
i-John2010 >incollection
ib->inbook
p- > for proceeding
mt > master thesis
ph >phd
u> unpublished
m>misc
These are the standard types:
Re: Duplicated citation keys
I'm thinking of a popup menu in preferences, not using a format or creating another similar format-like mechanism. Something simple.
Jon
Sonny Software
Jon
Sonny Software
Re: Duplicated citation keys
I'm going to start a new thread so that possibly affected users don't miss this.
Jon
Sonny Software
Jon
Sonny Software