09-16-2018, 10:10 AM | #1 |
Member
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 05:41 AM. |
09-16-2018, 11:20 AM | #2 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Moved to the ePub forum.
|
Advert | |
|
09-16-2018, 12:02 PM | #3 |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
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 07:54 PM. |
09-17-2018, 06:42 AM | #4 |
Member
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 07:11 AM. |
09-17-2018, 09:24 AM | #5 | ||
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Quote:
Quote:
|
||
Advert | |
|
09-17-2018, 02:20 PM | #6 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
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 |
09-21-2018, 06:31 AM | #7 |
Member
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! |
09-21-2018, 11:12 AM | #8 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
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 |
|
09-22-2018, 11:29 AM | #9 |
Member
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 |
09-22-2018, 11:35 AM | #10 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
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 |
|
09-22-2018, 12:17 PM | #11 |
Member
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. |
09-22-2018, 12:47 PM | #12 |
Member
Posts: 22
Karma: 10
Join Date: Mar 2018
Device: pocketbook Touch HD 2
|
|
09-22-2018, 12:51 PM | #13 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
09-22-2018, 06:53 PM | #14 |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
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". 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! Last edited by Turtle91; 09-22-2018 at 06:59 PM. |
09-22-2018, 11:42 PM | #15 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
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 |
|
Tags |
epub, pocketbook, touch hd 2 |
Thread Tools | Search this Thread |
|
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 06:32 PM |
[Old Thread] Create just one TOC | medwatt | Conversion | 27 | 12-18-2012 05:55 PM |
Create Newspaper TOC | plantoschka | Kindle Formats | 2 | 09-09-2010 02:03 PM |
Txt to Epub: how to create a toc | nestol | Calibre | 0 | 08-09-2010 08:56 PM |
How to create a TOC from scratch? | greenapple | Sigil | 5 | 06-01-2010 02:20 AM |