EPUB writer: Don't put blank title page in reading sequence.

Set linear="no" if no title block.
Addresses #797.
This commit is contained in:
John MacFarlane 2013-03-24 23:06:44 -07:00
parent cb906e7512
commit b6f75f60d6

View file

@ -242,7 +242,10 @@ writeEPUB opts doc@(Pandoc meta _) = do
Nothing -> [] Nothing -> []
Just _ -> [ unode "itemref" ! Just _ -> [ unode "itemref" !
[("idref", "cover"),("linear","no")] $ () ] [("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") (unode "itemref" ! [("idref", "nav")
,("linear", if writerTableOfContents opts ,("linear", if writerTableOfContents opts
then "yes" then "yes"