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 JabRef#626
Remove the statement "and others" at the end of authors list in order to generate a correct citation key.

Compulsory checks

Preview Give feedback

@morganteg morganteg marked this pull request as ready for review March 28, 2023 14:26
@morganteg morganteg requested a review from Siedlerchr March 28, 2023 14:37
@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
@koppor koppor force-pushed the fix-for-issue-626 branch from f66a109 to eb50c41 Compare April 24, 2023 22:14
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.
@koppor koppor force-pushed the fix-for-issue-626 branch from eb50c41 to c81e58e Compare April 24, 2023 22:54
@calixtus calixtus merged commit 21105b1 into JabRef:main Apr 24, 2023
@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
@koppor koppor mentioned this pull request Nov 3, 2024
7 tasks
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