02-28-2012, 11:08 AM | #1 |
Enthusiast
Posts: 38
Karma: 12
Join Date: May 2010
Device: iPhone apps
|
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...
|
02-28-2012, 11:36 AM | #2 | |
Well trained by Cats
Posts: 29,802
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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) |
|
Advert | |
|
02-28-2012, 02:57 PM | #3 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
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. |
02-28-2012, 03:24 PM | #4 | |
eBook Enthusiast
Posts: 120
Karma: 726
Join Date: Dec 2007
Location: US
Device: Sony PRS-350, Astak PocketPro, iPhone, Asus eee Pad Transformer
|
Quote:
e.g., h2 {text-align: left; text-indent: 10%} h3 {text-align: left; text-indent: 20%} etc. |
|
02-28-2012, 03:37 PM | #5 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
But Sigil doesn't create anything that those CSS attributes can be assigned to.
Last edited by DiapDealer; 02-28-2012 at 04:11 PM. |
Advert | |
|
02-28-2012, 04:09 PM | #6 | |
Well trained by Cats
Posts: 29,802
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
If care is used, a Code:
<h2>Chapter 1 <br />The Never Ending Chapter</h2> |
|
02-29-2012, 07:22 PM | #7 |
Enthusiast
Posts: 38
Karma: 12
Join Date: May 2010
Device: iPhone apps
|
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?! |
02-29-2012, 07:27 PM | #8 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
02-29-2012, 07:36 PM | #9 |
Enthusiast
Posts: 38
Karma: 12
Join Date: May 2010
Device: iPhone apps
|
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 |
02-29-2012, 07:57 PM | #10 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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). Last edited by DiapDealer; 02-29-2012 at 08:05 PM. |
02-29-2012, 08:40 PM | #11 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
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.
|
02-29-2012, 08:44 PM | #12 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Last edited by DiapDealer; 02-29-2012 at 08:48 PM. |
|
02-29-2012, 09:11 PM | #13 |
Enthusiast
Posts: 38
Karma: 12
Join Date: May 2010
Device: iPhone apps
|
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!!
|
02-29-2012, 10:01 PM | #14 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
02-29-2012, 10:54 PM | #15 |
Enthusiast
Posts: 38
Karma: 12
Join Date: May 2010
Device: iPhone apps
|
That was it! Thanks so much!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Odd formatting needs correction and TOC | leday | Sigil | 10 | 12-01-2010 12:47 PM |
[KOBO] Strip existing formatting to apply my own default formatting to all books | digital_steve | Calibre | 2 | 08-10-2010 06:34 PM |
Calibre and FORMATTING how to stop it altering my formatting? | nerys | Calibre | 37 | 07-23-2010 02:35 AM |
Calibre and FORMATTING how to stop it altering my formatting? | nerys | Calibre | 0 | 02-28-2010 04:51 PM |