Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-16-2018, 11:10 AM   #1
yJan1986
Member
yJan1986 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: pocketbook Touch HD 2
Can I create an EPUB TOC by myself?

Hello,

Necessity calls me here, the way I used to create local links (much like the way a regular webpage uses local links, e.g. <a href="#footnote1">Yo!</a> ... <h1 id="footnote1">Wassup???</h1>, used to work in EPUB ) doesn't work anymore, in my previous thread ( https://www.mobileread.com/forums/showthread.php?p=3747348#post3747348 ) I was told by some fine gentlemen that the missing internal splitting of HTML files inside of the EPUB container together with an error in the reader's firmware was the reason for my problems.

Do I need to wait for the file to be converted to EPUB, before I can actually say how the HTML files are split up to single pages, as I can't know beforehand, ( e.g. <a href="./index_split_001.HTML#footnote1 ) or is there a simpler way to circumvent the internal workings of the EPUB file?

If there is an official documentation, or at least something by individuals, I'd be glad to be noticed.

My reader was and is a pocketbook touch HD 2, latest firmware version.

Thank you very much for all your help!

( I could count H1 tags, that just dawned on me... , so answer only if you know of a better way :-) )

Last edited by yJan1986; 09-17-2018 at 06:41 AM.
yJan1986 is offline   Reply With Quote
Old 09-16-2018, 12:20 PM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 84,022
Karma: 78697158
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Moved to the ePub forum.
HarryT is offline   Reply With Quote
Old 09-16-2018, 01:02 PM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,694
Karma: 11766398
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
Not sure exactly what your issue is. Do you have an example of a file that is NOT working?

Your example <a> tag works just fine as long as you are only linking to IDs in the same html document. Even though it is not required to split the html document - it is much more common than not. Ebook rendering is much more efficient with smaller file sizes. Most people will split on every chapter or when they want to ensure an item is on its own page.

If you want to link to a different page you need to use the full reference in your tag eg. <a href="Chapter01#footnote1">Yo</a>.

If you are using a specialized ePub software like Sigil or Calibre, then it will automatically fix the links when the HTML page is split - as long as they are valid links to begin with.

Cheers,

PS. Sigil and Calibre will also automagically create a TOC for you. You can then edit them manually....makes life very easy!

Last edited by Turtle91; 09-16-2018 at 08:54 PM.
Turtle91 is offline   Reply With Quote
Old 09-17-2018, 07:42 AM   #4
yJan1986
Member
yJan1986 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: pocketbook Touch HD 2
@HarryT: thank you for moving my topic
@turtle91: in the last thread I posted 2 links – one is the EPUB file and the other is the HTMLZ source.

The problem is: the navigation was automatically included as part of the text in the actual EPUB file at the beginning or at the end of the EPUB, if you let calibre do this.but now it seems this option has disappeared. The only option is the real table of contents of the EPUB file, and this is slower than the way over direct links.

My navigation buttons include back, return to previous prayer, proceed to next prayer and go to the table of contents, included in the file itself.

You'll see, if you peek at the EPUB, that I included the links and anchors in the HTML file, where they worked. But once calibre converted the file to EPUB, the links stopped working.

I must have done something wrong in my syntax, if calibre didn't detect in-document links.

Last edited by yJan1986; 09-17-2018 at 08:11 AM.
yJan1986 is offline   Reply With Quote
Old 09-17-2018, 10:24 AM   #5
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,209
Karma: 500084
Join Date: Dec 2012
Device: Kindle
Quote:
Do I need to wait for the file to be converted to EPUB, before I can actually say how the HTML files are split up to single pages, as I can't know beforehand, ( e.g. <a href="./index_split_001.HTML#footnote1 ) or is there a simpler way to circumvent the internal workings of the EPUB file?
I don't know what could be simpler than to open an html file in Sigil, to link it to a favored style sheet, and then to click on the appropriate icon and merrily split away! That's the way I've handled every ebook since January 2012.

