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

Citation Key Generator does not work as described #12312

Open
2 tasks done
lionfood opened this issue Dec 20, 2024 · 7 comments
Open
2 tasks done

Citation Key Generator does not work as described #12312

lionfood opened this issue Dec 20, 2024 · 7 comments
Labels
good second issue Issues that involve a tour of two or three interweaved components in JabRef keygenerator type: documentation

Comments

@lionfood
Copy link

JabRef version

Other (please describe below)

Operating system

GNU / Linux

Details on version and operating system

JabRef 6.0--2024-12-16--a3b2efb / openSUSE Leap 15.6

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Configure Citation Key Generator to use [authorsAlpha]
  2. Generate the citation key for an entry
  3. According to the documentation for [authorsAlpha] the following should hold:
    • One author: The first three letters of the last name
    • Two to four authors: The first letter of the last name of each author
    • More than four authors: The first letter of the first three authors' last name. A + is added at the end if it is not in the list of unwanted characters.
  4. Instead i get the following
    • One author: The first two letters of the last name (see Screenshot 1)
    • Two to four authors: The first letter of the last name of each author (the same as documented)
    • More than four authors: The first letter of the first four authors' last name. A + is not added at the end (and is not in the list of unwanted characters). (see Screenshot 2)

Appendix

Screenshots
  • Screenshot 1:
    Image

  • Screenshot 2:
    Image

Bib file
@InBook{Gre12,
  author     = {Grelck, Clemens},
  pages      = {207--278},
  publisher  = {Springer Berlin Heidelberg},
  title      = {Single Assignment C (SAC) High Productivity Meets High Performance},
  year       = {2012},
  isbn       = {9783642320965},
  booktitle  = {Central European Functional Programming School},
  doi        = {10.1007/978-3-642-32096-5_5},
  issn       = {1611-3349}
}

@Article{KAS+14,
  author     = {Kakkad, Vasvi and Attar, Saeed and Santosa, Andrew E. and Fekete, Alan and Scholz, Bernhard},
  journal    = {Software: Practice and Experience},
  title      = {Curracurrong: a stream programming environment for wireless sensor networks},
  year       = {2014},
  issn       = {1097-024X},
  month      = nov,
  number     = {2},
  pages      = {175--199},
  volume     = {44},
  doi        = {10.1002/spe.2165},
  publisher  = {Wiley}
}
@koppor
Copy link
Member

koppor commented Dec 24, 2024

@subhramit changed it in #11614.

You can check the current behavior at

(if Java code is OK)

Maybe you can (re-)join the discussion at #11614

I don't read out if you like the new behavior more or if you really like the old one more?

@subhramit
Copy link
Member

subhramit commented Dec 24, 2024

Hmm parts of the CSL project still remain to be documented. This, however, was not something I expected to find JabRef-specific documentation on (especially now that we follow a more universal standard).

Updates needed:

Image

  1. No "+" anymore
  2. Fix the numbers

@subhramit subhramit self-assigned this Dec 24, 2024
@lionfood
Copy link
Author

I don't read out if you like the new behavior more or if you really like the old one more?

Sorry for that.

I am more a fan of the old behavior. It allows me to better compare the references of my LaTeX documents (where I use the alpha style) and the JabRef database.

I would therefore like to ask whether it would be possible to reintegrate the old style into JabRef (this may of course be done under a different name).

@subhramit
Copy link
Member

subhramit commented Dec 24, 2024

I would therefore like to ask whether it would be possible to reintegrate the old style into JabRef (this may of course be done under a different name).

Yes, that can be done.

@koppor We are back to an old question again - two "AuthorsAlpha" then? This seems to be the simplest way.
The old one stays as it is (was) for the CitationKeyGenerator. The new one should be for internal use confined to the utility of DIN/LNI styles in LibreOffice.

@koppor
Copy link
Member

koppor commented Dec 25, 2024

The new one should be for internal use confined to the utility of DIN/LNI styles in LibreOffice.

The feature to generate citation keys should be available on all places where citation keys can be used. This included LibreOffice and the filename patterns.

Thus, we need two variants.

Maybe AuthorsAlpha and AuthorsAlphaV2?

@subhramit subhramit added the good second issue Issues that involve a tour of two or three interweaved components in JabRef label Dec 25, 2024
@subhramit subhramit removed their assignment Dec 25, 2024
@subhramit
Copy link
Member

Keeping this free to take for students. I'll come back to this in the next two weeks to if nobody takes it.

@subhramit
Copy link
Member

subhramit commented Dec 25, 2024

Implementation notes for anyone interested:

  1. Rename current authorsAlpha to authorsAlphaV2 (including tests) and replace its uses in OO classes to the V2.
  2. Revert Fix authorsAlpha #11614 (including tests). This will give us back the original authorsAlpha.
  3. Add an option to Citation Key generator so that [authorsAlphaV2] is available to use (for hints, see how current [authorsAlpha] is used there).
  4. Update documentation for [authorsAlphaV2] at https://docs.jabref.org/v5/setup/citationkeypatterns#special-field-markers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good second issue Issues that involve a tour of two or three interweaved components in JabRef keygenerator type: documentation
Projects
Status: Free to take
Development

No branches or pull requests

4 participants