05-08-2013, 09:10 PM | #1 |
Groupie
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
|
Using Find/Replace and Spellcheck in Book View
Is there any way you can force Sigil to remain in book view when doing basic text editing? i.e. spellchecking and/or a simple search and replace of text. I find it really distracting that a search immediately takes you into code view.
Was this always the case? I have dim memories of doing my text editing in book view. As a rule, when there is lots of editing to be done, I end up doing it in WordPerfect, but shunting back and forth between programs is obviously not ideal. If this is NOT an option (I certainly can't see one) may I put my hand up and request it - I find it's just so much easier to see stuff in book view. Thanks! |
05-09-2013, 07:33 AM | #2 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
These two functions occur at the HTML level, so that is what it switches to. It would be difficult to guess just where you mean to search and replace..include the space afterwards, the break or paragraph tag. etc. If you have done much even with other editing functions in book view, especially related to headings, you can find you have made headings out of the following text if there was a break instead of the end of a paragraph.
You're right it is not ideal. I like WordPerfect too but there is a chance that it will introduce material that wasn't there when you jumped out into it. It could be worthwhile to create a few line document, look at it in code view, work on it a little in WordPerfect, return to Sigil to be sure it has not added extra unwanted stuff. |
05-10-2013, 09:33 AM | #3 |
Groupie
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
|
Thanks. I meant, more, that I would like to be able to spell check in Book View. I don't see any valid reason for that being confined to code view. Search and replace isn't that important, but occasionally would be nice to remain in book view when replacing non-code elements such as em-dashes or whatever within a selected text block.
I use search and replace extensively to clean up codes (pretty familiar with all that) and so on, but using any of the available code view fonts I still find it relatively hard to use for spell checking. A really annoying aspect of WordPerfect spell checking is that XVI doesn't ignore or add words beginning with an uppercase letter. Generally speaking Sigil has a far better spell checker, especially now all my strange words have been added to my dictionaries. I suppose it's just the fonts available that bugs me. I do realise - or at any rate assume - fixed width fonts have to be used in code view. |
05-10-2013, 11:38 AM | #4 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
You can change fonts to anything you like, in book and code view, under edit, preferences, appearance. They are probably set to default to two different fonts so you don't get confused where you are and what the developers consider as readable as well as non-proprietary.
Just be clear that unless you specify a font, your reader will get the device's default...don't line things up using spaces, etc and expect it will all line up everywhere. |
05-13-2013, 12:28 AM | #5 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
One reason I would love to be able to a simple search in BookView: the ability to search for stray glyphs that are NOT part of a code tag. For example, straight quotes, ampersands, <, >, slashes, etc.
I seem to end up having to copy&paste the text from BookView into Notepad++ or something, in order to be able to search those out. I only know a tiny bit of regex, and have failed to design a proper search that would *exclude tags*. I guess I need to search through the forum for an antidote. @Hoods7070, I've set my CodeView font to Monaco monospaced font, but I'm about to try out Courier Prime (newly released SIL OFL licensed font). Changing to monospace made working in codeview so much easier. |
05-13-2013, 06:54 AM | #6 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Regex is powerful alright...at doing its job and at giving you a headache! I use it but don't really understand it very well. If there were some open source regex maker machine that could be integrated into Sigil that would be great.
|
05-13-2013, 11:02 AM | #7 |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
REGEX tutorial
Way back when, I was totally confused about REGEX (OK, dense )
The Manichean wrote a tutorial in the Calibre forum. https://www.mobileread.com/forums/sho...90&postcount=1 Which finally made it through my thick skull. I also keep at hand, a REGEX 'Cheat sheet' |
05-14-2013, 06:47 AM | #8 |
Groupie
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
|
@grannyGrumpy: Glad someone understands the sentiments behind my original question.
FWIW I generally search/replace all quotes to straight quotes, then use "smarten punctuation" in the Calibre ePub Modify plugin to fix them back to curly quotes. This does an excellent but not a 100% job, so I usually sort the quotes out BEFORE any other editing. As the code view fixed fonts (I use Courier New) show curly quotes as angled straight quotes it's relatively easy to spot the mistakes. Generally these occur with the use of the wrong angle in abbreviations/truncations like 'em, 'twas etc. - which can mostly be S/R-ed easily enough back in Sigil. Unfortunately a S/R in Sigil does not even "see" some stuff, such as the little rectangles/or boxes that show up periodically. I have not figured out any logic as to when/why these things appear or what they might represent. Seems you just have to weed them out visually. (You can copy and paste these glyphs, but they don't register in a search.) Anyway, it'd be brilliant if there were an option in Sigil for these and any other extra-ordinary glyphs to be picked up and highlighted during a spellcheck. Not sure if any Sigil developers follow these threads, but hope they do and would consider some changes that would minimize the need for Regex. The thought of defining a regex to root out evils is far beyond my minimal understanding of same. Apropos - thanks @myducks for pointing to that excellent tutorial! |
05-14-2013, 07:19 AM | #9 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
If you have such a source, you can recall where the problem glyph is, right click open with PSPad or similar editor. It will display the text and the hex representation for the glyph, so you can search them out.
This odd character problem has happened a time or two for me, but it not common in my sources. It may be an artifact of the OCR program used on the original scans. The developers use QT webkit for the text handling (for better or worse) and are stuck with its limitations. |
05-14-2013, 09:44 AM | #10 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I have resorted to a HEX editor (like http://www.physics.ohio-state.edu/~p...dit/index.html ) to discover some of the character VALUES. THEN I spend some time looking up the value of various character maps until I find a logical usage (2 or 3 different matches in the same chart usually gives a clue to the proper encoding; eg CP1252 ). The above steps ARE tedious. |
|
05-14-2013, 01:41 PM | #11 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
It is my experience too that if you find one, you will find more. In my last case of this there were mysterious spaces that would not allow numbers to line up. It took me a couple of hours just to find and delete this relatively small problem....and it was not really substantial either.
But if it is the wrong code page it is back to calibre, isn't it, because Sigil doesn't have to deal with wrong code pages..theoretically at least. |
05-15-2013, 11:06 PM | #12 |
Groupie
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
|
It's a PITA really, but as @mrmikel says, it's only been occasional for me - say once in every 20-30 edits. However, other than intellectual curiosity (which I do have from time to time!) it isn't worth (to me) the time spent tracking down the values of the few offending glyphs - usually they are something relatively easily spotted and easily replaced (or deleted) during the visual checking process. If I miss one or two it's not serious, as most of this editing is done for my own benefit.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
replace in book view changes view to code view | cybmole | Sigil | 4 | 10-28-2012 01:20 PM |
Find/Replace ? | Otter | Calibre | 2 | 10-08-2012 08:48 PM |
Find/Replace Won't Find | Rand Brittain | Sigil | 7 | 09-24-2011 04:35 AM |
SPELLCHECK NATION: Does SpellCheck have a dark side? | cbaehr | Self-Promotions by Authors and Publishers | 10 | 11-07-2010 12:45 PM |
Using Find/Replace with BD | Otter | Sony Reader | 7 | 02-28-2009 01:49 PM |