11-22-2009, 08:00 PM | #1 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
toc.ncx navpoint content=src empty?
Hi,
I am a new user to Sigil and I love it. One problem I have run into is that the toc.ncx file does not seem to be correctly produced (at least with verison 0.14 which I think is the latest. The problems is that the content src= value is empty. Here are a few snippets: <navPoint id="navPoint-9" playOrder="9"> <navLabel> <text>5: What Makes a Good Parent?</text> </navLabel> <content src=""/> </navPoint> or there is just a # sign <navPoint id="navPoint-14" playOrder="14"> <navLabel> <text>Inside a curious person</text> </navLabel> <content src="#"/> </navPoint> This causes all epub files I create to fail epubcheck-1.0.3.jar tests and does seem to be in violation of the rules for creating toc.ncx files at least as specified by Wikipedia http://en.wikipedia.org/wiki/EPUB which states: "navPoint's content element points to a content document listed in the manifest and can also include an element identifier (e.g. #section1)." Unfortunately this does not seem to be happening for me. Is this a known problem? Is there a solution coming up? Thanks, Kevin |
11-22-2009, 09:02 PM | #2 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Hi,
I think I found the problem, or at least part of it. The html file was created from a pml file which used the \C0="The Chapter Title" tag and not the \X nor \x tags. Under ereader pml \C* tag contents should not be visible in the file (they are kinda-like navpoints) and the visible title of the chapter which generally followed it used no special tags to indicate it was in any way a chapter title. When converted to html the converter program translated these \C0, \C1, ... \C4 tags to html comments with embedded hr tags to preserve the depth information as follows: <!-- <h1>The Chapter Title</h1> --> for \C0="The Chapter Title" ... <!-- <h5>The Sub Chapter Title</h5> --> for \C4="The SubChapter Title" The thing that messed me up is that Sigil nicely found these <h1></h1> through <h5></h5> tags that were embedded into html comments (which made them invisible as the pml spec said they should be) and the TOC was nicely automatically filled in for me so I thought great. However, when converted to epub, these tags embedded in the comments somehow freaked out Sigil and it resulted in empty content src="" tags in the toc.ncx (although everything else was properly found. I manually removed one of these and hand edited the html to add the <h1></h1> tags and removed that comment and regenerated the epub and the content src= tag in toc.ncx was correctly generated. The problem is this file has over 125 chapters in it that are all nicely and invisibly (since embedded in html comments) marked nav points, so I would have to literally search for and edit things 125 times. Is there any way you can make Sigil handle <h1></h1> style tags embedded in comments? They are already recognized by the ToC editor and properly exist there, They are just not being added to toc.ncx content src line properly. Thanks, Kevin |
Advert | |
|
11-23-2009, 04:35 AM | #3 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
But the resolution of this issue will be to ignore heading tags in comments completely. Your comment headings will not appear in the TOC editor. |
|
11-23-2009, 10:33 AM | #4 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
toc.ncx navpoint content=src empty
Hi,
Thanks very much for your reply. The more I look at the various pml files, I can see that many never use \x or \X* at all to make chapters. It looks like a real pain. I have access to the script which does the pml to html conversion. Please think about allowing the use of a "sigil only marker" that does not appear in the text. For example, right now I have modified the script to output sigilChapter breaks (see below) properly un-nested (so that they reside just in the <body> tags) which makes for easy points to split the html file right in the html file itself. div> <hr class="sigilChapterBreak" /> </div> These are all properly recognized when reading the html file into Sigil and so the work of separating the html into chapter size pieces is already done automatically for me. This saves me mountains of time manually editing the book just to place chapter breaks. I could easily convert these \C*="text" to almost anything that Sigil would like as long as it would not show up in the text. Perhaps: 1. a comment formatted especially for sigil <!-- sigilToCEntry "text" --> or 2. an empty span formatted especially for sigil that is wrapped around a comment that has the label text <span id="sigilToCEntry0001"><!-- The Chapter Title --></span> or just about any idea you might have to augment (not rewrite or replace) the <h*></h*> toc finding routines with something specific for sigil, that will not mess up regular html browsers or other conversion programs. Please let me know if that is something you might consider for a future release. Thanks, Kevin |
11-23-2009, 12:10 PM | #5 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Found a workaround!
Hi,
Please ignore my last request. A simple <div style="display: none;"><h1>The Chapter Title Here</h1></div> works to hide the chapter information from appearing in the text but it is properly parsed and output by Sigil into the toc.ncx file so everything now works! Thanks for making Sigil! With this change to the script, I can write an HTML file that Sigil will read in with all chapter breaks and toc entires automatically filled in and ready to go. Very nice indeed. Thanks, Kevin |
Advert | |
|
11-23-2009, 12:48 PM | #6 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Code:
<h1 title="The Chapter Title Here"></h1> |
|
11-23-2009, 01:39 PM | #7 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
That's even Better
Hi,
Thanks for that idea. It is cleaner all around Thanks, Kevin |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Page Mapping Using toc.ncx | lorddon | ePub | 35 | 01-16-2018 12:18 PM |
[Old Thread] calibre not creating content.opf or toc.ncx files during conversion | foxxywith2xs | Calibre | 7 | 12-16-2012 07:49 PM |
adding a toc.ncx file to the .prc package | cyberbaffled | Amazon Kindle | 4 | 09-14-2010 02:21 PM |
Can you bypass first two items in TOC.ncx? | sueneu | Kindle Formats | 4 | 07-14-2010 08:36 AM |
toc.ncx playOrder question | aarcane | ePub | 8 | 05-25-2010 05:00 AM |