zepinglee/citeproc-lua

cannot change line spacing in bibliography

jpjoines opened this issue · 2 comments

Describe the bug
The "References" generated by \printbibliography are always double-spaced regardless of which options I use with package setspace. I need them to be single-spaced.

Additional information

  • TeX distribution: TeX Live 2024
  • Package citation-style-language version: 0.4.8
  • LaTeX engine: lualatex

To Reproduce

\documentclass[twoside]{article}

\usepackage{setspace}

\usepackage{citation-style-language}
  \cslsetup{style = apa}
  \addbibresource{mwe-bib-spacing.json}

\begin{document}
  First, citing a first paper \cite{forbes-1887-Bull.PeoriaSci.Assoc.}.  Then, citing a second paper \cite{cowles-1899-Bot.Gaz.}.  Finally, citing a third paper and final paper \cite{cooper-1913-BotanicalGazette}.  This paragraph is now long enough to see that it is single-spaced, but the bibliography below is double-spaced.

\singlespacing
\printbibliography

\end{document}

Contents of mwe-bib-spacing.json:

[
  {"id":"cooper-1913-BotanicalGazette","accessed":{"date-parts":[["2014",11,17]]},"author":[{"family":"Cooper","given":"William S."}],"citation-key":"cooper-1913-BotanicalGazette","container-title":"Botanical Gazette","container-title-short":"Botanical Gazette","ISSN":"0006-8071","issue":"3","issued":{"date-parts":[["1913",3,1]]},"page":"189-235","source":"JSTOR","title":"The climax forest of Isle Royale, Lake Superior, and its development. III","type":"article-journal","URL":"http://www.jstor.org/stable/2468507","volume":"55"},
  {"id":"cowles-1899-Bot.Gaz.","accessed":{"date-parts":[["2011",11,1]]},"author":[{"family":"Cowles","given":"Henry Chandler"}],"citation-key":"cowles-1899-Bot.Gaz.","container-title":"Botanical Gazette","ISSN":"0006-8071","issue":"2","issued":{"date-parts":[["1899",2,1]]},"note":"ArticleType: research-article / Full publication date: Feb., 1899 / Copyright © 1899 The University of Chicago Press","page":"95-117","source":"JSTOR","title":"The ecological relations of the vegetation on the sand dunes of Lake Michigan. Part I. Geographical relations of the dune floras.","type":"article-journal","URL":"http://www.jstor.org/stable/2465177","volume":"27"},
  {"id":"forbes-1887-Bull.PeoriaSci.Assoc.","author":[{"family":"Forbes","given":"Stephen A."}],"citation-key":"forbes-1887-Bull.PeoriaSci.Assoc.","container-title":"Bulletin of the Peoria Scientific Association","issued":{"date-parts":[["1887"]]},"page":"77-87","title":"The lake as a microcosm","type":"article-journal"}
]

Thanks for your feedback and I can reproduce that.

Unlike BibTeX or biblatex, the CSL has a configurable line-spacing option for the bibliography and it has higher priority than the format outside \printbibliography. line-spacing=2 is set in apa.csl and Thus \singlespacing here doesn't have effects. You can set the line spacing inside bibliography by \cslsetup {bib-font = \singlespacing} or \cslsetup {bib-font = \linespread{1}} without setspace package.

<bibliography hanging-indent="true" et-al-min="21" et-al-use-first="19" et-al-use-last="true" entry-spacing="0" line-spacing="2">

Thank you so much for your help. I completely missed the bib-font option to cslsetup in the documentation.