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 07-27-2017, 02:38 AM   #1
rbruce1314
Zealot
rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.
 
rbruce1314's Avatar
 
Posts: 134
Karma: 207140
Join Date: Apr 2010
Location: Stroud, UK
Device: Xgody tablet, LG G3 (Android), moon+reader
Where are the spaces going?

I've had this problem on and off for some time , but it's getting a bit annoying.

I have a book with dleiberate space lines in it: say (<p class="calibre8">& nbsp;</p>) or (<p class="calibre8">& #160;</p>) as a deliberate space line. At some stage I return to the page and find that the space symbol has gone - which means the line no longer produces a space once in book view!! At the same time ALL other space symbols have gone from the whole document . . .

It appears to happen randomly even though I know it can't be the case. I have Sigil set to "automatically clean......." on 'open', and also set to 'pretty print tidy'.
rbruce1314 is offline   Reply With Quote
Advert
Old 07-27-2017, 03:53 AM   #2
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 3,889
Karma: 10764058
Join Date: Dec 2010
Device: Kindle PW2
You'll need to add &nbsp; to the list of entities to be preserved.

Edit > Preferences > Preserve Entities > Entities to Preserve

(If you don't see this option, you'll need to update your Sigil version.)
Doitsu is offline   Reply With Quote
Old 07-27-2017, 05:23 AM   #3
rbruce1314
Zealot
rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.
 
rbruce1314's Avatar
 
Posts: 134
Karma: 207140
Join Date: Apr 2010
Location: Stroud, UK
Device: Xgody tablet, LG G3 (Android), moon+reader
Quote:
Originally Posted by Doitsu View Post
You'll need to add &nbsp; to the list of entities to be preserved.

Edit > Preferences > Preserve Entities > Entities to Preserve

(If you don't see this option, you'll need to update your Sigil version.)
Hmm . . Thanks for that pointer - the nbsp was in the list, the #160 wasn't. I've added that and see if it makes a difference: I STILL have the old problem of the two entities swapping at random when editing - even when going from one chapter to another in the same book!
rbruce1314 is offline   Reply With Quote
Old 07-27-2017, 07:38 AM   #4
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: 17,045
Karma: 89654632
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You're going to have a hard time preserving both &nbsp; and &#160; in the same code in Sigil. Stick with one or the other--they represent the same exact character (no-break space) after all. Having both in your Preserve Entities preferences can certainly cause the harmless "swappiness" you're describing. I recommend you choose one or the other. I typically preserve/use &nbsp; in EPUB2s and &#160; for EPUB3s.
DiapDealer is online now   Reply With Quote
Old 07-27-2017, 09:41 AM   #5
rbruce1314
Zealot
rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.
 
rbruce1314's Avatar
 
Posts: 134
Karma: 207140
Join Date: Apr 2010
Location: Stroud, UK
Device: Xgody tablet, LG G3 (Android), moon+reader
Quote:
Originally Posted by DiapDealer View Post
You're going to have a hard time preserving both &nbsp; and &#160; in the same code in Sigil. Stick with one or the other--they represent the same exact character (no-break space) after all. Having both in your Preserve Entities preferences can certainly cause the harmless "swappiness" you're describing. I recommend you choose one or the other. I typically preserve/use &nbsp; in EPUB2s and &#160; for EPUB3s.
But that doesn't envelop what happens when I open a book with it showing nbsp, but a few minutes and a few chapters on, these have all become #160 - without me exiting Sigil or doing anything other than Ctrl+S to avoid losing what I've just done . . .

Explain that to me and I'll be able to comprehend your post - otherwise I'm 'loster' than before I started the thread . . . . .
rbruce1314 is offline   Reply With Quote
Advert
Old 07-27-2017, 09:53 AM   #6
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,545
Karma: 772404
Join Date: Nov 2009
Device: many
Under the spec, all entities are converted to their character representation during parsing. For most entities that is fine, but for some whitespace related entities, that would be problematic as you can then not differentiate a normal space from a non-breaking space on sight. To that end, Sigil users can choose to preserve entities (restore the entity representation in the text after parsing and serialization).

For epub2, named entities are allowed and so typically & nbsp ; is added to the list of entities to preserve. Upon first load, all non-breaking spaces will be converted to their named entitity equivalent.

For epub3, only numeric entities are allowed (aside from the official xml named entities), so leaving & nbsp ; in an epub3 would result in warnings/errors from epubcheck. For epub3, Sigil users should use the numeric version of the entity (not the named entity version) to get a non-breaking space. This is typically written as & #160 ; although there are other hex based versions of the same thing.

So again, on first load and on any other parsing/serializing activity, the non-breaking space characters will be converted to their numeric entity equivalent.

If you are not seeing this, exactly what version of Sigil are you using? Just how old is it?

Last edited by KevinH; 07-27-2017 at 10:13 AM.
KevinH is offline   Reply With Quote
Old 07-27-2017, 09:57 AM   #7
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: 17,045
Karma: 89654632
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by rbruce1314 View Post
But that doesn't envelop what happens when I open a book with it showing nbsp, but a few minutes and a few chapters on, these have all become #160 - without me exiting Sigil or doing anything other than Ctrl+S to avoid losing what I've just done . . .

Explain that to me and I'll be able to comprehend your post - otherwise I'm 'loster' than before I started the thread . . . . .
EPUB2 or EPUB3? &nbsp; is invalid in EPUB3. You also can't preserve both &nbsp; and &#160; at the same time. One has to "win." They're the same thing.

In the simplest terms, choose to preserve one or the other (and it MUST be &#160; with EPUB3s)--not both--and they'll stop changing when you save.

Last edited by DiapDealer; 07-27-2017 at 09:59 AM.
DiapDealer is online now   Reply With Quote
Old 07-28-2017, 02:25 AM   #8
rbruce1314
Zealot
rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.
 
rbruce1314's Avatar
 
Posts: 134
Karma: 207140
Join Date: Apr 2010
Location: Stroud, UK
Device: Xgody tablet, LG G3 (Android), moon+reader
I'm still on 0.8.6. I tried 0.9 versions but it kept doing things I didn't want (or even understand). I still sometimes use book view to edit - ever tried using code view to search for a few rogue '/'s or '<'s ? It just wouldn't cooperate for me.

At least now I seem to have a definitive answer as to the 'spontaneous' changes to the spaces.
rbruce1314 is offline   Reply With Quote
Old 07-28-2017, 07:53 AM   #9
JustinThought
Zealot
JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.
 
JustinThought's Avatar
 
Posts: 110
Karma: 3500618
Join Date: May 2016
Location: Monterrey, Mexico
Device: Samsung Tab-3 7"
My way of solving that, which seems to work for me while settling the argument between Sigil and Calibre as far as named spaces, was to just use <p><br/></p> instead.

Of course, if one of the more experienced and knowledgeable users here finds an issue with that, I'm always willing to re-think my solution.
JustinThought is offline   Reply With Quote
Old 07-28-2017, 08:13 AM   #10
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: 17,045
Karma: 89654632
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by JustinThought View Post
Of course, if one of the more experienced and knowledgeable users here finds an issue with that, I'm always willing to re-think my solution.
I think adding the no-break space into the mix is just a safeguard against quirky renderers that ignore empty paragraphs. <p><br/></p> should suffice for the vast, vast majority of devices/apps out there, but there could be a handful that will ignore even that. Not sure. I gave up trying to keep track, quite honestly.

For the most part, I avoid using any of the various empty-ish paragraph strategies for creating vertical space altogether. I use css and css classes instead.
DiapDealer is online now   Reply With Quote
Old 07-28-2017, 08:33 AM   #11
JustinThought
Zealot
JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.
 
JustinThought's Avatar
 
Posts: 110
Karma: 3500618
Join Date: May 2016
Location: Monterrey, Mexico
Device: Samsung Tab-3 7"
Quote:
Originally Posted by DiapDealer View Post
//snip!!// ...but there could be a handful that will ignore even that. Not sure. I gave up trying to keep track, quite honestly.

For the most part, I avoid using any of the various empty-ish paragraph strategies for creating vertical space altogether. I use css and css classes instead.
That hearkens back to my original post here on MobilRead, what seems like a long, long time ago and far, far away--where I was twitchin' about how I thought any and all e-readers should present the e-book in the format the publisher has written it. Not the way the e-reader maker thinks it should be.

What I've ascertained since is, you can do your best to support everything out there, but something, like the ChiReader 6900, is going to decide it doesn't like what you've done, and would prefer to do it its own way.

As far as the last part of your post, I have also developed a preference for that method as well. Now, whenever I open one of the older e-books I had created, I convert it to adhere to that.
JustinThought is offline   Reply With Quote
Old 07-28-2017, 09:19 AM   #12
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,092
Karma: 480516
Join Date: Dec 2012
Device: Kindle
Why don't you just avoid the problem by creating a paragraph style with margin-bottom or margin-top of 1 em?
Notjohn is online now   Reply With Quote
Old 07-28-2017, 09:34 AM   #13
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,545
Karma: 772404
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by rbruce1314 View Post
I'm still on 0.8.6. I tried 0.9 versions but it kept doing things I didn't want (or even understand).
Please explain what 0.9 versions do that you didn't want? Examples, and Details would help.

That said, given the huge number of bug fixes since the 0.8 series, I would strongly recommend using only the latest most recent version of Sigil. Sigil 0.9.8 is much much more stable than any earlier version, and current master (the next version) has even more serious (crashing) bugs fixed.

And if there is something you do not understand, we can help.
KevinH is offline   Reply With Quote
Old 07-28-2017, 08:11 PM   #14
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 9,094
Karma: 7214933
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Notjohn View Post
Why don't you just avoid the problem by creating a paragraph style with margin-bottom or margin-top of 1 em?
I was starting to wonder if I was Robinson Crusoe. I all nuke empty lines and set para margins before I even get to Sigil.

BR
BetterRed is offline   Reply With Quote
Old 07-29-2017, 03:01 AM   #15
rbruce1314
Zealot
rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.rbruce1314 ought to be getting tired of karma fortunes by now.
 
rbruce1314's Avatar
 
Posts: 134
Karma: 207140
Join Date: Apr 2010
Location: Stroud, UK
Device: Xgody tablet, LG G3 (Android), moon+reader
Quote:
Originally Posted by JustinThought View Post
My way of solving that, which seems to work for me while settling the argument between Sigil and Calibre as far as named spaces, was to just use <p><br/></p> instead.

Of course, if one of the more experienced and knowledgeable users here finds an issue with that, I'm always willing to re-think my solution.
My choice is different. I add a category to the stylesheet as follows:

.stara
{
margin-top: 1em;
margin-bottom: 0.5em;
font-size: 1em;
text-align: center;
text-indent: 1em;
}

Then, when needing a divider, 'JustinThought's line becomes:

<p class="stara">* * * * *</p>

Simple, efficient, visible and (so far!!) 100% faultless.
rbruce1314 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
Spaces between paragraphs Bigo2 Calibre 15 06-25-2014 03:37 AM
special spaces exaltedwombat Sigil 6 03-02-2013 09:40 AM
file name contains spaces bmacklin ePub 3 09-20-2012 05:07 PM
embedded spaces rikm Calibre 1 06-03-2010 03:08 PM
Non breaking spaces? troymc Sigil 6 05-22-2010 07:47 AM


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


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