Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-04-2017, 03: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: 608
Karma: 2292468
Join Date: Jun 2006
Location: Toronto
Device: Kobo Clara HD, Kobo Libra 2; 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-05-2017 at 12:49 AM.
RobertJSawyer is offline   Reply With Quote
Old 01-04-2017, 04: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: 244
Karma: 20386
Join Date: Sep 2010
Location: France
Device: Cybook Diva
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, 07: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: 6718479
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, 07: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: 64,479
Karma: 104254653
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, 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, 09:25 PM   #5
nabsltd
Groupie
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: 172
Karma: 4402576
Join Date: Aug 2013
Location: Hamden, CT
Device: Onyx Boox M92
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, 10: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: 608
Karma: 2292468
Join Date: Jun 2006
Location: Toronto
Device: Kobo Clara HD, Kobo Libra 2; Kindle PaperWhite
Thank you, nabsltd! That works much better!

Rob
RobertJSawyer is offline   Reply With Quote
Old 01-08-2017, 07: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: 64,479
Karma: 104254653
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Full justify is NOT right justify. So this thread is off-topic.
JSWolf is offline   Reply With Quote
Old 01-08-2017, 07: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: 608
Karma: 2292468
Join Date: Jun 2006
Location: Toronto
Device: Kobo Clara HD, Kobo Libra 2; Kindle PaperWhite
Oh, FFS.

(Full? Fine, sure.)
RobertJSawyer is offline   Reply With Quote
Old 01-08-2017, 07: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: 26,959
Karma: 41959066
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2, 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 online now   Reply With Quote
Old 01-08-2017, 08:49 PM   #10
BetterRed
null operator
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: 17,731
Karma: 20473671
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, 02: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: 64,479
Karma: 104254653
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, 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 02:24 PM.
JSWolf is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:24 AM
ebook-viewer.exe ormembar Devices 3 03-23-2016 06:19 PM
Calibre2\ebook-viewer.exe pdrapoza Related Tools 2 12-09-2014 07:40 PM
(Suggestion) Move ebook-viewer.exe to the main directory next to calibre-portable.exe avid01 Library Management 6 07-03-2014 04:55 AM
Search issue with 64-bit ebook-viewer.exe Francois_C Calibre 3 11-23-2013 09:31 AM


All times are GMT -4. The time now is 06:16 PM.


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