![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2022
Device: sigil
|
![]() ![]() I'd looking for in the 'plugins list' and in this forums and not found references at this issue. Explaining my point: I'm copying text (large of) in xhtml and your respective toc.xhtml from online source. However, the file toc.ncx (or nav.html) it's not available. It's possible running at toc.html to transform it in toc.ncx? I believe this is an opportunity to make a new plugin. I understanding Python, but I don´t know which libraries using to this. Anyone is available to a partnership? ![]() |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,761
Karma: 5706256
Join Date: Nov 2009
Device: many
|
Make the toc.html the nav (import it to Sigil into an empty epub3 and copy and paste its contents into the nav.xhtml.
This assumes your toc.xhtml follows the general rules for nav.xhtml documents. Then use Sigil's epub3 specific tools menu to generate the ncx from the nav. Last edited by KevinH; 10-26-2022 at 06:24 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,761
Karma: 5706256
Join Date: Nov 2009
Device: many
|
Or if your html files properly use heading tags h1-h6, then just create the ncx directly from the actual headers of the xhtml chapter files.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2022
Device: sigil
|
|
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2022
Device: sigil
|
Quote:
Well, this is a manual solution that works. But, I believe that is equal job make the headers in html texts. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,761
Karma: 5706256
Join Date: Nov 2009
Device: many
|
For accessibility reasons, adding structural heading tags is important. If there is a some way to use find and replace to generate proper heading tags, that would be best.
|
![]() |
![]() |
![]() |
#7 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
No software has the ability to look at, say, 2700 paragraphs of text and magically pick out the relevant structural headings and from thence, create an NCX or Nav. You have to give it SOME help and honestly, this is typically done at the word processing stage (Word, AWP, LO, whatever); then simply exported to HTML with the appropriate HTML tags (h1, h2, etc.) and then, in Sigil, you can simply use that to build your own NCX or NAV (or both). It's a critical part, really, of understanding how ePUBs work and all that. It's something that should be done regardless of the later intended use, especially around accessibility. It's also important around usability issues--if you have headings and all that, you can easily and with pretty much 2 clicks, break the ePUB file into separate XHTML files, to reduce the load on the reading device. Much more efficient, better rendering, and all that. Yes, if you haven't already done it, it's a bit of work NOW, but if you use headings and Styles (word-processing-wise or markdown or whatever you're doing) during the writing/editing, this is all pretty much a snap. Not to mention all the good things it does for you during that word-processing stage, as well. HTH Hitch |
|
![]() |
![]() |
![]() |
#8 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,761
Karma: 5706256
Join Date: Nov 2009
Device: many
|
If there is some detectable pattern of heading titles , you should be able to use Find/Replace with regular expressions to insert the required h1-h6 tags automatically.
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
One might also be able use the Tag Mechanic plugin. If there's p tags that use a consistent class attribute for chapters, those could easily be converted to h tags.
|
![]() |
![]() |
![]() |
#10 | ||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Hitch |
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Some files.html & toc.xhtml (also Cover.xhtml) | chaot | Workshop | 23 | 02-13-2017 12:20 PM |
Ho do I create a TOC for ePub which does convert to an active TOC in Kindle Previewer | K-Thom | Calibre | 1 | 09-24-2013 06:32 PM |
Kindler previewer not recognizing toc.ncx file, my html toc, or the start point... | petercrowell | Kindle Formats | 2 | 05-01-2012 08:14 AM |
Inline TOC from toc.ncx | elmago79 | Kindle Formats | 38 | 03-25-2011 12:56 PM |
Use Regex to Code an Inline TOC, from an External TOC's .ncx File | mostlynovels | ePub | 2 | 03-16-2011 12:15 PM |