Quote:
But once calibre converted the file to EPUB, the links stopped working.
From all that I have read (and I've read a lot!), you're better off leaving Calibre out of the process if you are serious about publishing, as opposed to managing books for your own enjoyment. To me, Calibre-generated html looks an awful mess. I use it regularly to convert epubs to mobi files so I can read them on my Fire tablet, but I wouldn't dream of inflicting that html on my own books.
Notjohn is offline   Reply With Quote
Old 09-17-2018, 03:20 PM   #6
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,075
Karma: 12302236
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
You can use something like Atlantis Word Processor. It lets you work as in Word and shows the TOC live on the left side of the screen so you can see exactly what it will look like as you build it. It will also save your file as an ePub. No need to deal with HTML. Check our wiki for more description. You use styles like in word to determine if a new page will be generated.

Dale
DaleDe is offline   Reply With Quote
Old 09-21-2018, 07:31 AM   #7
yJan1986
Member
yJan1986 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: pocketbook Touch HD 2
the fact that calibre doesn't always deliver best results is new for me, meanwhile the fact that earlier versions of calibre produced fully functional EPUB books is indisputable.

@notJohn: no, I don't plan to publish books for money.
@DaleD: I'm currently trying.

Thank you very much for all your help!
yJan1986 is offline   Reply With Quote
Old 09-21-2018, 12:12 PM   #8
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 7,094
Karma: 63607829
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by yJan1986 View Post
@HarryT: thank you for moving my topic
@turtle91: in the last thread I posted 2 links – one is the EPUB file and the other is the HTMLZ source.

The problem is: the navigation was automatically included as part of the text in the actual EPUB file at the beginning or at the end of the EPUB, if you let calibre do this.but now it seems this option has disappeared. The only option is the real table of contents of the EPUB file, and this is slower than the way over direct links.

My navigation buttons include back, return to previous prayer, proceed to next prayer and go to the table of contents, included in the file itself.

You'll see, if you peek at the EPUB, that I included the links and anchors in the HTML file, where they worked. But once calibre converted the file to EPUB, the links stopped working.

I must have done something wrong in my syntax, if calibre didn't detect in-document links.
Can you give me the line number, and text, for ANY line in your HTML, that includes links?

I opened your HTMLZ file. I don't see any links. In fact, I don't see any links, at all. I have searched for hrefs...I've searched for <a, and so far, I've found nothing. This is the HTML file that you say, had the links, is that right? Did I miss something?

Ditto the ePUB--there are simply no links there. There's the usual link for the CSS; a link for an image, and that's all, folks. I've searched for hrefs, and found nada. For that matter, I suspect your image links are broken, too, in the ePUB.

Unless I've downloaded the wrong files (ePUB/HTML) from your original post?

Hitch
Hitch is offline   Reply With Quote
Old 09-22-2018, 12:29 PM   #9
yJan1986
Member
yJan1986 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: pocketbook Touch HD 2
You are absolutely right, I presume that I have uploaded the right file, but now I can see that it was an older version.


Here is the link to a more recent version of the file.

epub file:
https://drive.google.com/open?id=16_...7qMI4YY3vjfO3b

htmlz file:
https://drive.google.com/open?id=1wo...kB3w4s_QOqb0RL
yJan1986 is offline   Reply With Quote
Old 09-22-2018, 12:35 PM   #10
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 7,094
Karma: 63607829
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by yJan1986 View Post
You are absolutely right, I presume that I have uploaded the right file, but now I can see that it was an older version.


Here is the link to a more recent version of the file.

epub file:
https://drive.google.com/open?id=16_...7qMI4YY3vjfO3b

htmlz file:
https://drive.google.com/open?id=1wo...kB3w4s_QOqb0RL
Well, that certainly makes it harder to troubleshoot.

When I get to my office today, I'll download these and look at them, but I suspect the simple explanation is the structure of the links.

Hitch
Hitch is offline   Reply With Quote
Old 09-22-2018, 01:17 PM   #11
yJan1986
Member
yJan1986 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: pocketbook Touch HD 2
I just updated the EPUB file, that the significant links are a little more distinct.

Instead of <a href="#chapter5">xyz</a> I used the more accurate diction <a href="index.htmll#chapter5">xyz</a>, and within the EPUB viewer of calibre the window starts moving when you click the link, but the target is not the caption, but the text somewhere before the actual mark I aimed at.this

I'll update the files in a second.
yJan1986 is offline   Reply With Quote
Old 09-22-2018, 01:47 PM   #12
yJan1986
Member
yJan1986 began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: pocketbook Touch HD 2
EPUB:
https://drive.google.com/open?id=1Im...2gASIICCywV3K9

ZIP:
https://drive.google.com/open?id=12D...2mnKHmR9SNUa0R
yJan1986 is offline   Reply With Quote
Old 09-22-2018, 01:51 PM   #13
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 7,094
Karma: 63607829
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
I don't know what you did, but when I try to open this with Sigil, I get the dreaded Pink Screen of Death, because you have a fatal error in the FIRST LINE. Please fix it, please check it with Sigil, FIRST, and then please put it back up for download.

Hitch
Hitch is offline   Reply With Quote
Old 09-22-2018, 07:53 PM   #14
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,694
Karma: 11766398
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
yJan1986 - this file is a mess! The html coding is inconsistent. It looks like the source for this was a scan/conversion of a pdf! You have some missing sections/chapters. You have some missing images. You have images that aren't used. The images need to be referenced with the proper src="" tag. (eg <img alt="" src="../Images/00001.jpg" /> */ or whatever the path to your image files /*)

I have taken the liberty of cleaning it up a little bit so it is readable. You should take a look at some of the differences between what you had and what I've done to get some ideas on the direction you should go. One recommendation is to rename the "Calibre" classes into something that makes sense; instead of class="calibre2174" you could have class="verse". That will help you to understand what each section is supposed to do.

In answer to your links question:

You need to make sure you have a correct reference (not just the extra l in your .htmll) otherwise it will throw errors. The correct reference isn't necessarily a full path but you may need to provide a full path if you reference a separate html file.

For example:

Code:
href="../Text/chapter1.html"
if the destination is in a separate html file in the "Text" folder and you want to open at the beginning of the file.

href="../Text/chapter1.html#section3"
if the destination is in a separate html file in the "Text" folder and you want to open at the point within the file with id="section3". 

href="#section3"
if the destination is in the current file and you want to open at the point within the file with id="section3".
Some of your references aren't working because they are pointing at missing locations. You don't have an id="chapter1" in your index file.

I have also taken the liberty of splitting your really long index.html file into individual chapter files. This makes it much easier/faster for a reading device/app to render your files. It also makes your link references easier because all you need to do is reference the file name (href="../Text/chapter4.html"). The renderer will automatically open the file to the top of the document.

Good luck!

EDIT: sorry loaded the wrong file!
Attached Files
File Type: epub Gebete1 - Jan.epub (1.50 MB, 23 views)

Last edited by Turtle91; 09-22-2018 at 07:59 PM.
Turtle91 is offline   Reply With Quote
Old 09-23-2018, 12:42 AM   #15
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 7,094
Karma: 63607829
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by Turtle91 View Post
yJan1986 - this file is a mess! The html coding is inconsistent. It looks like the source for this was a scan/conversion of a pdf! You have some missing sections/chapters. You have some missing images. You have images that aren't used. The images need to be referenced with the proper src="" tag. (eg <img alt="" src="../Images/00001.jpg" /> */ or whatever the path to your image files /*)

I have taken the liberty of cleaning it up a little bit so it is readable. You should take a look at some of the differences between what you had and what I've done to get some ideas on the direction you should go. One recommendation is to rename the "Calibre" classes into something that makes sense; instead of class="calibre2174" you could have class="verse". That will help you to understand what each section is supposed to do.

In answer to your links question:

You need to make sure you have a correct reference (not just the extra l in your .htmll) otherwise it will throw errors. The correct reference isn't necessarily a full path but you may need to provide a full path if you reference a separate html file.

For example:

Code:
href="../Text/chapter1.html"
if the destination is in a separate html file in the "Text" folder and you want to open at the beginning of the file.

href="../Text/chapter1.html#section3"
if the destination is in a separate html file in the "Text" folder and you want to open at the point within the file with id="section3". 

href="#section3"
if the destination is in the current file and you want to open at the point within the file with id="section3".
Some of your references aren't working because they are pointing at missing locations. You don't have an id="chapter1" in your index file.

I have also taken the liberty of splitting your really long index.html file into individual chapter files. This makes it much easier/faster for a reading device/app to render your files. It also makes your link references easier because all you need to do is reference the file name (href="../Text/chapter4.html"). The renderer will automatically open the file to the top of the document.

Good luck!

EDIT: sorry loaded the wrong file!
You're a nicer person than I am, Turt. I took one look at it and threw up my hands. I couldn't just let Sigil fix it--after all, we were looking for errata, right? And one look at what I could see--well, yes, a "mess" is not even close to an accurate description. Dog's breakfast is closer to accurate.

That file needs whoever is working on it to learn some HTML and start learning to clean up messes like that. The links are the least of the worries.

Hitch
Hitch is offline   Reply With Quote
Reply

Tags
epub, pocketbook, touch hd 2

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
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 07:32 PM
[Old Thread] Create just one TOC medwatt Conversion 27 12-18-2012 06:55 PM
Create Newspaper TOC plantoschka Kindle Formats 2 09-09-2010 03:03 PM
Txt to Epub: how to create a toc nestol Calibre 0 08-09-2010 09:56 PM
How to create a TOC from scratch? greenapple Sigil 5 06-01-2010 03:20 AM


All times are GMT -4. The time now is 05:49 PM.


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