-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Regex of University Institution too broad for citekey generation #6942
Comments
The regex matches anything that starts with |
I am by no means an expert on these issues, but my thoughts are,
Oupsie. That is my fault, jabref/src/main/java/org/jabref/logic/citationkeypattern/BracketedPattern.java Lines 466 to 470 in c225533
the LatexToUnicodeAdapter will interpret the {(...)} as a code-block, which gets resolved to (...) , which is likely what is going wrong, as it won't be detected as an abbreviation anymore.
I believe the name is being parsed around
I'd be hesitant against making it too specific as well. I don't really know what a good solution to this is. I'd consider |
@tmrd993 are you looking into this issue? |
Adds a note on generating institution keys. Uses the example given in JabRef/jabref#6942
Adds a note on generating institution keys. Uses the example given in JabRef/jabref#6942
Thanks to @k3KAW8Pnf7mkmdSMPHz27 this should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version. |
Mandatory: I have tested the latest development version from http://builds.jabref.org/master/ and the problem persists
Steps to reproduce the behavior:
uni
(see below for example)citekey
as an institution with default settingsExpected Behavior
Generate the
citekey
as a regular institution abbrevationObserved Behavior
citekey
is generated as a "University" citekey beginning withUni
and adding a short form of the abbrevation afterwardsAlternative Behavior
Make use of the
shortauthor
field if present for that entry.biblatex-apa
for example uses this field as the institution abbrevation, so if wished, one can add the shortauthor field to the respective entrytypes.Longer description:
I tried to add the following two entries and let Jabref generate the
citekey
automatically.I did not understand why the automatically generation would work for the ICAO entry but would not work for the EASA field (I would have been okay with having EUASA as the
citekey
, as I was aware that the automatic abbrevation would have used the U in the initials of the name). Insted, a completely different key was generated.I tried to pinpoint the issue and stumbled upon this Regex in the key generation for institutions in brackets.
jabref/src/main/java/org/jabref/logic/citationkeypattern/BracketedPattern.java
Lines 70 to 79 in 129c36e
To me, the Regex seems a bit broad but maybe this was on purpose. If so, I would be happy if there was an option to somehow have a setting to use the optional shortauthor field if present.
Unfortunately, I'm not skilled enough to implement a fix in a PR but I wanted to point out that this might be an issue.
If someone asks: I do not use the suggested institution abbrevation mentioned here as this messes with the institution abbrevation in the
biblatex-apa
package which uses the shortauthor. And even with an added abbrevation behind the full name, the citekey is still wrong.The text was updated successfully, but these errors were encountered: