|
|
#31 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,089
Karma: 4000129
Join Date: Jan 2017
Location: Poland
Device: Various
|
It's very simple.
But to help you understand it, let's use a real character: the ellipsis. Unicode character: … Numerical entity: & #8230; Named entity: & hellip; Got it? |
|
|
|
|
|
#32 | ||
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 457
Karma: 100100
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
But, trying to relate that to the language used in discusssions is not so evident. Particularly in the User Guide, the terms character, numerical and named seem to be used interchangeably to the point where they obscure the reality of what 'Preserve Entities' actually does. Another example from the User Guide - Quote:
If nothing is in the preserve entities list, the non-breaking space characters remain 'as is', when the files are reformatted with 'mend and prettify'. So what is 'preserved' ? It seems to be a question of familiarity causing incorrect nomenclature to be used at the expense of the meaning. Maybe I'm the only one confused by the language? |
||
|
|
|
|
|
#33 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,952
Karma: 212736643
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Putting an entity (named or numerical) in the Preserve Entities list means that that entity will never be converted to a character in Code View.
Most of the time, being converted to a character is not a problem (and it's always valid), but many special characters are invisible, or tend to look much like, other normal characters. Preserving them as entities can help them be readily located in Code View. Sigil's gumbo parser wants to convert all entities to characters. Adding them to the Preserve Entities list allows users to preserve those entities that they'd rather not be converted to characters in Code View. Last edited by DiapDealer; Today at 08:22 AM. |
|
|
|
|
|
#34 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,089
Karma: 4000129
Join Date: Jan 2017
Location: Poland
Device: Various
|
IMHO (and probably according to Sigil's developers), phrase "Preserve Entities" in Sigil's Preferences means exactly this:
"If character X is written in any form (numeric entity, named entity, unicode character), then write it as an entity from the list below." Thus, "Preserve Entities" = "Protect the entities on my list, and while you're at it, convert other forms to these specific entities." |
|
|
|
|
|
#35 | |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,231
Karma: 7640012
Join Date: Nov 2009
Device: many
|
Quote:
Named entities are illegal in epub3 (except for 5 xml named enties for < > & " ') so only numeric entities are allowed. All Preserve Entities does is allow the user to specify which characters should be converted back to entities after every use of gumbo (in other words which to preserve, thus the name) and if so which entity form you want. Newer versions of Sigil's Preserve Entities defaults to only preserve the nbsp as a numeric entity since it can not be seen in CodeView and is valid in both epub2 and epub3. Hope this helps. FWIW, Volunteers created the Sigil User Guide and volunteers help improve and maintain it. PRs to improve the User's guide are welcome. Last edited by KevinH; Today at 09:15 AM. |
|
|
|
|
|
|
#36 |
|
Enthusiast
![]() Posts: 41
Karma: 10
Join Date: Oct 2020
Device: none
|
There's a bug in it then; I added ​ and yet my zero-width spaces are still getting clobbered.
[quick note, posting from work] |
|
|
|
|
|
#37 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,231
Karma: 7640012
Join Date: Nov 2009
Device: many
|
Getting clobbered by using what command, menu, or tool? And by clobbered, do you mean converted to its character equivalent or converted incorrectly to some other character, or removed?
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| No Table of Contents and "This HTML file is larger than 260 KB" Error | rosewood | Conversion | 13 | 02-07-2023 12:58 PM |
| PRS-T3 "Table of contents" button on every page | Leon74 | Sony Reader | 2 | 01-04-2014 12:48 PM |
| Change name of autogenerated "Table of Contents" | Dzoni | Conversion | 7 | 03-16-2011 04:44 AM |
| Generating a rough "table of contents" | Vanguard3000 | Calibre | 5 | 01-09-2011 11:31 PM |
| TOO SLOW to open "Table of Contents" | mdhuang | Sony Reader | 16 | 09-06-2007 11:29 PM |