From 7a5cb29319e6daae3ed1cf01a966ca3aac6bec22 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 17 Nov 2014 15:43:40 -0800 Subject: Really fix #1758. Add `id="cover"` to body on cover page. Not title page! --- data/templates | 2 +- src/Text/Pandoc/Writers/EPUB.hs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/templates b/data/templates index 7ff2baf59..c76c6c522 160000 --- a/data/templates +++ b/data/templates @@ -1 +1 @@ -Subproject commit 7ff2baf592ee4627da0ad1e5cec60e6be3de5785 +Subproject commit c76c6c52249118e49c5dd1b99fe916724350a590 diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 456158116..2291c7184 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -358,8 +358,9 @@ writeEPUB opts doc@(Pandoc meta _) = do Nothing -> return ([],[]) Just img -> do let coverImage = "media/" ++ takeFileName img - let cpContent = renderHtml $ writeHtml opts' - (Pandoc meta [RawBlock (Format "html") $ "
\n\"cover\n
"]) + let cpContent = renderHtml $ writeHtml + opts'{ writerVariables = ("coverpage","true"):vars } + (Pandoc meta [RawBlock (Format "html") $ "
\n\"cover\n
"]) imgContent <- B.readFile img return ( [mkEntry "cover.xhtml" cpContent] , [mkEntry coverImage imgContent] ) -- cgit v1.2.3