View Single Post
Old 09-14-2008, 12:53 PM   #9
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
To make testing easier, here is a simple file:

Code:
<html>
<head>
<guide>
  <reference type="toc" title="Contents" href="#contents"></reference>
</guide>
</head>
<body>

<a name="contents"/>
<h1>CONTENTS</h1>
<a href="#chapter1">Chapter 1</a><br/>
<a href="#chapter2">Chapter 2</a><br/>

<mbp:pagebreak/>
<a name="preface"/>
<p>This is some text before the first chapter.</p>

<mbp:pagebreak/>
<a name="chapter1"/>
<h1>CHAPTER 1</h1>
<p>This is the first chapter.</p>

<mbp:pagebreak/>
<a name="chapter2"/>
<h1>CHAPTER 2</h1>
<p>This is the second chapter.</p>

</body>
</html>
If I've not made any error (I haven't yet tried with this file), if this is converted to mobipocket with html2mobi and then opened in the Cybook, the "Start Reading" menu entry will point to #chapter1.

If I want it to point to #preface, I have either to add a new guide entry with a title (which will not be affected by UI language), or add a link to it in the toc:

Code:
<reference type="other.ms-firstpage" title="Start Reading" href="#preface"></reference>
or

Code:
<h1>CONTENTS</h1>
<a href="#preface"/>
<a href="#chapter1">Chapter 1</a><br/>
<a href="#chapter2">Chapter 2</a><br/>
Note that this last option, with an empty link, actually seems to work, and when browsing the links in the toc with the up/down keys this "phantom" link is ignored. So, I think for the moment this is the best solution.

But if I want the "Start Reading" entry to point to "#chapter2", I think the only solution is adding a guide item... but I would probably add it with blank title:

Code:
<reference type="other.ms-firstpage" title="" href="#preface"></reference>
Does this make any sense?
Jellby is offline   Reply With Quote