Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 09-13-2023, 03:23 PM   #1
fredex
Enthusiast
fredex began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Aug 2014
Device: none
in viewer, text "sliding" off the left margin

Attachment 203744In at least one of my books (I've seen it before, in other books, and ignored it, but right now can't find any other book where it is happening) the farther I read into the book the farther the first letter of every line is sliding off the left margin, by which I mean progressively more and more of the left side of each first letter is cut off, as if the text were being pushed off the page. see attached image.

Thanks in advance, for any help you can give!

Fredex
Attached Thumbnails
Click image for larger version

Name:	Screenshot at 2023-09-13 15-14-06.jpg
Views:	71
Size:	27.6 KB
ID:	203745  
fredex is offline   Reply With Quote
Old 09-13-2023, 03:46 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,973
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I suspect bad code (CSS) has negative margins that are accumulating.

The first C in CSS is Cascade
theducks is offline   Reply With Quote
Old 09-13-2023, 06:16 PM   #3
fredex
Enthusiast
fredex began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Aug 2014
Device: none
in viewer, text "sliding" off the left margin

I suspect you're right, but having inspected the CSS (and I'm no expert therein) I can't see it. there ARE negative margins, but ASFAICS they are being reset appropriately.

But I'll go stare at it some more,... miracles DO happen!
fredex is offline   Reply With Quote
Old 09-13-2023, 06:31 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,973
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by fredex View Post
I suspect you're right, but having inspected the CSS (and I'm no expert therein) I can't see it. there ARE negative margins, but ASFAICS they are being reset appropriately.

But I'll go stare at it some more,... miracles DO happen!
Right click on the page, Inspector
This tool shows how things are layered in the Box Model
(also in the Editor)
theducks is offline   Reply With Quote
Old 09-13-2023, 07:32 PM   #5
fredex
Enthusiast
fredex began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Aug 2014
Device: none
OK, so I tweaked the CSS a bit, based on guesswork:

Code:
.calibre_28 {
  display: block;
 /* text-indent: -19pt;
  margin: 1em 0 0 19pt; */
  text-indent: 0;
  margin 1em 0 0 0;
}
.calibre_29 {
  display: block;
  /* text-indent: -19pt;
  margin: 0 0 0 19pt;*/
  text-indent: 0;
  margin: 0 0 0 0;
}
and it seems to have cured the problem.

Thanks for your replies!

Fred
fredex is offline   Reply With Quote
Old 09-13-2023, 09:37 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,973
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
That is a hanging indent.
The code looked normal (calibre28 is a common first Paragraph style with a large top margin)

I don't see why that would cause issues.
theducks is offline   Reply With Quote
Old 09-14-2023, 03:18 PM   #7
fredex
Enthusiast
fredex began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Aug 2014
Device: none
while I don't know which of those classes does what, it didn't appear obviously wrong, but I didn't see any negative offsets anywhere else, so I gave it a try and voila!

Do you know if any of the CSS (or other features) involved in Calibre ebooks are documented anywhere?

Thanks!

Fred
fredex is offline   Reply With Quote
Old 09-14-2023, 03:49 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,973
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Calibre does EPUB (see MR Wiki)
The viewer is more tolerant of errors than most EPUB devices

A negative indent was just a guess. There are so many other things that (self) publishers do trying to trick normal behavior into being JUST LIKE THE PRINT VERSION
I looked at those 2 samples, and just figured that was what would normally be done if you wanted a Hanging indent
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug converting html css text-indent and left-margin bhoyt Conversion 15 01-24-2014 07:28 PM
Get rid off "left-justified" text SMR Kindle Developer's Corner 3 03-01-2012 01:14 AM
epub "padding left" to mobi "block quote" conversion issue 1611mac Conversion 3 01-11-2012 02:10 PM
Foxit's "text viewer" -> save? ile Amazon Kindle 2 10-10-2010 06:29 PM


All times are GMT -4. The time now is 02:55 AM.


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