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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-17-2011, 07:27 AM   #1
shaina
Member
shaina began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Nov 2011
Device: iphone
text alignment issue

Hi, m trying to develop an epub for ipad... aligned my entire book text justified.. but only two of the chapters are accepting justification rest are appearing left in ipad ... anyone having idea of the issue plz.. help thnks
shaina is offline   Reply With Quote
Old 11-17-2011, 09:41 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,689
Karma: 54369090
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 shaina View Post
Hi, m trying to develop an epub for ipad... aligned my entire book text justified.. but only two of the chapters are accepting justification rest are appearing left in ipad ... anyone having idea of the issue plz.. help thnks
Conflicting, cascaded styles.
switch to CV (code view) and work from the inner style out.
(x)html is just boxes of letters/pictures stacked or side-by-side inside other boxes.
see http://www.w3.org/TR/CSS2/box.html.
A Paragraph is typically a block level box, sometimes folks wrap (1 or more) those in a Div (outer box).

the Div now constrains the P.
theducks is offline   Reply With Quote
Advert
Old 11-21-2011, 07:10 AM   #3
shaina
Member
shaina began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Nov 2011
Device: iphone
there is no problem in sigil... entire text just look fine(i.e justified) there, the problem arises when the book is opened in ipad ... only some of the text is appearing justified rest is left ..
shaina is offline   Reply With Quote
Old 11-21-2011, 09:15 AM   #4
Keroberos
Zealot
Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.
 
Keroberos's Avatar
 
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
Possible typo in the CSS file? You can paste the contents of your CSS file here to check it. Sigil is very forgiving of missing or incorrect colons/semicolons. Try opening the epub in Adobe Digital Editions or Sony Reader Library and see if the behaviour is the same there.
Keroberos is offline   Reply With Quote
Old 11-21-2011, 09:49 AM   #5
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,689
Karma: 54369090
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 Keroberos View Post
Possible typo in the CSS file? You can paste the contents of your CSS file here to check it. Sigil is very forgiving of missing or incorrect colons/semicolons. Try opening the epub in Adobe Digital Editions or Sony Reader Library and see if the behaviour is the same there.
2nd this diagnosis

ADE also is unforgiving. Stuff that Sigil/Calibre displays fine, ADE barfs on

Edit:
BTW There is a free CSS validation service at W3:
http://jigsaw.w3.org/css-validator/#validate_by_upload

Last edited by theducks; 11-21-2011 at 09:53 AM. Reason: added link
theducks is offline   Reply With Quote
Advert
Old 11-21-2011, 01:53 PM   #6
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 688
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by theducks View Post
2nd this diagnosis

ADE also is unforgiving. Stuff that Sigil/Calibre displays fine, ADE barfs on

Edit:
BTW There is a free CSS validation service at W3:
http://jigsaw.w3.org/css-validator/#validate_by_upload
I've been bitten by this too, on occasion. Once Sigil gets plug-in capability, a CSS validator would be very high on my plugin wish list!
st_albert is offline   Reply With Quote
Old 11-21-2011, 02:12 PM   #7
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by Keroberos View Post
Possible typo in the CSS file? ...
I don't agree.

Since there are two chapters that display as intended and several others that don't the CSS, at least those styles used in the first 2 chapters, is well enough formatted for iBooks to handle correctly.

The fact that the formatting changes beginning at chapter 3 indicates that there is some change in the (x)html document construction that begins in chapter three and is repeated or inherited throughout the rest of the (x)html document(s). This change could be a typo at the end of chapter 2 or at the beginning of chapter 3. It could also be a design change.

Types of design changes that could easily have this affect include:
  • Different styles for the <p> tags in the two portions of the document.
  • Different style in any enveloping <div> tags or styled <div> tags enveloping some <p> tags and not others.
  • It could be a style applied in the <body> tag if chapter 3 et al are separate (x)html files.
  • It can also happen when there is more than one CSS file and some of the chapter (x)html files link to one and the others link to another.
  • It could be that everything up to chapter 2 links to the CSS only and starting in chapter 3 there is a <style> section in the <head> section that overrides the styles set in the linked CSS or vice versa.
Simply looking at the (x)html in Sigil's code view and comparing the tags in chapter 2 and chapter 3 should reveal this type of "fault".

Last edited by dwig; 11-21-2011 at 02:14 PM.
dwig is offline   Reply With Quote
Old 11-21-2011, 09:52 PM   #8
Keroberos
Zealot
Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.Keroberos ought to be getting tired of karma fortunes by now.
 
