Jabref: BibTeX Key Pattern results don't match with expectations

Created on 3 Mar 2017  路  6Comments  路  Source: JabRef/jabref


Hi!

I encounterd some unexpected behaviour in the creation of keys, I'm using JabRef 3.8.2 on windows 10 10.0 amd64 Java 1.8.0_121.

Steps to reproduce:

  1. In Preferences -> BibTeX key generator set the Default pattern field to [title][shorttitle]
  2. Generate the key, for example for the document in the screenshot

Based on the documentation on http://help.jabref.org/en/BibtexKeyPatterns I was expecting the following output:
For [title]: HeuristicsandUsabilityGuidelinesfortheCreationandEvaluationofFuninVideogames
For [shorttitle]: Heuristicsandusability

Intead I got Heuristicsandusabilityguidelinesforthecreationandevaluationoffuninvideogames
and Heuristicsusabilityguidelines.

image

Put the excerpt of the log file here

Most helpful comment

Cool thanks, I'll continue working on it then :)

I'm going to try to fix the shortTitle and title cases as well then before I create the pull request.
I'll try to see what the Google Guava does and if I can use it.

All 6 comments

Related to #2589

Since this is the second report regarding key patterns in a short time, maybe there are some general issues with key patterns at the moment.

Edit: I just saw that you attempted to fix #2589 but did not propose the fix in this repo. You are very welcome to do so!

Hey, thanks for the response :)

I was working on it but I noticed afterwards that @Siedlerchr was already working on it as well in this pull request, so I wasn't sure if I should continue.

Fixing the [shorttitle] option shouldn't be too hard, but I was unable to find where the [title] option is handled in the function makeLabel in the class BibtexKeyPatternUtil.

@RolfStarre Thanks for your interest, as I had not yet the time to investigate why the Google Guava solution does not really work as expected, you could take a look at it. Or we could use your solution, I saw that you already added a test for it... Feel free to propose your PR here.
We are always looking contributors...;)

Regarding the [title] option, it is handled implicity in the else-part where just the field content is returned:
return entry.getFieldOrAlias(val).orElse("");

Cool thanks, I'll continue working on it then :)

I'm going to try to fix the shortTitle and title cases as well then before I create the pull request.
I'll try to see what the Google Guava does and if I can use it.

This can be closed right?

Yup 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wujastyk picture wujastyk  路  37Comments

Codeberg-AsGithubAlternative-buhtz picture Codeberg-AsGithubAlternative-buhtz  路  32Comments

schniepp picture schniepp  路  50Comments

LyzardKing picture LyzardKing  路  62Comments

ilippert picture ilippert  路  34Comments