old-www/LDP/LG/issue37/richardson.html

132 lines
5.6 KiB
HTML

<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>LG #37</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<!--endcut ============================================================-->
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<font color="navy">A <I>Linux Journal</I> Review</font>:
This article appeared first in the February 1998 issue of <I>Linux
Journal</I>. I decided to reprint it here because most of you who write
letters to <I>LG</I> don't seem to know this handy command exists.
While it's not mentioned
in the article, ispell can be used from elm and other e-mail packages.
<P> <HR> <P>
<center>
<H1><font color="maroon">ispell: Spelling Checker</font></H1>
<H4>By <a href="mailto:gazette@ssc.com">Marjorie Richardson</a></H4>
</center>
<P> <HR> <P>
As a former Technical Editor, I know how easy it is to miss incorrect
spelling when proof-reading, especially if the word ``looks''
right, e.g., compatability (sic). For this reason, a good spelling checker is
a must. The command <tt>ispell</tt> does a good job and has special
features to help it do even better. The Man page for
<tt>ispell</tt> is very comprehensive, so I won't go into all its
options--only my favorites.
<p>
When <tt>ispell</tt> has been invoked and it finds a misspelled
word, options are displayed across the bottom of the screen:
<p>
<pre>
[SP] &lt;number> R)epel A)ccept I)nsert L)ookup U)ncap Q)uit e(X)it or ? for help
</pre>
All you have to do is press the space bar (accept this time only)
or <i>A</i> (accept for rest of document) to accept the spelling as
is, press <i>I</i> to insert the word in the dictionary, or press the appropriate
number or <i>R</i> to replace it. The main thing to watch out for is the right
time to use <i>R</i>. When a misspelled word is found and the spelling choices are
offered, the tendency is to press <i>R</i> for <i>replace</i> and enter the
number of the correct choice--doing this results in the number
replacing your word. Instead, enter the number of your choice immediately,
and since <i>replace</i> is the default, the correct spelling will replace
the incorrect in the text. Use <i>R</i> only when a correct spelling is not
offered by <tt>ispell</tt>.
<p>
Most of SSC's reference cards and command summaries use troff text
formatting; other manuals use TeX. Use the option <tt>-n</tt> with
troff text or <tt>-t</tt> with TeX or LaTeX, and
<tt>ispell</tt>
will ignore formatting commands, thereby returning fewer
``misspelled'' words for you to <i>accept</i>. While an option is
not available to designate a Quark file, you can always insert the
QuarkXPress formatting commands
into your personal dictionary the first time they come up and not be
hassled again.
<p>
In fact, the personal dictionary is probably the neatest feature of all.
The very first time you select <i>I</i> to <i>insert</i> a word it doesn't
recognize, <tt>ispell</tt> sets up a personal dictionary named
ispell_english in your home directory. After that, any word you
select will be added to this dictionary, and you will never be told it
is misspelled again. This feature is particularly handy for proper names, buzz
words and abbreviations unique to your business. Hashed
dictionaries for other languages (that have been installed) can be
specified using <tt>-d</tt>.
In addition, you can set up special dictionaries for particular projects.
For example, when I was editing the Java Reference Cards, I set up a
special dictionary named ispell_java just for Java terms in my work
directory. Afterwards, whenever I ran <tt>ispell</tt>, I specified
the command line as:
<p>
<pre>
ispell -n -p ./ispell_java java.troff
</pre>
As a result, <tt>ispell</tt> knew class names like
<tt>getFontList</tt> were spelled correctly, and that
<tt>getFontlist</tt> was not. By the way, don't forget
that the command line specification must include the directory of the
dictionary (<tt>./</tt> in the above example); otherwise
<tt>ispell</tt> will look for it in your home directory.
<p>
Another handy feature to remember is how to check a single word instead
of a complete file by using the <tt>-a</tt> option. For
example, if you specify:
<p>
<pre>
echo compatability | ispell -a
</pre>
<tt>ispell</tt> will return the message:
<p>
<pre>
&compatability 3 0: comparability, compatibility, computability
</pre>
This message tells you ``compatability'' is misspelled, and gives you
a list of 3 <i>best guesses</i> in alphabetical order. If you prefer not to
have the list sorted alphabetically, use the <tt>-S</tt> option,
and it will be sorted by <i>best guess</i>.
<p>
All in all, <tt>ispell</tt> is an effective and easy-to-use
all-purpose spell checker.
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1999, Marjorie Richardson <BR>
Published in Issue 37 of <i>Linux Gazette</i>, February 1999</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./gm.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./ramirez.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->