Skip to content

Commit

Permalink
fixup! feat(packages): Use experimental CSL renderer for BibTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
Omikhleia authored and Didier Willis committed Jul 20, 2024
1 parent 330cd9d commit b1b2f13
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/bibtex/support/bib2csl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b1b2f13

Please sign in to comment.