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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-03-2012, 07:17 PM   #1
JJ Joseph
Member
JJ Joseph began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2012
Device: Kindle
Where's the TOC?

I can assemble quite a nice looking book in Sigil, and save the result to an epub file that uploads to Amazon, no problem. The Sigil epub generates a nice Table of Contents (TOC) from headings on the right side of my display, but the final published book doesn't have a TOC. When viewing the Sigil epub with Kindle Previewer, it also says there's no TOC.

With Sigil, how do I get a TOC into my uploaded Kindle book, preferably the Sigil-generated TOC that shows on my display?
JJ Joseph is offline   Reply With Quote
Old 07-03-2012, 07:38 PM   #2
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 540
Karma: 64420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by JJ Joseph View Post
I can assemble quite a nice looking book in Sigil, and save the result to an epub file that uploads to Amazon, no problem. The Sigil epub generates a nice Table of Contents (TOC) from headings on the right side of my display, but the final published book doesn't have a TOC. When viewing the Sigil epub with Kindle Previewer, it also says there's no TOC.

With Sigil, how do I get a TOC into my uploaded Kindle book, preferably the Sigil-generated TOC that shows on my display?
The Kindle needs an in-line TOC (namely an xhtml file with links to the chapters, and which is identified as the table of contents in the <guide> section of the content.opf file).

Amazon's kindlegen mobi generator (which is what is applied when you upload an epub) will not generate an in-line TOC, so you will have to add one yourself to the epub before uploading. The newest beta of Sigil will do this (based on the contents of toc.ncx) with one click. However, IMHO the beta is not yet ready for prime time. With the earlier release version of Sigil, you're on your own to create the inline toc.

On the other hand, if you use Calibre to create the mobi from the epub, Calibre will create the in-line TOC for you. But the Calibre-created mobi may or may not be otherwise equivalent to the kindlegen-created mobi. Use at your own risk.
st_albert is offline   Reply With Quote
 
Enthusiast
Old 07-03-2012, 09:21 PM   #3
JJ Joseph
Member
JJ Joseph began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2012
Device: Kindle
Linking the TOC

Quote:
Originally Posted by st_albert View Post
The Kindle needs an in-line TOC (namely an xhtml file with links to the chapters, and which is identified as the table of contents in the <guide> section of the content.opf file).
OK, I think I'm following you here. My Sigil has already generated a toc.ncx file which looks like a complete TOC. It shows on the list of files on the left side of Sigil's workbench. Is the the file you mean when you say the TOC is "identified as the table of contents"? Can this file be linked to from the <guide> section of the content.opf like you suggest? What is the syntax?
JJ Joseph is offline   Reply With Quote
Old 07-04-2012, 02:06 AM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,742
Karma: 2117255
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
No, the Kindle cannot handle ePUB and the toc.ncx is very specific ePUB. Some converters from ePUB to mobi will convert the toc.ncx to an inline TOC, but not all (as you noticed).
In this case you need to create a toc manually as XHTML file. In Sigil that means a new text section with links in them to the headers. You need to identify this xhtml file as being the TOC. You can do that by right-clicking on the file and select the TOC entry.
Toxaris is offline   Reply With Quote
Old 07-04-2012, 12:00 PM   #5
exaltedwombat
Evangelist
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 414
Karma: 1703930
Join Date: Nov 2011
Device: none
What's the name of that useful little utility program where you drop in an epub file and it constructs a HTML toc page?
exaltedwombat is offline   Reply With Quote
Old 07-04-2012, 02:41 PM   #6
Piper_
~~~~~
Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.
 
Piper_'s Avatar
 
Posts: 762
Karma: 1276933
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
Amazon requires an external / ncx file now, and I *think* discourages the inline toc.
Im not able to get to computerto get link, but it's in the kdp guide section.
Was glad to see it because books that lack them are pet peeves of mine.

Last edited by Piper_; 07-04-2012 at 02:43 PM.
Piper_ is offline   Reply With Quote
Old 07-04-2012, 03:18 PM   #7
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,313
Karma: 36123946
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
The inline (html) ToC is the only thing that allows the "Go to ToC" feature to function (on at least the older Kindle devices). The NCX file is what allows users to jump to various "chapters" using the left-right arrows. I do believe the very latest Amazon devices/firmware allow you to navigate directly to the various chapters via an NCX view.

The latest Amazon Kindle Publishing Guidelines (Sec 3.3) still heavily encourages both the inline HTML ToC and the logical ToC (NCX file )—though only the logical ToC (NCX) is considered "mandatory."

