![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
More TOC questions
I'm sorry to expose my ignorance yet again, but I just don't comprehend how to get Calibre to set up TOCs the way I want them.
First question: I'm learning how to do a template for ebooks in XHTML 1.1 and CSS. My markup for the TOC is <div id="TOC"> <h3>Table of Contents</h3> <p>Preface</p> .... </div> With this and and the CSS I can produce an ebook in Mobipocket format with Calibre which works as a TOC. I 'turn off' the XPath stuff in Calibre by using / as the search term. But Calibre produces, without me asking for it, a TOC at the end of the ebook, after all the text. And when I press the button on my Cybook which takes me to the Go To option and select Table of Contents the Cybook takes me to this TOC generated by Calibre and not to mine generated from the markup - I know it's not mine because it is at the end of the ebook and because it is not offset from the left margin as mine is. How do I stop Calibre from generating the second TOC, or how to I get my Cybook to go to my TOC and not Calibre's TOC? Second question: The ebook I'm preparing now has several footnotes in the text which I'm going to make into end notes. Because XHTML 1.1 does not accept the 'a name' option I have to use an id for each footnote. On the trial runs I've done so far Calibre puts an entry for each footnote into its TOC at the end of the book, which is certainly not what I want. If I can't stop Calibre from generating its own TOC at the end of the book is there any way in which I can stop it including each end note in the TOC? Please note that I have read the XPath tutorial, and am none the wiser. Regards, Alex |
![]() |
![]() |
![]() |
#2 |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
I though you use // to turn off the TOC stuff?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,305
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use the no links in TOC option to not include iinks in the TOC and -in MOBI output turn off the inline TOC to not have calib-re -put a TOC at t-he end of the book.
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks. I'm pretty sure it's / but I'll go back and check.
Regards, Alex Last edited by kovidgoyal; 08-06-2009 at 10:56 AM. |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,305
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thank you for your help with turning off the option of having a second TOC generated by Calibre at the end of Mobipocket books converted from HTML.
My main TOC problem now is that I cannot work out how to have Mobipocket recognise the TOC in my HTML; that is, how to have the TOC show up on the Mobipocket Go To menu. I'm also quite confused as to what the various options do - What does 'Force use of autogenerated TOC' do? It doesn't seem to make any difference whether I check that box or not. - What is the 'First level' of TOC and the 'Second Level'? Is the First level the title or heading of the TOC, and second level the items in the TOC? I presume other people have been able to get the TOC to show up in the Mobipocket menu; could I have a summary on how to get this to work, please? Regards, Alex |
![]() |
![]() |
![]() |
#8 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
You need to add a TOC item to the "Guide" section of the OPF file you're using to create the MobiPocket book.
|
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,305
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Shaort answer is you can't. calibre has no way of knowing where your inline TOC is in the MOBI book, so when creating the book it cannot set the toc element in the guide that mobi readers use to know where to go for the TOC
|
![]() |
![]() |
![]() |
#10 |
Comparer of the Ephemeris
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
Actually, I think HarryT's correct. If you add a line like this in the <guide> section of your OPF:
<reference type="toc" title="Table of Contents" href="<name of your TOC HTML file>" /> it will be written in MOBI-compliant format. At least it works on my Kindle. G |
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,305
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yeah, but IIRC calibre will strip that out during conversion. It may not, you'll have to test and see.
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Thanks to you all. I'll look at the opf file suggestions and see if I can make it work.
If not, I'll either have to go back to Mobipocket Creator or accept the Calibre generated TOC. Could anyone answer the other questions in my last post please, about what the autogenerate option does and about the levels of TOC? If I have to accept the Calibre generated TOC how do I prevent endnotes from showing up in the TOC? Regards, Alex |
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,305
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Use the no links in TOC option
|
![]() |
![]() |
![]() |
#14 |
Zealot
![]() ![]() ![]() Posts: 128
Karma: 278
Join Date: Jun 2008
Device: Kindle; PRS-500; MobiPocket on Windows Mobile
|
Version 0.5.14 using oeb2mobi didn't ... I believe it translated the <guide> elements properly. I'm not sure about 0.6.5 and ebook-convert. I think it might still strip out most other <guide> entries, but last I checked it did work properly with the TOC <guide> entry.
|
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Sorry, Kovid, I'm even more confused.
The markup for one of the 'chapters' that I do want in the TOC is <p><a href="#editpref">Editor's Preface</a></p> <div class="section" id="editpref"> and for and endnote that I do not want in the TOC is <a href="#endnote">[1]</a></p> <div id="endnote"> Won't the 'Use the no links in TOC option' take out both of these links? I only want the endnote link to not appear in the TOC Regards, Alex |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TOC & other questions | PatNY | Sigil | 41 | 10-02-2010 10:46 AM |
TOC issues | fading | Kindle Formats | 13 | 07-23-2009 07:55 AM |
Getting TOC to work? | enarchay | Sony Reader | 11 | 05-28-2009 05:46 AM |
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working | Magitek | LRF | 0 | 05-06-2009 01:25 PM |
toc question | zelda_pinwheel | IMP | 4 | 01-18-2008 10:49 AM |