12-19-2018, 12:46 PM | #1 |
Addict
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
Links in TOC don't take to the right ID
What can cause links in the TOC not to send to the right location?
My epub3 is built with Calibre, I've run Calibre check book and epub validator and the books tested ok. If I open the book in Calibre/iBooks and click on a TOC item I am redirected to the corresponding file but the HTML tag (<h1) didn't appear on top of my screen, basically, the TOC link just takes me to the right file. The TOC link looks like this: Code:
<ol> <li> <a href="intro.xhtml">Intro</a> <ul> <li><a href="intro_1.xhtml#toc_1">TakeMeThere</a></li> </ul> </li> </ol> Code:
<h1 id="toc_1">Welcome</h1> |
12-20-2018, 12:34 AM | #2 |
Bibliophagist
Posts: 35,356
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
How did you generate that TOC entry? I've haven't seen an epub3 navigation document that used nested ordered and unordered lists though I suppose one could be manually generated. What does your epub3 declare as the navigation document in the content.opf The declaration should look something like:
Code:
<item href="Text/nav.xhtml" id="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/> Last edited by DNSB; 12-20-2018 at 01:28 AM. Reason: Fat Fingered Typos© |
Advert | |
|
12-20-2018, 01:36 AM | #3 |
Addict
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
Hello David and thank you very much for taking the time to try and help!
I use Calibre to generate TOC since it's so handy :-) My TOC file looks like this: Code:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:ibooks="http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0" epub:prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0"> <head> <title>Book title</title> <link href="../css/styles.css" rel="stylesheet" type="text/css"/> </head> <body xml:lang="he" dir="rtl"> <nav id="toc" epub:type="toc"> <ol> <li> <a href="intro.xhtml">Intro</a> <ul> <li><a href="intro_1.xhtml#toc_1">TakeMeThere</a></li> </ul> </li> </ol> </nav> </body> </html> Code:
<item href="text/toc.xhtml" id="nav" media-type="application/xhtml+xml" properties="nav"/> P.S: Did you use Code:
<!doctype html> Thanks again! |
12-20-2018, 12:13 PM | #4 | ||
Bibliophagist
Posts: 35,356
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Quote:
From years back, I seem to remember a reference to workarounds for page breaks and iBooks from Elizabeth Castro's pigsgourdsandwikis.com site but not something that I paid much attention to at the time. |
||
12-21-2018, 10:49 AM | #5 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
|
Advert | |
|
12-21-2018, 11:36 AM | #6 |
Bibliophagist
Posts: 35,356
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Six of one, 2 threes of the other. I use Sigil but will switch to calibre's editor at times where I find it makes some tasks easier. Possibly a bit of a baby duckling syndrome.
|
12-21-2018, 05:19 PM | #7 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Wait--I thought, when you asked me about this, you meant that it was going to the WRONG place. Is this all about simply that the linked section doesn't scroll to the top of the screen? It doesn't do that, in ePUB. It does in MOBI. Hitch |
|
12-22-2018, 04:53 AM | #8 | ||
Addict
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
Quote:
Actually, I was just checking and I see someone picked up the development so I'm curious to how is it. Why do you find Sigil better than Calibre? Quote:
|
||
12-22-2018, 10:50 AM | #9 | ||
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Hitch |
||
12-22-2018, 11:12 AM | #10 | |
Well trained by Cats
Posts: 29,795
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:
I tend to like Sigil's saved searches and clips.Mostly that was what I learned on., But I prefer Calibres debug, CSS cleaner and TOC editor Do I want the other to duplicate the others L&F? H*ll No! I have a choice of tools that fit MY work style. |
|
12-22-2018, 11:30 AM | #11 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Hell, I'm in the "uses both" camp! Never really thought of it as a competition.
|
12-22-2018, 04:26 PM | #12 | |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Quote:
I'm writing books for publication. Sigil is designed precisely to do that, whereas Calibre is a library-management tool. (Kovid evidently developed Calibre Editor to fill the gap when Sigil was briefly orphaned, but I've never tried the Editor.) Besides, Amazon is notorious for rejecting books created by Calibre. It may not be a large percentage, but it is a long-standing problem. Give Sigil a try. It is a powerful and sophisticated program, and Preview Panel for all practical purposes makes it WYSIWYG. It creates the "logical" or virtual TOC on the fly, so neatly that it scarcely needs any attention. I still use epub2, validated by the Flight Crew plug-in. I upload the epub (without an included cover) to Amazon's KDP platform, and with a cover to Draft2Digital and Google Play. Of course, if you aren't actively publishing books, Calibre may be just what you require. I regularly use it to convert epubs to mobi format, to read on my Fire tablet. Less often, I use it to reverse-engineer an ebook and get it into Word format for revision. |
|
12-22-2018, 06:30 PM | #13 | ||
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Quote:
I appreciate your dedication to Sigil, but your reluctance to use or recommend calibre's editor to edit epubs is based on unfounded fears/biases. |
||
12-22-2018, 07:26 PM | #14 |
Resident Curmudgeon
Posts: 73,956
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
@odeta, doyou actiall need an ID in the ToC? Are you jumping someplace in the middle of an XML file? It slows down the ePub if you use unnecessary ID links. If you are just linking to the XML file and do not need the ID, dump the ID.
|
12-23-2018, 12:54 AM | #15 | |
Addict
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
|
Quote:
@Notjohn, Thanks! I will try Sigil out, I can't believe it's been years now since I last tried it and actually made an ebook |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre ToC links don't work in OverDrive | zoomiest | Conversion | 3 | 12-29-2017 10:15 AM |
Generated TOC links back to TOC page in the book | Caleb666 | Sigil | 7 | 08-17-2011 11:58 AM |
TOC links inside tables in epub don't translate in mobi | wannabee | Calibre | 1 | 01-20-2011 01:13 AM |
Links to URLs work, internal links don't? | NewDay | ePub | 36 | 10-27-2010 04:09 AM |
Links don't work | ragdoll | iRex | 3 | 02-21-2008 01:47 PM |