Closed koppor closed 1 year ago
What's your citaiton key pattern?
Default [auth][year] pattern generates:
@TechReport{Artemenko2019,
title = {The Industrial Reference Architecture ({iRefA}) -- Description and User Guidance for System Architects},
editor = {Alexander Artemenko and others},
year = {2019},
}
It could be the heuristics for companies/entities/organizations as well. It might get triggered (because only one name) and dislike the capitalization
Hi, I'd like to contribute to fix the issue. I already have a fix idea that already make the AuthorListParserTest.java
to be executed successfully. I only would to ask which Test Case should I execute in order to verify that the correct citation is generated:
@TechReport{Artemenko2019,
title = {The Industrial Reference Architecture ({iRefA}) -- Description and User Guidance for System Architects},
editor = {Alexander Artemenko and others},
year = {2019},
}
Thanks, regards.
@morganteg That sounds great! I hope I understood you right, I think it should be sufficient to add a test case to CitationKeyGeneratorTest in addition to the AuthorListParserTest
Yes, many thanks! I added the following test that should correctly test the issue:
@Test
void generateKeyCorrectKeyWithAndOthersAtTheEnd() {
BibEntry entry = createABibEntryAuthor("Alexander Artemenko and others");
entry.setField(StandardField.YEAR, "2019");
assertEquals("Artemenko2019", generateKey(entry, "[auth][year]"));
}
If you agree, I will create a Pull Request with my changes.
Regards.
Yes that looks good! Go ahead!
Citation Key generator is probably authorsAlpha
. All keys are listed at https://docs.jabref.org/setup/citationkeypatterns#special-field-markers. Test class is /src/test/java/org/jabref/logic/citationkeypattern/CitationKeyGeneratorTest.java#L27.
Why is
Ao2019TR
generated as BibTeX key and notArtmenko
? The AuthorListParser is broken!