Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-15-2014, 09:55 PM   #1
sjchase
Junior Member
sjchase began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2014
Device: none
I want to see *all* the codes in code view

I am hoping this is a simple setting that is just hiding from me somewhere. I have been editing my book and adding the full html character codes for things like ellipses, right and left quotes, em and en dashes, etc. They appear to display correctly in book view, but in code view they vanish into their "real" vs. code form. For example, & hellip; (ignore the space) shows up as ... in both code view and book view. I would like to be able to confirm that I have successfully substituted all the special characters, but code view is "helping" me just a little too much

Thanks in advance,
Sabrina
sjchase is offline   Reply With Quote
Old 07-16-2014, 01:50 AM   #2
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
I hope someone will jump in here if I am giving bad advice ---

*In most cases* it will help to go to Edit >> Preferences >> Clean Source. Then under "Automatically Clean..." UNCHECK both Open and Save. Select "Pretty Print" rather than "HTML Tidy" so that if/when it does run, it uses the Pretty Print mode --- HTML Tidy can sometimes be destructive of your code and layout, and can actually lose data.

That said, I have found with version .074, it will automatically "Pretty Print" or "Tidy" your (x)html pages when you run certain procedures. One that happens to me all the time is when I "split at cursor" or "split at markers". All my preferred indentations and line spacing on the code page are changed to Sigil's preferred layout, and my careful usage of named/numbered entities (like your hellip) are changed to the actual characters. (I would prefer the entities for certain Search and Replace procedures.)

I think v .072 did not do this, and keep meaning to load it up and test it, but haven't checked that yet.
GrannyGrump is offline   Reply With Quote
Old 07-16-2014, 02:24 AM   #3
Doitsu
Grand Sorcerer
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: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by sjchase View Post
I have been editing my book and adding the full html character codes for things like ellipses, right and left quotes, em and en dashes, etc. They appear to display correctly in book view, but in code view they vanish into their "real" vs. code form.
AFAIK, this is a special "feature" of Sigil 0.7.4. Sigil will automatically change named entities to their Unicode equivalents, whenever text is changed in Book View mode, even if the Open and Save Clean Source options are disabled.
The only way to avoid this behavior is to change text only in Code View mode or to downgrade to an earlier Sigil version that doesn't exhibit this behavior.

If you only use a limited number of named entities you could also use the Saved Searches feature to define a group that contains Unicode characters and their named entity equivalents and then use this group to replace Unicode characters with named entities.

However, since named entities are not required in XHTML, this would only make sense, if you prefer named entities for proofreading purposes.
Doitsu is offline   Reply With Quote
Old 07-16-2014, 02:48 AM   #4
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
@Doitsu said
Quote:
The only way to avoid this behavior is to change text only in Code View mode
As I noted, sometimes being in Code View is no protection. In version .074, Splitting files will always cause Pretty Print to kick in -- I wish there was a way to disable it completely. I'm using named entities for special font characters (fleurons, logos) in the "private use area", so in code view they convert to "missing character" glyphs, which is not at all helpful when searching or replacing or proofing. I'll bet there are other Sigil users who grit their teeth over this behavior.
GrannyGrump is offline   Reply With Quote
Old 07-16-2014, 03:16 AM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
The calibre editor has an option to control "Replace HTML entities as they are typed".

I don't think that will happen when splitting filesyes it does but I bet Kovid would be more responsive to a fix, since calibre is being developed.
eschwartz is offline   Reply With Quote
Old 07-16-2014, 07:11 AM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by sjchase View Post
I am hoping this is a simple setting that is just hiding from me somewhere. I have been editing my book and adding the full html character codes for things like ellipses, right and left quotes, em and en dashes, etc. They appear to display correctly in book view, but in code view they vanish into their "real" vs. code form. For example, & hellip; (ignore the space) shows up as ... in both code view and book view. I would like to be able to confirm that I have successfully substituted all the special characters, but code view is "helping" me just a little too much
As … is exactly the same as … for example, can you explain what the problem is? Why do you want to substitute the special characters to named entities? If it is about the conversion of ... to …, that can be done with some simple search and replace actions.
Toxaris is offline   Reply With Quote
Old 07-16-2014, 08:10 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: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Toxaris View Post
As … is exactly the same as … for example, can you explain what the problem is? Why do you want to substitute the special characters to named entities? If it is about the conversion of ... to …, that can be done with some simple search and replace actions.
When it comes to typographic quotes (single and double) and apostrophes I can see the desire to distinguish, with entities, that which can be ambiguous using characters (’ for closing single quote VS ’ for apostrophes). Think about formatting documents that will have both British and American editions (single quotes vs double-quotes) and how much easier the transition would be--or just about any situation where you need to algorithmically distinguish between a single closing quote and an apostrophe.

