Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2011, 12:08 PM   #1
wmeyer
Junior Member
wmeyer began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2011
Device: Kindle
removing extra spaces - kills images

I am new to Sigil, and am trying to reformat some files I downloaded from Gutenberg, to clean up some of the more annoying formatting errors in them.

One such is the appearance of extra spaces, that is, more than one space between words. Today, I tried that on a file in which images have been inserted. When the S&R was complete, the images had all been removed.

My process was to use S&R in the book view, and replace all occurrences of two spaces with a single space. This is the process I have used in pretty much every editor I have ever used, but in this instance, I got more than expected.

Can anyone show me the error of my ways, or suggest an alternate solution?

Thanks!

Bill
wmeyer is offline   Reply With Quote
Old 01-14-2011, 12:53 PM   #2
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: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Hmm... Maybe the S&R in the book view is seeing "space, image, space" as a double space, an replacing everything with a space?

Go to the code view and see what's the code around the double spaces (it must be more than " ", because any number of consecutive spaces in the code will render as a single space, at most, in book view, unless in a <pre> block), then remove only one of the spaces.
Jellby is offline   Reply With Quote
Advert
Old 01-14-2011, 12:54 PM   #3
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,820
Karma: 54830978
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 wmeyer View Post
I am new to Sigil, and am trying to reformat some files I downloaded from Gutenberg, to clean up some of the more annoying formatting errors in them.

One such is the appearance of extra spaces, that is, more than one space between words. Today, I tried that on a file in which images have been inserted. When the S&R was complete, the images had all been removed.

My process was to use S&R in the book view, and replace all occurrences of two spaces with a single space. This is the process I have used in pretty much every editor I have ever used, but in this instance, I got more than expected.

Can anyone show me the error of my ways, or suggest an alternate solution?

Thanks!

Bill
The issue with Book View is there can be a huge amount of code between those spaces (as you seem to have found out) the hard way)

HTML is supposed to ignore multiple spaces(%20 type).
non-breaking spaces (&nbsp; ) can only be replaced in code view
or are you confusing us with Vertical Spacing issues (used to break scenes, among other things.) These could be coded using Margins, BR, a paragraph consisting of a NBSP ... I prefer the paragraph margin method, it allows tweaking the document in a single place: the stylesheet.
theducks is offline   Reply With Quote
Old 01-14-2011, 01:05 PM   #4
wmeyer
Junior Member
wmeyer began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2011
Device: Kindle
Thanks. No, I was not confusing literal spaces with vertical space. I realize HTML should ignore embedded spaces, but I am seeing the effect of them on the Kindle, and hadn't really considered that they would have no effect in HTML. However, if they are present in the HTML, do they get passed through to the EPUB output? And then to the MOBI file I convert to with Calibre?

Sorry, I am so new to this, and there are so many steps....
wmeyer is offline   Reply With Quote
Old 01-14-2011, 01:37 PM   #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,820
Karma: 54830978
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 wmeyer View Post
Thanks. No, I was not confusing literal spaces with vertical space. I realize HTML should ignore embedded spaces, but I am seeing the effect of them on the Kindle, and hadn't really considered that they would have no effect in HTML. However, if they are present in the HTML, do they get passed through to the EPUB output? And then to the MOBI file I convert to with Calibre?

Sorry, I am so new to this, and there are so many steps....
Yes.
To make code readable (to humans), HTML allows white-space in the code to make it easy to read. You could code an entire document without returns and it would still renders the same in a browser.
NBSP's are NOT ignored, set your insert point at a problem (paragraph), then switch to CV and see what is there.
Conversion can make a hash out of poorly coded sources. GIGO still applies
theducks is offline   Reply With Quote
Advert
Reply

Tags
removing spaces, s&r


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF->Mobi extra spaces inserted? tapar Conversion 8 01-29-2011 08:33 PM
I'm having a problem with extra paragraph spaces akosimike Calibre 10 05-27-2010 06:53 PM
FBReader adds extra spaces for EPUB Book pakiyabhai PocketBook 11 05-27-2010 05:58 PM
So here's the part that kills me kennyc News 27 09-07-2009 10:50 AM
Removing extra line breaks plemming Calibre 0 07-31-2008 07:50 PM


All times are GMT -4. The time now is 01:08 PM.


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