|
|
#1 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
the case of the disappearing TOC
I have some books which contain a hard coded content / toc page i.e. it can be seem as an xhtml page in epub, e.g.
Code:
<body class="calibre"> <p class="calibre9"><span class="calibre5 bold">Contents</span></p> <p><a class="calibre10"></a><a class="calibre10" id="filepos916"></a></p> <p class="calibre11"><a class="calibre12" href="../Text/Stories_All-New_Tales_split_003.html#filepos5958"><span class="calibre13 calibre14 sgc-1">Introduction:</span></a> Just Four Words Neil Gaiman</p> <p><a class="calibre10"></a><a class="calibre10" id="filepos1070"></a></p> <p class="calibre15"><a class="calibre12" href="../Text/Stories_All-New_Tales_split_004.html#filepos13963"><span class="calibre13 calibre14 sgc-1">Blood:</span></a> Roddy Doyle</p> the "toc" is also referencing explicit locations in explicit split files, and the number of split files is not always the same as the number of toc entries. ( in this example they match but I have other books where many toc entry points are squeezed into a few xhtml splits, referenced by filepos code e.g. Code:
<navPoint class="chapter" id="c07b675a-c357-498a-a48c-cdc24750b605" playOrder="4">
<navLabel>
<text>THE PUNISHED</text>
</navLabel>
<content src="Beauty_s_Punishment_split_001.html#filepos2996"/>
ANYWAY if these epubs iare opened & saved with sigil, then suddenly there is no toc in calibre viewer - all you get is a one line "start" entry. some before and after viewing of exploded epub shows that sigil is rewriting the toc.ncx file, thus this Code:
<docTitle>
<text>Stories: All-New Tales</text>
</docTitle>
<navMap>
<navPoint class="chapter" id="33c52f2d-e3f0-4394-94fe-2081b1133809" playOrder="1">
<navLabel>
<text>Introduction:</text>
</navLabel>
<content src="Stories_All-New_Tales_split_003.html"/>
</navPoint>
<navPoint class="chapter" id="081f987c-44c5-4cd5-af9c-fb1cca814843" playOrder="2">
<navLabel>
<text>Blood:</text>
</navLabel>
<content src="Stories_All-New_Tales_split_004.html"/>
</navPoint>
<navPoint class="chapter" id="26096607-bf5a-49f9-a5a6-a40be7ef6b85" playOrder="3">
<navLabel>
<text>Fossil-Figures:</text>
Code:
<docTitle>
<text>Stories: All-New Tales</text>
</docTitle>
<navMap>
<navPoint id="navPoint-1" playOrder="1">
<navLabel>
<text>Start</text>
</navLabel>
<content src="Text/titlepage.xhtml"/>
</navPoint>
</navMap>
</ncx>
1. I cannot edit books with this type of hard coded toc e.g. to fix typos without losing the toc navigation in viewers. 2. I see no foolproof way of directly converting this type of toc to one that will survive editing - best I have for now is the roundabout epub - zip - convert with structure detect & hope that builds a "proper" toc. what is annoying is that the "table of contents" text, layout ,links etc still exist in the xhtml - they are just no longer considered to be "toc" Last edited by cybmole; 01-18-2011 at 02:27 AM. |
|
|
|
|
|
#2 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123457
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
This is a long-standing bug/feature request in Sigil - it deletes the existing TOC and builds it's own based on heading tags. This is by design, but it's on the roadmap to fix it.
There are a variety of workarounds discussed in the Sigil forums. |
|
|
|
| Advert | |
|
|
|
|
#3 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
I guess that I could eplode epub , back up toc.ncx, edit in sigil, save, re-explode, replace toc, but I'd also have to also remember not to change the file split structure. |
|
|
|
|
|
|
#4 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123457
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
|
|
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,798
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
have you tried this new app that just got released in epub forum
https://www.mobileread.com/forums/sho...d.php?t=117809 It allows you to edit your TOC from inside sigil or you can just open it seperately. Its great for setting and editing TOC |
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disappearing 'Collections' | Bawstinn | Amazon Kindle | 11 | 09-06-2011 06:06 PM |
| The Case of the Disappearing Cursor... | Hitch | EPUBReader | 8 | 09-08-2010 05:20 AM |
| Disappearing files | Argel | Calibre | 8 | 02-14-2010 11:42 PM |
| Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working | Magitek | LRF | 0 | 05-06-2009 02:25 PM |
| Disappearing attachments | mtravellerh | Upload Help | 2 | 12-16-2008 04:57 AM |