But other than that ... I agree, I find it just as easy to search for (and replace with) characters as I do entities. *shrugs*

Either way, users really should be able to choose not to have their entities be eaten.

That's why I stick with v0.7.3. Yes, it barks about missing Doctypes, but I find that noisy (and easily fixed) issue much less destructive and annoying than 0.7.4's penchant for eating markup.
DiapDealer is offline   Reply With Quote
Old 07-18-2014, 12:36 AM   #8
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
Toxaris said:
Quote:
Why do you want to substitute the special characters to named entities?
In my case, it is a mixture of what DiapDealer replied
Quote:
When it comes to typographic quotes (single and double) and apostrophes I can see the desire to distinguish, with entities,
and the wish to be able to easily find and replace my *really special* characters, such as those fleurons I mentioned above from the "private usage area." When you are using entities like
& # xf021; and & # xf029; and & # 61477;
it helps to be able to see the actual codes instead of just a generic missing-glyph character, when I want to replace one or more of those with a different decorative character.

Not all "special character" entities convert automatically to the actual character if they depend on a special or embedded font that is not availabe to the code editor.

PS-- And I *still* wish we could search in book view, like the old versions. It was the fastest simplest way to find stray straight-quote marks that fell in the text outside of tags. Now you have to mess around with regex to hunt them down.

Last edited by GrannyGrump; 07-18-2014 at 12:44 AM.
GrannyGrump is offline   Reply With Quote
Old 07-21-2014, 03:49 PM   #9
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,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi,

I see you were complaining about the exact same thing I was troubled by.

FYI: I have made a patch to Sigil to enable you to set a Preference for exactly which Entities you want to preserve in Code View.

Please see this post for the patch against Sigil trunk:

https://www.mobileread.com/forums/sho...5&postcount=46

And this thread for one other bug fix you may be interested in and some discussion.

https://www.mobileread.com/forums/sho...d.php?t=242391

So if you know how to build from source, please test this patch and let me know if it does what you need. If you can not, I can compile a Sigil.dmg for Mac with this patch and post it for you and probably do a Linux build as well, but I can not do a Windows build so you are out of luck there.

Hope this helps,

KevinH
KevinH is offline   Reply With Quote
Old 07-22-2014, 01:41 PM   #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: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
In case some Windows people want to experiment (and aren't following the Maverick Crashing thread). I've posted (Google Drive link) the Windows build of Sigil patched with KevinH's "Preserve Entities" feature (and with Qt5.3.1). The named entities you wish to be preserved (when editing in Book View) must be entered in the new Edit > Preferences > Preserve Entities section of Sigil's settings.

I'm sure there's probably some sort of daily download limit for files on Google Drive, but I'm thinking we probably won't have to worry about it (but I thought I'd mention it just in case).

Anyway ... make of it what you will.
https://drive.google.com/file/d/0B5C...it?usp=sharing
DiapDealer is offline   Reply With Quote
Old 07-22-2014, 08:01 PM   #11
sjchase
Junior Member
sjchase began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2014
Device: none
Thank you very much DiapDealer!
sjchase is offline   Reply With Quote
Old 07-22-2014, 10:49 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,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by sjchase View Post
Thank you very much DiapDealer!
KevinH did all the heavy-lifting. I just compiled it for Windows. But you're welcome anyway.
DiapDealer is offline   Reply With Quote
Old 07-30-2014, 01:05 AM   #13
mvo
Connoisseur
mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.mvo once ate a cherry pie in a record 7 seconds.
 
Posts: 78
Karma: 1588
Join Date: Jan 2011
Location: New Zealand
Device: see signature
Thank you very much KevinH and DiapDealer.
mvo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Elipsis character displays in code view but not in book view magmanpi Sigil 19 03-03-2014 04:45 AM
replace in book view changes view to code view cybmole Sigil 4 10-28-2012 01:20 PM
Sigil highlight Book View No Longer Shows in Code View Themus Sigil 4 10-04-2012 07:54 PM
quotes differences book view & code view cybmole Sigil 13 03-29-2011 01:53 AM
lock book view & code view windows into synch cybmole Sigil 5 01-19-2011 10:30 PM


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


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