diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-05-17 20:43:41 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-05-17 20:46:49 -0700 |
commit | fa23effe2567183ec424feda55f507e27f50f7c8 (patch) | |
tree | cfb546d944b90762ae8f79fca269b912226ca308 /data | |
parent | 56fb4dae1ba2f6c28f561964249b89385d482f53 (diff) | |
download | pandoc-fa23effe2567183ec424feda55f507e27f50f7c8.tar.gz |
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.
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/default.latex | 6 |
1 files changed, 3 insertions, 3 deletions
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} |