09-17-2013, 09:27 AM | #46 | |
Well trained by Cats
Posts: 29,791
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:
In EPUB, the NCX file is the official TOC (What you see on the side (if enabled) in the Calibre viewer Calibre can generate the Inline one during conversion (and has options for Front or 'Back of the Book' placement) Sigil will also generate an 'HTML TOC' from the NCX ( save your work before using this feature: crash prone on Windows) What I see in picture 2 is some HTML Code showing as text (the title is correct) |
|
09-26-2013, 10:47 AM | #47 |
Connoisseur
Posts: 92
Karma: 1000100
Join Date: Oct 2010
Device: Samsung tab 3 & Nook Simple Touch with Glow light
|
Allways Expanded ToC in Nook simple touch
I'm using the fantastic new Edit ToC to handle a merged food recipe epub.
Everything is great when viewed on the Calibre Viewer, but on my Nook Simple Touch the ToC is always 'expanded' and what I wanted is always 'collapsed', allowing me to expand a 1st level ToC when I wanted to. Is this a problem with my Nook, or somewhere in the PI? Any solutions? |
Advert | |
|
09-26-2013, 10:54 AM | #48 |
Well trained by Cats
Posts: 29,791
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Nested (multi-level) TOC handling is a device issue if it looks good (nesting wise) in the viewer
|
09-26-2013, 11:03 AM | #49 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Do other books with a multi-level TOC work OK on your nook?
|
09-26-2013, 11:47 AM | #50 |
Connoisseur
Posts: 92
Karma: 1000100
Join Date: Oct 2010
Device: Samsung tab 3 & Nook Simple Touch with Glow light
|
|
Advert | |
|
09-26-2013, 06:38 PM | #51 |
Connoisseur
Posts: 92
Karma: 1000100
Join Date: Oct 2010
Device: Samsung tab 3 & Nook Simple Touch with Glow light
|
|
09-26-2013, 06:48 PM | #52 |
Wizard
Posts: 1,751
Karma: 2667650
Join Date: Jul 2012
Device: Android, Nook Simple Touch, Nook Color, ..., Glo
|
Oops never mind
|
11-20-2013, 09:03 AM | #53 |
Connoisseur
Posts: 69
Karma: 520
Join Date: Jun 2012
Location: France
Device: Kindle Paperwhite 5 & iPad Mini & Galaxy Tab10
|
Thank You!
I have just used this tool to create a ToC for an unwieldy 8-book anthology and it's a real treat!
This will enable me to split the anthology into more manageable publications. And so easy to use, too! |
12-05-2013, 08:24 AM | #54 |
Zealot
Posts: 108
Karma: 810
Join Date: Jul 2012
Device: Kobo
|
Determining best epub candidates for Edit ToC.
While I was using the new Edit TOC feature (with belated thanks to Kovid !) to go through hundreds of epubs currently without a useful TOC, I was wondering how to better isolate the epubs where Edit TOC would be most likely to be effective?
The "Generate ToC from files" option has been the one that is most likely to work (an epub without a useful ToC typically also does not have links or headers that will help) and the key factor for that "from files" option to work well seems to be whether the number of html files within the epub correspond to a few more than the number of chapters one might expect in the epub. Does anyone know of an existing feature in Calibre or any of the plugins (or a regular expression) that could could provide a count of the number of html files within the ePub, so that the count could be put into a temporary sort column? I am already using a feature in the Quality Check plugin (Check ePub structure / Check NCX TOC with < 3 entries) to separate out most of the epubs without a useful TOC, and I can't think of a better way to do that in bulk. Any other suggestions for sorting out ePubs that are the best candidates for Edit ToC would also be great, including identifying those where there are in fact links and headers that might provide an effective alternative when "from files" will not work. The innovative simplicity and effectiveness of Edit ToC is greatly appreciated Kovid ! |
12-05-2013, 11:14 AM | #55 |
Well trained by Cats
Posts: 29,791
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Try the Quality check PI
Check EPUB Structure: Check NCX TOC with less than 3 entries |
12-05-2013, 12:00 PM | #56 |
Zealot
Posts: 108
Karma: 810
Join Date: Jul 2012
Device: Kobo
|
Thank you, but in my posting I noted that I was already using that feature and was seeing if something in addition might be available such as a regular expression that could identify the number of html files within each ePub, for the reasons noted.
|
12-05-2013, 01:35 PM | #57 |
Well trained by Cats
Posts: 29,791
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You can have 1 big HTML file that could have many places for TOC entries You can have many HTML files that do not get any (typical) TOC entries (eg no chapters (header) at all) I use that tool, then select All (results) and add a Tag. Then I check Each book, fixing or adjusting tags for future work/whitelising |
12-05-2013, 03:11 PM | #58 |
Zealot
Posts: 108
Karma: 810
Join Date: Jul 2012
Device: Kobo
|
Yes, there certainly are different situations, but an approach for determining the count of the html files would be helpful, But if that is not cannot be done through a regular expression or whatever, then so be it. Thanks.
|
03-01-2017, 05:03 PM | #59 |
Zealot
Posts: 108
Karma: 810
Join Date: Jul 2012
Device: Kobo
|
Double Quote in RegEx code for auto-generating ToC ?
As noted earlier, this Edit ToC feature is very useful. Thanks to Kovid.
Does anyone know what RegEx coding should be used within this Edit ToC function in order to include ToC items that are enclosed in double quotes? FWIW, to provide some context, I have found the following code to be quite effective in generating TOC entries (copied into the first slot in the pop-up box "Create ToC from XPath") ... it will capture variations using roman numerals, chapter numbers, short descriptors, etc and can be retained using the "save settings" option using the code itself as the name of the setting: Note: the fourth and fifth characters in the code below are a colon followed by a small letter p, but those two characters are auto-replaced by a pesky icon sticking out its tongue, so just reverse-substitute if you use the code: //h:p[re:test(., "(^\s*[0-9]{1,2}\s*$)|(^.{1,80}[a-z]\s*$)|(^\s*[IVX]{1,6}\s*$)|(^\s*prologue)|(^\s*epilogue)|(^\s*chap ter)|(^\s*map)|(^\s*index)|(^\s*introduction)|(^\s *notes)", "i")] I recently set up a modified version as follows to also catch ToC items that end with a question mark, exclamation mark, etc but use it only as an alternative approach when necessary because in some case it generates too many extraneous entries that need to be manually deleted: Code:
//h:p[re:test(., "(^\s*[0-9]{1,2}\s*[\.\!\?]{0,1}\s*$)|(^.{1,80}[a-z]\s*$)|(^.{1,20}[0-9]\s*$)|(^.{1,20}\s*[\.\!\?]\s*$)|(^\s*[IVX]{1,6}\s*[\.]{0,1}\s*$)|(^\s*prologue)|(^\s*epilogue)|(^\s*chapter)|(^\s*map)|(^\s*index)|(^\s*introduction)|(^\s*notes)", "i")] Thanks for any help on this. Last edited by BetterRed; 03-01-2017 at 05:32 PM. Reason: add some noparse tags |
03-01-2017, 05:41 PM | #60 |
null operator (he/him)
Posts: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Moderator Notice @Rob559 I added some noparse tags to get rid of the pesky icons, and I put the second regex string in a code block which I think is better for copying - remove if you prefer but leave the noparse. Sorry - can't answer your question, my re-fu runs out after ~10 characters BR |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Introducing New tool: "Polish" Books | kovidgoyal | Calibre | 131 | 01-29-2023 04:41 PM |
New Edit ToC tool | library addict | Calibre | 2 | 03-15-2013 04:49 AM |
Release : New Tool to Edit ePubs TOC, Edit with Sigil and keep you TOC | Nigol | ePub | 105 | 10-29-2012 11:40 AM |
Getting calibre to detect "Prologue" and "Epilogue" for TOC | sherman | Calibre | 2 | 09-20-2010 02:21 AM |