06-17-2011, 01:42 AM | #1 |
Member
Posts: 10
Karma: 116
Join Date: May 2011
Device: Multiple
|
Book opens on wrong page
I am using Mobipocket Creator and Kindle Previewer, hand coded html and .ncx and .opf. Here is the manifest and guide section of my .opf:
<manifest> <item id="item1" media-type="text/x-oeb1-document" href="Wild%20Heart.html"></item> <item id="ncx" media-type="application/x-dtbncx+xml" href="TOC.ncx"></item> </manifest> <spine toc="ncx"> <itemref idref="item1"/> </spine> <tours></tours> <guide><reference type="toc" title="Contents" href="Wild%20Heart.html#toc"/></guide> I have a <a name="start"/> tag at the beginning of my "title page" and the toc follows after some other front material. When I open the book in the Kindle Previewer, it opens to a "page" just following the table of contents. As you can see, the TOC is internal (not a separate file). How do I control where the book opens? Thanks in advance for your help. Dan |
06-17-2011, 02:02 AM | #2 |
Member
Posts: 10
Karma: 116
Join Date: May 2011
Device: Multiple
|
I was able to solve my issue by adding a line to the <guide>
<guide> <reference type="start" title="Title Page" href="Wild%20Heart.html#start"/> <reference type="toc" title="Contents" href="Wild Heart.html#toc"/> </guide> The <reference type="start" was the trick. |
Advert | |
|
08-03-2011, 04:02 PM | #3 |
Member
Posts: 18
Karma: 12
Join Date: Aug 2011
Location: Washington, DC
Device: none
|
I'm stuck on the same problem, but adding a line doesn't seem to help. When I tell the Kindle file to go to the beginning, it goes to the very last page. How can I tell it the beginning is at the beginning?
Can a start line be a duplicate of another line in the guide? Can I tell it to start at the cover or the TOC for example? Thanks, Phyllis |
08-03-2011, 04:20 PM | #4 |
Member
Posts: 18
Karma: 12
Join Date: Aug 2011
Location: Washington, DC
Device: none
|
I added:
<reference type="start" title="Preface" href="Text/preface.xhtml"/> but the file ignores that and opens on the last page of the book. And choosing "Beginning" also takes me to the last page of the book. Any ideas? |
08-04-2011, 04:00 AM | #5 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Add the following to the "guide" section of your OPF file:
<reference type="other.ms-firstpage" title="Start Reading" href="book.html%23start_reading"></reference> and add to your file (called "book.html" above - change as appropriate) the anchor tag: <A name=start_reading></A> That will make the book open at the indicated point. |
Advert | |
|
08-04-2011, 09:43 AM | #6 |
Member
Posts: 18
Karma: 12
Join Date: Aug 2011
Location: Washington, DC
Device: none
|
Hey thanks,
I couldn't get that to work (still opened to the last chapter), but I discovered that it works if I remove any reference lines except the one for the first text I want to open. I had thought that I should include semantics for all the files but that doesn't work. I changed my guide so that it only has reference lines for the cover, table of contents, preface, and first page of text. I also tried it with just the cover, toc, and preface. In either one of those scenarios it opens to the first page of text (as my first page of text was just after the preface). It means the Kindle Previewer no longer has links to all the sections, but those links aren't on the actual device anyway as far as I can tell. Thanks, Phyllis |
08-04-2011, 12:05 PM | #7 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
No, you definitely don't include links to all your files in the "guide" section of the OPF; the file list goes in the "manifest" section of the OPF.
|
08-04-2011, 12:46 PM | #8 |
Member
Posts: 18
Karma: 12
Join Date: Aug 2011
Location: Washington, DC
Device: none
|
Thanks. Sadly I learned in a video on epubs that I should be adding semantics for all of them. Lot of misinformation out there...
|
08-04-2011, 12:48 PM | #9 |
Member
Posts: 18
Karma: 12
Join Date: Aug 2011
Location: Washington, DC
Device: none
|
I guess they say that because the Kindle Previewer does use them. If you add reference lines for all pages, they appear under "Go to" in Kindle Previewer. But as far as I can tell, they don't actually appear on the Kindle itself. Looks like the only Table of Contents on there is the HTML one that I add at the beginning. Does it use the toc.ncx file at all? Or is that only for epubs?
Thanks, Phyllis |
08-04-2011, 11:37 PM | #10 | |
Grand Sorcerer
Posts: 27,966
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
08-05-2011, 08:33 AM | #11 |
Member
Posts: 18
Karma: 12
Join Date: Aug 2011
Location: Washington, DC
Device: none
|
Good information on the toc.ncx! I noticed my first attempt doesn't work correctly if I try to page through it with the 5-way controller. I'll see if I can figure that out.
Also, I'm going through a book on EPUBs and notice that in this book the Guide section shows every page (with multiple pages having a type of "text") just like the video I watched on this (totally different authors). So I think I'm using a workaround by including only the first line semantically labeled as text (and ultimately I still don't really get how to mark the first page for Kindle). Perhaps Kindle requires this workaround? Thanks, Phyllis Last edited by phyllisj9; 08-05-2011 at 09:02 AM. |
08-05-2011, 09:46 AM | #12 | ||
Grand Sorcerer
Posts: 27,966
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
But if you're creating mobi's for the Kindle, there's just no reason to have anything in the guide section of the opf file that doesn't have to do with the TOC, Cover or Beginning. Because those are the only options that the Kindle interface provides from the "Go To" menu (besides being able to directly enter a location number). Quote:
Last edited by DiapDealer; 08-05-2011 at 09:57 AM. |
||
08-05-2011, 10:56 AM | #13 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
|
08-05-2011, 12:31 PM | #14 |
Member
Posts: 18
Karma: 12
Join Date: Aug 2011
Location: Washington, DC
Device: none
|
Hey! No, it didn't work. Well, the "Start Reading" link appeared, but the file still initially opened on the last chapter. But I think this other method works okay (where I specify only one page as text in the guide). And I found some other documentation that seems to support this idea that it should only be one page anyway (as you had said, but which other sources had disagreed with):
http://idpf.org/epub/20/spec/OPF_2.0...htm#Section2.6 Thanks, Phyllis |
08-05-2011, 02:52 PM | #15 |
Wizard
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
|
Phyllis, I'm afraid you're mixing apples with oranges. You're referring to the epub specification but you have to look for the mobi specification. They are similar but not the same.
Maybe you want to start here: http://www.mobipocket.com/dev/articl...eFolder=prcgen |
Tags |
kindle, mobipocket creator, open, toc |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-650 book re-opens on last page ??? prs-650 | cybmole | Sony Reader | 23 | 05-21-2011 10:15 AM |
Man Opens One-Book Bookstore | Dylrob | Lounge | 2 | 04-30-2011 11:59 AM |
Calibre opens wrong browser | brontus | Library Management | 0 | 02-11-2011 05:19 PM |
Tor.com opens a book store | igorsk | News | 9 | 06-21-2009 07:08 AM |
Always opens a previous book | Dunno | iRex | 3 | 12-25-2008 10:33 AM |