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

Fixes citation key generation when authors list has "and others" at t… #9703

Merged
merged 2 commits into from Apr 24, 2023

Conversation

morganteg
Copy link
Contributor

@morganteg morganteg commented Mar 26, 2023

…he end

Fixes koppor#626
Remove the statement "and others" at the end of authors list in order to generate a correct citation key.

Compulsory checks

Edit tasklist title
Beta Give feedback Tasklist Compulsory checks, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
    Options
  2. Tests created for changes (if applicable)
    Options
  3. Manually tested changed features in running JabRef (always required)
    Options
  4. Screenshots added in PR description (for UI changes)
    Options
  5. Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
    Options
  6. Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.
    Options

@morganteg morganteg marked this pull request as ready for review March 28, 2023 14:26
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 29, 2023
Siedlerchr
Siedlerchr previously approved these changes Mar 29, 2023
Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my side this looks good

@calixtus
Copy link
Member

Looks good codewise to me too, thank you very much. Please add now a changelog entry, shorten the PR title a little bit so it fits in the char limit of github and check the checklist in the PR description. Then we can merge!

@koppor
Copy link
Member

koppor commented Apr 1, 2023

It just came into my.mind that BibTeX uses "+" to indicate "and others". For instance at the LNI stye / authorsalpha. Can that be done here, too?

@ThiloteE
Copy link
Member

ThiloteE commented Apr 1, 2023

Tried this PR.

For citationkey pattern [auth][date]:

image

void generateKeyCorrectKeyWithAndOthersAtTheEnd() {
BibEntry entry = createABibEntryAuthor("Alexander Artemenko and others");
entry.setField(StandardField.YEAR, "2019");
assertEquals("Artemenko2019", generateKey(entry, "[auth][year]"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is OK here.

We need another test with [authors] and [authorsAlpha]. -- They are roughly explained at https://docs.jabref.org/setup/citationkeypatterns#special-field-markers.

  • [authors] -> Artemenko+
  • [authorsAlpha] -> A+ (as far as I know. Can you setup a short Latex MWE to check?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c8df469 (#9703)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[authshort]: The last name if one author is given; the first character of up to three authors' last names if more than one author is given. A plus character is added, if there are more than three authors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b107f0a (#9703)

@koppor koppor added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers status: changes required Pull requests that are not yet complete and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Apr 4, 2023
@Siedlerchr
Copy link
Member

What's the status here? @koppor is this good now?

@koppor
Copy link
Member

koppor commented Apr 15, 2023

My comments were not adressed yet. With my code proposals, it shold be easy to finalize the PR. Maybe you can to the follow up @Siedlerchr if it is too much for @morganteg for now?

@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 15, 2023
@koppor koppor marked this pull request as draft April 15, 2023 21:14
@koppor
Copy link
Member

koppor commented Apr 18, 2023

This PR is a follow up to #6300 (where @dextep probalby accidently added + to the set of unwanted characters org.jabref.logic.citationkeypattern.CitationKeyGenerator#DEFAULT_UNWANTED_CHARACTERS).

@koppor koppor added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes required Pull requests that are not yet complete labels Apr 18, 2023
@koppor koppor marked this pull request as ready for review April 18, 2023 09:53
morganteg and others added 2 commits April 25, 2023 00:53
…he end

JabRef#626
Remove the statement "and others" at the end of authors list in order to generate a correct citation key.
@calixtus calixtus merged commit 21105b1 into JabRef:main Apr 24, 2023
10 checks passed
@koppor koppor mentioned this pull request Apr 24, 2023
@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 27, 2023
@koppor koppor mentioned this pull request May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AuthorListParser broken for "and others"
5 participants