Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-16-2012, 02:18 PM   #1
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
ToC renumbering

In toc.ncx, each entry is numbered in sequential order. If one of the entries is deleted, all the entries after that need to be renumbered. Can Sigil do this for us or can it be made to do this for us?
JSWolf is offline   Reply With Quote
Old 01-16-2012, 02:29 PM   #2
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Quote:
Originally Posted by JSWolf View Post
In toc.ncx, each entry is numbered in sequential order. If one of the entries is deleted, all the entries after that need to be renumbered. Can Sigil do this for us or can it be made to do this for us?
What about Generate TOC from headings?
meme is offline   Reply With Quote
Old 01-16-2012, 03:03 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I don't always have an ncx that exactly matches what would be produced by "Generate TOC from headings." I often build portions of the ncx manually.

So while it's certainly not something that will keep me up nights if it never materializes; the ability to sequentially renumber existing ncx entries (without regenerating the toc from headings) would be a feature that I would giggle with glee about.
DiapDealer is online now   Reply With Quote
Old 01-16-2012, 03:43 PM   #4
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Could you describe an example a bit more - before after entries in the TOC, and explain how a heading gets removed?

Its something I can add to the issue log to track.

In addition to modifying Generate TOC to add the ability to select the heading levels to include in the generated TOC, I've though about using regex to search the document for certain patterns, possibly even entries already in TOC, and then allowing you to choose which entries to include. That would allow auto-renumbering, but is a much bigger issue that may not be as useful.
meme is offline   Reply With Quote
Old 01-16-2012, 04:00 PM   #5
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: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
do toc numbers have to be sequential ?

I often delete chunks of an existing toc to remove unwanted pages/ matching toc entires from start/end of books & that seems to have no effect on remainder of book. It doesn't seems to matter if toc numbering starts not at 1 or if a later part is removed.

e.g. this toc now starts at 2 , but book is fine:
<navMap>

<navPoint class="chapter" id="prol_1" playOrder="2">
<navLabel>
<text>Prologue</text>
</navLabel>
<content src="Text/StraightIntoDa_prol_1.html"/>
</navPoint>
<navPoint class="chapter" id="part_1" playOrder="3">
<navLabel>
<text>Munich, 1929</text>
</navLabel>
<content src="Text/StraightIntoDa_part_1.html"/>
</navPoint>.....

this one starts at 105, then goes 1 thru 99, there is no 100.,101,102,103,104.
<navMap>
<navPoint class="chapter" id="cd587276-645c-4638-adde-7410bf5899f5" playOrder="105">
<navLabel>
<text>Cover</text>
</navLabel>
<content src="Text/dummy_split_106.html"/>
</navPoint>
<navPoint class="chapter" id="1f87fc56-2eb2-4723-be6c-bc4bb244aa42" playOrder="1">
<navLabel>
<text>Title Page</text>
</navLabel>
<content src="Text/dummy_split_000.html"/>
</navPoint>

Last edited by cybmole; 01-16-2012 at 04:06 PM.
cybmole is offline   Reply With Quote
Old 01-16-2012, 04:12 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by cybmole View Post
do toc numbers have to be sequential ?

I often delete chunks of an existing toc to remove unwanted pages/ matching toc entires from start/end of books & that seems to have no effect on remainder of book. It doesn't seems to matter if toc numbering starts not at 1 or if a later part is removed.
That's not a problem. The problem comes when you go to add entries (that didn't previously exist) to the ncx file manually. If it's first or last you're OK but anywhere in between and you're renumbering large portions.

Quote:
Originally Posted by meme
Could you describe an example a bit more - before after entries in the TOC, and explain how a heading gets removed?
It's not that headings get removed... it's that I don't always use headings. So when I go to insert entries into the ncx manually... I often have to renumber the play-orders.

Like I said, it's not that big of a deal for me, but it's something I would use if it did exist.

Last edited by DiapDealer; 01-16-2012 at 04:41 PM.
DiapDealer is online now   Reply With Quote
Old 01-17-2012, 09:16 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by meme View Post
What about Generate TOC from headings?
Not always possible without editing the headings. And in some books, there can be more then 50 chapters. That would be a lot of chapters to have to edit just to renumber the ncx file.
JSWolf is offline   Reply With Quote
Old 01-20-2012, 03:21 PM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
If I remember correctly, in the latest ePub 2 spec, the playOrder property is optional, but if present the values must be unique and consecutive. If you have missing or repeated values it is probably easier to remove them all (they have no use that I know of).
Jellby is offline   Reply With Quote
Old 01-20-2012, 04:44 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Jellby View Post
If I remember correctly, in the latest ePub 2 spec, the playOrder property is optional, but if present the values must be unique and consecutive. If you have missing or repeated values it is probably easier to remove them all (they have no use that I know of).
I should try removing the playorder and see what FlightCrew does.
JSWolf is offline   Reply With Quote
Old 01-23-2012, 01:11 PM   #10
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
I have a working test version of the tox.ncx playOrder renumbering - right click on the toc.ncx file and select Refresh TOC PlayOrder and the toc.ncx navMap gets re-written exactly the same except the playOrder values start at 1 and increment from there. So you can add something in the middle and it'll correct the numbers.

But I do have some questions.

As also mentioned in https://www.mobileread.com/forums/showthread.php?t=75984 I found that the NCX file can also have 2 other types of navigation lists besides the navPoint - navList and pageList. The current Generate TOC From Headings functionality in Sigil does not do anything with navList or pageList, so the renumbering also ignores/deletes these types of lists.

