Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-22-2012, 05:39 AM   #1
Whackatagin
Tweaker
Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.
 
Whackatagin's Avatar
 
Posts: 102
Karma: 324366
Join Date: Jan 2012
Location: Scotland
Device: Kindle / KOBO / PC
Exclamation Irregular Word Spacing In Mobi

Hi

I've been dropping in and out the forums for about a year now, good stuff, lots of answers. Anyhoo, I now have a question I can't seem to find the answer too so I thought I'd ask.

The short version.
  • Doc to Filtered Html (Done)
  • Filtered Html to generic ePub in Sigil (Done)
  • Sigil - Add very simple H12&3 & firstline indent CSS (Done)
  • Sigil - Split the file down into chapters, title & verso etc (Done)
  • Notepad++ - split the ePub and scrub the file. (Simple & Elegant)
  • Re-zip, check on various Desktop apps (inc ADE) - Looking great.
  • Still a generic ePub, Fire into Calibre (Top program, by the way) & run conversion to mobi.....(Hmmmm?)
The only setting I altered from default was put the TOC at the start, everything else to default...output Kindle from Default generic epub. I hurriedly plugged in my K3 and dumped the new mobi onto the device...TADA! superb, even the static title verso looked excellent (Kindlegen seems to hate those). It was only when I started testing the TOC and jumping randomly about in the text that I found my problem, and I can't figure out why.

Randomly, somethimes a whole para, some times just a sentence or two, or even just a word or two, I get what appears to be double spacing between words. This wouldn't be to much of an issue if these "patches" weren't sitting amoungst properly spaced text.

Anyway, any thoughts guys?

Before you ask, all text is enclosed in <P> </P> tags with only class style listed. It's as clean as I can make it. All Para breaks use <P>&nbsp; </P>, there are no scan font br, or well any other tags in the files (xhtml).

Last edited by Whackatagin; 01-22-2012 at 05:54 AM.
Whackatagin is offline   Reply With Quote
Old 01-22-2012, 06:26 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Are you sure that the words really are double-spaced, and that it's not just the Kindle's not-always-terribly-good justification that you're seeing? Have you looked at the Mobi source and verified that there genuinely are double spaces between the words?
HarryT is offline   Reply With Quote
Old 01-22-2012, 07:02 AM   #3
Whackatagin
Tweaker
Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.
 
Whackatagin's Avatar
 
Posts: 102
Karma: 324366
Join Date: Jan 2012
Location: Scotland
Device: Kindle / KOBO / PC
Hi harry,

That was quick. In answer to your 2nd question, yes, I have checked multiple instances of this effect in the source xhtml files. I'm almost OCD when it comes to cleaning up the source. All spacing is 100% spot on. The source file comes out perfect in it's epub form. I almost fell off my seat when it worked, full-feature, no bugs, in ADE. Not even the two standard parse & syntax errors ADE usually generates for homemade files from Sigil.

I've even looked for commonalities in trailing after a puncuation mark, capitisation, and even the actual length of the words themselves. I am stumped.

You recon it might be the actual kindle firmware? The gremlin also appears in K4PC.

Like I say, I like everything simple and clean code-wise, but I think I might be looking at trying to find away to force it to behave consistantly. The spacing thing occours "within" a tagged para? And, honestly, although it might just have been me, but I don't think it was happening before. I've been "experimenting" with Sigil, Calibre for about 8 or 9 months now. MIght it be a little gremlin in the latest Calibre update, I noticed the addition of several new device options on the output screen?

G:0)
Whackatagin is offline   Reply With Quote
Old 01-22-2012, 07:06 AM   #4
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by Whackatagin View Post
Hi harry,

That was quick. In answer to your 2nd question, yes, I have checked multiple instances of this effect in the source xhtml files. I'm almost OCD when it comes to cleaning up the source. All spacing is 100% spot on.
No, you misunderstand me.

You believe, as I understand it, that Calibre may be inserting extra spaces into the Mobi HTML. What I'm asking you is whether you've looked at the HTML source of the generated Mobi file (eg by using the "Mobiunpack" tool) and ascertained whether there really is extra spacing there.

The Kindle's justification algorithm can make the spacing look odd on occasions, and it's nothing to do with the Mobi file.
HarryT is offline   Reply With Quote
Old 01-22-2012, 07:34 AM   #5
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
A simple check for HarryT's suggestion (not-always-terribly-good justification), which is agree is likely the problem, would be to try ragged right (i.e. left) justfication. I use the following to do this:
Code:
body {
	text-align:  left;}
If the extra spaces go away with left alignment, then they are caused by the Kindles text justification.
wallcraft is offline   Reply With Quote
Old 01-22-2012, 07:42 AM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Yes, that's an excellent suggestion. I'm pretty sure that you'll find that it is the justification algorithm that's to blame for this.
HarryT is offline   Reply With Quote
Old 01-22-2012, 07:48 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There's actually a conversion option (under look & feel) in calibre to control justification, which does a much more comprehensive job than setting the justification on body.
kovidgoyal is offline   Reply With Quote
Old 01-22-2012, 07:49 AM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by kovidgoyal View Post
There's actually a conversion option (under look & feel) in calibre to control justification, which does a much more comprehensive job than setting the justification on body.
Thanks - hadn't spotted that!
HarryT is offline   Reply With Quote
Old 01-22-2012, 07:49 AM   #9
Whackatagin
Tweaker
Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.
 
Whackatagin's Avatar
 
Posts: 102
Karma: 324366
Join Date: Jan 2012
Location: Scotland
Device: Kindle / KOBO / PC
Sorry Harry,

I misunderstood. Okay, I have installed python 2, mobiunpack, run the decomp and opened the block html with notepad++. (quick study )

(frustrated head shake) It all looks fine.

G:0)

Update: Had a go at playing with the "Look & Feel" alignments as per Kovid's (and Wallcraft's) suggestion. Justify; no improvement. Left align; BINGO! it has left a very ragged right, especially size 4 and above on the K3, but still, spacing is now perfect. I guess it was just "squishing" (word of the day) things about to get the best spread on each line.

A niggly little problem easily solved, thanks everyone! (I've learned some new stuff too:0)

Last edited by Whackatagin; 01-22-2012 at 08:16 AM.
Whackatagin is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobi line spacing and endnote references mrobertsbcn Kindle Formats 4 01-14-2012 12:36 AM
Ideas? epub to mobi - a bit of reg para spacing -vs.- list single space 1611mac Conversion 0 12-09-2011 02:34 PM
Creating MOBI ebooks for Kindle using FineReader, Word & Mobi Creator shoreline Workshop 1 01-28-2011 03:37 AM
Mobi and Empty Spacing? KingOfMyWorld Kindle Formats 6 08-09-2010 11:57 PM
'letter-spacing' in Mobi hkdorama Kindle Formats 4 07-26-2010 06:35 AM


All times are GMT -4. The time now is 04:19 PM.


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