From b1b2f131eba5a5df1733d87e9b015f2316a74263 Mon Sep 17 00:00:00 2001 From: Omikhleia Date: Sat, 20 Jul 2024 10:31:00 +0200 Subject: [PATCH] fixup! feat(packages): Use experimental CSL renderer for BibTeX --- packages/bibtex/support/bib2csl.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/bibtex/support/bib2csl.lua b/packages/bibtex/support/bib2csl.lua index 7065622b9..4d1befc4d 100644 --- a/packages/bibtex/support/bib2csl.lua +++ b/packages/bibtex/support/bib2csl.lua @@ -133,7 +133,14 @@ local function bib2csl (entry) -- BibTeX number and issue -- Tricky, see https://github.com/JabRef/jabref/issues/8372#issuecomment-1023768144 -- Still not sure this is completely corect below. - if bibtex.number and bibtex.issue then + if bibtex.series then + -- Series use number + -- BibLaTeX says number is for the series number on books, etc. + -- It says something about articles in a series, not implemented here... + csl['collection-title'] = bibtex.series + csl['collection-number'] = bibtex.number + csl.issue = bibtex.issue + elseif bibtex.number and bibtex.issue then -- Both present, take both and hope the CSL style knows what to do csl.number = bibtex.number csl.issue = bibtex.issue @@ -160,15 +167,12 @@ local function bib2csl (entry) -- Pages csl.page = bibtex.pages - -- journaltitle / booktitle / series + -- journaltitle / booktitle if bibtex.journaltitle then csl['container-title'] = bibtex.journaltitle elseif bibtex.booktitle then csl['container-title'] = bibtex.booktitle end - if bibtex.series then - csl['collection-title'] = bibtex.series - end -- publisher / institution / school / organization if bibtex.publisher then