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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-08-2020, 11: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,416
Karma: 15732467
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle Paperwhite 2, Kindle Paperwhite 3
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, 01: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: 24,384
Karma: 30705461
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(RIP), Galaxy Tab A, Kobo Aura2
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, 05: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,416
Karma: 15732467
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle Paperwhite 2, Kindle Paperwhite 3
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, 06:47 AM   #4
Sirtel
Wizard
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: 2,339
Karma: 22038282
Join Date: Jan 2014
Location: Estonia
Device: Kindle Voyage/Oasis 2/Oasis 3/Nook Glowlight Plus 7.8''/Kobo Libra H2O
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, 07: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,416
Karma: 15732467
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle Paperwhite 2, Kindle Paperwhite 3
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, 10: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: 24,384
Karma: 30705461
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(RIP), Galaxy Tab A, Kobo Aura2
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, 09: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,416
Karma: 15732467
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle Paperwhite 2, Kindle Paperwhite 3
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, 12:27 PM   #8
deback
Book E d i t o r
deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.deback figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 362
Karma: 110636
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, 01: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: 24,384
Karma: 30705461
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(RIP), Galaxy Tab A, Kobo Aura2
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, 01: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: 311
Karma: 426062
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook Touch HD
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, 01: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: 24,384
Karma: 30705461
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(RIP), Galaxy Tab A, Kobo Aura2
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, 02: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: 311
Karma: 426062
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook Touch HD
Such is life.
jbacelar is offline   Reply With Quote
Old 01-11-2020, 03: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: 55,003
Karma: 51405990
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
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 03:35 PM.
JSWolf is offline   Reply With Quote
Old 01-11-2020, 06: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,416
Karma: 15732467
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle Paperwhite 2, Kindle Paperwhite 3
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, 06: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,416
Karma: 15732467
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle Paperwhite 2, Kindle Paperwhite 3
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 07:27 AM.


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