View Single Post
Old 04-04-2013, 08:32 AM   #11
yucca
Member
yucca began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2013
Location: Finland
Device: Bookeen Cybook Muse Frontlight
The plague of automatically generated nbsp

Quote:
Originally Posted by townsend View Post
What's with the no-break-spaces? ( )

I am constantly having to fish them out of the HTML code.
The no-break space is as such a useful character. It is like a normal space, but forbids line breaks before and after it, when text is formatted into lines. So it “glues” words together. For example, the expression “10 km” should no be broken across lines, and using no-break space instead of space is a simple way to achieve that.

No-break spaces have other effects, too, in practice, especially in HTML. But let’s not go into that here.

The key question is why Sigil automatically convert spaces into no-break spaces at times and whether this can be controlled. The docs seem to mention just replacing a space by a no-break space if it appears after another space. I don’t think this is a good idea, but at least it has been documented and it has some logic in it. But where is the logic when Sigil changes e.g. a space between normal text and a link to a no-break space? This tends to make word division worse, typically so a break appears inside a link when there was a fine opportunity to break before the link.

Some word processors do such a change when a space appears between digits, on the grounds that a string like 123 456 is probably a single number in a language that uses space as thousands separator. So this is a simple case where I would expect a space to become a no-break space; but this does not happen in Sigil. So what is the logic, and how to live with it?
yucca is offline   Reply With Quote