[Help Contents]
[MicroSpell Home Page]

[Help Contents]

Speller Modes

A "mode" is simply a group of option settings that take effect when you check a corresponding type of document. For example, the options that control which, if any, text is skipped are mode specific. The colors used to draw skipped and normal text can vary with the mode setting. The characters that are considered valid within a word can be set independently for each mode. Currently, the speller operates in one of four modes: ASCII, TeX, RTF, or HTML. You can examine or set any mode specific options (except colors) using the appropriate Options|<mode> Mode Preferences command on the main edit window. To set the main window colors for the current mode use the Options|Set Colors command. Normally, MicroSpell sets the mode automatically based on the document's extension and contents. ASCII is the default if the speller cannot discern a more appropriate mode. You can override the speller's choice by using the Options|Change Current Mode command or by double-clicking the Mode pane of the status bar at the bottom of the main text window to display the dialog shown here.

There are many speller options that apply no matter which mode is in effect; these include the program fonts, all colors except the main edit window text colors, and all of the options on the Options|General Preferences tabbed dialog. Consult the respective topics for additional information on Mode Specific and General Preferences.

Text Formats

What we call "text format" might more clearly be expressed "the way text is formatted for display." There are two possibilities: standard and "Rich" format. ("Std." and "Rich" are used in the text format pane of the status bar to show the current format.) When you open a file in MicroSpell, it will always be displayed in standard format. This means that if the file is of a type that has embedded formatting commands (such as TeX/LaTeX, RTF, or HTML), you will see your text surrounded by the formatting commands—it will not be rendered, for example, the way an HTML document is rendered when viewed as a web page. The different mode settings described above enable the speller to navigate the corresponding document type and extract the text from amid the formatting commands.

While the speller cannot render a TeX or HTML document the way a previewer or Internet browser can, it can display RTF in "Rich" format, but only if you drag-and-drop or cut-and-paste the text form an RTF source such as WordPad or Microsoft Word (but this is sometimes not a good idea in the case of Microsoft Word—see below). This limitation is intentional. The speller is based on a Windows control which recognizes only a subset of the RTF commands that a program such as Microsoft Word might use in an RTF document. If the speller were to read such a file and interpret the formatting commands, it would ignore those that it did not recognize. While the rendered display might not look bad, a corrected version of the document written by the speller would be lacking some of the original formatting information. By not attempting to interpret and render RTF but simply passing it back unchanged, the speller should be able to check and correct RTF files from any source. Currently, this is the only reasonable way to deal with Microsoft Word documents that are not saved as a "text-only" file.

If you cut-and-paste text from Microsoft Word (and some other programs), the speller will display it as "Rich" text unless you've set the speller option that causes it to refuse rich text (see figure above). If you then cut-and-paste the corrected text back into Microsoft Word, you will lose whatever formatting information the speller did not recognize. Why does the speller allow this, even as an option? Because it will work properly with programs such as WordPad and others based on the Windows rich edit control, and here, cutting-and-pasting is easier than writing an RTF file.

Here are some simple rules to help you avoid these problems:

  1. When you are dealing with formatted text from a source such as Microsoft Word, always save the text to an RTF file before presenting it to the speller.
  2. If you are uncertain whether you can safely cut-and-paste or drag-and-drop text between MicroSpell and another window, try using the hotkey spell check function which simply automates the cut-and-paste process and will only work if it has an appropriate script. We have defined copy scripts for edit and rich edit controls and a few other window classes so MicroSpell can grab the text when it recognizes one of these windows. Conversely, we have not provided a script for Microsoft Word or any other source from which we discourage cutting-and-pasting. Tip: if this function successfully copies text, but the copied text looks significantly different form the source (font, formatting, etc.), make sure you are not refusing rich text (see figure above).

    If the hotkey spell check function does not work, it might mean you should go with rule (1) above, or it might mean that we simply haven't encountered the window class that you are trying to work with. You might want to try some careful experiments to see whether copying text to the speller and then back to the original window causes any problems. If not, you can define a new copy script.