diff --git a/README.md b/README.md index 86dcfaf..05c1f0b 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ I link e i riferimenti sono in nero di default, e possibile abilitare il colore #### Bibliografia -È possibile gestire la bibliografia attraverso il filtro [pandoc-citeproc][]. +È possibile gestire la bibliografia attraverso il flag `--citeproc`. #### Compilazione degli esempi Di seguito è riportato il comando utilizzato per compilare gli esempi forniti nella cartella samples. @@ -179,5 +179,3 @@ pandoc --template latekiss -o --top-level-division ch [pandoc-crossref]: https://lierdakil.github.io/pandoc-crossref/ -[pandoc-citeproc]: https://github.com/jgm/pandoc-citeproc - diff --git a/latekiss.tex b/latekiss.tex index b312533..31a31b1 100644 --- a/latekiss.tex +++ b/latekiss.tex @@ -246,6 +246,7 @@ $if(dir)$ \newenvironment{LTR}{\beginL}{\endL} \fi $endif$ + $if(natbib)$ \usepackage[$natbiboptions$]{natbib} \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} @@ -256,13 +257,33 @@ $for(bibliography)$ \addbibresource{$bibliography$} $endfor$ $endif$ +$if(nocite-ids)$ +\nocite{$for(nocite-ids)$$it$$sep$, $endfor$} +$endif$ $if(csl-refs)$ \newlength{\cslhangindent} \setlength{\cslhangindent}{1.5em} -\newenvironment{cslreferences}% - {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% - \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% - {\par} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing + {% don't indent paragraphs + \setlength{\parindent}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi + % set entry spacing + \ifnum #2 > 0 + \setlength{\parskip}{#2\baselineskip} + \fi + }% + {} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ +$if(csquotes)$ +\usepackage{csquotes} $endif$ \PassOptionsToPackage{