Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default settings for filename format and autolink files don't play nice together. #3472

Closed
bdcaf opened this issue Nov 29, 2017 · 5 comments · Fixed by #3509
Closed

Default settings for filename format and autolink files don't play nice together. #3472

bdcaf opened this issue Nov 29, 2017 · 5 comments · Fixed by #3509

Comments

@bdcaf
Copy link

bdcaf commented Nov 29, 2017

I ran into the need to autolink files. I had generated the bibtex keys using (the reasonable) default setting [auth][year]. And renamed the files using a filename format \bibtexkey - ...

As example consider I have following papers:

  • Einstein 1902 "Kinetische Theorie des ...
  • Einstein 1902 "Thermodynamische Theorie der...
  • Einstein (year unknown) "Ein den Elementarprozess der...
  • Unknown author - unknown year "hello...

The autogenerated keys would be "Einstein1902", "Einstein1902a", "Einstein", "". The problem is that "Einstein1902" will try to autolink both 1902 papers. The "Einstein" will try to autolink all three. An the one with the empty key will try to autolink all of the papers.

I think it would be good to have save defaults.

For myself I adjusted the autolink regex so that it checks for a whitespace or dot after the bibtex key - I think that might be a saver default.
However the case of empty keys still should be treated.

@Siedlerchr
Copy link
Member

There is an option to autolink files only with exact matches. That should help in your case.
Regarding empty key, this should not happen

@bdcaf
Copy link
Author

bdcaf commented Nov 29, 2017

@Siedlerchr That would require renaming all the files to just bibtexkey and extension. Having a little more info is nice. It's clear that I can tune it to my liking. However I would argue that the defaults should be free from such pitfalls.

@tobiasdiez
Copy link
Member

I also think there is room for improvement, especially since we get quite a few "bug reports" based on this behavior. I would suggest that only files are linked that start with the key and the key is followed by some non-alphanumeric character, ie. Einstein1902-something is matched but Einstein1902something is not.

@AEgit
Copy link

AEgit commented Nov 30, 2017

The names of the files I autolink either strictly follow the bibtexkey or have the bibtexkey and an extension that follows this pattern (I'm usually using this to autolink supplementary material): Einstein1902_My_extension

I just wanted to let you know about it, as changing the default behaviour might result in unexpected behaviour for users like me.

@Siedlerchr
Copy link
Member

Thank you for reporting this issue. We think, that is already fixed in our development version and consequently the change will be included in the next release.

We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants