mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
EPUB writer: include title page in landmarks.
Closes #6919. Note that the toc is also included if `--toc` is specified.
This commit is contained in:
@@ -825,7 +825,12 @@ pandocToEPUB version opts doc = do
|
||||
[ unode "h1" ! [("id","toc-title")] $ tocTitle
|
||||
, unode "ol" ! [("class","toc")] $ tocBlocks ]]
|
||||
let landmarkItems = if epub3
|
||||
then [ unode "li"
|
||||
then unode "li"
|
||||
[ unode "a" ! [("href",
|
||||
"text/title_page.xhtml")
|
||||
,("epub:type", "titlepage")] $
|
||||
("Title Page" :: String) ] :
|
||||
[ unode "li"
|
||||
[ unode "a" ! [("href", "text/cover.xhtml")
|
||||
,("epub:type", "cover")] $
|
||||
("Cover" :: String)] |
|
||||
@@ -834,7 +839,7 @@ pandocToEPUB version opts doc = do
|
||||
[ unode "li"
|
||||
[ unode "a" ! [("href", "#toc")
|
||||
,("epub:type", "toc")] $
|
||||
("Table of contents" :: String)
|
||||
("Table of Contents" :: String)
|
||||
] | writerTableOfContents opts
|
||||
]
|
||||
else []
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<p><span id="nav.xhtml"></span></p>
|
||||
<nav type="landmarks" id="landmarks" hidden="hidden">
|
||||
<ol>
|
||||
<li><a href="#nav.xhtml#toc">Table of contents</a></li>
|
||||
<li><a href="text/title_page.xhtml">Title Page</a></li>
|
||||
<li><a href="#nav.xhtml#toc">Table of Contents</a></li>
|
||||
</ol>
|
||||
</nav>
|
||||
<p><span id="ch001.xhtml"></span></p>
|
||||
|
||||
Reference in New Issue
Block a user