For a while, JabRef uses Citation Style Language files to display entry previews (you can select among a very long list of citations styles in Options -> Preferences, Tab Entry Preview). And for your LaTeX documents, you had to rely on BibTeX or biblatex.
Thanks to a new LaTeX package, it is now possible to use CSL files within LaTeX documents to format your bibliography. So, from now on, you may use the exact same style in JabRef and in LaTeX.
As far as i can see, the package uses a CSL lua converter, which is different from the one Jabref currently uses: citeproc-java by Michel-Kraemer. This means, the formatting and rendering within Jabref may slightly differ from the rendering and formatting provided by LaTeX CSL package. This difference may be something for the docs.
The getting started example given in the documentation shows your bibliography being saved as a .json file and if so, it seems to be quite easy to use.
It is not yet clear to me, if it works with a .bib file. Jabref is .bib native and lacks an export to .json , but maybe the following procedure could work?
Other engines For engines other than LuaTeX, the citeproc executable is required to
run on the .aux file to generate the citations and bibliography. The general procedure is
similar to the traditional BibTeX workflow.
Run latex on example.tex.
Run citeproc on example.aux. The engine reads the .csl style, CSL locale files,
and .bib database and then writes the processed citations and bibliography to
example.bbl.
Run latex on example.tex. The .bbl file is loaded and all the citations and bibli-
ography are printed.
In LaTeX the aux file contains all the references you actually used in your tex document (PS JabRef can parse it and create a new library based on aux files)
So I guess the csl-parser uses that as a starting point
It works not only theoretically, but practically as well
Minimum working example:
\documentclass[12pt,a4paper]{article}
\usepackage{citation-style-language}
\cslsetup{
style = apa,
}
\addbibresource{bibliography.bib}
\begin{document}
test \cite[p. 23-24]{Glass20210607PGP, Glass20210607PGP}.\\
test 2 \cite[p. 23]{Glass20210607PGP} test.\\
test 3 \cite[whatever]{Glass20210607PGP} test.\\
\printbibliography
\end{document}
Here the bibliographic data:
@Article{Glass20210607PGP,
author = {Glass, Nicola},
date = {2021-06-07},
title = {Proteste Gegen Putschisten – Widerstand in Den Nachbarländern Myanmar Und Thailand},
doi = {10.11588/XAREP.00004477},
url = {http://crossasia-repository.ub.uni-heidelberg.de/4477/},
urldate = {2021-09-08},
file = {:Glass (2021) Proteste gegen Putschisten - Widerstand in Maynmar und Thailand.pdf:PDF},
keywords = {Political science, FOS: Political science, Military science},
publisher = {Heidelberg University Library},
urn = {urn:nbn:de:bsz:16-crossasiarep-44775},
}
Although i have to admit there really seem to be a lot of packages that are (not yet?) compatible with the csl-package. I ran into a problem using the babel package right from the start. This simple line in the preamble crashed everything: \usepackage[english]{babel}.
Hyperref not working properly and Backref not working at all really is a bummer
Yes. The citation-style-language package redefines several commands related to bibliography (e.g., \cite, \bibitem, and their internal commands). Other packages modifying them are very likely to cause conflicts. The babel in this case redefines \bibitem and \bibcite and thus crashes. Currently I’ve patched babel, csquotes, and hyperref.
I’ve just implemented the hyperlinks of citations and backref.