![]() |
#1 |
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
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">* * *</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 before. Is this normal? So then if there is a lone in the book somewhere I really should look for & #160; right? |
![]() |
![]() |
![]() |
#2 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
ePub3 doesn't allow named entities like - 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 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; |
![]() |
![]() |
![]() |
#3 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/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> |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If you put 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 shouldn't be in your Preserve Entities list. As Turtle91 noted: named entities are not valid in Epub3.
|
![]() |
![]() |
![]() |
#5 | |||
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
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.
|
![]() |
![]() |
![]() |
#7 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
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 or   as needed. Quote:
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;   Last edited by Tex2002ans; 06-25-2020 at 08:58 PM. |
||
![]() |
![]() |
![]() |
#8 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,828
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, 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. ]> |
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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.
|
![]() |
![]() |
![]() |
#10 |
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
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.
|
![]() |
![]() |
![]() |
#11 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
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. |
![]() |
![]() |
![]() |
#12 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
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.
|
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
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 to   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. |
![]() |
![]() |
![]() |
#14 |
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Ok. Thanks for the explanations, guys.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with and | VerSoc38 | Workshop | 3 | 04-17-2019 04:34 PM |
&()nbsp , &()#160 , inconsistencies?? | rbruce1314 | Sigil | 47 | 09-18-2015 12:29 PM |
  instead of | Alt68er | Sigil | 16 | 01-02-2014 08:02 PM |