View Single Post
Old 09-18-2012, 07:51 AM   #1
Tugger
Connoisseur
Tugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongue
 
Posts: 91
Karma: 22222
Join Date: Jul 2012
Device: Kindle
Go to beginning/start - *not* solved after all

I believe I have completely solved the problem of making Kindle devices go to the correct start position when opening a book. This start location is also jumped to using the go to beginning menu option.

My search for a solution found the following:
  • Many people have encountered this problem.
  • Amazon themselves don't know the answer. Their own sample books, including the "Kindle Format 8 Sample" jump to the wrong places.
  • Some solutions work for mobi7 but not for KF8. Now that the Kindle 3 Keyboard is being updated to make it KF8, the problem will become widespread.
  • Some solutions work when using the Previewer but not for the actual Kindle device.
  • Some solutions require the TOC to be in a separate file.
  • Some solutions almost work, jumping to the end of the page before or part way down the start page.

My aim was to come up with a solution which has none of the above problems, and now I will document it. It may look slightly odd, but do what I say and you will find it works. If it doesn't, please tell me. It would be good to have it confirmed that it works on a Kindle that does not yet have KF8, if you have an actual Kindle like that, please try it. (e.g. Kindle Keyboard still on version 3.3.)

I have attached a very small sample .mobi file, which you can try. It deliberately has the start position set to the top of chapter 2, so you can clearly see it is working. It includes a TOC. If you unpack the file, you have the whole source there in a zip file.

The solution
1. Edit the .xhtml file in the html folder.
Add "<a id="start" name="start"></a>" immediately before the first character of the heading of the start page. Example:
<p class="heading-2" id="toc-anchor-1"><a id="start" name="start"></a>Chapter 1</p>
Note that I really mean immediately, no other characters between the end of the string and the start of the heading text.

2. Edit the .opf file, adding a line to the <guide> section. Example of a typical guide section:
<guide>
<reference type="toc" title="Table of Contents" href="html/Test document.xhtml#toc"/>
<reference type="text" title="Beginning" href="html/Test document.xhtml#start"/>
</guide>

Hope that helps.

Quote:
Edited to say that while it worked for the text file attached, it is unreliable and often doesn't work. It also contains bad advice about putting the anchor inside the paragraph.
Attached Files
File Type: mobi Test KF8 start and fonts fixed.mobi (71.9 KB, 418 views)

Last edited by Tugger; 09-23-2012 at 06:32 PM.
Tugger is offline   Reply With Quote