Keroberos's Avatar
 
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
Quote:
Originally Posted by dwig View Post
I don't agree.
I'm not so sure of that. According to shaina's second post the entire text shows justified in Sigil which it should not if there were anything incorrect with the xhtml or if there were any changes or different styles like you describe. Not knowing iBooks behaviour with regards to typos in the CSS file is why I recommended opening the epub in ADE, which will show no formating if there are any typos in the CSS.
Keroberos is offline   Reply With Quote
Old 11-22-2011, 01:24 AM   #9
shaina
Member
shaina began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Nov 2011
Device: iphone
All the alignment looks fine in ADE too... and there is no issue with css or <p> tag formatting bcoz if i try to give entire book right/center alignment .. its acceptable .. issue arises with justify alignment only ...n plz dont think there might b some mistake in css... bcoz book looks fine in sigil n ADE both issue arises only when we view in ipad
shaina is offline   Reply With Quote
Old 11-22-2011, 09:46 AM   #10
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718479
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by Keroberos View Post
I'm not so sure of that. According to shaina's second post the entire text shows justified in Sigil which it should not if there were anything incorrect with the xhtml or if there were any changes or different styles like you describe. ...
No, the fact that Sigil displays the book correctly DOES NOT point to the error solely being in the CSS. Sigil could very easily be correcting for an error in the (x)html files as one in the CSS.

Since the error only occurs in the display of a portion of the document, or in some of the (x)html files, it is all but impossible for the error to be in the CSS stylesheet. An error in the stylesheet would affect the whole document, not just a portion.

The only way a stylesheet error could be causing this behavior is if the <p> tags in chapt 1-2 have one style applied and chapt 3-... have a different style and the style used in chapt 3-... contains a typo that Sigil is correcting for on the fly. Even if this is the case, resolving it would be much easier if the (x)html code used for chapt 2 is carefully compared to that used for chapt 3 to expose the difference. You could then know what coding error/difference in chapt 3-... causing the problem. It may point to a different CSS style that needs fixing and may indicate some other error.
dwig is offline   Reply With Quote
Old 11-22-2011, 10:40 AM   #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,689
Karma: 54369090
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 dwig View Post
No, the fact that Sigil displays the book correctly DOES NOT point to the error solely being in the CSS. Sigil could very easily be correcting for an error in the (x)html files as one in the CSS.

Since the error only occurs in the display of a portion of the document, or in some of the (x)html files, it is all but impossible for the error to be in the CSS stylesheet. An error in the stylesheet would affect the whole document, not just a portion.

The only way a stylesheet error could be causing this behavior is if the <p> tags in chapt 1-2 have one style applied and chapt 3-... have a different style and the style used in chapt 3-... contains a typo that Sigil is correcting for on the fly. Even if this is the case, resolving it would be much easier if the (x)html code used for chapt 2 is carefully compared to that used for chapt 3 to expose the difference. You could then know what coding error/difference in chapt 3-... causing the problem. It may point to a different CSS style that needs fixing and may indicate some other error.
real trashy (style per chapter that gets created on some OCR conversions) style sheets excepted.
It may also be possible for the <body> to not have the same/no style applied
theducks is offline   Reply With Quote
Old 11-22-2011, 10:41 AM   #12
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by Keroberos View Post
I'm not so sure of that. According to shaina's second post the entire text shows justified in Sigil which it should not if there were anything incorrect with the xhtml or if there were any changes or different styles like you describe. .
not true - I've had stuff look great in sigil book view but all wrong in ADE or on my sony reader, becuase SIGIL is more error tolerant.

ADE/sony give up at the 1st CSS typo & ignore all other style rules.

PS sometimes it is faster to run epub to epub conversion in calibre than to stare at the code looking for errors.
calibre will auto fix many bugs

otherwise stare hard at the lines in XHTML which link to the stylesheet, an error there can lead to not seeing styles applied

in the head section you should have something like this
<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">

Last edited by cybmole; 11-22-2011 at 10:45 AM.
cybmole is offline   Reply With Quote
Old 11-22-2011, 10:42 AM   #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: 73,661
Karma: 127838198
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Isn't there an option in the iBooks settings to be justified?
JSWolf is offline   Reply With Quote
Old 11-22-2011, 01:26 PM   #14
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Correct JSWolf, that is what I am thinking too. We have seen it earlier on the forum with regards to justification and iBooks.
Check the default justification setting in iBooks.
Toxaris is offline   Reply With Quote
Old 11-22-2011, 02:34 PM   #15
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,689
Karma: 54369090
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 Toxaris View Post
Correct JSWolf, that is what I am thinking too. We have seen it earlier on the forum with regards to justification and iBooks.
Check the default justification setting in iBooks.
how does that setting only affect some chapters?
theducks is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vertical text alignment OCR bookmeal Workshop 7 11-14-2011 03:28 PM
Hello/Image and text alignment Derek R Introduce Yourself 3 06-26-2011 10:47 AM
PRS-650 Text and alignment issues henders254 Sony Reader 0 05-14-2011 08:11 PM
Text Alignment Problem fan of kovid Conversion 15 03-20-2011 05:39 PM
Text alignment James_Wilde iRiver Story 0 10-25-2010 04:22 AM


All times are GMT -4. The time now is 09:30 AM.


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