Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-22-2009, 08:00 PM   #1
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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
KevinH is online now   Reply With Quote
Old 11-22-2009, 09:02 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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
KevinH is online now   Reply With Quote
Advert
Old 11-23-2009, 04:35 AM   #3
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by KevinH View Post
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.
Create an issue on the tracker with an example file. The fix for this could possibly land in v0.1.5, but I may not have time. S&R is practically done and I want to push that out ASAP. Fixing this bug would require rewriting the heading extraction algorithms which I admittedly have been putting off for a while now. I'm aware of their limitations.

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.
Valloric is offline   Reply With Quote
Old 11-23-2009, 10:33 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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
KevinH is online now   Reply With Quote
Old 11-23-2009, 12:10 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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
KevinH is online now   Reply With Quote
Advert
Old 11-23-2009, 12:48 PM   #6
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by KevinH View Post
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!
You can also use the "title" attribute on heading tags. This for instance also works:
Code:
<h1 title="The Chapter Title Here"></h1>
Valloric is offline   Reply With Quote
Old 11-23-2009, 01:39 PM   #7
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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
KevinH is online now   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 07:55 PM.


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