-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
CSL4LibreOffice - E [Add re-distribution of numeric CSL citations] #11712
Conversation
@koppor @Siedlerchr Please merge this before 6.0-alpha release. |
I tested this PR. The only way that I found how to destroy its functionality was to select a numeric CSL style, to cite / cite-in-text and then to select the default numeric JStyle and cite / cite-in-text and then to delete some of the priorly cited references. Then pressed "Make/Sync Bibliography". This caused the JStyle reference list at the end of the document to update, but the CSL Style reference list to remain unchanged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your code currently does not meet JabRef's code guidelines.
We use OpenRewrite to ensure "modern" Java coding practices.
The issues found can be automatically fixed.
Please execute the gradle task rewriteRun
, check the results, commit, and push.
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "OpenRewrite".
Hey, thanks for trying out. Yes, the jstyle and csl style citation detection, parsing, bibliography section population and syncing pipelines are completely independent of each other and can't be (or rather isn't recommended to be) used together (one of the reasons being the reference mark format being different - Jstyles don't start with " |
I think it would be good to add this piece of information to the documentation. It is an edge case and not many people will use both csl and jstyle in one document, but when they do, they will run into this. |
Good idea. On my list. |
Yes, I opened an issue here for the CSL additions: JabRef/user-documentation#509. |
* Initial commit * Semi-fix: 0-based index * add method for getting multiple citations * Use XTextRangeCompare * Fix update order * Remove dead code, undo ai refactor changes * Fix remaining order issues, Remove dead code, undo ai refactor changes * Restore exceptions: UpdateCSLBibliography * Refine * Fix checkstyle * Remove experiment * Fix OOBibBase.java exceptions * Fix OpenOfficePanel.java exceptions * Fix adapter exception indent * Fix adapter exception order * Restore javadoc * Restore javadoc, remove dead code * Remove dead code * Improve implementation (general changes) * Change printStackTrace->Logger * Fix readExistingMarks() * Remove logs * Finish CSLReferenceMarkManager * openRewrite * fix unit test (std streams -> logger) * Redundant log * Safety, refactoring * Add log * Better log * Change log level (non-breaking) * Add handling for multiple entries * Better log * Restore javadoc * Restore javadoc * Use list instead of singleton * Adapt test * Add comment * Add stricter conditions for update * Add stricter conditions for reading * Make xtextcompare final * Null handling * Update javadoc * Refactor * Remove redundant condition * Fix non-numeric side effect * Enhance implementation * Add newline * Bug fix: no sync in refresh bibliography * fix logger openrewrite --------- Co-authored-by: Siedlerchr <[email protected]>
Fixes subhramit#22
Follow-up to #11521, #11577
sameLineTest.mp4
multiLineTest.mp4
groups.mp4
Limitations:
Fix does not work for grouped citations (it is a more difficult problem, refs. [WIP] CSL citations: Fix sync numbering #11688)(Solved)LibreOffice:[Ctrl-F8] orLibreOffice:[menu:View]/[Field Shadings]
) (refs. https://devdocs.jabref.org/code-howtos/openoffice/overview.html)Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)