![]() |
#1 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2010
Device: iPad, Kidle
|
Justified paragraph becomes unjustified
This year I've been using Calibre as a conversion engine to take in a word file and put out epub. I then use Sigil to tweak. Recently I've noticed some justified paragraphs that mid-way through become left aligned, then sometimes even switching back to justifed. So the middle of a paragraph, for example, might be left aligned.
When I look at the code I see something like this: <p>It is fairly apparent that high performing organizations have favorable <span class="calibre4">cultural profiles. </span> In addition . . . Where calibre4 is defined as white space: pre-wrap; and pre-wrap messes up justification. The odd thing is that there is nothing in the word document to occasion any special treatment of those two words. They are just in the middle of a paragraph. One of my documents has hundreds of these seemingly random spans. I redefined the class as white space: normal; and everything went back to proper justification. Any idea what might be going on? Anyway, if you do conversion with Calibre, keep an eye on paragraph justification. |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The solution is to install Diaps Editing Toolbag editor plugin and use that to remove all of those spans. It's better to get rid of the spans then it is to change the CSS and leave them. Plus, the code is a lot neater. And it reduces the size of the eBook.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,072
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
In HTML multiple white space characters (spaces, tabs, etc.) are rendered as a single space, but in Word multiple white space characters are meant to all be significant.
I took a look at the code calibre uses to convert DOCX format and it appears that it uses white-space:pre-wrap in places where the Word document contains text that has extra white space. In your case the sentence has two spaces after the period. The extra markup is being generated to assure that both spaces are rendered in the resulting EPUB. |
![]() |
![]() |
![]() |
#4 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I would fix it in the DOCX. BR |
|
![]() |
![]() |
![]() |
#5 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,758
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
So the old fashioned two spaces after a period is no longer valid.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
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:
![]() |
|
![]() |
![]() |
![]() |
#7 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Pretty sure there are threads in the ePub and/or Workshop forums about getting a wider space between sentences.
There is a thinspace character, but, afaik, there's no wide/thick/fatspace character - why's that I've often wondered? BR |
![]() |
![]() |
![]() |
#8 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
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:
I think emsp is your fat space ![]() |
|
![]() |
![]() |
![]() |
#9 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Doh - there must have been a time when I knew that, for I just discovered I already have a custom shortcut for it in Word
![]() BR |
![]() |
![]() |
![]() |
#10 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,045
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
I search for multiple spaces (replace with one), lines starting or ending in space (delete space) and empty lines (delete) all as the LAST thing after all other edits. Then I save as in native and then docx for Calibre.
I only use non-standard width spaces for paper versions (like between a number and the unit abbreviation). I'd rarely use a non breaking space (either ctrl or alt space, I forget). I do sometimes have an non-paragraph return, but NEVER EVER on fully justified text. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Isolated unjustified lines in hardware readers | randich | Amazon Kindle | 32 | 09-19-2015 04:27 PM |
Full Justified or Left Justified? | JSWolf | General Discussions | 96 | 02-04-2013 06:57 PM |
Left-justified text in a right-justified box | Skeezix | Conversion | 4 | 11-15-2011 08:44 PM |
Justified word paragraph not wrapping in mobi | wlloydw | Conversion | 0 | 03-05-2011 03:03 PM |
html2lrf Unjustified Text | Albertane | Sony Reader | 1 | 08-11-2007 06:54 PM |