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 03-19-2018, 08:57 PM   #1
fotoroberto
Member
fotoroberto began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2018
Device: Kobo Glo HD
Text cut off on the left

Hi,
In many books I tried to read there is a bug that displays lists cut off at the begining of the line.
Help




Sent from my iPhone using Tapatalk Pro
fotoroberto is offline   Reply With Quote
Old 03-19-2018, 09:26 PM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Looking at that, my first thought*, is that someone is playing games with the left margin and have ended up with a negative margin in the CSS. Or maybe a negative text-indent. It looks like a case where the renderer is doing exactly what it is told to do, but what it is being told to do doesn't work properly. To be able to comment more, I think we need to see the code in the book. If the books is copyrighted, you can't post the book, but if it is legally available or a sample is, please post a link.


* Actually, my first thought was that it's lunch time.
davidfor is offline   Reply With Quote
Advert
Old 03-20-2018, 04:59 AM   #3
fotoroberto
Member
fotoroberto began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2018
Device: Kobo Glo HD
Actually, only the lists (I believe it is the list attribute) are displayed cut off on the left, rest of the text is just fine. Can I send you a copy of it by e-mail or PM?
fotoroberto is offline   Reply With Quote
Old 03-20-2018, 05:56 AM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by fotoroberto View Post
Actually, only the lists (I believe it is the list attribute) are displayed cut off on the left, rest of the text is just fine. Can I send you a copy of it by e-mail or PM?
Put it somewhere and PM me the link to download it and I will look at it.
davidfor is offline   Reply With Quote
Old 03-20-2018, 05:36 PM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by davidfor View Post
Looking at that, my first thought*, is that someone is playing games with the left margin and have ended up with a negative margin in the CSS. Or maybe a negative text-indent. It looks like a case where the renderer is doing exactly what it is told to do, but what it is being told to do doesn't work properly.
Yep. I'm thinking they used a negative indent, but forgot to set the left margin as an equal and opposite.

Example Code:

Spoiler:
Code:
<body>
  <p class="noindent">This is a sentence with no indent.</p>

  <p class="correct">This is a sentence with a proper negative indent.</p>

  <p class="wrong">This is a sentence with a wrong negative indent.</p>
</body>


CSS:

Spoiler:
Code:
.noindent {
	text-indent: 0;
}

.correct {
	text-indent: -2em;
	margin-left: 2em;
}

.wrong {
	text-indent: -2em;
	margin-left: 0;
}


Click image for larger version

Name:	NegativeIndentExample.png
Views:	190
Size:	11.0 KB
ID:	162930

Seems like it's just the case of a poorly formatted book.

Only way to correct it is to open it up yourself and fix the CSS, or to contact the author/publisher and let them know about the formatting error.
Tex2002ans is offline   Reply With Quote
Advert
Old 03-20-2018, 09:08 PM   #6
fotoroberto
Member
fotoroberto began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2018
Device: Kobo Glo HD
Is there any way to correct this while converting to Kepub in Calibre?
fotoroberto is offline   Reply With Quote
Old 03-21-2018, 02:41 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: 79,740
Karma: 145864619
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 fotoroberto View Post
Is there any way to correct this while converting to Kepub in Calibre?
Don't convert to kepub until after you've had a look at the ePub code in the Calibre editor. If it is a negative margin, then it will be very easy to see and fix in the CSS before converting to kepub. The thing is, if you are able to fix this witht he conversion, the source ePub will always be wrong.
JSWolf is offline   Reply With Quote
Old 03-21-2018, 08:02 PM   #8
fotoroberto
Member
fotoroberto began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2018
Device: Kobo Glo HD
I see. OK, I opened the file in editor, originally it is in AZW3 format, and I located few instances with negative indent. Should I change it to zero, just remove negative mark or something else?
What is the best and maybe automatic way of correcting books like these upon importing into calibre.
Editing CSS for a few books is OK, but I want to fix my whole library.

I reckon maybe I should replace all "text-indent:-" and "text-indent: -" to "text-indent:" removing "-",
but I'm not sure where I can set it in conversion settings.
Thanks

Code:
<body>
<p class="toc1" id="p47"><a class="calibre1" href="part0008.html#div14">
<span class="green1"><strong class="calibre2">Breakfast</strong></span></a></p>

<p class="toc2" id="p48"><a class="calibre9" href="part0008.html#p347">
<em class="calibre3">Quinoa Muesli</em> <span class="yellow2">NS</span></a></p>

<p class="parahang" id="p75">Carrot-Ginger Dressing <span class="yellow2">NS</span>
<a class="calibre9" href="part0028.html#fn1" id="nf1">*</a></p>
</body>
CSS:
Code:
.calibre1 {
    line-height: 1.2;
    text-decoration: none
    }
.calibre2 {
    font-weight: bold;
    line-height: 1.2
    }
.calibre3 {
    font-style: italic
    }
.calibre9 {
    text-decoration: none
    }
.green1 {
    color: #00674E;
    font-weight: bold;
    line-height: 1.2
    }
.parahang {
    border-bottom: 0;
    border-top: 0;
    display: block;
    padding-bottom: 0;
    padding-top: 0;
    text-indent: -1em;
    margin: 0.5em 0 0.5em 2em
    }
.tablelist {
    border-bottom: 0;
    border-top: 0;
    display: block;
    padding-bottom: 0;
    padding-top: 0;
    margin: 0.5em 0 0.5em 1em
    }
.toc1 {
    border-bottom: 0;
    border-top: 0;
    color: #00674E;
    display: block;
    font-size: 1.41667em;
    font-weight: bold;
    line-height: 1.2;
    padding-bottom: 0;
    padding-top: 0;
    text-indent: -1em;
    margin: 0.5em 0 0.5em 1em
    }
.toc2 {
    border-bottom: 0;
    border-top: 0;
    display: block;
    font-size: 1em;
    padding-bottom: 0;
    padding-top: 0;
    text-indent: -1.5em;
    margin: 0.5em 0 0.5em 3em

Last edited by fotoroberto; 03-21-2018 at 10:14 PM.
fotoroberto is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text cut off on right/left on full screen option despite fix Katsunami Kobo Reader 13 02-05-2018 05:22 AM
Text cut off due to patch? isaacbh Kobo Reader 2 11-02-2015 03:16 AM
Text cut off on right hand side stevmnk Kindle Formats 1 04-29-2013 05:38 PM
Since 1.9.10, text slightly cut off on very bottom line danskmacabre Kobo Reader 33 01-13-2012 05:25 AM
Text Cut Off jthedwalker Calibre 1 11-13-2010 12:15 PM


All times are GMT -4. The time now is 10:24 PM.


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