Page 1 of 1
Feature Request - Bibtex keys
Posted: Wed Nov 16, 2016 7:01 am
by joao
Hi,
I recently did a bibtex export from Bookends and noticed a few minor issues, and one major issue.
Minor issues had to do with curly braces not being written around titles even though the preferences was set to do just that.
The major issue was errors in the Bibtex citation key. I noticed the following:
- Some bibtex keys were written like this:
"someName[carriage return]someOtherName[space]1993"
- Others like this (due to incomplete reference data):
"-1993" or "name-" or "-"
The feature request is for Bookends to have a menu action to search for invalid Bibtex keys and allow the user to manually change them (and automatically adding 'a' or 'b' if necessary to the date after said change). This should cover any issues with Bookends generating invalid bibtex keys and, more importantly, imported references containing invalid Bibtex keys.
This is extremely important for the following reason.
I can have Bookends periodically export a bibtex file. I can make any corrections on that bibtex file in Bibdesk or Jabref if I wish. But the one correction I should not be doing is the bibtex citation key. Ideally only one program should be responsible for writing it, and all programs use the same key. Otherwise, we lose track of citations.
Thanks,
Joao
Re: Feature Request - Bibtex keys
Posted: Sun Nov 20, 2016 9:41 am
by Dellu
- Some bibtex keys were written like this:
"someName[carriage return]someOtherName[space]1993"
I think you have some formatting inside the Author field. That is why you are getting [Carriage return]. Look at those references which the return, and remove the formatting, or remove the return manually.
- Others like this (due to incomplete reference data):
"-1993" or "name-" or "-"
This one, yes, it looks like you either have no Author; or you have wrong formatting at the Format Manager.
The feature request is for Bookends to have a menu action to search for invalid Bibtex keys
You can try smart search: or the column in the main library to order the Key (like this

). The ones without Author name must come on top. You can then fix them manually.
Re: Feature Request - Bibtex keys
Posted: Sun Nov 20, 2016 9:50 am
by Jon
The Return in the key may be because of a non-Mac return character in the authors field (i.e. ASCII 13 instead of ASCII 10). Check for that.
As for repairing bad keys, you can select the reference(s) in question and have Bookends generate them anew with Refs -> Generate BibTeX Key.
Dellu's comment about a Key field in the reference list is a good one, too.
Jon
Sonny Software
Re: Feature Request - Bibtex keys
Posted: Sun Nov 20, 2016 9:54 am
by Dellu
This is extremely important for the following reason.
I can have Bookends periodically export a bibtex file. I can make any corrections on that bibtex file in Bibdesk or Jabref if I wish. But the one correction I should not be doing is the bibtex citation key. Ideally only one program should be responsible for writing it, and all programs use the same key. Otherwise, we lose track of citations.
that is very correct. I also use the same technique. May be, we can request Jon to have more options on generating the Key. But, the returns must not be a problem so far as you inserted your references correctly. I don't have similar problems. I have very clean library; and, correct Key.
(I am not trying to replace Jon; I am just trying to suggest some means, since he is on vacation, as I learned from other posts he made in this blog---user to user discussion could also be one of helping each other without always expecting Jon to answer all the questions--I think we need to develop such a culture in here; as in Tinderbox forum, the user to user discussion could as helpful as the answer from the developers).
Re: Feature Request - Bibtex keys
Posted: Sun Nov 20, 2016 9:56 am
by Jon
Dellu wrote:
(I am not trying to replace Jon; I am just trying to suggest some means, since is on vacation, as I learned from other posts he made in this blog---user to user discussion could also be one of helping each other without always expecting Jon to answer all the questions--I think we need to develop such a culture in here; as in Tinderbox forum, the user to user discussion could as helpful as the answer from the developers).
Absolutely! It's great when users can help other users. Thanks for posting.
Jon
Sonny Software
P.S. I'm back.
Re: Feature Request - Bibtex keys
Posted: Sun Nov 20, 2016 10:14 am
by Dellu
Great to see you back

Re: Feature Request - Bibtex keys
Posted: Sun Nov 20, 2016 10:24 am
by Jon
joao wrote:
- Some bibtex keys were written like this:
"someName[carriage return]someOtherName[space]1993"
I do see that incorrect outputs can be generated if there is more than one author and the first author's name does not contain a comma (i.e. is not in the form surname, first name/initials). I've fixed this for the next update.
Jon
Sonny Software
Re: Feature Request - Bibtex keys
Posted: Wed Nov 23, 2016 7:31 am
by joao
Hi Dellu,
Yes, that is what I did in the end to fix the Bibtex keys. And yes, I do like it when others chime in (that's why I named the topic 'feature request' - to see if other users would be interested). I don't expect Jon to answer everything here. I seem to remember your name from the Sente forums.... another Sente convert like me?
Jon,
Hope you had a good holiday, and thanks for the fix in the next update. I had already changed the keys so I can't really tell what the offending references were but I do remember a few things:
1. Like you discovered, this happened in a small number of references with more than one author without the standard comma separation in their names (this can be more common than it appears, especially when authors/editors are organizations).
2. I noticed a few issues with some diacritic/accent characters, but can't remember which.
3. I did notice an issue with a special character in the journal title field. The journal was called something like "A|U". That's a pipe character, not a capital i. Can't remember if the issue was in Bookends exporting the bibtex or bibtex not liking the pipe.
I also notice now that the Bookends preferences only allows for curly braces around acronyms, and not the entire title. Bibdesk complains (with warnings, not errors) about this. I imagine that a feature request for curly braces around the entire title may encounter a lot of resistance by users however, and would only make sense activating on an individual reference basis.
Since it seems that there will not be a check/search for invalid keys, can you confirm that Bookends will only ever change the Bibtex key field when it's empty (i.e. even when the key is invalid, it stays invalid). This makes it easier to simply do a 'select all'/'generate keys' without fear of any unexpected changes.
Re: Feature Request - Bibtex keys
Posted: Wed Nov 23, 2016 8:30 am
by Jon
The automatic generation of a BibTeX key works regardless of whether the Key field has content or not. So if you had a type in the author's name and fixed it, you could generate a new key.
If you want to change only references with empty Key fields, use Find (Command-F), looking for references where the Key field IS EMPTY. Then select those and generate the BibTeX key.
Jon
Sonny Software
Re: Feature Request - Bibtex keys
Posted: Wed Nov 23, 2016 8:36 am
by joao
Thanks Jon, thats really important information. I assumed Bookends would skip already generated keys.
Just did a smart group for empty field on 'User1' (should really be called 'key').
Re: Feature Request - Bibtex keys
Posted: Wed Nov 23, 2016 9:36 am
by Jon
If you enable BibTeX in preferences the name will change to Key.
Jon
Sonny Software
Re: Feature Request - Bibtex keys
Posted: Wed Nov 23, 2016 10:34 am
by joao
If you enable BibTeX in preferences the name will change to Key.
The name in Bookends' inspector (edit reference, summary, etc..) yes. But not the name in the field selection for smart groups (hence the slight confusion).
Re: Feature Request - Bibtex keys
Posted: Thu Nov 24, 2016 11:11 am
by Dellu
I seem to remember your name from the Sente forums.... another Sente convert like me?
exactly!