aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorShaun Attfield (shaun@victor) <heurist+git@gmail.com>2013-11-18 11:53:13 +0200
committerShaun Attfield (shaun@victor) <heurist+git@gmail.com>2013-11-18 11:53:13 +0200
commitd07dc971da0123149e751dff987cf9df1a55b75d (patch)
treee75f437f6acce1a09cf0c96c96fba2ce474bf076 /src/Text/Pandoc/Writers
parente690c87dc4c3ff79689d9a887a9b5e3bffbb5d37 (diff)
downloadpandoc-d07dc971da0123149e751dff987cf9df1a55b75d.tar.gz
Epub Writer: Add cover reference to guide element
Fixes an issue with calibre http://calibre-ebook.com/ putting the cover at the end of the book if the spine has linear="no". Apparently this is best practice for other converters as well. http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.6
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index ac0e7610c..ca69a0fd4 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -260,8 +260,10 @@ writeEPUB opts doc@(Pandoc meta _) = do
else "no")] $ ()) :
map chapterRefNode chapterEntries)
, unode "guide" $
- unode "reference" !
- [("type","toc"),("title",plainTitle),("href","nav.xhtml")] $ ()
+ [ unode "reference" !
+ [("type","toc"),("title",plainTitle),("href","nav.xhtml")] $ () ]
+ ++ [ unode "reference" !
+ [("type","cover"),("title","Cover"),("href","cover.xhtml")] $ () ]
]
let contentsEntry = mkEntry "content.opf" contentsData