Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-04-2017, 02:32 PM   #1
RobertJSawyer
Guru
RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.
 
RobertJSawyer's Avatar
 
Posts: 733
Karma: 3911762
Join Date: Jun 2006
Location: Toronto
Device: Kobo Libra 2, Clara 2E, and Clara HD; Kindle PaperWhite
Squashing right-justification in ebook-viewer.exe

Hi, everybody.

My user stylesheet for calibre's ebook-viewer.exe is:

Code:
body {
  widows: 0;
  orphans: 0;
  text-align: left !important;
}
p {text-align: left}
and yet in a number of ebooks (not all) I'm still getting full justification, instead of left alignment. Any suggestions?

Many thanks!

Rob

Last edited by RobertJSawyer; 01-04-2017 at 11:49 PM.
RobertJSawyer is offline   Reply With Quote
Old 01-04-2017, 03:32 PM   #2
aleyx
Addict
aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.aleyx can self-interpret dreams as they happen.
 
Posts: 250
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Bookeen Diva, Kobo Clara BW
My first step would be to check the structure of the book. In many cases of weird formatting, it turns out that paragraphs are using div tags, or the whole chapter is one container broken by br tags, or some other insanity. You only selected for body and p; maybe adding a body * { text-align: left} would help, although juuuust a little overkill.

N.
aleyx is offline   Reply With Quote
Advert
Old 01-04-2017, 06:02 PM   #3
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Also, its likely that inline styling will override the viewer's stylesheet as it always overrides internal CSS stylesheets and the <style> sections in the HTML file's <head> section.

I've seen ebooks where every paragraph tag is styled. Such books probably can't be "fixed" without editing an ePub or AZW3 version and bulk replacing all of the <p andWhateverStyle> tags with simple unstyled <p> tags.
dwig is offline   Reply With Quote
Old 01-04-2017, 06:50 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: 79,413
Karma: 145491800
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 RobertJSawyer View Post
Hi, everybody.

My user stylesheet for calibre's ebook-viewer.exe is:

Code:
body {
  widows: 0;
  orphans: 0;
  text-align: left !important;
}
p {text-align: left}
and yet in a number of ebooks (not all) I'm still getting full justification, instead of left alignment. Any suggestions?

Many thanks!

Rob
You could use the eBook editor to replace all text-align: justify with text-align: left. However, it looks better using full justification since hyphenation is supported.
JSWolf is offline   Reply With Quote
Old 01-06-2017, 08:25 PM   #5
nabsltd
Fanatic
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 518
Karma: 8500000
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
Quote:
Originally Posted by RobertJSawyer View Post
Code:
body {
  widows: 0;
  orphans: 0;
  text-align: left !important;
}
p {text-align: left}
and yet in a number of ebooks (not all) I'm still getting full justification, instead of left alignment.
Add "!important" to the "p" rule. "!important" only affects the order in which rules are selected from various stylesheets after specificity is checked. Any rule in the eBook that formats a "p" element as fully justified would be used, because your "p" rule is sooner in the cascade order, and your "body" rule has less specificity.

Basically, your "body" rule is only being applied to text that is inside a "body" element but not inside of any other element with styling, which is pretty unlikely.
nabsltd is offline   Reply With Quote
Advert
Old 01-06-2017, 09:03 PM   #6
RobertJSawyer
Guru
RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.
 
RobertJSawyer's Avatar
 
Posts: 733
Karma: 3911762
Join Date: Jun 2006
Location: Toronto
Device: Kobo Libra 2, Clara 2E, and Clara HD; Kindle PaperWhite
Thank you, nabsltd! That works much better!

Rob
RobertJSawyer is offline   Reply With Quote
Old 01-08-2017, 06:33 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,413
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Full justify is NOT right justify. So this thread is off-topic.
JSWolf is offline   Reply With Quote
Old 01-08-2017, 06:36 PM   #8
RobertJSawyer
Guru
RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.
 
RobertJSawyer's Avatar
 
Posts: 733
Karma: 3911762
Join Date: Jun 2006
Location: Toronto
Device: Kobo Libra 2, Clara 2E, and Clara HD; Kindle PaperWhite
Oh, FFS.

(Full? Fine, sure.)
RobertJSawyer is offline   Reply With Quote
Old 01-08-2017, 06:39 PM   #9
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: 30,939
Karma: 60358908
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 JSWolf View Post
Full justify is NOT right justify. So this thread is off-topic.
You do know who RJS is?
(if not... you better go buy some of his work )
He doesn't need nit picking.
theducks is offline   Reply With Quote
Old 01-08-2017, 07:49 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,660
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
You do know who RJS is?
(if not... you better go buy some of his work )
He doesn't need nit picking.
No disrespect to Mr Sawyer, but nor does anyone else.

BR
BetterRed is offline   Reply With Quote
Old 01-09-2017, 01:21 PM   #11
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,413
Karma: 145491800
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 theducks View Post
You do know who RJS is?
(if not... you better go buy some of his work )
He doesn't need nit picking.
Yes I know. In fact, I have Quantum Night ready to be sent to my H2O next time I plug the H2O into the laptop.

Last edited by JSWolf; 01-09-2017 at 01:24 PM.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre ebook-viewer.exe changes EPUB file sizes? avid01 Calibre 23 04-11-2018 04:24 AM
ebook-viewer.exe ormembar Devices 3 03-23-2016 05:19 PM
Calibre2\ebook-viewer.exe pdrapoza Related Tools 2 12-09-2014 06:40 PM
(Suggestion) Move ebook-viewer.exe to the main directory next to calibre-portable.exe avid01 Library Management 6 07-03-2014 03:55 AM
Search issue with 64-bit ebook-viewer.exe Francois_C Calibre 3 11-23-2013 08:31 AM


All times are GMT -4. The time now is 07:45 PM.


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