Closed ThiloteE closed 2 months ago
Additional Info: Documentation of the current OpenOffice integration code:
Additional Info: How JabRef currently uses CSL:
JabRef currently uses CSL for the Entry Preview in the entry-editor. The style can be chosen in the preferences.
Entry-Preview (as separate tab):
Preferences:
JabRef uses Citeproc java by Michel-Kraemer. Citeproc-java is a Citation Style Language (CSL) processor for Java. It interprets CSL styles and generates citations and bibliographies.
Some hints on the code: JabRef calls the UNO API of LibreOffice to insert formatted text into the Writer Document. Roughly the approach is as follows for this here as well:
A difference: JabRef's jstyle format also controls the formatting of the in text citation and if it should be author year or numeric This needs to be considered as well. Therefore, I would suggest starting with the formatting of the list of references.
The documentation «Documentation of the current OpenOffice integration code» link is a 404, is this the current location?
The documentation «Documentation of the current OpenOffice integration code» link is a 404 [...]
@iandol thx, I fixed it.
This seems to be the main function that needs to be called to insert html formated text: https://github.com/JabRef/jabref/blob/cbf99ec7e6eb1c627dae6af44931998eefbca59c/src/main/java/org/jabref/model/openoffice/ootext/OOTextIntoOO.java#L100-L131
This is the class the currently generates our custom JStyle format export layout: https://github.com/JabRef/jabref/blob/27a22af6eb400d4e2fe2b7c49c3baf05c9e3e221/src/main/java/org/jabref/logic/openoffice/style/OOBibStyle.java#L58
Some additional stuff. Citeproc-java can render both the citation and the bibliography (list of references)
Current state: JabRef only renders the bibliography
JabRef's CSLAdapter class needs to be extended to support making the citation as well, but that is simple:
cslInstance.makeCitation( id )
where id would be the citation key
This issue here is supposed to be for students and tries to explain the issue more clearly and broader as is done in the original issue (#2146). It also aims at preventing external CSL maintainers from being spammed with too many unnecessary JabRef related messages and requests.
Background info:
For the OpenOffice (OO) and LibreOffice (LO) integration, JabRef offers to format citations in various Styles. These styles are also referred to as JStyles. They are used by importing OO/LO Style files into JabRef. Please check out JabRef's LO/OO documentation for further information.
Problems:
Solution:
Support Citation Style Language (CSL) Styles in the LO/OO integration as originally proposed in #2146. That means, users should be able to select CSL styles somewhere in the "select styles" dialogue of the OO/LO integration.
There could potentially be two tabs: One for CSL styles, a separate tab for Jstyles.