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 01-08-2020, 10:53 PM   #1
BookCat
C L J
BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.
 
BookCat's Avatar
 
Posts: 2,912
Karma: 21115458
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle PW2, Kindle PW3, Kobo Libra2
Page Justification

I frequently convert from epub to azw3 and some of the books have ragged right hand margins. I hate these and would love to know if there's a way to tell Calibre to give me full justification, with the exception of first line indents of paragraphs.

Thanks.
BookCat is offline   Reply With Quote
Old 01-09-2020, 12:16 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,976
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
First P (0 indent) is a separate item and has no requirement for or against Justify (and excluding it, might get tricky for bulk/generic conversions)

To set the default for NEW, first time, conversions you set this in:
Preferences: Common options:

And (or if converting again. In the dialog at the begining of Convert)
Look and Feel: Styling options (tab): Extra CSS:

Code:
p {text-align: justify)
theducks is offline   Reply With Quote
Advert
Old 01-09-2020, 04:51 AM   #3
BookCat
C L J
BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.
 
BookCat's Avatar
 
Posts: 2,912
Karma: 21115458
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle PW2, Kindle PW3, Kobo Libra2
Quote:
Originally Posted by theducks View Post
First P (0 indent) is a separate item and has no requirement for or against Justify (and excluding it, might get tricky for bulk/generic conversions)

To set the default for NEW, first time, conversions you set this in:
Preferences: Common options:

And (or if converting again. In the dialog at the begining of Convert)
Look and Feel: Styling options (tab): Extra CSS:

Code:
p {text-align: justify)
I tried putting p {text-align: justify) which I copied and pasted from your post, into the Look and Feel: Styling Options tab, Extra CSS, but the resulting text was still jagged.

Am I doing something wrong. I'm not very technically minded.
BookCat is offline   Reply With Quote
Old 01-09-2020, 05:47 AM   #4
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 10,430
Karma: 225537496
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
The closing bracket should be the same type as the opening bracket. They're different in your example. The opening bracket is the right type, the closing bracket is not.
Sirtel is offline   Reply With Quote
Old 01-09-2020, 06:05 AM   #5
BookCat
C L J
BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.
 
BookCat's Avatar
 
Posts: 2,912
Karma: 21115458
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle PW2, Kindle PW3, Kobo Libra2
Quote:
Originally Posted by Sirtel View Post
The closing bracket should be the same type as the opening bracket. They're different in your example. The opening bracket is the right type, the closing bracket is not.
That worked!
BookCat is offline   Reply With Quote
Advert
Old 01-09-2020, 09:35 AM   #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,976
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 BookCat View Post
That worked!
Sorry, Senior fingers (and eyesight that did not spot it)
theducks is offline   Reply With Quote
Old 01-10-2020, 08:33 PM   #7
BookCat
C L J
BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.
 
BookCat's Avatar
 
Posts: 2,912
Karma: 21115458
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle PW2, Kindle PW3, Kobo Libra2
For some odd reason this has stopped working. I carefully type in the correct code, in the right place, but after conversion the right margin is still jagged.

I just tried this with H. R. Haggard's Cleopatra, which has been on my pc for ages, I can't remember where I got it, probably somewhere like manybooks.
BookCat is offline   Reply With Quote
Old 01-11-2020, 11:27 AM   #8
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
In the CSS file, you have to either add the text-align: justify; line to the "calibre" class (or the class that is used for the body class) or to the class that is used for paragraphs and the first paragraph. The class "p" is rarely used for paragraphs, except in the case of poor coding by the person who created the file.

Also, you can set everything to be justified in Preferences, Conversion, Common Options, Look & Feel, Text (tab), Text Justification (drop-down box) and Justify text, but this will usually cause the cover image to be justified and not centered.

I have many codes added in Extra CSS to add text-align: justify; to many of the class names that are used for the first paragraph and paragraphs (including the "calibre" class, which doesn't work for some reason). Once in a while, I'll have to manually edit a CSS class to add text-align: justify; (when an unusual class name is used for the first paragraph and paragraphs).
deback is offline   Reply With Quote
Old 01-11-2020, 12:15 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: 29,976
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
there is a technical difference between
Code:
.p { stuff}
and
p {stuff}
The former affects ALL <p > type tags
the latter only affects ANY tag with a class="p"
As to poor coding. <shrug> either is valid, and that is what counts most
theducks is offline   Reply With Quote
Old 01-11-2020, 12:47 PM   #10
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
Quote:
Originally Posted by theducks View Post
Code:
.p { stuff}
and
p {stuff}
The former affects ALL <p > type tags
the latter only affects ANY tag with a class="p"
It's the other way around.


Quote:
Originally Posted by deback View Post
The class "p" is rarely used for paragraphs, except in the case of poor coding by the person who created the file.
The <p> tag is the one used for paragraphs. Hence the p.
jbacelar is offline   Reply With Quote
Old 01-11-2020, 12:52 PM   #11
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,976
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 jbacelar View Post
It's the other way around.


The <p> tag is the one used for paragraphs. Hence the p.

OMG how could I write that when I KNOW CSS (at least a tad more than the basics)
theducks is offline   Reply With Quote
Old 01-11-2020, 01:09 PM   #12
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
Such is life.
jbacelar is offline   Reply With Quote
Old 01-11-2020, 02:33 PM   #13
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,624
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 theducks View Post
First P (0 indent) is a separate item and has no requirement for or against Justify (and excluding it, might get tricky for bulk/generic conversions)

To set the default for NEW, first time, conversions you set this in:
Preferences: Common options:

And (or if converting again. In the dialog at the begining of Convert)
Look and Feel: Styling options (tab): Extra CSS:

Code:
p {text-align: justify)
Even easier then that is to put in text-align: justify; in body and delete any occurrence of text-align: left;. Simple really.

The p suggestion will work in most cases, but not all. Some eBooks use <div> instead of <p>. My suggestion will work in all cases and you get rid of all cases of left justification.

Last edited by JSWolf; 01-11-2020 at 02:35 PM.
JSWolf is offline   Reply With Quote
Old 01-11-2020, 05:45 PM   #14
BookCat
C L J
BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.
 
BookCat's Avatar
 
Posts: 2,912
Karma: 21115458
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle PW2, Kindle PW3, Kobo Libra2
I'm confused!

Apart from setting the justify in preferences, which I understood, I'm not sure what to do.

I don't understand CSS or html or any other programing. Please tell me slowly, step by step.

Thank you.
BookCat is offline   Reply With Quote
Old 01-11-2020, 05:52 PM   #15
BookCat
C L J
BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.BookCat ought to be getting tired of karma fortunes by now.
 
BookCat's Avatar
 
Posts: 2,912
Karma: 21115458
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle PW2, Kindle PW3, Kobo Libra2
After setting the preferences, I reconverted the Cleopatra book: it's now justified. If only I could feel sure this would always happen.

Last night I spent 50p on the Amazon kindle version because it's justified!
BookCat is offline   Reply With Quote
Reply

Tags
justification, ragged margins


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page justification when converting from EPUB to AZW3 Tomhik Conversion 1 01-22-2018 11:02 PM
PRS-T1 Justification Hatgirl Sony Reader 5 11-17-2011 09:59 AM
[Kobo] Remove page number from right-hand margin + justification digital_steve Calibre 5 08-05-2010 11:24 PM
Next Firmware Update - Page margins and full justification JBlyth Kobo Reader 32 07-11-2010 11:13 PM
DX justification jlinden Amazon Kindle 7 01-18-2010 07:22 AM


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


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