10-12-2012, 08:15 AM | #1 |
Guru
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
Editing toc
I've used h1 for chapter titles, h2 for sections within a chapter. The page appearance is good. But the customer has sent it back - she's looking at the Contents panel in ADE and wants everything top-level. (I've given her a functional inline Contents page, but there's no point in arguing. Enough trouble explaining how she can't have it looking EXACTLY like the printed page in other ways :-)
I changed all the h2 tags to h1, recreated the toc, edited the book to back how it started. Could I have done this more easily by direct editing toc.ncx? I can't see from examining it how the hirearchy is set. |
10-12-2012, 08:22 AM | #2 |
Calibre Plugins Developer
Posts: 4,679
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Yes you could have just edited the toc.ncx file. If you look closely (try it with a new "test" page book, containing only an h1 and an h2) you will see there is some fairly simple nesting of the <navpoint> elements. Just a case of "cutting" those nested <navpoint>...</navpoint> elements out to paste them after the parent's closing </navpoint> so that they are all at the same top level.
We hope to have a GUI for doing this in a future release. |
Advert | |
|
10-12-2012, 08:34 AM | #3 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
10-12-2012, 08:40 AM | #4 | |
Grand Sorcerer
Posts: 28,033
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
navPoints are nestable ... as per this example: Code:
<navMap>
<navPoint id="np_1" playOrder="1">
<navLabel>
<text>Blah</text>
</navLabel>
<content src="Text/part0001.xhtml"/>
<navPoint id="np_2" playOrder="2">
<navLabel>
<text>1</text>
</navLabel>
<content src="Text/part0002.xhtml"/>
</navPoint>
</navPoint>
<navMap>
Code:
<navMap>
<navPoint id="np_1" playOrder="1">
<navLabel>
<text>Blah</text>
</navLabel>
<content src="Text/part0001.xhtml"/>
</navPoint>
<navPoint id="np_2" playOrder="2">
<navLabel>
<text>1</text>
</navLabel>
<content src="Text/part0002.xhtml"/>
</navPoint>
<navMap>
Last edited by DiapDealer; 10-12-2012 at 08:50 AM. |
|
10-14-2012, 01:57 PM | #5 |
Guru
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
Yes, that helps a lot! I'm ashamed for not seeing that nesting myself.
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Editing mobi file for toc | mharring | Kindle Formats | 9 | 09-16-2012 10:21 AM |
editing toc of a mobi | thomass | Kindle Formats | 1 | 04-20-2011 08:44 AM |
Use Regex to Code an Inline TOC, from an External TOC's .ncx File | mostlynovels | ePub | 2 | 03-16-2011 12:15 PM |
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working | Magitek | LRF | 0 | 05-06-2009 01:25 PM |
Bood Designer - horizontal bars & TOC editing | DoctorBri | Sony Reader | 5 | 09-17-2007 10:33 AM |