From fa23effe2567183ec424feda55f507e27f50f7c8 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 17 May 2021 20:43:41 -0700 Subject: LaTeX template: improve treatment of CSL entry-spacing. Previously with the default template settings (`indent` variable not set), we would get interparagraph spaces separating bib entries even with `entry-spacing="0"`. On the other hand, setting `entry-spacing="2"` gave ridiculously large spacing. This change makes the spacing caused by `entry-spacing` a multiple of `\parskip` by default, which gives aesthetically reasonable output. Those who want a larger or smaller unit (e.g. because they use `indent` which sets `\parskip` to 0) may `\setlength{\cslentryspacingunit}{10pt}` in header-includes to override the defaults. Closes #7296. --- data/templates/default.latex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'data') diff --git a/data/templates/default.latex b/data/templates/default.latex index 61402c605..60f9972c2 100644 --- a/data/templates/default.latex +++ b/data/templates/default.latex @@ -378,6 +378,8 @@ $if(csl-refs)$ \setlength{\cslhangindent}{1.5em} \newlength{\csllabelwidth} \setlength{\csllabelwidth}{3em} +\newlength{\cslentryspacingunit} % times entry-spacing +\setlength{\cslentryspacingunit}{\parskip} \newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing {% don't indent paragraphs \setlength{\parindent}{0pt} @@ -387,9 +389,7 @@ $if(csl-refs)$ \def\par{\hangindent=\cslhangindent\oldpar} \fi % set entry spacing - \ifnum #2 > 0 - \setlength{\parskip}{#2\baselineskip} - \fi + \setlength{\parskip}{#2\cslentryspacingunit} }% {} \usepackage{calc} -- cgit v1.2.3