Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 12-10-2023, 04:22 PM   #1
ebookscovers
Enthusiast
ebookscovers began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Mar 2016
Device: Ipad mini 2
Full justify text issue

Hi there. I have formatted an ebook and have some justification issues which I'm trying to resolve in Sigil. Some of the first paragraphs or sentence from the start of some of the chapters is left justified but I can't seem to solve. see attached 2 screen shots.
first one is a view of chapter 1 which is correct full justified and what I want.
2nd one is a view of chapter 2 with the first line/paragraph not full justified.
(left is the kindle view and right is the sigil view)

haven't had this issue before.

if someone can help me to overide this issue I would be grateful.



David
Attached Thumbnails
Click image for larger version

Name:	chap1correct.jpg
Views:	114
Size:	348.4 KB
ID:	205120   Click image for larger version

Name:	chap2error.jpg
Views:	107
Size:	423.4 KB
ID:	205123  
Attached Files
File Type: rtf xhtmlfile.rtf (15.6 KB, 61 views)
File Type: rtf projectcss.rtf (58.1 KB, 68 views)

Last edited by ebookscovers; 12-11-2023 at 07:13 AM. Reason: added xhtml and css
ebookscovers is offline   Reply With Quote
Old 12-10-2023, 04:40 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
We would need to see the xhtml and the css stylesheet to say why this is happening.
KevinH is offline   Reply With Quote
Old 12-11-2023, 07:14 AM   #3
ebookscovers
Enthusiast
ebookscovers began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Mar 2016
Device: Ipad mini 2
I have added the css and xhtml details

Quote:
Originally Posted by KevinH View Post
We would need to see the xhtml and the css stylesheet to say why this is happening.
I have added the css and xhtml details
ebookscovers is offline   Reply With Quote
Old 12-11-2023, 08:17 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
I see nothing obvious but controlling the letter spacing (sometimes negative!) and kerning and mixing css stylesheets with styles in the head tag and styles attributes directly on the tag is asking for trouble. Not to mention wrapping each paragraph in a div that may have its own styles.

There is one tool in Sigil that might give us a hint. In Sigil's Preview show the problem area. Then invoke Preview's Inspector tool and highlight the problem span and it will show the css properties of that block including where each property came from.

That should give you a hint to see if really a justification issue or if the right margin setting or padding is incorrect, or is the containing div's width is the issue and where that property setting is inherited from.

Last edited by KevinH; 12-11-2023 at 08:38 AM.
KevinH is offline   Reply With Quote
Old 12-11-2023, 08:50 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
What are you using to preview the content? The screenshots you include are not of Sigil's Preview window.

I ask because after importing your html and css into Sigil, Sigil's Preview shows the content in question fully justified. It is your external renderer that seems to be having the problem.

EDIT: Never mind. I just noticed that you said the left images are views on a Kindle. We can't guess which portion(s) of your extensive css is not being properly honored by the conversion to the Kindle format. That's not really our area of expertise, or concern.

Last edited by DiapDealer; 12-11-2023 at 09:59 AM.
DiapDealer is offline   Reply With Quote
Old 12-11-2023, 09:53 AM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Moving this to the Workshop forum as this is not a Sigil issue. It is rather, a conversion issue regarding supported css. Perhaps others can provide insight into what sort of css does not convert well to other formats.

Last edited by DiapDealer; 12-11-2023 at 10:01 AM.
DiapDealer is offline   Reply With Quote
Old 12-11-2023, 06:19 PM   #7
azimuth
Enthusiast
azimuth plays well with othersazimuth plays well with othersazimuth plays well with othersazimuth plays well with othersazimuth plays well with othersazimuth plays well with othersazimuth plays well with othersazimuth plays well with othersazimuth plays well with othersazimuth plays well with othersazimuth plays well with others
 
Posts: 33
Karma: 2538
Join Date: Aug 2023
Location: NW US
Device: none
Class (para-Normal-Local-13) is your regular paragraph text and its justified for all the <p> tags except the first paragraph which uses "para-Normal-Local-7" tag for that.
A <span> class (char-Normal-Local-75) effects all of the other above mentioned <p> tags, and its NOT effecting nor reversing any of the 'justify' settings.

Neither the inline CSS nor the external linked CSS indicate that the justify on <p> tags is being negated.
When I looked at it on Firefox Developer screen it renders as "justify".
There are three CSS elements set with 'text-align:right' -- but none of those are being used in that HTML doc page.
If you add a sentence or two of "Ipsum Loren" test text you'll see the first paragraph's justify effect more readily.

Summation: You have "justify" correctly set in <p>.

Last edited by azimuth; 12-11-2023 at 11:02 PM.
azimuth is offline   Reply With Quote
Old 12-11-2023, 06:53 PM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That's the conclusion I came up with as well. So it must come down to being converted to a kindlebook that's causing the issue. I would simplify the ccs as much as possible before converting. If it converts and displays properly, "complicate it" little by little until it displays improperly after conversion. Then you'll have your culprit.

Also consider reading the Kindle publishing guidelines in order to determine if everything you're doing in your epub is even supported for kindlebooks.
DiapDealer is offline   Reply With Quote
Old 12-12-2023, 03:09 PM   #9
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,497
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Using Amazon's Kindle Previewer I took a look at the HTML and CSS provided and saw the same result, with the first paragraph not justified. I dug into the cause of that and it appears to be the consequence of several things related to how Amazon has implemented Enhanced Typesetting (KFX format) in conjunction with some unusual formatting choices made in this book.

First is that Amazon attempts to normalize the font size of books so that the main body text is the same across all books they sell. The CSS of that book sets the body text to 0.719em by wrapping the text in spans with font-size set to that. The KFX conversion attempts to compensate by essentially adding an outer div with a font-size of 1.39082em so that the resultant rendered size is 0.719 * 1.39082 = 1em. However this change triggers unexpected behavior in the KFX renderer.

Most of the paragraphs in the sample contain a single span encapsulating all of the text. In those cases the conversion to KFX folds the styling from that span into the paragraph so that the overall text-size of the paragraph is 1em.

But the paragraph that is handled incorrectly has the text is spit into two spans, each setting the text size to 0.719em. So in that case the renderer cannot fold the spans into the paragraph leaving the text-size at the paragraph level as 1.39082em.

In regular HTML the font-size at the paragraph level does not matter. But in KFX Amazon tries to be clever and disables text justification for a paragraph if the font-size exceeds a certain limit. This often results in a more readable rendering when the publisher has chosen to make something in the book much larger than normal. However in this case it appears that this logic is being triggered unexpectedly because of Amazon's compensation for the unusually small font size chosen for the book.
jhowell is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to get text to justify Clio Conversion 26 09-02-2022 08:24 AM
Forced line breaks and full justify dougfetch2 ePub 26 08-02-2017 12:11 PM
How to automatically justify text? cptnemo Recipes 9 11-27-2013 08:42 PM
Can you left justify text with the 360? maxbookworm PocketBook 11 05-31-2010 10:49 AM
Problems getting text to justify ficbot Calibre 4 01-13-2010 02:27 PM


All times are GMT -4. The time now is 03:51 AM.


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