Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 02-01-2016, 07:18 PM   #1
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
Understanding TOC conversion options

Hi:

I've worked through and gotten help with converting my novel from xhtml to epub and mobi. Last thing I'm struggling with: which TOC option do I want to select?

My book is already divided into separate chapters and I have created a page (originally toc.html, renamed index.html) on which I list and link all the pages and chapters in the order they should appear in the flow. This is the page I use when I "add book". Each one has a class of chapter assigned and I now have all the pages and chapters flowing in the right order, etc.

BUT! I'm confused about how many TOC's and how to place them. I understand the devices (and Calibri) create a TOC that can be accessed via menus. That seems to be working.

But I've read different things about having a TOC in the flow, and if so, have in beginning or at end, etc.

So far I haven't checked any of the checkboxes (Force use of auto-generated, do not add detected chapters to the Table of Contents, Allow duplicate Links…).

What I HAVE done is created an XPath expression at level 1 TOC (p with class of chapter) which generates the menu TOC AND a Table of Contents page in the flow of the book, after the Cover and dedication, AND a TOC at the end of the book. So I have three TOC's. I want to understand why I'm getting 3 and how to get 2: the menu TOC and one either in the beginning or end of book, but not both. (The TOC's themselves are all correct, so I've got that down!) And do I do something differently for the mobi version versus the epub?

Finally, should I be marking threads "closed" when I feel my question has been answered? I'm not finding a "mark this thread closed" option anywhere -- I've probably missed it. What is the proper way to close out a thread here?

Thanks!!
Paula-59 is offline   Reply With Quote
Old 02-01-2016, 07:35 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
If you have generated a ToC.ncx and/or inline (HTML) ToC already, you do NOT want calibre to create one during conversion. That is meant only for ebooks which do not yet have a ToC.

Under "___ Output", you will have an option to enable or disable generation of an inline ToC. Note that the tooltip says it is only useful (or wanted, really) if the book does not aready have an inline ToC.

As for closing threads -- no, MobileRead policy is to leave them open. Only moderators can close threads (as a last resort).
You can't put [solved] in the title either -- which I know some places allow and suggest, but again, here we don't.

Last edited by eschwartz; 02-01-2016 at 07:38 PM.
eschwartz is offline   Reply With Quote
Advert
Old 02-01-2016, 08:21 PM   #3
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
eschwartz: Thanks for info on closing threads!

Re: the inline TOC -- I could have sworn I didn't select the inline chapter option in output, but I'm going to run through a conversion again and make sure that isn't checked and see how many TOC's I end up with. I'll report back.
Paula-59 is offline   Reply With Quote
Old 02-01-2016, 09:07 PM   #4
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
OK -- tried something -- have to try again -- be back.

Last edited by Paula-59; 02-01-2016 at 09:11 PM.
Paula-59 is offline   Reply With Quote
Old 02-01-2016, 09:27 PM   #5
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
OK, I did a fresh epub -- deleted all previous versions, brought in new. I got the working TOC.ncx AND an inline TOC which is my index.html. I had the same result at last post and then thought maybe the problem was that my index.html had the class "chapter" applied to the header, and the "chapter" class is what I'm telling Calibri to use to build the TOC. So I removed the class from the index.html, deleted the book, added the modified index.html to start over, but it still is being used as an inline Table of Contents.

So what's happening, it seems, is that the index.html I have, which includes the list of all the pages/files for the book, is being used to create an inline TOC even though I am not asking Calibri to do that.

I can live with an inline TOC but I want to understand why it's being created. I would rather NOT have yet a third TOC in the mobi, but my understanding is that mobi readers automatically place a TOC inline at the end. Any way to fix?

Thanks!
Paula-59 is offline   Reply With Quote
Advert
Old 02-01-2016, 10:07 PM   #6
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
WAIT -- this is more accurate :o

I realized what I need to know how to do is NOT have my index.html included in the flow. I keep saying it is an inline TOC, but I think it's really just another Page that happens to have TOC content on it.

