Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-25-2020, 06:08 PM   #1
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
Copied and pasted   ended up with & #160;

(I left that space in & #160; intentionally otherwise MR turned it into *)

For my asterisk spacing I use:

<p class="asterisks">*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</p>

So I copied that and pasted it into a new book. But after implementing "Mend and prettify all HTML files" I got this: (actually several & #160#; things and my three asterisks)

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

I know they're the same thing but Sigil never changed the &nbsp; before. Is this normal? So then if there is a lone &nbsp; in the book somewhere I really should look for & #160; right?
Gregg Bell is offline   Reply With Quote
Old 06-25-2020, 06:25 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
ePub3 doesn't allow named entities like &nbsp; - it only accepts numbered entities (one of the dumber things I think the ODPF changed).

If you have Sigil set to ePub3 by default, it will automatically change the &nbsp; to & #160;

I honestly don't remember if Sigil does it for ePub2 automatically?? In any case you can go into Sigil Preferences/Preserve Entities and add & #160;
Turtle91 is offline   Reply With Quote
Advert
Old 06-25-2020, 06:27 PM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
As for the asterisks...I wouldn't put a lot of extra spaces between the characters...just set your css with your desired letter spacing:

eg
.asterisks {letter-spacing:2em}
<p class="asterisks">***</p>
Turtle91 is offline   Reply With Quote
Old 06-25-2020, 06:31 PM   #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: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If you put &nbsp; in your Preserve Entities list (in Preferences) and you're working on an epub2, they won't be converted. If you're working on an epub3, then &nbsp; shouldn't be in your Preserve Entities list. As Turtle91 noted: named entities are not valid in Epub3.
DiapDealer is offline   Reply With Quote
Old 06-25-2020, 07:57 PM   #5
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
Quote:
Originally Posted by Turtle91 View Post
As for the asterisks...I wouldn't put a lot of extra spaces between the characters...just set your css with your desired letter spacing:

eg
.asterisks {letter-spacing:2em}
<p class="asterisks">***</p>
Thanks Dion. I'll try it.

Quote:
Originally Posted by Turtle91 View Post
ePub3 doesn't allow named entities like &nbsp; - it only accepts numbered entities (one of the dumber things I think the ODPF changed).

If you have Sigil set to ePub3 by default, it will automatically change the &nbsp; to & #160;

I honestly don't remember if Sigil does it for ePub2 automatically?? In any case you can go into Sigil Preferences/Preserve Entities and add & #160;
Mine was set to Epub Version 2. And I don't know how it got in there but the & #160 entitiy was in the Preserve Entities. I got rid of it and added the & nbsp entity (that's what you meant, right?).

Quote:
Originally Posted by DiapDealer View Post
If you put &nbsp; in your Preserve Entities list (in Preferences) and you're working on an epub2, they won't be converted. If you're working on an epub3, then &nbsp; shouldn't be in your Preserve Entities list. As Turtle91 noted: named entities are not valid in Epub3.
Thanks Diap. Yeah, working on an epub2. Like I said, that & #160; entity was in the Preserve Entities (it was the only thing there). It must've come with the default because I didn't even know there was a Preserve Entities section. Anyway, I got rid of the evil & #160; and restored good old & nbsp;. The crops are saved.
Gregg Bell is offline   Reply With Quote
Advert
Old 06-25-2020, 08:05 PM   #6
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,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It DOES come as the default entry. Basically because it will work without issue in either epub2 or epub3. If you plan on working mostly with epub2, and you prefer the named entity, then the advice is to change it as you did.
DiapDealer is offline   Reply With Quote
Old 06-25-2020, 08:41 PM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Gregg Bell View Post
I know they're the same thing but Sigil never changed the &nbsp; before. Is this normal? So then if there is a lone &nbsp; in the book somewhere I really should look for & #160; right?
In 2019, I reported the same bug in the "Sigil 0.9.15" thread:

https://www.mobileread.com/forums/sh...64#post3865864

Nobody could find any rhyme or reason it happened either.

... Definitely a headscratcher though... (it hasn't happened to me since).

Diap recommended the same thing here: To readd the &nbsp; or &#160; as needed.

Quote:
Originally Posted by Gregg Bell View Post
(I left that space in & #160; intentionally otherwise MR turned it into *)
The forums auto-convert nbsp and #160 into space.

If you want to force it to display, you can shove a [ noparse][/noparse] around the ampersand. (Remove the space before " noparse".)

So you type this:

Code:
[ noparse]&[/noparse]nbsp;
[ noparse]&[/noparse]#160;
and the forums will display like this:

&nbsp;
&#160;

Last edited by Tex2002ans; 06-25-2020 at 08:58 PM.
Tex2002ans is offline   Reply With Quote
Old 06-25-2020, 08:56 PM   #8
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,367
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
One minor nit. There are 5 named entities allowed in epub3, & amp;, & lt;, & gt;, & apos; and & quot;.

I also ran into one epub3 where the author decided to add a mass of entities using:

Code:
<!DOCTYPE html [
   <!ENTITY nbsp "& #160;"> 
   <!ENTITY Aacute "& #193;"> 
   <!ENTITY bull  "& #8226;">
   <!ENTITY ldquo "& #8220;">
   <!ENTITY rdquo "& #8221;">
   <!ENTITY pound "& #163;"> 
   <!ENTITY iquest "& #191;"> 
....  for about 20 more entries.
]>
DNSB is offline   Reply With Quote
Old 06-25-2020, 09:41 PM   #9
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,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DNSB View Post
One minor nit. There are 5 named entities allowed in epub3, & amp;, & lt;, & gt;, & apos; and & quot;.
Yep. That's a given. They're always allowed. The first three of those should also never be added to Sigil's Preserve Entities list. Not unless you want all your opening and closing tags to be converted to entities and all ampersands in those entities to start breeding out of control.
DiapDealer is offline   Reply With Quote
Old 06-28-2020, 01:01 PM   #10
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
If it helps, this bug happened when I upgraded from Sigil 1.1.0 to 1.2.0.
Gregg Bell is offline   Reply With Quote
Old 06-28-2020, 01:13 PM   #11
KevinH
Sigil Developer
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: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
It is not a bug. It is expected behaviour. The default is now set to work properly with both epub2 and epub3. You must change the Sigil's Preserve Entities Preferences to set it if you prefer named entities in epub2.

You can even remove it completely and the nbsp char will show up in CodeView's syntax highlighter so you can detect it even without the entity set.
KevinH is online now   Reply With Quote
Old 06-28-2020, 03:23 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,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Yes. I missed the part about a few thinking it was a "bug." It's definitely working as it was intended. The numeric non-breaking space entity is compatible with both epub2 and epub3. So that's the default for new Sigil installs. If you primarily work with epub2 and prefer the named non-breaking space entity, change it in the Preserve Entities preference list as described above.
DiapDealer is offline   Reply With Quote
Old 06-28-2020, 05:36 PM   #13
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,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Also ... for anyone who might be wondering why their existing Sigil installation might have changed from &nbsp; to &#160; after a Sigil upgrade, it's probably because you never modified your Preserve Entities list in your preferences. The single default entry (the no-break space entity--whether named or numeric) is not saved to the Sigil.ini file if the list is never altered by the user. Only when you add/remove entities does the list get flushed to disk. Once that happens, no Sigil update will alter it (whether Sigil's defaults change or not). Until then, the single default entry that's hard-coded in Sigil rules the day.

Last edited by DiapDealer; 06-28-2020 at 05:40 PM.
DiapDealer is offline   Reply With Quote
Old 06-29-2020, 11:44 PM   #14
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
Ok. Thanks for the explanations, guys.
Gregg Bell is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with   and &nbsp; VerSoc38 Workshop 3 04-17-2019 04:34 PM
&()nbsp , &()#160 , inconsistencies?? rbruce1314 Sigil 47 09-18-2015 12:29 PM
&#160; instead of &nbsp; Alt68er Sigil 16 01-02-2014 08:02 PM


All times are GMT -4. The time now is 07:03 PM.


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