diff options
| author | John MacFarlane <[email protected]> | 2022-01-09 11:33:47 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-01-09 11:33:47 -0800 |
| commit | ceb463e36ee5886befa12b7d2f026cbd2b6a7668 (patch) | |
| tree | c72e087e807a7e97e8b5a0b96da52f17c69835e8 /data/templates | |
| parent | 2e50c8d1378e911095918a42c04643d64946d554 (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.epub2 | 13 | ||||
| -rw-r--r-- | data/templates/default.epub3 | 13 |
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)$ |
