![]() |
Formatting TOC
Is there any way to format the Table of Contents that Sigil generates? For example, having the h2 tags indent a certain amount and the h3 tags indent a certain amount. It seems the way it is defaulting is to leave a much larger indent than I would prefer...
|
Quote:
Sigil will create the NCX file from H# tags, that is used by many readers to display the 'Contents Menu' (this has no provision for style formatting) |
As theducks says, the TOC the readers display is based on the toc.ncx file. The layout is defined by the reader, not the ePUB.
If you create an inline TOC (which I don't recommend), you have complete control over the layout. However, you have to maintain it yourself. |
Quote:
e.g., h2 {text-align: left; text-indent: 10%} h3 {text-align: left; text-indent: 20%} etc. |
But Sigil doesn't create anything that those CSS attributes can be assigned to.
|
Quote:
If care is used, a Code:
<h2>Chapter 1 <br />The Never Ending Chapter</h2> |
Thanks for the info...! Okay - IF I did want to create an inline TOC manually in addition to the NCX TOC that Sigil automatically generates - is there any way to have the GO TO TOC go to my inline TOC *instead of* the NCX TOC? What I'm trying to do is have a "long version" of the TOC inline that includes all the subheadings as links within each chapter - but I DON'T want the NCX to include all these subheadings because I want my "jump to next" feature to just go from chapter to chapter - not all the little sub-sections...
Can this be done?! |
Quote:
|
Yes - Kindle :)
I've been able to do this using MobiPocket Creator - but I'm trying to use Sigil on my Mac instead of having to use my PC laptop... I like the way Sigil works WAY better for everything else - so if I can just get this TOC situation figured out, I'll be a Sigil convert :) |
Once you create and style your HTML TOC you just need to identify it as a TOC. If it has its own html file, just right click on the file in the Book Browser and select "Table of Contents" from the Add Semantics menu. That's the easiest method. That will make your GO TO TOC functionality work after you convert to MOBI.
If it's not in its very own html file... then you're going to have to manually add a reference to the guide section of the opf file that refers to an anchor in the html where your ToC starts. Just pick a file in the epub and mark it as a TOC (even if it's not... you can unmark it later). You can then go to the opf file and see the general syntax for the TOC reference tag in the guide section. EDIT: all the above is predicated on using kindlegen to convert the epub to MOBI. Calibre has a weird habit of homogenizing the inline TOC and the NCX file so they match (even when you tell it not to add the TOC). |
Putting a ToC (page of useless links) in an ePub is just really bad form. ePub has toc.ncx. If you use calibre to convert to Mobipocket, then it will generate a ToC page for the Mobipocket file using the ToC in toc.ncx.
|
Quote:
|
Thanks SO much for your help, DiapDealer! I actually tried it before I saw your "Edit" - and using Calibre it still kept my 2 TOC's intact! The only thing I'm experiencing now is my inline TOC is putting page breaks at the end of each book "section" even though I didn't put page breaks in the TOC... Is there a way to make it keep the whole TOC as a continuous one instead of with page breaks? I'm SO close to having this how I want it!!
|
Quote:
|
That was it! Thanks so much!
|
Inline TOCS are the first thing i'm throwing out of every eBook. My reader goes to the inline TOC with the appropriate button pressed and the inline toc is -- yes where is it? At the end? Page 1? page 2? Useless crap.
|
Quote:
|
If i would like to go to an inline TOC, what do i have to do? Going to page 2? Or 3? Or to the end? Or ist the toc located at the same place in every book? The built-in TOC is always at the the place...
|
Quote:
Most ePub that have a links page also have a link in the proper ToC to this links page. In order to get to the link to go to the links page, we have to go to the ToC. So since we are there at the ToC, why would we then want to go to the links page to then go to the place we want when we can just go there from the ToC? |
| All times are GMT -4. The time now is 06:56 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.