Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-19-2023, 10:56 AM   #1
SomeSteve
Addict
SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.
 
Posts: 210
Karma: 5497310
Join Date: Sep 2012
Device: Sony PRS-T2, Kindle
Line in CSS prevents text wrapping on PRS-T2

Here's a puzzle perhaps someone can comment on.

I downloaded the compatible epub of The Turn of the Screw by Henry James at Standard Ebooks and converted it in Calibre to make it epub2 instead of epub3. The epub3 works as is on my Sony PRS-T2; however, I also have a PRS-350, and my experience has been that the covers and/or cover thumbnails of books from Standard Ebooks often don't display on that device, so I've been routinely converting the books, after which the covers do show up, and putting the converted books on both readers. (I don't know enough about ebook construction, HTML, and CSS to say why the covers don't show up, otherwise I could just change the the relevant lines instead of performing a conversion.)

The puzzle: If the first word of a paragraph in this converted epub is an abbreviation, the text of that paragraph doesn't wrap on the PRS-T2, but goes off the edge of the screen and is unreadable. It does wrap on the PRS-350. This doesn't happen if the abbreviation isn't the first word in the paragraph. And it only happens in the book converted by Calibre (epub2), not in the original compatible epub from Standard Ebooks (epub3).

For example, this paragraph near the end of Chapter 2 doesn't wrap in the converted book on the PRS-T2:

Quote:
Mrs. Grose appeared to try to be conscientious. “About some things—yes.”
Typically, depending on font size, the word "conscientious" would be the last visible part of the paragraph. The rest is off the screen. The following paragraph begins (and wraps) normally.

The XHTML for the affected paragraph:

Code:
<p class="calibre10"><abbr class="calibre12">Mrs.</abbr> Grose appeared to try to be conscientious. “About some things—yes.”</p>
There is a non-breaking space immediately following </abbr>, but the code for it disappears when I paste it here.

The CSS:

Code:
.calibre10 {
  display: block;
  text-indent: 1em;
  margin: 0;
}
and

Code:
.calibre12 {
  white-space: nowrap;
  border: currentColor none medium;
}
I discovered that changing the line "white-space: no wrap;" to "white-space: normal;" solves the problem. Okay. By why are only the paragraphs in which the first word is an abbreviation affected, and not those in which the abbreviation occurs at another position, such as this one?:

Code:
<p class="calibre10">I don’t know what there was in this brevity of <abbr class="calibre12">Mrs.</abbr> Grose’s that struck me as ambiguous. “Went off to die?” <abbr class="calibre12">Mrs.</abbr> Grose looked straight out of the window, but I felt that, hypothetically, I had a right to know what young persons engaged for Bly were expected to do. “She was taken ill, you mean, and went home?”</p>
Again, there is a non-breaking space after the </abbr> tags, but the code for it disappears here .

Is this failure to wrap a bug in the reader software? Is the reader software simply too old to execute the CSS correctly? Or is there some other cause? I would appreciate any insights.

One more thing. What is the point of the abbr tag?

Here's the link to the original compatible epub:

https://standardebooks.org/ebooks/he...the-screw.epub
SomeSteve is offline   Reply With Quote
Old 06-19-2023, 11:08 AM   #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,967
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
nowrap says exactly what it does.
The question is Why was it coded (the use) that way?

I find that many (self)publications do not consider the VAST variations upon the work will be read (like your PRS-T2).
IMHO EPUB3 is not 'better' just because it has a '3'.
Why use '3' when 2 serves for a particular work? KISS
theducks is offline   Reply With Quote
Advert
Old 06-21-2023, 11:31 AM   #3
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,619
Karma: 87456643
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
I remove line-height and white-space by default on all conversions. They are in my default Calibre conversion style properties

The "nowrap" might make sense in a web browser window (as it has a horizontal scroll bar). It's never going to make sense in an ebook.
Quoth is offline   Reply With Quote
Old 06-21-2023, 01:32 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,590
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 Quoth View Post
I remove line-height and white-space by default on all conversions. They are in my default Calibre conversion style properties

The "nowrap" might make sense in a web browser window (as it has a horizontal scroll bar). It's never going to make sense in an ebook.
<pre> is another useless option for eBooks.
JSWolf is offline   Reply With Quote
Old 06-21-2023, 02:20 PM   #5
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,619
Karma: 87456643
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by JSWolf View Post
<pre> is another useless option for eBooks.
Yes. Though I've not yet encountered it in an ebook. CSS makes it obsolete anyway.
Quoth is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pdf: Too many line breaks (wrapping?) and hyphens BlackShot Conversion 1 02-19-2022 04:15 PM
Combining Italics And Normal Text In One Line Via CSS SeaCanary Sigil 4 02-09-2014 10:36 AM
changing text line-height in css wjcroft EPUBReader 0 12-15-2010 03:13 PM
Line un-wrapping Factor jjansen Calibre 6 08-18-2010 12:21 AM
Stop line wrapping at quotes at the end of a paragraph sherman ePub 6 05-13-2010 02:52 PM


All times are GMT -4. The time now is 04:52 AM.


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