Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 06-17-2011, 01:42 AM   #1
spiralpath
Junior Member
spiralpath doesn't litterspiralpath doesn't litter
 
Posts: 4
Karma: 116
Join Date: May 2011
Device: Kindle
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
spiralpath is offline   Reply With Quote
Old 06-17-2011, 02:02 AM   #2
spiralpath
Junior Member
spiralpath doesn't litterspiralpath doesn't litter
 
Posts: 4
Karma: 116
Join Date: May 2011
Device: Kindle
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.
spiralpath is offline   Reply With Quote
Old 08-03-2011, 04:02 PM   #3
phyllisj9
Member
phyllisj9 began at the beginning.
 
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
phyllisj9 is offline   Reply With Quote
Old 08-03-2011, 04:20 PM   #4
phyllisj9
Member
phyllisj9 began at the beginning.
 
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?
phyllisj9 is offline   Reply With Quote
Old 08-04-2011, 04:00 AM   #5
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 62,555
Karma: 40125235
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
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.
HarryT is online now   Reply With Quote
Old 08-04-2011, 09:43 AM   #6
phyllisj9
Member
phyllisj9 began at the beginning.
 
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
phyllisj9 is offline   Reply With Quote
Old 08-04-2011, 12:05 PM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 62,555
Karma: 40125235
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
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.
HarryT is online now   Reply With Quote
Old 08-04-2011, 12:46 PM   #8
phyllisj9
Member
phyllisj9 began at the beginning.
 
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...
phyllisj9 is offline   Reply With Quote
Old 08-04-2011, 12:48 PM   #9
phyllisj9
Member
phyllisj9 began at the beginning.
 
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
phyllisj9 is offline   Reply With Quote
Old 08-04-2011, 11:37 PM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,752
Karma: 39457947
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
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?
It only uses the toc.ncx file to "jump" to the different chapters with the 5-way controller on the Kindle. The marks on the progress bar represent the chapter points, and by nudging the 5-way left or right, you can jump between the chapters (the double-arrow buttons on Kindle Previewer simulate that functionality). But that's the only thing that the Kindle uses the NCX file for. If you don't add your own inline (html) ToC, the ebook won't have one.
DiapDealer is offline   Reply With Quote
Old 08-05-2011, 08:33 AM   #11
phyllisj9
Member
phyllisj9 began at the beginning.
 
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.
phyllisj9 is offline   Reply With Quote
Old 08-05-2011, 09:46 AM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,752
Karma: 39457947
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
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).
I've never cracked open any commercially produced ePub and seen all of the xhtml files represented with reference elements in the guide section of the opf. Nor have I seen ePubs where multiple xhtml files were tagged with the text semantic, in the wild. I could be wrong, of course, but that's ePub anyway and not mobi. So it doesn't really have much to do with why it will/won't work for generating mobi files.

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:
and ultimately I still don't really get how to mark the first page for Kindle
If you're using Kindlegen to build the mobi, the "start" <reference> or a single "text" <reference> whose href attribute points to an xhtml file (or an anchor within an xhtml file) in the guide section of the opf file will be converted to the proper "Start reading" record in the resulting mobi (there may be others as Harry has mentioned, but I only know what works for me). But you have to be feeding the opf file or the epub file to kindlegen, not producing the mobi from an html file.

Last edited by DiapDealer; 08-05-2011 at 09:57 AM.
DiapDealer is offline   Reply With Quote
Old 08-05-2011, 10:56 AM   #13
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 62,555
Karma: 40125235
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Post

Quote:
Originally Posted by phyllisj9 View Post
and ultimately I still don't really get how to mark the first page for Kindle.
I provided a working example in post #5 above. Did it not work for you?
HarryT is online now   Reply With Quote
Old 08-05-2011, 12:31 PM   #14
phyllisj9
Member
phyllisj9 began at the beginning.
 
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
phyllisj9 is offline   Reply With Quote
Old 08-05-2011, 02:52 PM   #15
Billi
Wizard
Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.
 
Billi's Avatar
 
Posts: 3,176
Karma: 13011679
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
Billi is offline   Reply With Quote
Reply

Tags
kindle, mobipocket creator, open, toc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 01:55 PM.


MobileRead.com is a privately owned, operated and funded community.