Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-15-2022, 12:31 PM   #1
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 661
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?
Attached Files
File Type: epub scrambled-partial.epub (143.9 KB, 47 views)
patrik is offline   Reply With Quote
Old 07-15-2022, 01:32 PM   #2
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,662
Karma: 87654321
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
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.
Quoth is offline   Reply With Quote
Advert
Old 07-15-2022, 01:34 PM   #3
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 661
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).
patrik is offline   Reply With Quote
Old 07-15-2022, 01:40 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,631
Karma: 130140792
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;
}
JSWolf is offline   Reply With Quote
Old 07-15-2022, 02:10 PM   #5
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 661
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.
patrik is offline   Reply With Quote
Advert
Old 07-15-2022, 04:32 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,784
Karma: 146617620
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?
DNSB is online now   Reply With Quote
Old 07-15-2022, 04:35 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,631
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
Can you supply the same partial scrambled ebook but after it was kepubified whether by calibre or kepubify?
And also supply a scrambled copy of the original so we can maybe see where the problem code is.
JSWolf is offline   Reply With Quote
Old 07-15-2022, 05:28 PM   #8
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 661
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
Quote:
Originally Posted by JSWolf View Post
And also supply a scrambled copy of the original so we can maybe see where the problem code is.
The attached file is the original.
patrik is offline   Reply With Quote
Old 07-15-2022, 05:31 PM   #9
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 661
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
Quote:
Originally Posted by DNSB View Post
Can you supply the same partial scrambled ebook but after it was kepubified whether by calibre or kepubify?
Here is the kepub (by Calibre).
Attached Files
File Type: epub scrambled.kepub.epub (256.6 KB, 50 views)
patrik is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 04:41 PM.


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