Do I need to name it something else? Or click something somewhere else?
Paula-59 is offline   Reply With Quote
Old 02-02-2016, 11:11 AM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,910
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Paula-59 View Post
I realized what I need to know how to do is NOT have my index.html included in the flow. I keep saying it is an inline TOC, but I think it's really just another Page that happens to have TOC content on it.

Do I need to name it something else? Or click something somewhere else?

If you use the tool to create the Inline TOC, the file gets a Semantic Flag auto-magically and appears in the Guide section of content.opf
ex.
Code:
  <guide>
    <reference href="titlepage.xhtml" title="Cover" type="cover"/>
    <reference type="toc" title="Table of Contents" href="toc.xhtml#calibre_generated_inline_toc"/>
  </guide>
All you need to do is drag the file to the desired position in the file browser (it is created in the first list position)

All other similar files just LOOK like an Inline TOC

You can only have ONE of any kind of semantic assigned (and will be done for you if you use tools to make them):
1 cover PAGE
1 cover IMAGE
1 (inline) TOC
theducks is offline   Reply With Quote
Old 02-02-2016, 02:18 PM   #8
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
Thank you for your reply!

theducks: "If you use the tool to create the Inline TOC,"

OK, let's clarify: which tool?

What I am doing is: Convert Books > convert individually
Then I select the output format: epub
Then I start down the options that come up in the left pane; I make no changes in Look & Feel, Heuristic Processing or Page Setup -- I leave the defaults as is.
On Structure Detection I select "none" for Chapter Mark because I have that handled via CSS. I leave everything else as is.
Table of Contents: I don't check any options or change number of links or chapter threshold -- but I add an XPath expression to Level 1 TOC (to use any paragraphs with the "chapter" class)
I do nothing with Search and Replace
I go to Output -- in the case of epub I check "preserve cover aspect ratio" and nothing else. I do NOT check "insert inline table of contents"
I hit "ok" and the conversion happens.
I "view" the book in Calibri and have the menu-based TOC (this is the TOC.ncx, right?) and I have my cover, my dedication, and a Table of Contents page, then my preface, and Chapter 1 and all the rest.

Where am I "using the tool to create the inline TOC? Is that when I add the XPath expression?

Thanks!
Paula-59 is offline   Reply With Quote
Old 02-02-2016, 02:36 PM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,910
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Sorry, but your work flow is just strange to me.

In the Calibre Editor you can generate the NCX. THEN you can generate the Inline TOC (On the Tools menu)
Once I have a Clean EPUB, I can convert. No need to have conversion insert things like the TOC, scale fonts...


My flow:
Add to Calibre
fix metadata (Library)
Use Polish or Modify EPUB to insert it into book
Use the EPUB Editor (or Sigil) to tweak the code
Generate/replace the NCX
Optional: Generate/Replace or Remove the inline TOC (I onlyAdd if converting for my K4)
theducks is offline   Reply With Quote
Old 02-02-2016, 04:47 PM   #10
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
theducks: thanks for replying.

Looks like we're doing things quite differently.

I can live with having an inline TOC from my index.html in the epub. I don't like having that AND another TOC at the end AND the TOC.ncx in the mobi.

My index.html is being placed in the flow as a Table of Contents, right after the cover and this is happening even though I am not asking Calibri to do that.

Is there an XPath expression I can use to get Calibri to NOT include the index.html in the flow? If I apply a class to the index.html header, can I say "bring in all the files with the class of "chapter" but leave out files with the class of "whatever"?

Here's the Xpath expression I use:
Code:
//h:p[re:test(@class, "chapter", "i")]
Thanks!
Paula-59 is offline   Reply With Quote
Reply

Tags
toc creation


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you add more conversion options? Glorfindel Conversion 22 05-16-2014 06:01 PM
iPad Conversion Options Help yoss15 Recipes 1 01-23-2013 09:22 AM
Understanding foreign fonts and HTML conversion chittu ePub 1 06-21-2012 07:06 PM
Understanding the Advanced Options for adding metadata when unknown? Killian Calibre 2 07-30-2009 03:40 PM
Default conversion options ShellShock Calibre 2 11-02-2008 01:27 PM


All times are GMT -4. The time now is 08:52 PM.


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