Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-26-2021, 09:24 AM   #1
franc
Connoisseur
franc began at the beginning.
 
Posts: 68
Karma: 10
Join Date: Feb 2010
Device: none
TOC - create from multiple files

Hallo

is there a way to create a Table of contents (TOC) with multi selection of files?
I have some books where the toc is broken or totally miscreated and I need to fix that.
I can add files (which are the chapters) one by one, which is unhandy enough, but I cannot multiselect all chapter-files to get added all together to the toc.

In Calibre book-edit I can select more files easily so that must be possible in Sigil as well, I guess, to create the toc fastly from the files somehow.

Thanks for hints.

frank with Sigil 1.5beta
franc is offline   Reply With Quote
Old 03-26-2021, 09:38 AM   #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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
You do not have to multi-select files to generate a table of contents. In fact one chapter per file is the norm. So as long as you use heading tags in each file (h1, h2, h3) to mark the chapter and section titles, you can use Sigil's Create Table Of Contents tool. In epub2 it will recreate the NCX, in epub3 it will recreate the NAV, and there is an option to create a HTML toc as well.

You might want to take a look at the Sigil User Guide if you are new to Sigil.

It can be found here:

https://github.com/Sigil-Ebook/Sigil....25_epub3.epub
KevinH is offline   Reply With Quote
Old 03-26-2021, 09:40 AM   #3
The_book
Zealot
The_book began at the beginning.
 
Posts: 100
Karma: 10
Join Date: Aug 2019
Device: none
1. select all files which is not chapters
2. `save as` into a folder
3. delete them
4. create Table of contents
5. add them back

or

1. select all files which is not chapters
2. replace `<h.` to something else (unique)
1. like `<h(.)` to `<#h\1`
4. create Table of contents
5. replace them back
1. like `<#h(.)` to `<h\1`
The_book is offline   Reply With Quote
Old 03-26-2021, 10:09 AM   #4
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,548
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I have no idea what's going on here.
DiapDealer is offline   Reply With Quote
Old 03-26-2021, 10:16 AM   #5
franc
Connoisseur
franc began at the beginning.
 
Posts: 68
Karma: 10
Join Date: Feb 2010
Device: none
Thank firstly a lot for that fast answerings!

Now I see clearer a bit. My toc was not created because the htm-files all missing a h-tag, e.g.:

Code:
...<body class="calibre" link="blue" vlink="blue">

<div class="WordSection">

   <span class="calibre3"><br class="calibre4" clear="all" id="calibre_pb_9"/></span> 

   <p class="MsoNormal1"><span class="calibre1"><img alt="" border="0" class="calibre18" src="../Images/dwhakf-11.png"/></span></p>

   <p class="calibre16"><span class="calibre1">*</span></p>

   <p class="calibre16"><span class="calibre1">Trude wurde seekrank. 
...
So I could replace in all chapter-files the whole body tag with the same body tag and added some h1 Tag so this would work.
But I did it in Calibre's ebook-edit, which can handle that multiselect, so I use both, its faster.
Thanks!
franc is offline   Reply With Quote
Old 03-26-2021, 10:43 AM   #6
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
You seem to be going about things in a round-about way.
Please try the user-guide. It was recently updated and has a tutorial on how and why to add headings to mark them and generate a Table of Contents.


Quote:
Originally Posted by franc View Post
Thank firstly a lot for that fast answerings!

Now I see clearer a bit. My toc was not created because the htm-files all missing a h-tag, e.g.:

Code:
...<body class="calibre" link="blue" vlink="blue">

<div class="WordSection">

   <span class="calibre3"><br class="calibre4" clear="all" id="calibre_pb_9"/></span> 

   <p class="MsoNormal1"><span class="calibre1"><img alt="" border="0" class="calibre18" src="../Images/dwhakf-11.png"/></span></p>

   <p class="calibre16"><span class="calibre1">*</span></p>

   <p class="calibre16"><span class="calibre1">Trude wurde seekrank. 
...
So I could replace in all chapter-files the whole body tag with the same body tag and added some h1 Tag so this would work.
But I did it in Calibre's ebook-edit, which can handle that multiselect, so I use both, its faster.
Thanks!
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create single book out of multiple files? bumpkinboy Editor 4 04-08-2014 06:41 AM
Multiple HTML files w/ TOC to MOBI, not added in order listed in TOC dysfunction Conversion 3 01-03-2014 12:40 AM
Create TOC based on physical files Barty Conversion 2 11-18-2013 12:29 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
TOC filter and Multiple HTML Files Beedrew Calibre 1 07-20-2010 10:32 PM


All times are GMT -4. The time now is 03:36 AM.


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