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 04-03-2013, 02:32 PM   #1
townsend
Enthusiast
townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.
 
townsend's Avatar
 
Posts: 29
Karma: 6366
Join Date: Oct 2011
Device: Sigil
Plague of no-break-spaces ( )

What's with the no-break-spaces? ( )

I am constantly having to fish them out of the HTML code.

They're useless. I just delete them all.

Last edited by Jellby; 04-04-2013 at 03:55 AM. Reason: removed smiley
townsend is offline   Reply With Quote
Old 04-03-2013, 02:58 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
There's a difference between "they're useless" and "I personally don't have any use for these particular ones I've encountered."

I suspect you meant the latter.

Last edited by DiapDealer; 04-04-2013 at 06:39 AM.
DiapDealer is online now   Reply With Quote
Advert
Old 04-03-2013, 03:01 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,778
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
They have a USE,
They keep 2 words from being separated/justify padded
theducks is online now   Reply With Quote
Old 04-03-2013, 03:18 PM   #4
townsend
Enthusiast
townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.
 
townsend's Avatar
 
Posts: 29
Karma: 6366
Join Date: Oct 2011
Device: Sigil
Thanks for the reply. And I would like to learn what they are used for, even if I have no use for them now. They seem to occur mostly, when I do a lot of editing. Especially when I use the carriage return.

At this point I really don't understand what you mean by:
Quote:
They keep 2 words from being separated/justify padded.
Could you give me an example of when or why I'd use them?
townsend is offline   Reply With Quote
Old 04-03-2013, 03:55 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,778
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 townsend View Post
Thanks for the reply. And I would like to learn what they are used for, even if I have no use for them now. They seem to occur mostly, when I do a lot of editing. Especially when I use the carriage return.

At this point I really don't understand what you mean by: Could you give me an example of when or why I'd use them?
Mr. Smith

Does

Mr.
Smith

look good to you or with a big gap between those words?
theducks is online now   Reply With Quote
Advert
Old 04-03-2013, 04:10 PM   #6
townsend
Enthusiast
townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.townsend got an A in P-Chem.
 
townsend's Avatar
 
Posts: 29
Karma: 6366
Join Date: Oct 2011
Device: Sigil
Oh. I see. It's like when I use Shift and a carriage return in a HTML editor.

But for some reason Sigil put then in with just a regular carriage return.
townsend is offline   Reply With Quote
Old 04-03-2013, 04:31 PM   #7
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,778
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 townsend View Post
Oh. I see. It's like when I use Shift and a carriage return in a HTML editor.

But for some reason Sigil put then in with just a regular carriage return.
No.
nbsp is a space with glue.
It looks like a space, but is treated more like another letter so the result is more like a big word
theducks is online now   Reply With Quote
Old 04-03-2013, 05:13 PM   #8
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
If you edit in Book View then you can end up with lots of extra nbsp characters if you double space words, etc. Just delete them - if you didn't intentionally use them.
meme is offline   Reply With Quote
Old 04-04-2013, 05:30 AM   #9
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
This is why you should edit in Code View. I know Page View is reassuringly familiar, but it's easier to work directly with the content really!
exaltedwombat is offline   Reply With Quote
Old 04-04-2013, 06:32 AM   #10
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,492
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by townsend View Post
But for some reason Sigil put then in with just a regular carriage return.
Are you, by any chance, using multiple spaces at the start of a paragraph to do an indent?
pdurrant is offline   Reply With Quote
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
Old 04-04-2013, 12:07 PM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
and how to live with it?
If you never make edits (as in actually editing the text, not the formatting) in Book View, you never have to worry about "living with it." Converting what happens in Book View to html will always be subject to the whims of what QtWebkit and the other underlying libraries think best.

I know it's not a very satisfactory one, but the answer is to do the least amount of editing in Book View that you possibly can (if you have an opinion as to how the underlying code should look). Look at Book View to make sure the edits you made in Code View had the desired effect.

Book View (WYSIWYG) editing is for people who don't really care what the underlying code turns out looking like (and for people who don't mind manually cleaning up the code that Book View does generate). Everyone else should be editing in Code View.

Last edited by DiapDealer; 04-04-2013 at 12:33 PM.
DiapDealer is online now   Reply With Quote
Old 04-05-2013, 06:57 AM   #13
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,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
No break spaces exist because HTML does not recognize more than one space in a row as valid. It ignores them. So no break spaces allow you to enter spaces and make sure they will be shown. Sigil has no way of reading your mind as to whether you REALLY want a space there all the time or not, so it inserts a guaranteed no break space.

The developers know you can go through at the end of your editing and search for them and replace them all with normal spaces in a giant search and replace, being careful to skip those sections that have purposeful multiple spaces.

And yes it is annoying, but that is the nature of epubs being based on HTML.
mrmikel is offline   Reply With Quote
Old 04-05-2013, 07:18 AM   #14
teh603
Autism Spectrum Disorder
teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.teh603 ought to be getting tired of karma fortunes by now.
 
teh603's Avatar
 
Posts: 1,212
Karma: 6244877
Join Date: Sep 2011
Location: Coastal Texas
Device: Android Phone
Quote:
Originally Posted by mrmikel View Post
No break spaces exist because HTML does not recognize more than one space in a row as valid. It ignores them. So no break spaces allow you to enter spaces and make sure they will be shown. Sigil has no way of reading your mind as to whether you REALLY want a space there all the time or not, so it inserts a guaranteed no break space.
I'll call this several steps back in word processing. Using the spacebar for tables and spacing is a pretty bad idea unless you're in a monospaced font, so why even support it? Doesn't HTML support tables for a reason?

Edit: Then again, we are talking about a language written without a tab character, so I guess anything's impossible.

Last edited by teh603; 04-05-2013 at 07:20 AM.
teh603 is offline   Reply With Quote
Old 04-05-2013, 07:58 AM   #15
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,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
I didn't say it was desirable...it isn't. The reflow can cause odd breaks in sentences because words can't disconnect from each other. Tables work only sort of, so lining things up is always...er...interesting.

HTML was designed for web pages, and it was probably adopted for epubs because it was neutral and known by many. But you probably could have designed a better language, but then it would have been fought over and patented, etc, etc.etc.
mrmikel 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
Use of nonbreaking space ( ) Ti-Ron ePub 10 04-14-2013 10:57 PM
Use of   for spacing Ripplinger Sigil 11 11-25-2012 04:36 AM
iBooks does NOT LIKE   Erin Apple Devices 0 09-13-2011 11:17 AM
Specify indent in css, not with &nbsp James_Wilde Calibre 7 09-13-2010 09:48 PM
Mobiperl   lost when converting to mobi Jellby Kindle Formats 19 08-26-2008 03:10 PM


All times are GMT -4. The time now is 10:35 PM.


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