![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
All text becomes a link (kepub only)
A retail epub works fine as epub, but when converted to kepub (either by the calibre plugin, or by kepubify) all the text becomes a link.
Every chapter title looks something like this: <p class="CT" id="ch04_ch_001"><a href="ch04.xhtml#tocch04_ch_001"><span class="ChapLabel">4</span>Title text</a></p> Code:
p.CT { font-family: sans-serif; font-size: 140%; margin-left: 0em; margin-top: 1em; margin-bottom: 2.5em; font-style: normal; font-weight: bold; text-align: center; line-height: 1.2em; text-transform: uppercase; } It's this link that gets followed when the text in the chapter gets clicked on. I have tried to remove various things, divs and what not, but so far I haven't understood what is causing this. (Removing the href from the title works of course.) Tested on two different Kobo models. Any idea? |
![]() |
![]() |
![]() |
#2 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,659
Karma: 103503445
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
I'd use a Regex or something to make look like this.
<h2 class="ChapLabel" id="ch04_ch_001">Title text</h2> Chapter heads should be <h No need for links or spans in a chapter title, even if two lines: <h2 class="ChapLabel" id="ch04_ch_001">Chapter 4<br/> Chapter Name Text</h2> level 1, 2 or 3 depending if more than one book in the ebook (omnibus) and if "Parts" or "Sections" or "Volumes" in any of the books. If there is a preamble Title and preamble title then they get <p class="whatever", not an <h Often I'd search </h2> <p class="reg-body" and replace </h2> <p class="no-indent" Then copy the CSS for .regbody and rename it to .no-indent, then set text-indent: 0; Then Calibre can easily make a new TOC if the TOC is stupid, and break file at each heading (some ereaders and formats need that to do a page break). Last edited by Quoth; 07-15-2022 at 01:37 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
I tested to change one title from p to h1 (which is not in use anywhere else). Didn't make a difference.
The problem was removed when I removed all links in the titles, but I would really like to understand why this happens (unless it's just a bug in the kepub-renderer). |
![]() |
![]() |
![]() |
#4 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,005
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The chapter header is some pretty poor code. This is some much better code for the same thing. You can style h2 as you see fit. But as you see, the code for the chapter header is very clean and simple. Plus, if you want or need to generate a new ToC, this will let you do so very easily. Plus, I cannot stand links in the chapter header as I prefer to nuke the HTML ToC.
Code:
<h2>Chapter 4</h2> Code:
h2 { text-align: center; text-indent: 0; font-weight: bold; margin-top: 0.8em; margin-bottom: 0.8em; } |
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
While I appriciate your input, the issue is that this is a store bought epub that doesn't work as a kepub on Kobo. I get that sideloading is not officially supported (AFAIK), but it's still very interesting to find out why. There is probably something bad in the code, or maybe there is a bug in the kepub-renderar that would be great if Kobo fixed.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,616
Karma: 168431739
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Can you supply the same partial scrambled ebook but after it was kepubified whether by calibre or kepubify?
|
![]() |
![]() |
![]() |
#7 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,005
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#8 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
|
![]() |
![]() |
![]() |
#9 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 681
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
Here is the kepub (by Calibre).
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adjusting word spacing for justified text – kepub | Lykke | Kobo Reader | 201 | 07-01-2022 06:42 AM |
Libra Text with side-loaded font cut off at the bottom in vertical layout (synched KePub) | kch | Kobo Reader | 0 | 01-17-2021 08:30 PM |
Text link to End Note and back again | phossler | Sigil | 5 | 11-30-2012 01:52 PM |
Help! ePub errors -- attribute link/text not declared | katyya | ePub | 1 | 11-17-2011 02:13 PM |
Touch Missing text on Touch screen in kEpub | PeterT | Kobo Reader | 1 | 10-14-2011 02:57 PM |