Add cursor area awareness (guards) to CSL citations
Reproducibility:
- Open JabRef and a LibreOffice Writer document
- Open
Chocolate.bibin JabRef - Connect to the running LO instance
- Select any JStyle
- Select any entry and cite it in the document
- Click anywhere in between the citation area (can be visualized by ctrl+f8)
- Select any other entry and try to cite
- Observe the following error ("the cursor is in a protected area"):
This guarding mechanism doesn't exist when the corresponding steps are carried out with CSL styles, which leads to broken citations:
Wish: Introduce it to CSL styles as well. Refs. https://github.com/JabRef/jabref/issues/11829 eventually.
Some more UX engineering - in the error dialog, the user doesn't have to be aware of an internal reference mark format like JR_cite_1_Corti_2009. Maybe change it to the same string used for the citation text.
Can I say that a document can only contain either CSL or JStyle citations?Or they can coexist in a doc?
Can I say that a document can only contain either CSL or JStyle citations?Or they can coexist in a doc?
Yes, they cannot co-exist
Seems to be another issue:
For CSL, a normal citation with multiple entries is inserted as a single reference mark, but in-text citation with multiple citations is still split into multiple separate reference marks.
Steps to reproduce:
- Use JStyle, cite serveral entries at the same time. Entries are inserted as a single reference mark.
- Use CSL, do step 1 again. It does not work for in-text citation
There also appears to be missing spaces in csl normal, multiple entries from your screenshot
Please open these two above as separate issues. They're good findings.
We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.
For any feedback, add a comment to the pull request at https://github.com/JabRef/jabref/pull/15728.
A pull request addressing the issue has been created. You can try out the pull request by following the steps at How to try out any JabRef pull request?.
For any feedback, add a comment to the pull request at https://github.com/JabRef/jabref/pull/15728.