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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2011, 02:21 AM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,967
Karma: 1280000
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
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>
this type of "toc" appears well behaved i.e. calibre viewer detects it, calibre preserves it in format conversions... but those "toc" entries do not have header tags in the story files, and thus navigation with kindle buttons is impaired.
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"/>
chapter 4 in file 1

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>
becomes this after a sigil save
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>
so - issues
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.
cybmole is offline   Reply With Quote
Old 01-18-2011, 02:30 AM   #2
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
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.
ldolse is offline   Reply With Quote
Old 01-18-2011, 02:37 AM   #3
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,967
Karma: 1280000
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
Quote:
Originally Posted by ldolse View Post
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.
thanks for super quick response - I will search sigil forums, unless you have a handy quick link.

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.
cybmole is offline   Reply With Quote
Old 01-18-2011, 02:40 AM   #4
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Quote:
Originally Posted by cybmole View Post
thanks for super quick response - I will search sigil forums, unless you have a handy quick link.

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.
That's the main workaround - there are variations on it and discussion in the Sigil forums. Don't have a link though, the search tool is your friend
ldolse is offline   Reply With Quote
Old 01-22-2011, 05:29 AM   #5
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,123
Karma: 8671315
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
have you tried this new app that just got released in epub forum

http://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
Dopedangel 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
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


All times are GMT -4. The time now is 12:52 AM.


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