Last edited by DiapDealer; 07-04-2012 at 03:21 PM.
DiapDealer is offline   Reply With Quote
Old 07-06-2012, 04:56 PM   #8
JJ Joseph
Member
JJ Joseph began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2012
Device: Kindle
Quote:
Originally Posted by st_albert View Post
The Kindle needs an in-line TOC which is identified as the table of contents in the <guide> section of the content.opf file).
Thanks, st_albert. This sounds useful. Is the "in-line TOC" simply another html (xml) file in the sequence of xml files that make up my book? I'm guessing that the links between the TOC and the chapters are name attributes or anchors? How do I "identify" this xml file in the <guide> section of the content.opf file (i.e. what is the syntax)?
JJ Joseph is offline   Reply With Quote
Old 07-06-2012, 06:45 PM   #9
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 540
Karma: 64420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by JJ Joseph View Post
Thanks, st_albert. This sounds useful. Is the "in-line TOC" simply another html (xml) file in the sequence of xml files that make up my book? I'm guessing that the links between the TOC and the chapters are name attributes or anchors? How do I "identify" this xml file in the <guide> section of the content.opf file (i.e. what is the syntax)?
Yes, you've got it. Suppose the content.opf file is in the /OEBPS directory, and the in-line TOC is in the file /OEBPS/Text/TOC.xhtml

Then the <guide> item would be
Code:
   <reference href="Text/TOC.xhtml" title="Table Of Contents" type="toc" />
and the TOC.xhtml file just contains hyperlinks pointing to the start of the various chapters, or whatever you want in the table of contents. For example, a line in the TOC.xhtml might look like:

Code:
<div><a class="toc-item" href="../Text/Rendlesham07.xhtml">Chapter 3  New, Old Venues</a></div>
Note that in the above case, the chapter 3 starts at the beginning of the Rendlesham07.xhtml file. If you wanted to point to somewhere else in that same file (e.g. for subheadings, whatever) you would use the usual #anchor syntax, as in:

Code:
 href="../Text/Rendlesham07.xhtml#sidebar"
like any hyperlink.

Last edited by st_albert; 07-06-2012 at 06:48 PM. Reason: typo
st_albert is offline   Reply With Quote
Old 07-07-2012, 12:03 PM   #10
Tulpana
Enthusiast
Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.
 
Posts: 22
Karma: 470232
Join Date: Feb 2012
Device: Entourage Pocket Edge
I have read as much of this thread as I can understand (and I have edited .Epubs with Sigil for approximately nine months). I have never been able to generate a TOC.

I do not know HTML. My .Epub file was generated by Calibre from a Microsoft Word .xhtml document. I have no problems with any other feature of Sigil, except this.

If anyone can tell me what I'm doing wrong, I'd be very grateful. (FWIW, I have tried clicking on the "Generate TOC from Headings," but I don't know what "Headings" means in the context of Sigil. I assume "Headings" means the various sections of the .epub file created when a Chapter Break is made.)
Tulpana is offline   Reply With Quote
Old 07-07-2012, 12:24 PM   #11
Danger
Evangelist
Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.
 
Danger's Avatar
 
Posts: 466
Karma: 1665031
Join Date: Nov 2010
Location: Vancouver Island, Nanaimo
Device: K2 (retired), Kobo Touch (passed to the wife), KGlo
Quote:
Originally Posted by Tulpana View Post
...but I don't know what "Headings" means in the context of Sigil. I assume "Headings" means the various sections of the .epub file created when a Chapter Break is made.)
Headings, as far I understand are any, h1-h# tag
ex. <h1>Chapter One</h1>

When you generate a TOC from headings you will get "Chapter One" in your TOC
and the <h1>Chapter One</h1> will change to something like <h1 id="heading_01">Chapter One</h1>

You can generate a TOC this way even IF you don't want to have/use the h# tags. Simply put them in at the beginning of each chapter as shown above. Click Generate TOC. I then move the ID="something" to an empty DIV tag... actually I don't know if you really need the ID but I keep them anyway. I usually only move it to the DIV in the Cover.xhtml page anyway and keep the rest of the h1 as is. You can then remove all <h1... tags using a find/replace regex... FIND <h1(.*?)</h1> REPLACE with blank space

Last edited by Danger; 07-07-2012 at 12:27 PM.
Danger is offline   Reply With Quote
Old 07-07-2012, 12:33 PM   #12
theducks
Grand Sorcerer
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: 13,603
Karma: 5126946
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Tulpana View Post
I have read as much of this thread as I can understand (and I have edited .Epubs with Sigil for approximately nine months). I have never been able to generate a TOC.

I do not know HTML. My .Epub file was generated by Calibre from a Microsoft Word .xhtml document. I have no problems with any other feature of Sigil, except this.

If anyone can tell me what I'm doing wrong, I'd be very grateful. (FWIW, I have tried clicking on the "Generate TOC from Headings," but I don't know what "Headings" means in the context of Sigil. I assume "Headings" means the various sections of the .epub file created when a Chapter Break is made.)
No! You can have chapter breaks without headings as You can have more than 1 chapter in a file as long as you don't trip the ADE oversize limit. (My preference is to break into a new file at a chapter start)
Headings are <H1-6> tags.
In Sigil BV, you can place the cursor on the Chapter Title/number and see if the setting indicates a heading. see red circle
Attached Thumbnails
Click image for larger version

Name:	Sigil-head.jpg
Views:	71
Size:	85.1 KB
ID:	88834  
theducks is offline   Reply With Quote
Old 07-07-2012, 12:54 PM   #13
st_albert
Fanatic
st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.st_albert calls his or her ebook reader Vera.
 
Posts: 540
Karma: 64420
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by Tulpana View Post
I have read as much of this thread as I can understand (and I have edited .Epubs with Sigil for approximately nine months). I have never been able to generate a TOC.

I do not know HTML. My .Epub file was generated by Calibre from a Microsoft Word .xhtml document. I have no problems with any other feature of Sigil, except this.

If anyone can tell me what I'm doing wrong, I'd be very grateful. (FWIW, I have tried clicking on the "Generate TOC from Headings," but I don't know what "Headings" means in the context of Sigil. I assume "Headings" means the various sections of the .epub file created when a Chapter Break is made.)
A few points:

1) I don't mean to sound snippy, really I don't, but if you're going to be editing epubs in Sigil, you really should make the effort to learn at least a little (x)html. There are tutorials here, as well as reference pages on the various elements of HTML and CSS and their syntax.

2) re: generating a TOC in Sigil. In Sigil, the "Generate TOC from Headings" button will generate the file "toc.ncx", which is the epub table of contents, based on heading tags in the xhtml files which constitute the body of the book. (i.e. <h1>, <h2>, etc.). NB: Sigil responds ONLY to HEADING tags, so if your chapter headers are coded some other way (a styled <p> tag for example) they won't show up in the TOC. After completion, the right-hand column, "Table of Contents" should be filled out. That's all there is to it.

3) There is also another kind of "Table of Contents" which is often referred to as an "in-line" table of contents, which consists of an xhtml file just like all the other xhtml files containing text of the book (hence "in-line"). This file contains hyperlinks to targets within the text of the book, such that when you click on "Chapter 3" in the inline TOC you jump to wherever that link points (hopefully to the start of chapter 3). In an epub, the inline TOC is not needed (its function duplicates that of toc.ncx). But some people, for various reasons, prefer to have one anyway. And if you're intending to use the epub as source code for conversion to mobi (kindle), it is essential to have it, IMHO.

