Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-05-2009, 07:12 AM   #1
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
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
AlexBell is offline   Reply With Quote
Old 08-05-2009, 11:14 AM   #2
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
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?
ilovejedd is offline   Reply With Quote
Advert
Old 08-05-2009, 11:28 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 08-06-2009, 06:48 AM   #4
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
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
Quote:
Originally Posted by ilovejedd View Post
I though you use // to turn off the TOC stuff?
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.
AlexBell is offline   Reply With Quote
Old 08-06-2009, 07:01 AM   #5
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
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
Quote:
Originally Posted by kovidgoyal View Post
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.
Thanks, Kovid. I appreciate all the help you provide and your patience.

Regards, Alex
AlexBell is offline   Reply With Quote
Advert
Old 08-06-2009, 11:06 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,305
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by AlexBell View Post
Thanks. I'm pretty sure it's / but I'll go back and check.

Regards, Alex
IIRC both will work. Basically any XPath expression that is valid but doesn't match a non root tag will do the trick
kovidgoyal is offline   Reply With Quote
Old 08-08-2009, 06:09 AM   #7
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
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
AlexBell is offline   Reply With Quote
Old 08-08-2009, 09:26 AM   #8
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: 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.
HarryT is offline   Reply With Quote
Old 08-08-2009, 12:09 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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
kovidgoyal is offline   Reply With Quote
Old 08-08-2009, 01:07 PM   #10
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
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
GRiker is offline   Reply With Quote
Old 08-08-2009, 04:29 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 08-09-2009, 07:45 AM   #12
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
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
AlexBell is offline   Reply With Quote
Old 08-09-2009, 11:09 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,305
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the no links in TOC option
kovidgoyal is offline   Reply With Quote
Old 08-09-2009, 10:52 PM   #14
chorpler
Zealot
chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.
 
Posts: 128
Karma: 278
Join Date: Jun 2008
Device: Kindle; PRS-500; MobiPocket on Windows Mobile
Quote:
Originally Posted by kovidgoyal View Post
Yeah, but IIRC calibre will strip that out during conversion. It may not, you'll have to test and see.
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.
chorpler is offline   Reply With Quote
Old 08-10-2009, 03:00 AM   #15
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
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
Quote:
Originally Posted by kovidgoyal View Post
Use the no links in TOC option
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
AlexBell is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


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


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