![]() |
#1 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2016
Device: iPad, Kindle Paperwhite
|
Trouble with TOC
What I have:
Now I need all that in a Mobi file. But no matter what I try I simply cannot get the TOC button in Kindle Previewer to display a TOC (I understand this is called a Logical TOC?). I work with InDesign, Sigil and Kindle Previewer. Have successfully generated a TOC with Sigil, but this simply duplicates the all-ready-in-place Contents page in the book. The ePub contains a toc.xhtml (yes, checked in Semantics – Table of Contents). So my question is ... how to get that toc.xhtml to speak Kindle. ![]() Last edited by tinmug; 01-21-2016 at 08:49 AM. |
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
For more information see the Kindle Publishing Guidelines. ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2016
Device: iPad, Kindle Paperwhite
|
Thanks.
I've been using ePub 3. The resulting ePub yields (of course) a doc.xhtml. Establishing that as the Table of Contents file (Add Semantics ... Table of Contents) does create an entry in the OPF file. But this alone doesn't appear to be enough (or entirely) correct for the Kindle to see it/link to it. The OPF entry reads: <reference href="Text/toc.xhtml" title="Table Of Contents" type="toc"/> Whereas the standards document refers to (an example of): <item id="toc" properties="nav" href="xhtml/toc.xhtml" media-type="application/xhtml+xml"/> Another ePub that I have looked into, and one that does successfully convert all elements to Mobi, has the same elements in the OPF TOC entry, except that it refers to HTML, not XHTML. Haven't had luck with variations on this. Any comments from your side in this regard much appreciated. Thanks. Last edited by tinmug; 01-22-2016 at 12:46 AM. |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
In that case, you'll need to add a toc landmarks item. If a book contains both an .opf file with a guide section and nav xhtml file with a landmarks section the nav xhtml file takes precedence over the .opf file. (The nav xhtml file has a properties="nav" attribute in the .opf file.)
Quote:
That's the required nav file manifest entry in the .opf file. BTW, if you've opened an ePub3 book generated by InDesign with an older Sigil version, it might have saved it as an ePub2 file. Check your ePub with the IDPF Online Validator. If it says Detected version: EPUB 2.0.1 , Sigil has saved your epub3 book as an epub2 book and the .opf guide item should work otherwise check the landmarks section of the nav xhtml file. Last edited by Doitsu; 01-22-2016 at 10:18 AM. |
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2016
Device: iPad, Kindle Paperwhite
|
Hi Doitsu,
The OPF does set toc.xhtml as properties="nav" (inside manifest). The OPF does list the to.xhtml inside the guide tags. The doc.xhtml is set as Table of Contents (Add Semantics ...) The IDPF validator lists the epub as 3.0.1 (thanks for the links, I appreciate that), and gives the file a clean bill of health. The Table of Contents button in Kindle Previewer remains greyed out (Cmd+T/Ctrl+T). But ... when I load the .mobi file onto my wife's Paperwhite the Go To menu does list everything as it should. – Should the lack of the TOC button in Kindle Previewer concern me? Where should <item id="toc" properties="nav" href="xhtml/toc.xhtml" media-type="application/xhtml+xml"/> be placed? In OPF? Inside <guide>? Many thanks for your input. Hugely appreciated. Edit: I am using the current (0.9.2) version of Sigil. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
As I've aleady pointed out, .opf guide elements are ignored for ePub3 books. You'll need to add a toc landmarks item to the NAV xhtml file. For example:
Spoiler:
For a working example book download this ePub3 book from MR. It has the proper NAV xhtml landmarks and compiles OK with KindleGen. If you format your book in the same way the TOC menu item will no longer be greyed out. Quote:
Quote:
I've replied too quickly that declaration should be in the .opf file. Last edited by Doitsu; 01-22-2016 at 10:17 AM. |
||
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2016
Device: iPad, Kindle Paperwhite
|
A-ha! Thank you – will create the nav.xhtml and integrate that ... will report back. Thanks for your patience.
|
![]() |
![]() |
![]() |
#8 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2016
Device: iPad, Kindle Paperwhite
|
Thanks for that – have it doing what I hoped it would. I added the 'nav id="landmarks"' string, and that seems to have sorted it all out.
I know have a horribly formatted TOC that appears between cover and title page (followed by copyright page and the original internal TOC page). Quick question: instead of styling the new nav/toc xhtml, is it possible to set the original (internal – part of the INDD doc) TOC page as the nav/toc xhtml (not going to rename it, simply set as TOC (Add Semantics) and add the Landmark values? |
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
(ePub3 files can contain an .ncx file for backwards compatibility, but it's not required.) |
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2016
Device: iPad, Kindle Paperwhite
|
The NCX file aside, my original InDesign document features a Contents page; and all parts of the book are exported as separate XHTML file. Therefore the Contents XHTML file might be a candidate to serve as a nav/toc file (given the correct syntax). Will have to try ...
|
![]() |
![]() |
![]() |
#11 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2016
Device: iPad, Kindle Paperwhite
|
Thanks for that. Current file not an ordered list, and not likely to become one (I am loathe to change the styling). Thanks for your help though – have enough up and running for the time being, might revisit this in the next few days ...
Last edited by tinmug; 01-29-2016 at 12:46 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble creating toc | FDG | Conversion | 7 | 08-14-2015 10:01 AM |
Trouble with TOC | pastorjamie | Calibre | 1 | 12-10-2013 01:47 PM |
Sigil Trouble w TOC & Upgrading | sandrajonas | Sigil | 6 | 10-26-2013 11:10 AM |
Trouble with TOC in Mobipocket Creator | Frustrated | Kindle Formats | 4 | 08-13-2011 12:39 PM |
Trouble generating a TOC | foghat | Calibre | 2 | 05-07-2010 06:00 PM |