01-08-2020, 10:53 PM | #1 |
C L J
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. |
01-09-2020, 12:16 AM | #2 |
Well trained by Cats
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) |
Advert | |
|
01-09-2020, 04:51 AM | #3 | |
C L J
Posts: 2,912
Karma: 21115458
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle PW2, Kindle PW3, Kobo Libra2
|
Quote:
Am I doing something wrong. I'm not very technically minded. |
|
01-09-2020, 05:47 AM | #4 |
Grand Sorcerer
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.
|
01-09-2020, 06:05 AM | #5 |
C L J
Posts: 2,912
Karma: 21115458
Join Date: Dec 2008
Location: Birmingham UK
Device: Sony e-reader 505, Kindle PW2, Kindle PW3, Kobo Libra2
|
|
Advert | |
|
01-09-2020, 09:35 AM | #6 |
Well trained by Cats
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
|
|
01-10-2020, 08:33 PM | #7 |
C L J
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. |
01-11-2020, 11:27 AM | #8 |
Book E d i t o r
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). |
01-11-2020, 12:15 PM | #9 |
Well trained by Cats
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 latter only affects ANY tag with a class="p" As to poor coding. <shrug> either is valid, and that is what counts most |
01-11-2020, 12:47 PM | #10 | |
Interested in the matter
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
Quote:
The <p> tag is the one used for paragraphs. Hence the p. |
|
01-11-2020, 12:52 PM | #11 |
Well trained by Cats
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
|
|
01-11-2020, 01:09 PM | #12 |
Interested in the matter
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
Such is life.
|
01-11-2020, 02:33 PM | #13 | |
Resident Curmudgeon
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:
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. |
|
01-11-2020, 05:45 PM | #14 |
C L J
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. |
01-11-2020, 05:52 PM | #15 |
C L J
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! |
Tags |
justification, ragged margins |
|
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 |