Feature Request - Bibtex keys

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
joao
Posts: 59
Joined: Fri Jun 17, 2016 4:23 am

Feature Request - Bibtex keys

Post 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
Dellu
Posts: 271
Joined: Sun Mar 27, 2016 5:30 am

Re: Feature Request - Bibtex keys

Post 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 Image). The ones without Author name must come on top. You can then fix them manually.
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Feature Request - Bibtex keys

Post 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
Dellu
Posts: 271
Joined: Sun Mar 27, 2016 5:30 am

Re: Feature Request - Bibtex keys

Post 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).
Last edited by Dellu on Sun Nov 20, 2016 10:12 am, edited 1 time in total.
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Feature Request - Bibtex keys

Post 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.
Dellu
Posts: 271
Joined: Sun Mar 27, 2016 5:30 am

Re: Feature Request - Bibtex keys

Post by Dellu »

Great to see you back :D
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Feature Request - Bibtex keys

Post 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
joao
Posts: 59
Joined: Fri Jun 17, 2016 4:23 am

Re: Feature Request - Bibtex keys

Post 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.
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Feature Request - Bibtex keys

Post 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
joao
Posts: 59
Joined: Fri Jun 17, 2016 4:23 am

Re: Feature Request - Bibtex keys

Post 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').
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Feature Request - Bibtex keys

Post by Jon »

If you enable BibTeX in preferences the name will change to Key.

Jon
Sonny Software
joao
Posts: 59
Joined: Fri Jun 17, 2016 4:23 am

Re: Feature Request - Bibtex keys

Post 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).
Dellu
Posts: 271
Joined: Sun Mar 27, 2016 5:30 am

Re: Feature Request - Bibtex keys

Post by Dellu »

I seem to remember your name from the Sente forums.... another Sente convert like me?
exactly!
Post Reply