Slight improvements to hanging indent code in latex template.

See jgm/pandoc-citeproc#410.
This commit is contained in:
John MacFarlane 2019-09-03 12:30:40 -07:00
parent 513058a24e
commit dc01071053

View file

@ -360,11 +360,14 @@ $for(bibliography)$
$endfor$
$endif$
$if(csl-refs)$
\newlength{\cslhangindent} % set up new length
\setlength{\cslhangindent}{$if(csl-hanging-indent)$2em$else$0em$endif$}
$if(csl-hanging-indent)$
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
$endif$
\newenvironment{cslreferences}%
{\everypar{\setlength{\hangindent}{\cslhangindent}}}%
{\par} % by default, this env does not change anything
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
{\par}
$endif$
$if(title)$