aboutsummaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/default.latex23
-rw-r--r--data/templates/styles.html24
2 files changed, 43 insertions, 4 deletions
diff --git a/data/templates/default.latex b/data/templates/default.latex
index d6cca9c98..31327c1d8 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -368,10 +368,25 @@ $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}[3] % #1 hanging-ident, #2 entry sp
+ {% 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 line spacing
+ % set entry spacing
+ \ifnum #2 > 0
+ \setlength{\parskip}{#3\baselineskip}
+ \fi
+ }%
+ {}
+\usepackage{calc} % for \widthof, \maxof
+\newcommand{\CSLBlock}[1]{#1\hfill\break}
+\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\maxof{\widthof{#1}}{\csllabelwidth}}{#1}}
+\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth}{#1}}
+\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$
$if(title)$
diff --git a/data/templates/styles.html b/data/templates/styles.html
index b179d4871..3d7ebb55d 100644
--- a/data/templates/styles.html
+++ b/data/templates/styles.html
@@ -121,3 +121,27 @@ $endif$
$if(displaymath-css)$
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
$endif$
+$if(csl-css)$
+div.csl-bib-body { }
+div.csl-entry {
+ clear: both;
+$if(csl-entry-spacing)$
+ margin-bottom: $csl-entry-spacing$;
+$endif$
+}
+.hanging div.csl-entry {
+ margin-left:2em;
+ text-indent:-2em;
+}
+div.csl-left-margin {
+ min-width:2em;
+ float:left;
+}
+div.csl-right-inline {
+ margin-left:2em;
+ padding-left:1em;
+}
+div.csl-indent {
+ margin-left: 2em;
+}
+$endif$