fix: Merge changes from pandoc 3.1.8 LaTeX template (#364)

Fixes https://github.com/Wandmalfarbe/pandoc-latex-template/issues/361

See https://github.com/jgm/pandoc/compare/3.1.7...3.1.8
This commit is contained in:
David Mehren 2023-11-25 12:04:06 +01:00 committed by GitHub
parent 8c48a175e2
commit 9a6d1e50fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -434,6 +434,9 @@ $if(csl-refs)$
\begingroup\def\citeproctext{#2}\cite{#1}\endgroup} \begingroup\def\citeproctext{#2}\cite{#1}\endgroup}
% avoid brackets around text for \cite: % avoid brackets around text for \cite:
\makeatletter \makeatletter
% allow citations to break across lines
\let\@cite@ofmt\@firstofone
% avoid brackets around text for \cite:
\def\@biblabel#1{} \def\@biblabel#1{}
\def\@cite#1#2{{#1\if@tempswa , #2\fi}} \def\@cite#1#2{{#1\if@tempswa , #2\fi}}
\makeatother \makeatother
@ -441,19 +444,23 @@ $if(csl-refs)$
\setlength{\cslhangindent}{1.5em} \setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth} \newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em} \setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacing} \newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing
\setlength{\cslentryspacing}{0em} {\begin{list}{}{%
\usepackage{enumitem} \setlength{\itemindent}{0pt}
\newlist{CSLReferences}{itemize}{1} \setlength{\leftmargin}{0pt}
\setlist[CSLReferences]{label={}, \setlength{\parsep}{0pt}
leftmargin=\cslhangindent, % turn on hanging indent if param 1 is 1
itemindent=-1\cslhangindent, \ifodd #1
parsep=\parskip, \setlength{\leftmargin}{\cslhangindent}
itemsep=\cslentryspacing} \setlength{\itemindent}{-1\cslhangindent}
\fi
% set entry spacing
\setlength{\itemsep}{#2\baselineskip}}}
{\end{list}}
\usepackage{calc} \usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break} \newcommand{\CSLBlock}[1]{\hfill\break#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} \newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} \newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} \newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$ $endif$
$if(lang)$ $if(lang)$