aboutsummaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-01-09 11:33:47 -0800
committerJohn MacFarlane <[email protected]>2022-01-09 11:33:47 -0800
commitceb463e36ee5886befa12b7d2f026cbd2b6a7668 (patch)
treec72e087e807a7e97e8b5a0b96da52f17c69835e8 /data/templates
parent2e50c8d1378e911095918a42c04643d64946d554 (diff)
EPUB template improvements.
Include abstract in default template. Also ensure that the essential styles needed by pandoc (`styles.html` partial) are included in the templates. This is important for correct formatting of CSL bibliographies. Note that much of the styling in `styles.html` will be ignored for EPUB, because of the conditional on `document-css`, but if it is desired, you can set the `document-css` variable.
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/default.epub213
-rw-r--r--data/templates/default.epub313
2 files changed, 20 insertions, 6 deletions
diff --git a/data/templates/default.epub2 b/data/templates/default.epub2
index 685d10208..28de9c11b 100644
--- a/data/templates/default.epub2
+++ b/data/templates/default.epub2
@@ -6,11 +6,12 @@
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title>$pagetitle$</title>
-$if(highlighting-css)$
<style type="text/css">
-$highlighting-css$
- </style>
+ $styles.html()$
+$if(highlighting-css)$
+ $highlighting-css$
$endif$
+ </style>
$for(css)$
<link rel="stylesheet" type="text/css" href="$css$" />
$endfor$
@@ -45,6 +46,12 @@ $endif$
$if(rights)$
<div class="rights">$rights$</div>
$endif$
+$if(abstract)$
+<div class="abstract">
+<div class="abstract-title">$abstract-title$</div>
+$abstract$
+</div>
+$endif$
$else$
$if(coverpage)$
<div id="cover-image">
diff --git a/data/templates/default.epub3 b/data/templates/default.epub3
index fc4fa7620..19961ab13 100644
--- a/data/templates/default.epub3
+++ b/data/templates/default.epub3
@@ -5,11 +5,12 @@
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<title>$pagetitle$</title>
-$if(highlighting-css)$
<style>
-$highlighting-css$
- </style>
+ $styles.html()$
+$if(highlighting-css)$
+ $highlighting-css$
$endif$
+ </style>
$for(css)$
<link rel="stylesheet" type="text/css" href="$css$" />
$endfor$
@@ -45,6 +46,12 @@ $endif$
$if(rights)$
<div class="rights">$rights$</div>
$endif$
+$if(abstract)$
+<div class="abstract">
+<div class="abstract-title">$abstract-title$</div>
+$abstract$
+</div>
+$endif$
</section>
$else$
$if(coverpage)$