git.iko.soy/typeable/pandoc
on master help sign in
EPUB writer: include title page in landmarks.
7199d68John MacFarlane
src/Text/Pandoc/Writers/EPUB.hs+7−2
@@ -825,7 +825,12 @@ pandocToEPUB version opts doc = do
825 [ unode "h1" ! [("id","toc-title")] $ tocTitle
825 [ unode "h1" ! [("id","toc-title")] $ tocTitle
826 , unode "ol" ! [("class","toc")] $ tocBlocks ]]
826 , unode "ol" ! [("class","toc")] $ tocBlocks ]]
827 let landmarkItems = if epub3
827 let landmarkItems = if epub3
828+ then unode "li"
829+ [ unode "a" ! [("href",
830+ "text/title_page.xhtml")
831+ ,("epub:type", "titlepage")] $
832+ ("Title Page" :: String) ] :
828− then [ unode "li"
833+ [ unode "li"
829 [ unode "a" ! [("href", "text/cover.xhtml")
834 [ unode "a" ! [("href", "text/cover.xhtml")
830 ,("epub:type", "cover")] $
835 ,("epub:type", "cover")] $
831 ("Cover" :: String)] |
836 ("Cover" :: String)] |
@@ -834,7 +839,7 @@ pandocToEPUB version opts doc = do
834 [ unode "li"
839 [ unode "li"
835 [ unode "a" ! [("href", "#toc")
840 [ unode "a" ! [("href", "#toc")
836 ,("epub:type", "toc")] $
841 ,("epub:type", "toc")] $
837− ("Table of contents" :: String)
842+ ("Table of Contents" :: String)
838 ] | writerTableOfContents opts
843 ] | writerTableOfContents opts
839 ]
844 ]
840 else []
845 else []
test/command/5986.md+2−1
@@ -6,7 +6,8 @@
6<p><span id="nav.xhtml"></span></p>
6<p><span id="nav.xhtml"></span></p>
7<nav type="landmarks" id="landmarks" hidden="hidden">
7<nav type="landmarks" id="landmarks" hidden="hidden">
8<ol>
8<ol>
9+<li><a href="text/title_page.xhtml">Title Page</a></li>
9−<li><a href="#nav.xhtml#toc">Table of contents</a></li>
10+<li><a href="#nav.xhtml#toc">Table of Contents</a></li>
10</ol>
11</ol>
11</nav>
12</nav>
12<p><span id="ch001.xhtml"></span></p>
13<p><span id="ch001.xhtml"></span></p>