Ibycus Keyboard Layout Search and Replace
One of the issues with Ibycus Keyboard Layout is that it is difficult to search (and replace) text, since it's active on the actual document only. Creating a custom "Search and Replace" dialog is the only way to address this issue.
AncientGreek provides such a custom "Search and Replace" dialog (since v. 1.4-beta5), which is activated when a "Search" command is issued by the keyboard (pressing Ctrl-F on Windows and Linux or ⌘F on Mac OS), or a "Search and Replace" command is issued by the keyboard (pressing Ctrl-H on Windows and Linux or ⌥⌘F on Mac OS), on LibreOffice only, provided that "Ibycus Keyboard Layout" is already active.
The "Search and Replace Dialog" on Windows XP
This modeless? dialog does not offer all the functions provided by the built-in "Search and Replace" dialog, but it's sufficient for simple search and replace. If that's not enough, both the built-in "Search" and "Search and Replace" dialogs can be opened while the "Search term" is copied to clipboard.
Both text input fields (the "Search term" and the "Replace term") use the "Ibycus Keyboard Layout Greek Input" by default and can be toggled on and off independently form the actual document.
Input options ^
The dialog supports the following options regarding the input of the "Search term" and the "Replace term".
Clears the text on the relevant text input field and sets the input focus to it.
This two state push button toggles "Greek Input" for the "Search and Replace" Window on or off and sets the input focus to its relevant text input field. "Greek Input" is ON by default.
"Greek Input" can also be toggled on and off using the Ibycus Keyboard Layout keyboard shortcut.
This two state push button enlarges the text size on its relevant text input field and sets the input focus to it. Its state is OFF by default.
Search options ^
The following options customize the way the search function operates.
Inserts alternative characters into the search term, which results in creating and using a Regular Expression.
A typical Regular Expression created this way is "ἀ[πϖ]ό". This means: search for "ἀ" followed by "π" or "ϖ", followed by "ό".
• Whole words only
The "Search term" will only match text that is not part of a bigger word. When is active, the resulting Regular Expression is enclosed in the word boundary ("\b").
• Match Case
A case sensitive search will be performed. Case sensitivity works somewhat differently when it comes to Ancient Greek text; please refer to section Using "Match Case" later on this page.
• Word
Performs a Regular Expression search which would match the "Search term" only when it is found at the "Beginning" or the "End" of a word.
When this option is enabled, "Whole words only" gets disabled. To match a whole word, one should check both the "Beginning" and "End" options.
• Paragraph
Performs a Regular Expression search which would match the "Search term" only when it is found at the "Beginning" or the "End" of a paragraph.
When this option is enabled, "Whole words only" gets disabled. To match a whole paragraph, one should check both the "Beginning" and "End" options.
• Beginning
The "Search term" is at a word's or paragraph's beginning.
• End
The "Search term" is at a word's or paragraph's end.
When Regular Expressions are used, any valid Regular expression can be used on either input field.
Actions ^
The following actions are available:
Search forward.
Search backwards.
Search forward and replace.
Replace all occurrences of the "Search term".
Copy the "Search term" to the clipboard and open the built-in "Search" pane or the "Search and Replace dialog", so it can be pasted there.
A difference exists between OpenOffice and LibreOffice regarding the built-in "Search dialog".
OpenOffice (at the time of writing this is on version 4.1.1) provides the same built-in dialog for both "Search" and "Search and Replace" operations. LibreOffice, on the other hand, provides a built-in "Search pane" for searching and restricts the usage of the built-in "Search and Replace" dialog for replacing text.
Consequently, in LibreOffice the built-in "Search pane" will be opened, unless alternative characters are used in the "Search term"; in this case the built-in "Search and Replace" dialog will be opened.
Copy the "Search term" to the clipboard and open the built-in "Search and Replace dialog", so it can be pasted there.
Change icon theme so that it matches to your environment theme.
When Regular Expressions are used in the "Search term", the resulting Regular Expression is copied to the clipboard instead of the actual "Search term" typed. In this case, the user must check both "Whole words only" and "Match case" if the built-in "Search and Replace" dialog is used.
Using "Match Case" ^
As already stated, case sensitivity works somewhat differently when it comes to Ancient Greek text; a case insensitive search for a letter will match both its capital form and its alternative form.
For example, a case sensitive search for greek letter pi ("π") will only match itself ("π").
On the other hand, a case insensitive search for greek letter pi ("π") will match both greek capital letter Pi ("Π") and greek symbol pi ("ϖ").
In order to match both greek letter pi ("π") and greek symbol pi ("ϖ") but NOT greek capital letter Pi ("Π"), must be activated.
Mock-up Search images ^
The following mock-up images demonstrate the effect of toggling "Whole words only" and "Match Case" search options on the strings matched.
In this example screenshots of my LibreOffice 4.3.3.2 on Debian Linux Sid are taken and combined in such a way that all matches of the "Search term" are shown all at once; one would actually obtain them by consecutively pressing the "Search" button on the dialog.
The "Search term" used is "ἀπό" so that the difference in matching greek letter pi "π" and greek symbol pi "ϖ" is demonstrated, as well as matching whole words or not.
Image 1
Enabling "Match Case" will make "ἀ" and "π" match ("Ἀ" and "ϖ" will not).
Image 2
Enabling "Whole words only" will remove the word "ἀπότακτος" from the matches.
Image 3
Performing a case insensitive search will match both "ἀ" and "Ἀ" and "π" and "ϖ".
Image 4
And then, when disabling "Whole words only" will match all occurrences of the "Search term".
Now let's see what happens when alternative characters are used.
Although the "Search term" is still "ἀπό", the "effective search term" is actually "ἀ[πϖ]ό".
Image 5
When "Match Case" is disabled, using alternative characters have no effect. Please compare the matches between this image and the previous one.
Image 6
Enabling "Match Case" again, will remove words starting with "Ἀ" from the matches. Please compare the matches on this image with the ones of the first image, to see the differences imposed by using alternative characters.
Image 7
Finally, enabling "Whole words only" again, will remove remove "ἀπότακτος" and "Ἀπότακτος" from the matches. Please compare the matches on this image with the ones of the second image, to see the differences imposed by using alternative characters.