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

Support CrossRef in CSL styles #8454

Merged
merged 19 commits into from
Jan 28, 2022
Merged

Support CrossRef in CSL styles #8454

merged 19 commits into from
Jan 28, 2022

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Jan 23, 2022

Fixes #7378 and also provides groundwork for any fix regarding #8372

Removed copy of CSL to ASCIIDOC, RTF and XSL_FO as these are no longer supported

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • 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.

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 23, 2022
@Siedlerchr
Copy link
Member Author

Failing fetcher test are not relevant (RFC the url format changed)

todo  need db context
@Siedlerchr Siedlerchr removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 25, 2022
* upstream/main:
  Bump h2-mvstore from 2.0.206 to 2.1.210 in /buildSrc (#8458)
  Bump mariadb-java-client from 2.7.4 to 2.7.5 (#8457)
  Bump com.github.andygoossens.modernizer from 1.6.1 to 1.6.2 (#8459)
  Bump mockito-core from 4.2.0 to 4.3.0 (#8460)
  Bump xmlunit-matchers from 2.8.3 to 2.8.4 (#8461)
  Improve error handling for browser extension (#8432)
* upstream/main:
  Made search button in Web search wider. Also skewed side panel titles to the left (#8463)
add tests for issue and number

modify example tobe able to distinguish between issue and number
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 27, 2022
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

Small wish added - otherwise LGTM!

factory.createMenuItem(StandardActions.COPY_CITATION_RTF, new CopyCitationAction(CitationStyleOutputFormat.RTF, dialogService, stateManager, clipBoardManager, taskExecutor, previewPreferences)),
factory.createMenuItem(StandardActions.COPY_CITATION_ASCII_DOC, new CopyCitationAction(CitationStyleOutputFormat.ASCII_DOC, dialogService, stateManager, clipBoardManager, taskExecutor, previewPreferences)),
factory.createMenuItem(StandardActions.COPY_CITATION_XSLFO, new CopyCitationAction(CitationStyleOutputFormat.XSL_FO, dialogService, stateManager, clipBoardManager, taskExecutor, previewPreferences)));
copyCitationMenu.getItems().add(
Copy link
Member

Choose a reason for hiding this comment

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

Can we add COPY_CITATION_HTML? - This is IMHO a proper replacement for RTF, ASCII_DOC, XSLFO

factory.createMenuItem(StandardActions.COPY_CITATION_HTML, new CopyCitationAction(CitationStyleOutputFormat.HTML, dialogService, stateManager, clipBoardManager, taskExecutor, previewPreferences)),

Copy link
Member Author

Choose a reason for hiding this comment

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

See two lines above, HTML has been already available

Copy link
Member

Choose a reason for hiding this comment

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

OK - I did not expect that being present in a different menu.

Can we merge it into one? The current sub menu has only one item!

grafik

New:

grafik

Copy link
Member

@ThiloteE ThiloteE left a comment

Choose a reason for hiding this comment

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

@Siedlerchr How can i help you? Sorry, at least ~90% of this pull request is something i would need to look up, though. It is above my current skill level.

BibEntry entry = new BibEntry(StandardEntryType.Article);
entry.setField(StandardField.AUTHOR, "Last, First and\nDoe, Jane");
entry.setField(StandardField.ISSUE, "7");
entry.setField(StandardField.ISSUE, "28");
Copy link
Member

Choose a reason for hiding this comment

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

Is this a typo? Issue x2. Above it says "withIssueAndNumber".

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh thanks for spotting! This was not intended.

Copy link
Member Author

@Siedlerchr Siedlerchr Jan 28, 2022

Choose a reason for hiding this comment

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

As you can now see at the tests, the bibtex number gets now rendered as Art no. This PR is the preparation for the other issue, as we now have complete database information

void testBiblatexWitNumber() {
BibEntry entry = new BibEntry(StandardEntryType.Article);
entry.setField(StandardField.AUTHOR, "Last, First and Doe, Jane");
entry.setField(StandardField.NUMBER, "7");
Copy link
Member

Choose a reason for hiding this comment

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

At the top you used "3" for number. Maybe here too?

@Siedlerchr Siedlerchr merged commit b16160e into main Jan 28, 2022
@Siedlerchr Siedlerchr deleted the passBibDatabaseToCSL branch January 28, 2022 17:27
Siedlerchr added a commit that referenced this pull request Jan 28, 2022
* upstream/main: (24 commits)
  Support CrossRef in CSL styles (#8454)
  Update FUNDING.yml (#8473)
  Update to Javafx 17.02 (#8470)
  Made search button in Web search wider. Also skewed side panel titles to the left (#8463)
  Bump h2-mvstore from 2.0.206 to 2.1.210 in /buildSrc (#8458)
  Bump mariadb-java-client from 2.7.4 to 2.7.5 (#8457)
  Bump com.github.andygoossens.modernizer from 1.6.1 to 1.6.2 (#8459)
  Bump mockito-core from 4.2.0 to 4.3.0 (#8460)
  Bump xmlunit-matchers from 2.8.3 to 2.8.4 (#8461)
  Improve error handling for browser extension (#8432)
  New Crowdin updates (#8451)
  Fix library tab exception when saving prefs (#8450)
  Rename Groups interface into Groups (#8449)
  New Crowdin updates (#8445)
  update snap url
  Update bug_report.yml for 5.5
  Show development information\n\n+semver: minor
  Release v5.5
  Update journal abbrev list
  New Crowdin updates (#8439)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSL styles do not take CrossRef fields into account
4 participants