|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
[solved] Book has weird line breaks & text-size changes on Kobo but is ok on computer
I'm reading a book on my Kobo Forma and noticed abrupt (read: unnecessary) line breaks as well as weird changes in font size.
I wondered what was going on. So I went to my computer and opened the book. Calibre's ebook viewer didn't show the wierd formatting issues. It looks good on my computer. But it looks horrible on my Kobo Forma ereader. I exploded/unpacked the ebook in Calibre and noticed that the xhtml file has weird code like Code:
<a id="page5" / > See screenshots of Kobo and computer here: https://imgur.com/a/x0UOgTt I've uploaded the xhtml of this chapter, but had to add ".zip" to the end of the filename, because mobileread wouldn't accept xhtml as a fileextension. If you examine the file, all you have to do is remove " .zip". In other words, the real file name ends in .xhtml. 1. Why does the book have these weird html tags? My theory is that the print book's pages match the "pageX" id. But even if that's the case, why should publisher (in this case HarperCollins) include these weird codes in the ebook? I checked both the ePub version and the Kindle version of the book and both formats have these weird codes. 2. How can I find all other books with the same weird formatting issues (unnecessary line breaks, unnecessary change in font size) 3. What's the best/fastest/easiest/automatic way to fix these formatting issues? 4. Why does my Kobo interpret these codes as a place to change text size or do a line break? Last edited by droopy; 06-09-2020 at 11:20 PM. |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,962
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Anchors do not cause PAGEBREAKS (by default)
Who knows what someone (stupidly) put into the CSS for a{ ... } ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
Quote:
Thank you for your reply. Here is the contents of the CSS file: Code:
body { margin-right: 1em; margin-left: 1em; } img { max-height:100%; max-width:100%; } a { text-decoration:none; } .a1 { text-decoration:underline; } div.block2 { text-align: justify; text-indent: 0em; margin-left: 3em; margin-right: 3em; margin-top: 1em; margin-bottom: 1em; font-size: small; } p.right { text-indent: 0em; font-size: small; text-align: right; margin-top:0em; margin-bottom:0em; } p.center { text-indent: 0em; font-size: small; margin-top: 1em; text-align: center; margin-bottom: 1em; } p.centera { text-indent: 0em; font-size: small; margin-top: 1em; text-align: center; margin-bottom: 0em; } p.centerb { text-indent: 0em; font-size: small; margin-top: 0em; text-align: center; margin-bottom: 0em; } p.figure { text-indent: 0em; font-size: small; margin-top: 1em; text-align: center; margin-bottom: 1em; } p.nonindent { text-indent: 0em; margin-top:0em; margin-bottom:0em; font-size: small; text-align: justify; } .copy { margin-top: 1em; margin-bottom: 0em; text-indent: 0em; font-size: small; text-align: justify; } h1.chapter { text-indent: 0em; font-size: large; font-weight: bold; margin-top: 2em; margin-bottom: 2em; text-align:center; } h2.chapter1{ /* title page */ text-indent: 0em; font-size: x-large; text-align: center; margin-top: 0em; margin-bottom: 1em; } p.center4 /* title page */ { text-indent: 0em; margin-top: 2em; font-size: x-small; text-align: center; margin-bottom: 3em; } p.center3 /* title page */ { text-indent: 0em; margin-top: -0.5em; text-align: center; margin-bottom: 2em; font-size: medium; } p.indent { font-size: small; text-indent: 1.5em; text-align: justify; margin-top:0em; margin-bottom:0em; } /* ===================== Added Styles ===================== */ a.hlink { text-decoration: none; } span.small { font-size: smaller; } p.image /* back ads */ { text-indent: 0em; font-size: small; text-align: center; margin-top:1em; margin-bottom:1em; } .atp_f{ font-size:1em; margin-top:0em; margin-bottom:0em; margin-left:0em; margin-right:0em; text-indent:0em; text-align:center; } .atp_web{ font-size:1em; margin-top:0em; margin-bottom:1em; margin-left:0em; margin-right:0em; text-indent:0em; text-align:center; } |
|
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,962
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
there is nothing (that is obvious)` to cause a page break. ANYPLACE in that CSS
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,962
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
page-break-before: always
page-break-after: always are what does this MID document. Font size has nothing to do with breaks, only what fit on a screen. ![]() BUT these are not called in the CSS, so device defaults (1) prevail |
![]() |
![]() |
![]() |
#7 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
Ducks, don't you see the change in text size?
|
![]() |
![]() |
![]() |
#8 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,962
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I am looking at the code, looking for PAGE BREAK REASONS
you appear to have: small set for .indent and .nonindent. add display: block; to those, that stops inheritance of any prior sizing. You really need to wrap your head around CSS basics. There really is not much for basic books (of text). |
![]() |
![]() |
![]() |
#9 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,544
Karma: 168929301
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
One quick question is if you are converting the files to .kepub when sending them to your ereader. There have been some glitches with the KoboTouchExtended driver. Davidfor did create a test KTE driver which tried to fix the issues. Have you tried that one? See message #2106 in the KTE driver forum for the file.
Edit: I packaged the css and xhtml file and send them to my Forma as an epub and as a kepub generated using kepubify. Neither showed any extra line breaks. Last edited by DNSB; 06-05-2020 at 09:53 PM. Reason: Test the posted files. |
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
Yes, dnsb.
I have the ”extended driver” which automatically sends the ebook as converted kepubs files onto my Kobo. I won't have access to a computer until next Monday to try it out. For the weekend I just have my Kobo forma. I've never used kepubify before, as I have always relied on the touch extended driver for the conversion into kepubs. But if using kepubify in the command prompt / terminal is the only way to resolve this, I'm willing to give it a shot. Last edited by droopy; 06-05-2020 at 10:55 PM. |
![]() |
![]() |
![]() |
#11 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,544
Karma: 168929301
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
i posted a separate thread about this same issue- it had GIGO but in the title
depending on what is an an embedded span or anchor, the forma will render a line break, or will change text size or both. v annoying. I do use the extended driver to sideload as kepub so maybe that is the cuplrit sample para <p class="Text-Standard-tx">“You ordered a shuttle through deception,” bubbled the marshal of Drearburh, whose main claim to fame was that he was more <span aria-label="18" id="pg_18" role="doc-pagebreak"></span>decrepit alive than some of the legitimately dead. He stood before her on the landing field and gurgled with indignation. “You falsified documents. You stole a key. You removed your cuff. You wrong this house, you misuse its goods, you steal its stock.”</p> class CSS for that is p.Text-Standard-tx { font-size:0.858em; font-style:normal; font-weight:normal; margin-bottom:0em; margin-left:0em; margin-right:0em; margin-top:0em; text-align:justify; text-decoration:none; text-indent:1.2em; after the span is rendered , the font size is INCREASING, until paragraph end. Last edited by stumped; 06-06-2020 at 12:27 AM. |
![]() |
![]() |
![]() |
#13 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
Sounds good, David. Plan to do so next week, when I have access to a computer.
Last edited by droopy; 06-06-2020 at 10:14 AM. |
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
@droopy: Your images aren't comparing the same things. The images from the Kobo devices are for kepubs. The images from the calibre viewer are from viewing the epubs. If you were to open the kepub version in the calibre viewer, you would see the same problem as on the device.
The problem is a bug in the released version of the kepub output plugin. It was also seen with the extended driver. Which was reasonable, as they share code. I posted a beta to fix the extended driver, with the explanation of what was causing the error. I wasn't going to release a beta of the output plugin as I was hoping for an official release of both. But, I have posted a beta of the output plugin in it's thread with the same fix. I suppose the font change wasn't explicitly mentioned in the other thread. The font change is because the paragraph is being split during the conversion. But, the new p-tag is bare. It doesn't have the same class. It uses whatever is the base style for a paragraph in the book. The beta solves this by not incorrectly splitting the paragraphs. |
![]() |
![]() |
![]() |
#15 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
@davidfor thank you so much for your helpful reply. Looking forward to next week when I can use a computer and try your beta plugin. when I do, should I disable the extended driver that I'm currently using?
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Status line text size | BobC | KOReader | 4 | 01-07-2020 06:10 PM |
Troubleshooting Copying text in Kindle omits line breaks | JAFrancis | Amazon Kindle | 1 | 07-02-2018 04:05 PM |
Find/Replace bogus line breaks in Text editor, w/Regular Expression | scubaddictions | Conversion | 15 | 07-21-2011 08:52 AM |
Weird line breaks on Kindle?!? | echthemoderate | Kindle Formats | 0 | 06-14-2011 10:44 PM |
Tool for removing line breaks in text documents | kahn10 | Sony Reader | 9 | 08-22-2010 10:05 PM |