07-15-2014, 09:55 PM | #1 |
Junior Member
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 |
07-16-2014, 01:50 AM | #2 |
Obsessively Dedicated...
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. |
07-16-2014, 02:24 AM | #3 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
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. |
|
07-16-2014, 02:48 AM | #4 | |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
@Doitsu said
Quote:
|
|
07-16-2014, 03:16 AM | #5 |
Ex-Helpdesk Junkie
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. |
07-16-2014, 07:11 AM | #6 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
|
|
07-16-2014, 08:10 AM | #7 | |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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. |
|
07-18-2014, 12:36 AM | #8 | ||
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
Toxaris said:
Quote:
Quote:
& # 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. |
||
07-21-2014, 03:49 PM | #9 |
Sigil Developer
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 |
07-22-2014, 01:41 PM | #10 |
Grand Sorcerer
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 |
07-22-2014, 08:01 PM | #11 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jul 2014
Device: none
|
Thank you very much DiapDealer!
|
07-22-2014, 10:49 PM | #12 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
07-30-2014, 01:05 AM | #13 |
Connoisseur
Posts: 78
Karma: 1588
Join Date: Jan 2011
Location: New Zealand
Device: see signature
|
Thank you very much KevinH and DiapDealer.
|
|
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 |