However, I'm wondering if anyone uses navList or pageList? If it is used and it is in a toc.ncx that you renumber, then the navList/pageList entries will be removed. If it is used, possibly/likely to be used, then I can extend the code to rewrite those as well - since they also have playOrder numbers. As far as I can see there is only one set of playOrder numbers used by each section, so if there is some specific interlaced ordering of the elements that was manually created in the file then that would be lost and all navPoints would show up before the navList and the pageList items in the playOrder.
meme is offline   Reply With Quote
Old 01-27-2012, 11:39 AM   #11
Hellmark
Wizard
Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.Hellmark ought to be getting tired of karma fortunes by now.
 
Hellmark's Avatar
 
Posts: 2,549
Karma: 3799999
Join Date: Jun 2009
Location: O'Fallon, Missouri, USA
Device: Nokia N800, PRS-505, Nook STR Glowlight, Kindle 3
Quote:
Originally Posted by meme View Post
What about Generate TOC from headings?
Not all books are designed to really use headers. One book I recently read, used images from Grey's Anatomy to denote breaks in chapters. Now that the ToC editor has been replaced with only the option to generate ToC from headers, stuff like that is now a pain in the ass.

Requiring you to either make ToC by hand, or use traditional Chapter headings really limits artistic license. Hell, we can't even rename the ToC entries anymore in the ToC view. The old Editor, we could rename the entries, incase we wanted the ToC to appear slightly different than how they were at the start of each Chapter. Not only that, but there are legit uses for using Headers but not wanting it to be listed in the ToC.

I don't know, why even use Sigil if we're forced to code more by hand. I've been using Sigil for quite a while, and there are some changes that have made things easier, but other it so much more difficult.
Hellmark is offline   Reply With Quote
Old 01-27-2012, 11:46 AM   #12
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: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by Hellmark View Post
Now that the ToC editor has been replaced with only the option to generate ToC from headers, stuff like that is now a pain in the ass.

Requiring you to either make ToC by hand,.....
please tell me that's not correct, someone

IF the toc editor has been scrapped in 0.5 I will want to stay on 0.4.2!

it is there in 0.4.2. which I still use.
cybmole is offline   Reply With Quote
Old 01-27-2012, 11:48 AM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by cybmole View Post
please tell me that's not correct, someone

IF the toc editor has been scrapped in 0.5 I will want to stay on 0.4.2!

it is there in 0.4.2. which I still use.
The ability to edit the NCX file manually has not been changed in v0.5—if that's what you're referring to.
DiapDealer is online now   Reply With Quote
Old 01-27-2012, 12:05 PM   #14
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Quote:
Originally Posted by Hellmark View Post
Now that the ToC editor has been replaced with only the option to generate ToC from headers, stuff like that is now a pain in the ass.

Requiring you to either make ToC by hand, or use traditional Chapter headings really limits artistic license. Hell, we can't even rename the ToC entries anymore in the ToC view. The old Editor, we could rename the entries, incase we wanted the ToC to appear slightly different than how they were at the start of each Chapter. Not only that, but there are legit uses for using Headers but not wanting it to be listed in the ToC.

I don't know, why even use Sigil if we're forced to code more by hand. I've been using Sigil for quite a while, and there are some changes that have made things easier, but other it so much more difficult.
What exactly do you mean the TOC editor has been replaced? What exactly were you doing before, on what version (I haven't used the old versions much so don't know what to compare the new one to).

If there are features that you want, then if, when you ask for them, you provide more details it might help get them implemented.

For instance, it seems like renaming the entry in the TOC is something that people want. At the moment this can be done by editing the toc.ncx file directly. Or if you generate from headings, then you can put a title value in your heading tag to show the title in the toc instead of the text in the heading. And of course in generating headings you can select which ones to include (0.5.0 even includes an extra drop down that lets you select/unselect based on heading level automatically).

I assume, but I'm only guess, that what you want is the ability to select the TOC entry in the active TOC display and to rename it there without going into the toc.ncx file. If so, that's something I can look into. Though it opens the question of whether or not just the toc.ncx file should be updated, or if the element should have its title value changed as well for consistency (which would also keep generate from headings in sync).
meme is offline   Reply With Quote
Old 01-27-2012, 12:34 PM   #15
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Hellmark View Post
Not all books are designed to really use headers. One book I recently read, used images from Grey's Anatomy to denote breaks in chapters. Now that the ToC editor has been replaced with only the option to generate ToC from headers, stuff like that is now a pain in the ass.

Requiring you to either make ToC by hand, or use traditional Chapter headings really limits artistic license. Hell, we can't even rename the ToC entries anymore in the ToC view. The old Editor, we could rename the entries, incase we wanted the ToC to appear slightly different than how they were at the start of each Chapter. Not only that, but there are legit uses for using Headers but not wanting it to be listed in the ToC.

I don't know, why even use Sigil if we're forced to code more by hand. I've been using Sigil for quite a while, and there are some changes that have made things easier, but other it so much more difficult.
<h# class="noshow" title="anything you want"></h#>

where noshow is small or hidden styling.

<h# class="image" title="Still anything you want"><img alt="" class="chapterN" src="../Images/00002.jpg" /></h#>

My favourite is to use a background image and place text (the number) on top,. 1 image file, not 50 = smaller EPUB
theducks is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generated TOC links back to TOC page in the book Caleb666 Sigil 7 08-17-2011 11:58 AM
Inline TOC from toc.ncx elmago79 Kindle Formats 38 03-25-2011 12:56 PM
ePub TOC to mobi TOC edmnddntes Conversion 5 01-24-2011 02:56 AM
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working Magitek LRF 0 05-06-2009 01:25 PM
renumbering a pdf pimpoum PDF 1 04-30-2009 03:03 AM


All times are GMT -4. The time now is 01:37 PM.


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