如何在TOC中设置章节中段条目

时间:2016-06-19 17:00:35

标签: epub3

如何在epub中设置TOC中的条目,链接到章节中的位置?我已经尝试了所有我能想到的东西,并且始终从epubcheck 3获取错误消息。

我的.opf包含

<item id="Chapt1" href="Stockmarket7.xhtml" media-type="application/xhtml+xml" />
<item id="Link1" href="Stockmarket7.xhtml#Link1" media-type="application/xhtml+xml" />
<item id="Link2" href="Stockmarket7.xhtml#Link2" media-type="application/xhtml+xml" />
<item id="Link3" href="Stockmarket7.xhtml#Link3" media-type="application/xhtml+xml" />
<item id="Link4" href="Stockmarket7.xhtml#Link4" media-type="application/xhtml+xml" />

这会在错误列表中创建大量类似于以下内容的条目:

<message>RSC-001, ERROR, [File 'Stockmarket7.xhtml#Link1' could not be found.], Stockmarket.epub</message>
   <message>RSC-001, ERROR, [File 'Stockmarket7.xhtml#Link2' could not be found.], Stockmarket.epub</message>
   <message>RSC-001, ERROR, [File 'Stockmarket7.xhtml#Link3' could not be found.], Stockmarket.epub</message>
   <message>RSC-001, ERROR, [File 'Stockmarket7.xhtml#Link4' could not be found.], Stockmarket.epub</message>

我的.ncx包含:

<navPoint id="Link1" playOrder="8"> <navLabel><text>Nasdaq and the Big Bang</text></navLabel> <content src="Stockmarket7.xhtml#Link1"/></navPoint>

内容页面有UL,包含:

<li id="Chapt1"><a href="Stockmarket7.xhtml#Chapt1">1 The Power of the Internet</a></li>
<li id="Link1"><a href="Stockmarket7.xhtml#Link1">Nasdaq and the Big Bang</a></li>
<li id="Link2"><a href="Stockmarket7.xhtml#Link2">The Internet opens the door wide</a></li>
<li id="Link3"><a href="Stockmarket7.xhtml#Link3">Not all has been positive</a></li>
<li id="Link4"><a href="Stockmarket7.xhtml#Link4">Playing the game</a></li>

我在互联网上找不到任何有用的东西。 谢谢 伊恩

1 个答案:

答案 0 :(得分:0)

Ian,

The opf manifest is just for listing the files in the container. You cannot point into the content file. These entries you want to show in the TOC must be added only to the NCX file.