4) In your initial conversion via Calibre, you can have Calibre create both the inline TOC and the toc.ncx (it should do the latter regardless). You can "teach" Calibre how to recognize chapter headers via changing options in the conversion process. (solution is left to the student.)

HTH

Albert
st_albert is offline   Reply With Quote
Old 07-07-2012, 01:36 PM   #14
Tulpana
Enthusiast
Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.Tulpana ought to be getting tired of karma fortunes by now.
 
Posts: 22
Karma: 470232
Join Date: Feb 2012
Device: Entourage Pocket Edge
Thank you to those posters who have offered me a friendly greeting. Thanks to others as well, for your efforts.

As I stated, I do not know HTML--why I found Sigil so invaluable in editing the error-plagued, Calibre-generated .epub files. My Chapter Breaks have no Headings, for the simple reason that I do not understand either the denotation nor the connotation of the term "Heading" as it obtains, here.

I tried to highlight the various chapters, then apply a Heading to them (the way one would apply a Microsoft Word "Style" to text). Didn't work. I tried to click-and-drag the various chapters into the TOC box, the box that is generated when one clicks on View/Table of Contents. I believed that the whole purpose of Sigil was to allow those people unfamiliar with HTML the ability to edit HTML without knowing it. Therefore, unfortunately, I am unable to apply the various suggestions that some of you have offered at the expense of your valuable time.

Thank you.
Tulpana is offline   Reply With Quote
Old 07-07-2012, 02:16 PM   #15
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,313
Karma: 36123946
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
Quote:
Originally Posted by Tulpana View Post
I believed that the whole purpose of Sigil was to allow those people unfamiliar with HTML the ability to edit HTML without knowing it.
While it's certainly been a goal to allow people to do things here and there without knowing any html/css (and hopefully the list of those things will continue to grow), it never has been Sigil's "whole purpose" that I know of. There'd be no need for a code view at all, if it were.

So while it's possible to make an ePub with Sigil knowing no html/css (WYSIWYG), that doesn't mean you'll be able to make the perfect ePub that sings and does tricks. Nor does it mean that there won't be a few things that are only within the reach of those who do know at least a smattering of html/css.
DiapDealer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindler previewer not recognizing toc.ncx file, my html toc, or the start point... petercrowell Kindle Formats 2 05-01-2012 08:14 AM
Generated TOC links back to TOC page in the book Caleb666 Sigil 7 08-17-2011 11:58 AM
Use Regex to Code an Inline TOC, from an External TOC's .ncx File mostlynovels ePub 2 03-16-2011 12:15 PM
ePub TOC to mobi TOC edmnddntes Conversion 5 01-24-2011 02:56 AM
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working Magitek LRF 0 05-06-2009 01:25 PM


All times are GMT -4. The time now is 06:14 AM.


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