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

CSL styles do not take CrossRef fields into account #7378

Closed
Siedlerchr opened this issue Jan 22, 2021 · 6 comments · Fixed by #8454
Closed

CSL styles do not take CrossRef fields into account #7378

Siedlerchr opened this issue Jan 22, 2021 · 6 comments · Fixed by #8454
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs entry-preview

Comments

@Siedlerchr
Copy link
Member

Bug report from the Forum

I have the following entries in my bibliography:

@InCollection{smit2021,
author = {Smith, Bob},
title = {An article},
pages = {1-10},
crossref = {jone2021},
}
 @Book{jone2021,
editor = {Jones, John},
 publisher = {Great Publisher},
 title = {A book},
 year = {2021},
address = {Somewhere},
 }

When using the default entry preview (“Customized preview style”), the preview includes information from the cross-referenced entry:

InCollection (smit2021)

Smith, Bob
An article
2021

Jones, John (Ed.)
Great Publisher: Somewhere
p. 1-10

But if I try other preview styles, there is no information from the cross-referenced entry. For example, this is what I get from the APA 7th edition style (and I’ve seen the same thing in other styles):

Smith, B. An article (pp. 1–10).

Is it only possible to show the information from the cross-referenced entry in the customized preview style?

Thanks

FIX:
Should be getResolvedFieldOrAlias

for (Field key : bibEntry.getFieldMap().keySet()) {
bibEntry.getField(key)

@Siedlerchr Siedlerchr added good first issue An issue intended for project-newcomers. Varies in difficulty. entry-preview bug Confirmed bugs or reports that are very likely to be bugs and removed good first issue An issue intended for project-newcomers. Varies in difficulty. labels Jan 22, 2021
@Siedlerchr
Copy link
Member Author

Turns out it's not so easy to solve beause we need a library/bibdatasecontext

@jspitz
Copy link

jspitz commented Apr 17, 2021

Same for xdata-inherited fields with biblatex.

@Siedlerchr
Copy link
Member Author

Update (Noe for implementaiton): It should be possible to pass down the bibdatabasecontext to the CitationStyleGenerator methods. We already get a bibdatabasecontext in the generatePreview.
MIght be relevant for #8372

@Siedlerchr
Copy link
Member Author

Smith, B. (2021). An article (J. Jones, Ed.; pp. 1–10). Great Publisher.

@Siedlerchr Siedlerchr self-assigned this Jan 23, 2022
Siedlerchr added a commit that referenced this issue Jan 23, 2022
Fixes #7378

Add new test
Fix existing test
Siedlerchr added a commit that referenced this issue Jan 28, 2022
* experiment with crossref

* Support CrossRef in CSL

Fixes #7378

Add new test
Fix existing test

* add removed options

* fix checkstyle

* fix checkstyle

* try to enrich entrytype
todo  need db context

* use bibdatabsecontext

* use either allFields of the entry type or the current fields
add tests for issue and number

modify example tobe able to distinguish between issue and number

* fix architecuture violation
fix tests

* fix architecture violation and checkstyle

* fuu checkstyle

* seems like checkstyle doesn't like the plus in front

* finally

* Move single menu entry to menu above

* test number and issue

* fix l10n

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
@koppor koppor moved this to Done in Prioritization Nov 10, 2022
@jspitz
Copy link

jspitz commented Feb 8, 2024

Same for xdata-inherited fields with biblatex.

Just want to note that this still does not work (JabRef 5.12).

@jspitz
Copy link

jspitz commented Feb 8, 2024

Same for xdata-inherited fields with biblatex.

Just want to note that this still does not work (JabRef 5.12).

I have now singled this out at #10865.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs entry-preview
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants