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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-13-2012, 12:20 AM   #16
N00ter
Member
N00ter began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2012
Device: Kindle
Here is some more information to work with. As I dig through the ePub with Sigil I find that the first paragraph of each new section is classified as "OpeningParagraph." So I went to the css stylesheet and this is what it says under the .OpeningParagraph section:

Quote:
.OpeningParagraph {
color: black;
display: block;
font-family: MinionPro-Regular;
font-size: 0.875em;
line-height: 1.2;
margin-bottom: 6pt;
margin-left: 0;
margin-right: 0;
margin-top: 0;
text-align: left;
text-autospace: none;
text-justify: inter-ideograph
}
Does the key lie in changing some value in this section that I am just totally missing?
N00ter is offline   Reply With Quote
Old 04-13-2012, 12:25 AM   #17
N00ter
Member
N00ter began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2012
Device: Kindle
Above was a quote from the stylesheet css. Here is a quote from one of the paragraphs that has the screwed up spacing. Maybe something in here will make sense to some of your more trained eyes:

Quote:
<body class="calibre">
<p class="ChapterNumber" id="calibre_pb_38"><a class="calibre20" id="Chapter11"><span class="calibre25" xml:lang="EN-GB">11</span></a></p>

<p class="ChapterTitle"><span class="calibre25" xml:lang="EN-GB">Revolutions in American Religion and Society:<br class="calibre10" />
the Shadow of Civil War</span></p>

<p class="OpeningParagraph"><span class="calibre26" xml:lang="EN-GB">&nbsp;</span></p>

<p class="OpeningParagraph"><span class="calibre26" xml:lang="EN-GB">Christianity was a highly pervasive feature of the dynamically changing nineteenth-century American society, helping to mould its national cultural values, yet it was competed over and divisive territory. The freedom which Americans enjoyed to practice the religion of their choice did not bring greater tolerance, but a diversity of approaches to the interpretation of Christian teaching and models of Christian practice. The first Amendment deregulated religion, but made no attempt to establish what ‘the’ religious truth was, and as the nineteenth-century progressed, a multiplicity of claims about it were unleashed. A free market in religious opinion followed, with religion hawked across the land like any other product in the years before the American Civil War.<a class="calibre23" href="../Text/ePub%20Version_split_043.htm#_ftn632" id="_ftnref632" title=""><span class="calibre24">[632]</span></a> Many had their own vision of what godly America would look like, with little prospect that those visions would be united through compromise or consensus.<a class="calibre23" href="../Text/ePub%20Version_split_043.htm#_ftn633" id="_ftnref633" title=""><span class="calibre24">[633]</span></a> Over the big issues confronting America, such as the role of women in society, or slavery, the churches had much to say, but it was often delivered by means of diametrically opposing arguments, usually based on varying interpretations of the Bible.</span></p>
Sorry if I'm sharing information you all don't need. I know my way around HTML just a bit, but this is my first time really digging through the code of my ePub file before.
N00ter is offline   Reply With Quote
Old 04-13-2012, 10:19 AM   #18
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,086
Karma: 1444487
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
It pays to check the code when you have this kind of problem. Sometimes seemingly unrelated things have an effect on spacing. It depends on the readers internal programming.

With relatively limited memory in readers, support for hyphenation is necessarily limited. Better support would be the key for prettier text. Some day....
mrmikel is offline   Reply With Quote
Old 04-13-2012, 02:38 PM   #19
sellew
Enthusiast
sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.sellew has a complete set of Star Wars action figures.
 
Posts: 30
Karma: 300
Join Date: Oct 2011
Location: Barcelona
Device: Sony PRS-650, PRS-T2
Quote:
Originally Posted by N00ter View Post
Above was a quote from the stylesheet css. Here is a quote from one of the paragraphs that has the screwed up spacing.
1. This piece:

<p class="OpeningParagraph"><span class="calibre26" xml:lang="EN-GB">&nbsp;</span></p>

is creating an extra blank line between the chapter title and the first paragraph.

2. The hyper-links like that one:

<a class="calibre23" href="../Text/ePub%20Version_split_043.htm#_ftn632" id="_ftnref632" title=""><span class="calibre24">[632]</span></a>

can create higher space between lines depending on the CSS code of class "calibre24". If the vertical-align property is set to 'super' then most probably this is the cause. Usually, setting it to 'text-top' or 'top' solves the issue.
sellew is offline   Reply With Quote
Old 04-13-2012, 04:14 PM   #20
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,260
Karma: 4801167
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
... or add a "line-height: 0" to the footnote style. Depending on the other settings, it may cause the footnote to overlap with the previous line, but it can also look fine. I do it quite often.
Jellby is offline   Reply With Quote
Old 04-14-2012, 05:32 AM   #21
ProDigit
Karmaniac
ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.
 
ProDigit's Avatar
 
Posts: 2,157
Karma: 9023682
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, Jetbook Mini, Jetbook Color, Astak Ez Reader Pro
looks to me you have your text layout justified instead of left aligned.
That's perhaps why the weird spacing.
ProDigit is offline   Reply With Quote
Old 04-14-2012, 09:39 AM   #22
N00ter
Member
N00ter began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2012
Device: Kindle
I'VE DONE IT! Sorry for the all-caps. Here is what I did.

I had to tinker with the file. I have no idea why it was this way, but I went into the CSS Stylesheet and started experimenting with different line heights, but only in the Opening.Paragraph section. I left the line height at 1.2 for all other sections, but I changed Opening.Paragraph to 1.4. Sure enough, I go back into the book and it's perfect. I wonder if there is something in the iPad that is causing the line spacing in the Opening Paragraph of a new section to skew tighter for some reason.

Oh well - problem solved! Thanks, all!
N00ter is offline   Reply With Quote
Old 04-14-2012, 09:42 AM   #23
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: 37,915
Karma: 18763702
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by N00ter View Post
Every line-height: property in the ePub is set to 1.2. All of the vertical-align properties were set to middle.

Here is a new piece of information, because changing those two properties listed above haven't worked. It is the first paragraph under each new section-heading that has the tight spacing. I have examined almost the entire book and am finding very consistently that this is the case. Why would only the first paragraph after a new section heading have this tight spacing?
You don't change them. You remove them. You get rid of line-height and vertical-align. Just delete them.
JSWolf is offline   Reply With Quote
Old 04-14-2012, 09:45 AM   #24
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: 37,915
Karma: 18763702
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by N00ter View Post
Here is some more information to work with. As I dig through the ePub with Sigil I find that the first paragraph of each new section is classified as "OpeningParagraph." So I went to the css stylesheet and this is what it says under the .OpeningParagraph section:



Does the key lie in changing some value in this section that I am just totally missing?
Should become...

Code:
.OpeningParagraph {
display: block;
font-family: MinionPro-Regular;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
text-align: justify;
}
If you aren't using an embedded font, you can delete the font-family command. As for a line-height of 1.2em, that's just way too big and should be deleted.

Last edited by JSWolf; 04-15-2012 at 10:50 AM.
JSWolf is offline   Reply With Quote
Old 04-14-2012, 09:48 AM   #25
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: 37,915
Karma: 18763702
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by N00ter View Post
Above was a quote from the stylesheet css. Here is a quote from one of the paragraphs that has the screwed up spacing. Maybe something in here will make sense to some of your more trained eyes:



Sorry if I'm sharing information you all don't need. I know my way around HTML just a bit, but this is my first time really digging through the code of my ePub file before.
That is some really bad code.

Code:
<body>
<p class="ChapterNumber">11</p>
<p class="ChapterTitle">Revolutions in American Religion and Society:<br/>the Shadow of Civil War</p>
<p class="OpeningParagraph">Christianity was a highly pervasive feature of the dynamically changing nineteenth-century American society, helping to mould its national cultural values, yet it was competed over and divisive territory. The freedom which Americans enjoyed to practice the religion of their choice did not bring greater tolerance, but a diversity of approaches to the interpretation of Christian teaching and models of Christian practice. The first Amendment deregulated religion, but made no attempt to establish what ‘the’ religious truth was, and as the nineteenth-century progressed, a multiplicity of claims about it were unleashed. A free market in religious opinion followed, with religion hawked across the land like any other product in the years before the American Civil War.<a class="calibre23" href="../Text/ePub%20Version_split_043.htm#_ftn632" id="_ftnref632" title=""><span class="calibre24">[632]</span></a> Many had their own vision of what godly America would look like, with little prospect that those visions would be united through compromise or consensus.<a class="calibre23" href="../Text/ePub%20Version_split_043.htm#_ftn633" id="_ftnref633" title=""><span class="calibre24">[633]</span></a> Over the big issues confronting America, such as the role of women in society, or slavery, the churches had much to say, but it was often delivered by means of diametrically opposing arguments, usually based on varying interpretations of the Bible.</p>
That is somewhat better looking now.
JSWolf is offline   Reply With Quote
Old 04-14-2012, 10:00 AM   #26
N00ter
Member
N00ter began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jan 2012
Device: Kindle
Well, JSWolf, I did try a version of the book with the line-heights deleted completely. For some reason, the iPad was still making the first paragraphs a little tighter than the rest.

By manually causing the opening paragraph to space wider, it's counteracting whatever iBooks is doing with the opening paragraph. The problem is solved, but it isn't elegant.

You may have seen how I'm generating this eBook, but I write the whole thing in Word, export it to HTML, and then convert with Calibre. How am I supposed to get better code? Is manually changing it in Sigil the only way to go?
N00ter is offline   Reply With Quote
Old 04-15-2012, 10:51 AM   #27
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: 37,915
Karma: 18763702
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
The only way to get better code is to manually edit the mess that Word makes. Sigil will allow you to easily edit the mess. As you can see from my posts above, it's possible to edit manually like I did. Have you looked at the XML code where the spacing is off to see if there is anything there?
JSWolf is offline   Reply With Quote
Reply

Tags
epub, formatting, spacing

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"System UIDs Inconsistent" Szara Kobo Tablets 3 11-28-2011 05:11 PM
Inconsistent Display of Cover Motto Kobo Reader 2 03-23-2011 12:36 AM
ePub to Mobi cover art - inconsistent wannabee Conversion 5 03-15-2011 01:02 PM
Inconsistent Metadata windybt Calibre 8 10-10-2010 01:31 PM
Calibre + NYT download = inconsistent? maxbookworm Calibre 36 06-28-2010 08:30 AM


All times are GMT -4. The time now is 06:17 AM.


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