From b6f75f60d6a33d85839f8bec09c044a766d2caaa Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 24 Mar 2013 23:06:44 -0700 Subject: EPUB writer: Don't put blank title page in reading sequence. Set linear="no" if no title block. Addresses #797. --- src/Text/Pandoc/Writers/EPUB.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index e875a0649..f7385894b 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -242,7 +242,10 @@ writeEPUB opts doc@(Pandoc meta _) = do Nothing -> [] Just _ -> [ unode "itemref" ! [("idref", "cover"),("linear","no")] $ () ] - ++ ((unode "itemref" ! [("idref", "title_page"),("linear","yes")] $ ()) : + ++ ((unode "itemref" ! [("idref", "title_page") + ,("linear", case meta of + Meta [] [] [] -> "no" + _ -> "yes")] $ ()) : (unode "itemref" ! [("idref", "nav") ,("linear", if writerTableOfContents opts then "yes" -- cgit v1.2.3