home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / WP / JSPL202C.ZIP / MANUAL.DOC < prev    next >
Text File  |  1994-01-12  |  95KB  |  2,179 lines

  1.  
  2.  
  3.  
  4.              jspell 2.02c (Release date: Jan.12, 1994)
  5.  
  6.                    --- Shareware Version ---
  7.  
  8.                 Copyright 1993-1994 by Joohee Jeong
  9.  
  10.                   Nemosoft Technologies
  11.                   P.O.Box 1619
  12.                   El Cerrito, CA 94530-9998, U.S.A.
  13.  
  14.                   Email: 73072.3651@compuserve.com
  15.                   Phone/Fax: (510) 528-8753
  16.  
  17.  
  18.   All product names referenced herein are trademarks or registered
  19.   trademarks of their respective holders.
  20.  
  21.  
  22.   Before proceed, please read the text files 00readme and 01readme for
  23.  
  24.    (i)  Licensing, distribution and registration information,
  25.    (ii)  Disclaimer,
  26.    (iii)  Last minute changes.
  27.  
  28. Table of Contents _________________________________________________
  29.  
  30.  
  31.   Chapter I.  Introduction
  32.  
  33.     1  Features of jspell
  34.     2  Installation
  35.     3  Test drive
  36.     4  Configuration and hardware compatibility
  37.     5  Terminologies
  38.  
  39.   Chapter II.  User's guide for jspell
  40.  
  41.     1  Characters, words and dictionaries
  42.       1.1 Legal characters and legitimate words
  43.       1.2 Base dictionary and user dictionary
  44.       1.3 Dictionary loading
  45.     2  TeX-mode
  46.       2.1 Selecting the TeX-mode
  47.       2.2 Legitimate subwords in TeX
  48.       2.3 Ignoring the TeX commands
  49.       2.4 Math ignore mode
  50.       2.5 Miscellanies
  51.     3  Running jspell, the spell checker
  52.       3.1 Overview
  53.       3.2 Capitalization of words
  54.       3.3 Menu
  55.       3.4 [Replace] and [rePlace all]
  56.       3.5 Adding spotted word to user dictionaries
  57.       3.6 Miscellanies
  58.     4  Configuration files and command line options
  59.     5  Usage tips
  60.  
  61.   Chapter III.  User's guide for dictman
  62.  
  63.     1  Introduction
  64.     2  Running dictman, the dictionary manager
  65.       2.1 [File] menus
  66.       2.2 [BaseDic] menus
  67.       2.3 [UserDic] menus
  68.       2.4 [Utilities] menus
  69.       2.5 [Help=F1] menus
  70.     3  Dictionary maintenance
  71.       3.1 Merging user dictionary to base dictionary
  72.       3.2 Deleting words from a base dictionary
  73.       3.3 Building up your own base dictionary
  74.  
  75.   Appendix A.  Networked mode
  76.  
  77.   Appendix B.  Frequently Asked Questions
  78.  
  79.   Appendix C.  History
  80.  
  81.   Index
  82. Chapter I.  Introduction ----------------------------------------
  83.  
  84.   I.1.  Features of jspell
  85.  
  86.    (1) Ease of use:
  87.        Practically you don't need to study or practice anything to
  88.        use jspell proficiently.  With jspell's on-line help and the
  89.        intuitive keystrokes, which are indicated by the highlighted
  90.        letters in the on-screen menu buttons, you will hardly need
  91.        to read the manual except for the advanced features of
  92.        jspell, which are not found in other spell checkers.  For
  93.        mouse users, spell-checking with jspell can even be fun.
  94.  
  95.    (2) Speed:
  96.        jspell is fast in dictionary loading, scanning input files
  97.        for misspelled words and finding suggestions for near
  98.        misspelled words.  For a typical PC with 386 CPU, jspell
  99.        needs less than two seconds in loading a 40,000 word
  100.        dictionary and a fraction of a second in building and
  101.        displaying the list of suggested words for a misspelled word.
  102.  
  103.    (3) Dictionary:
  104.        A unique feature of jspell is its ability to handle file
  105.        specific dictionary and multiple user dictionaries---you can
  106.        have a dictionary (or dictionaries) that are specific to the
  107.        input file.  The author of jspell found this feature very
  108.        convenient, more than he initially imagined. The accompanying
  109.        dictionary manager dictman is powerful and easy to use.
  110.        Merging your personal dictionaries to the space/time-
  111.        efficient base dictionary and/or building your own base
  112.        dictionary from scratch is done effortlessly.
  113.  
  114.    (4) TeX support:
  115.        Ignoring the TeX-commands (that start with the backslashes
  116.        `\') is just the beginning.  Refer to (Section 2.2) of this
  117.        manual for the complete description of how jspell handles TeX
  118.        documents.
  119.  
  120.    (5) Foreign characters:
  121.        Foreign characters can be handled in either
  122.         (i) extended ASCII characters, or
  123.         (ii) TeX commands (e.g., G\"odel, Erd\H{o}s).
  124.  
  125.    (6) Undo:
  126.        Not all popular spell checkers support undoing the previous
  127.        actions---up to 400 steps!  Moreover, jspell always displays
  128.        the last action at the bottom row of the screen for added
  129.        convenience.
  130.  
  131.    (7) Network support:
  132.        Each user can have his/her own configuration and personal
  133.        dictionary while sharing the executables and the base
  134.        dictionary with other users.
  135.  
  136.    (8) More...
  137.        There are countless features of jspell that will please you.
  138.        For instance, the [Find] menu item in the dictionary manager
  139.        can display all words in the dictionary that match the given
  140.        regular expression: e.g., the pattern "t???e" will give you
  141.        the list of all 5 letter words that start with `t' and end
  142.        with `e', such as "table", "taste", "tease", "tense" etc., in
  143.        just 3 to 5 seconds for a typical 386 machine. Imagine what
  144.        you can do with this in solving crossword puzzles!
  145.  
  146.  
  147.   I.2  Installation
  148.  
  149.     Prepare a "jspell directory", say C:\JSPELL, by the DOS command
  150.  
  151.       mkdir C:\JSPELL
  152.  
  153.     and copy all jspell files into this directory.  Then C:\JSPELL
  154.     should contain the following 12 files
  155.  
  156.     ------------------------------------------------------------------
  157.       filename      size (bytes)   description
  158.     ------------------------------------------------------------------
  159.       00readme           8,550     this file
  160.       01readme            ****     last minute change
  161.       base.dic         172,285     English word list
  162.       dictman.exe       44,009     the dictionary manager executable
  163.       file_id.diz          394     FILE_ID.DIZ
  164.       jspell.cfg           886     configuration
  165.       jspell.exe        41,812     the spell checker executable
  166.       jspell.hlp        10,611     help messages
  167.       jsptex.cfg           202     TeX configuration
  168.       manual.doc        94,814     manual
  169.       register.doc      12,373     registration information
  170.       sample.txt         1,130     sample text for a test drive
  171.     ------------------------------------------------------------------
  172.  
  173.     If you find any file other than the 12 listed above, any file
  174.     missing or having different size, then you know this is not the
  175.     official shareware distribution by Nemosoft Technologies.
  176.  
  177.     In order to be able to run jspell (and dictman) in any
  178.     directory, either add C:\JSPELL to your PATH or put two batch
  179.     files jspell.bat and dictman.bat into one of your directories in
  180.     PATH. The content of the batch files jspell.bat and dictman.bat
  181.     should look like
  182.  
  183.     @echo off
  184.     C:\JSPELL\jspell.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13
  185.  
  186.     and
  187.  
  188.     @echo off
  189.     C:\JSPELL\dictman.exe %1 %2 %3 %4 %5 %6
  190.  
  191.     respectively.
  192.  
  193.     The default configuration of jspell is set to VGA and AT-keyboard.
  194.     Also we assume that you work under the plain-vanilla DOS
  195.     environment. If your computer's configuration and/or environment
  196.     is different from this, then you will need to read (Section I.4).
  197.  
  198.     If you are going to run jspell under a networked environment,
  199.     then please read (Appendix A.) to complete the installation.
  200.  
  201.  
  202.   I.3  Test drive
  203.  
  204.     We assume that jspell (and dictman) has been correctly installed
  205.     on your computer.  If not, please refer to the installation
  206.     information in the previous section.
  207.  
  208.     Also, we suggest you making a hard copy of this documentation
  209.     file manual.doc (by a command like "copy manual.doc prn"), at
  210.     least this "Test drive" section, with your printer---you can't
  211.     test drive jspell while reading this file on a computer screen
  212.     unless you run two computers simultaneously. In order to print
  213.     out this documentation properly, your printer must be able to
  214.     handle the IBM graphic characters correctly.
  215.  
  216.     This test drive is for jspell only---not for dictman, which will
  217.     be needed only after you've determined to use jspell as your
  218.     spell checker.
  219.  
  220.     Try the following command at the DOS prompt:
  221.  
  222.       jspell
  223.  
  224.     You will see the following screen (and the DOS prompt).
  225.  
  226.       Usage: jspell [-options...] <filename>
  227.                to spell check <filename>, where
  228.                option = -bd <base dictionary name>
  229.                         -ud <user dictionary name>
  230.                         -fd <file dictionary name>
  231.                         -len n    (2 <= n <= 9)
  232.                         -t[+-]
  233.                         -math[+-]
  234.                         -percent[+-]                 or
  235.              jspell ?
  236.                to read the help screen.
  237.  
  238.     Don't worry about the -options for the time being.  The Usage
  239.     tells you that you can spell-check a file, say <filename>, by
  240.     the command "jspell filename".  We will test this on the text
  241.     file "sample.txt" which should exist in the same directory as
  242.     jspell.exe. (It won't take long.  After all, you can exit from
  243.     this test drive whenever you want by hitting Alt-X.)
  244.  
  245.     First, copy this sample file "sample.txt" to the current
  246.     directory by the command
  247.  
  248.       copy c:\jspell\sample.txt .
  249.  
  250.     or something like this.  Then execute the following command at
  251.     the DOS prompt:
  252.  
  253.       jspell sample.txt
  254.  
  255.     Three boxes will be shown on the screen.  The upper one is for
  256.     text display, the lower left one is for the suggested words, and
  257.     the lower right one is for the menu buttons. The row between the
  258.     upper and lower area is called the "edit row".  Each misspelled
  259.     word in the input file sample.txt will be highlighted in the
  260.     upper box and also displayed on the edit row.  The bottom row is
  261.     for displaying some information about the current working of
  262.     jspell.
  263.  
  264.     First, jspell will briefly display the message that looks like
  265.  
  266.       Loading "C:\JSPELL\base.dic".....
  267.  
  268.     at the bottom row, and then spot/highlight the first misspelled
  269.     word "jspell" at the center row of the upper box. Also the edit
  270.     row will display the highlighted word "jspell" with a half-block
  271.     cursor flashing at the end of the word.
  272.  
  273.     Now press DownArrow to highlight the suggested word "spell" and
  274.     then press ENTER.  You should be able to see that the word
  275.     "jspell" has been replaced by "spell" and the second misspelled
  276.     word "typcal" is now being spotted/highlighted.
  277.  
  278.     Actually, replacing "jspell" by "spell" was not our intention.
  279.     We wanted to [iGnore all] the word "jspell" which occurs several
  280.     times in this sample text file.  So, hit Alt-U (or click on the
  281.     menu button [Undo]) to undo the previous action.  Then a dialog
  282.     box will pop-up at the center of the screen asking us to choose
  283.     one of the three options "Undo", "Cancel" or "Undo further".
  284.     Choose the default option "Undo" by either (highlighting "Undo"
  285.     and) pressing ENTER or clicking the left mouse button on it. Now
  286.     we are back to the previous step. This time, press Alt-G (or
  287.     click on the menu button [iGnore all]) to ignore all the
  288.     subsequent occurrences of "jspell" as well as this spotted one.
  289.  
  290.     jspell should be spotting/highlighting the word "typcal" now.
  291.     Naturally we want to replace this by the suggested word
  292.     "typical".  There are several ways of doing this:
  293.  
  294.     o  Highlight "typical" and then press ENTER, or
  295.     o  Press the key 1, or
  296.     o  Click left mouse button on the suggested word "typical".
  297.  
  298.     Do any one of these three actions.
  299.  
  300.     Now we want to add the next spotted/highlighted word "CPU" into
  301.     the user dictionary.  We do this by pressing Alt-A or clicking
  302.     on the menu button [Add to user.dic].  Then jspell asks us to
  303.     select one of the three possible capitalizations "CPU", "Cpu" or
  304.     "cpu".  We should choose the first one, "CPU".
  305.  
  306.     Next, you will see that the misspelled word "teh" is spotted/
  307.     highlighted. (By the way, although the previous word "CPU" is no
  308.     longer shown on the upper box, we can still see that the last
  309.     action was adding "CPU" to the user dictionary user.dic by
  310.     looking at the bottom row.)  Note that the row in the upper box
  311.     containing the spotted word "teh" has two occurrences of the
  312.     word "jspell" which were not caught because we have ignored
  313.     "jspell" globally.
  314.  
  315.     We replace this misspelled word "teh" by the correct word "the"
  316.     by hitting 6.  Then we see that another "teh" is spotted by
  317.     jspell. Thus we realize that we should have done [rePlace all]
  318.     instead of simple [Replace].  To this end, we first undo the
  319.     last action and then hit Alt-P after highlighting "the" in the
  320.     lower left box (or alternatively, you may click the left mouse
  321.     button on the suggested word "the" while pressing down the Ctrl
  322.     key).
  323.  
  324.     The next spotted word "jsspell" lies on a rather long line, but
  325.     jspell handles this situation with no problem. In fact, the
  326.     limit on the line length in the input file is as large as 512
  327.     characters. Note that the correct word "jspell" is suggested
  328.     although it's not in the dictionary. (Recall that "jspell" had
  329.     been globally ignored.)  Now replace "jsspell" by "jspell".
  330.  
  331.     The rest of this test drive is for the TeX-mode. The currently
  332.     spotted word "sl" is a valid TeX-command.  So we could just
  333.     ignore this "sl" or add it to user.dic.  But surely there is a
  334.     better solution: just ignore all words that follow the backslash
  335.     character `\', namely the TeX-commands.
  336.  
  337.     Normally, jspell chooses this TeX-mode automatically if (and
  338.     only if) the input file name has extension ".tex".  But we can
  339.     force the TeX-mode by the command line switch -t. So we'll end
  340.     this session and spell-check this text file sample.txt again in
  341.     TeX-mode.
  342.  
  343.     It's good time to test the [eXit] menu.  Hit Alt-X. Then jspell
  344.     will pop-up a window asking you to choose one of the following:
  345.  
  346.       Yes        (save changes before exit), or
  347.       No         (do not save changes and exit), or
  348.       Cancel     (do not exit, and continue jspell).
  349.  
  350.     We choose the first option "Yes" for now.
  351.  
  352.     Before starting another jspell session, you might want to look
  353.     into your user.dic file in the "jspell directory" to check that
  354.     the word "CPU" has really got in there.   Now enter the command
  355.  
  356.       jspell -t sample.txt
  357.  
  358.     We see that "jspell" is spotted again because [iGnore all] has
  359.     effect only on that particular session.  So, this time we will
  360.     put this word "jspell" in the file specific dictionary
  361.     sample.dic, by hitting Alt-T (or clicking mouse on the
  362.     appropriate menu button).
  363.  
  364.     The next spotted word should be "Pythagoras".  We put this word
  365.     into sample.dic.  (If you are bothered by the jspell's pop-up
  366.     window asking you to choose capitalization, then you may do
  367.     Shift-Alt-T or Shift-LeftMouseClick on [add To sample.dic].)
  368.  
  369.     Now jspell is done with this input file.  It will show you some
  370.     information about the session (such as the number of words that
  371.     have been spotted etc.) and displays a pop-up window with two
  372.     choices Exit and Cancel.  If you choose Cancel, then you can
  373.     undo the last action on "Pythagoras".  Otherwise, you just exit.
  374.  
  375.     Note that jspell ignored the 5 words "sl", "XY", "XZ", "YZ" and
  376.     "Wat" which would have been caught if TeX-mode had not been
  377.     used.
  378.  
  379.     You may want to look into the file sample.dic, which has been
  380.     created in the current directory by this jspell session.  It
  381.     should contain the two words "Pythagoras" and "jspell".  These
  382.     two words are considered to be in our vocabulary for input files
  383.     whose filenames are of the form sample.<ext>, where <ext> is any
  384.     extension, including the empty one.
  385.  
  386.     Note that the original file has been saved in a backup file named
  387.     sample.bak in the current directory.
  388.  
  389.     Remark:  In this test drive section, there are three places
  390.     where we made (slightly) wrong statements---on purpose to avoid
  391.     excessive details.  We'll continue this practice of deliberate
  392.     lying to the rest of this manual whenever it is appropriate.
  393.  
  394.  
  395.   I.4  Configuration and hardware
  396.  
  397.     jspell and dictman need IBM-PC 100% compatible computer because
  398.     they use direct video for fast screen update.  Also they use
  399.     low-level keyboard reading.  Thus some (old) IBM compatible
  400.     computers may not be able to run jspell/dictman successfully.
  401.  
  402.     For videos, VGA, EGA, CGA and Hercules are supported.  Other
  403.     video cards may or may not work.
  404.  
  405.     jspell uses two configuration files jspell.cfg and jsptex.cfg.
  406.     Both of these are plain ASCII text files.  jsptex.cfg is for
  407.     TeX-mode only and has nothing to do with the computer hardware.
  408.     In fact, only the first three entries of jspell.cfg are
  409.     pertinent to the hardware. So we will concentrate on these first
  410.     few lines of jspell.cfg in this section and defer the discussion
  411.     of the rest until later sections in this manual.
  412.  
  413.     The configuration variables in jspell.cfg have effect on the
  414.     behavior of both jspell and dictman.   A typical jspell.cfg
  415.     looks like:
  416.  
  417.       AT             % keyboard (AT or XT)
  418.       VGA            % video card  (CGA,EGA,VGA or Hercules)
  419.       Enhanced       % color option  (Standard,Enhanced,Monochrome
  420.                                       or Laptop)
  421.       ...  more ...
  422.       ...  more ...
  423.  
  424.     The meanings of these three configuration variables should be
  425.     more or less obvious---if you have an AT-keyboard, then choose
  426.     the AT option, otherwise choose the XT option and so on.  If you
  427.     want change a variable, say AT to XT, then you may simply
  428.     replace "AT" by "XT" using your favorite text editor.
  429.  
  430.     The order of these configuration variables does matter.
  431.     So be careful not to mess up the order. Upper/lower-case is
  432.     ignored.
  433.  
  434.     The difference between AT-keyboards and XT-keyboards is not that
  435.     important.  With AT, you can use certain keystrokes that are not
  436.     recognized by XT: e.g., CtrlUpArrow and CtrlDownArrow are only
  437.     recognized by AT-keyboards.
  438.  
  439.     For video cards not among the four supported ones, it may still
  440.     be possible to run jspell/dictman by selecting suitable options
  441.     by trial and error. Just note that Enhanced color option is for
  442.     VGA or EGA only.
  443.  
  444.     About the color options, many people prefer the Enhanced option
  445.     to the Standard option. But if you run jspell in a DOS box under
  446.     Windows (or you just prefer Standard to Enhanced for any reason)
  447.     then you may switch to the Standard option by simply replacing
  448.     "Enhanced" by "Standard" in the third line of the file
  449.     jspell.cfg.
  450.  
  451.     The Laptop option is basically Monochrome that can't display
  452.     "bright white" properly. So the command keys are highlighted by
  453.     inverse video instead of bright white if you choose this Laptop
  454.     option.
  455.  
  456.  
  457.   I.5  Terminologies
  458.  
  459.     As you may have already noticed, this manual uses the word
  460.     "jspell" somewhat ambiguously: sometimes it means the
  461.     jspell/dictman combo and sometimes it means only the spell
  462.     checker jspell.exe. Another example of our abuse of terminology
  463.     is the word TeX--- it usually means TeX/LaTeX: for instance, the
  464.     LaTeX-command \newenvironment is not really a TeX command in the
  465.     strict sense, but in this manual we may just say "the
  466.     TeX-command \newenvironment ..." for convenience.
  467.  
  468.     We want use the term jspell directory to mean the directory in
  469.     which jspell is installed: i.e., the directory in which all
  470.     jspell files reside.  But if we think about running jspell over
  471.     a networked environment, where each user may want to update
  472.     user.dic and/or base.dic, it becomes evident that we need some
  473.     sort of personal jspell directory for each user.
  474.  
  475.     For the single user mode, jspell directory will mean the
  476.     directory in which the jspell executable file jspell.exe
  477.     resides.  It is this directory where the jspell files such as
  478.     dictman.exe, jspell.cfg, jsptex.cfg and jspell.hlp normally
  479.     reside. jspell directory is also the default directory for
  480.     base.dic and user.dic.
  481.  
  482.     For the networked mode, jspell executable directory will mean
  483.     the directory in which jspell.exe resides.  We must put the
  484.     files dictman.exe and jspell.hlp in this directory. But the
  485.     other two files jspell.cfg and jsptex.cfg may exist in the
  486.     jspell configuration directory which is defined by the
  487.     environment variable JSPELL_DIR, which is normally set by
  488.     autoexec.bat. Also this jspell configuration directory is the
  489.     default directory for base.dic and user.dic.
  490.  
  491.     For the detailed discussion on this subject, the readers are
  492.     referred to (Appendix A.).  In (Chapter 2) and (Chapter 3), we
  493.     will always assume that jspell is being run under the single
  494.     user mode.
  495. Chapter II.  User's guide for jspell ----------------------------
  496.  
  497.   II.1  Characters, words and dictionaries
  498.  
  499.   II.1.1  Legal characters and legitimate words
  500.  
  501.     Following are the list of legal characters that can be used in
  502.     words:
  503.  
  504.       abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
  505.       ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜáíóúñÑß
  506.  
  507.     In addition, we may use the following special characters that
  508.     can be used in words in some circumstances:
  509.  
  510.       " ' - . = \ ^ ` { } ~
  511.  
  512.     A finite sequence <word> of legal characters and/or special
  513.     characters can be considered to be a legitimate word only if the
  514.     length of <word> is in between MinWordLen and 40, where
  515.     MinWordLen is some number in between 2 and 9 and defined in the
  516.     configuration file (as the 11th entry). This configuration
  517.     variable can be overridden by the command line switch -len For
  518.     instance
  519.  
  520.       jspell -len 3 <sample>
  521.  
  522.     will ignore all words in the text file <sample> that has length
  523.     1 or 2.
  524.  
  525.     Suppose that <word> has proper length.  In non-TeX-mode, the
  526.     only special character that can appear in <word> is the
  527.     apostrophe ('). Moreover, there's some restriction in the use of
  528.     apostrophe in <word>.  It must occur at the end of <word> as
  529.     *n't, *'ve, *'re or *'ll, where * denotes any sequence of
  530.     characters.
  531.  
  532.     To summarize, when jspell runs in non-TeX-mode, a finite
  533.     sequence <word> of legal characters and/or apostrophe is a
  534.     legitimate word if and only if it has length in between
  535.     MinWordLen and 40 and satisfies the condition on apostrophe as
  536.     described in the paragraph above.
  537.  
  538.     In TeX-mode, the definition of legitimate words gets more
  539.     complicated.  For this subject, refer to (Section II.2.2) in
  540.     this chapter.
  541.  
  542.  
  543.   II.1.2  Base dictionary and user dictionary
  544.  
  545.     Dictionary means a file that contains a list of words in some
  546.     systematic way.  (Sometimes we may use this term dictionary to
  547.     mean the list of words in the computer memory that have been
  548.     loaded from a dictionary file.)
  549.  
  550.     Two types of dictionaries are used by jspell: one is "base
  551.     dictionary" and the other is "user dictionary".
  552.  
  553.     Base dictionary exploits the common prefix/suffixes of words to
  554.     reduce the file size.  (Current version of jspell supports only
  555.     English prefix/suffix.  Future versions will allow user
  556.     configurable prefix/suffix for foreign languages.) Also loading
  557.     a base dictionary is fast because it is read into the memory
  558.     directly (i.e., no computation for building up data-structures).
  559.     If you want to make any change on the content of base
  560.     dictionary, then it must be done by dictman, the dictionary
  561.     manager for jspell.
  562.  
  563.     To see the extent of the space saving obtained by this
  564.     prefix/suffix business, run the [BaseDic][Expand] menu in
  565.     dictman.  It will create an ASCII text file that contains all
  566.     words in the base dictionary currently loaded in the computer
  567.     memory.
  568.  
  569.     User dictionary is simply an ASCII text file that contains one
  570.     word per line.  The words are alphabetically sorted for the ease
  571.     of maintenance---you can edit this file directly using any text
  572.     editor.  jspell reads user dictionary line by line.  If jspell
  573.     encounters a space character (i.e., space, tab, carriage return,
  574.     end of line etc.), then it ignores the rest of the line. If an
  575.     illegitimate word is encountered during loading, then jspell
  576.     exits with an error message.
  577.  
  578.     jspell supports the use of "multiple user dictionaries" and the
  579.     "file specific user dictionary" as explained in the next
  580.     section.
  581.  
  582.  
  583.   II.1.3  Dictionary loading
  584.  
  585.     When jspell starts it looks for the default base dictionary, say
  586.     base.dic, in the current directory, where the default dictionary
  587.     name is defined in the configuration file jspell.cfg (as the
  588.     12th entry). If it finds one, then the base dictionary is loaded
  589.     into the computer memory.  Otherwise jspell continues searching
  590.     base.dic in the jspell directory.  If both searches fail, then
  591.     jspell exits with an appropriate error message. You can override
  592.     the default base dictionary name defined in jspell.cfg by the
  593.     command line switch -bd for instance,
  594.  
  595.       jspell -bd german.dic <filename>
  596.  
  597.     will spell-check the file <filename> using the base dictionary
  598.     "german.dic".
  599.  
  600.     As we mentioned above jspell allows us to use more than one user
  601.     dictionaries.  There is one special user dictionary, called the
  602.     main user dictionary, which is used for *all* jspell-check
  603.     sessions.  User dictionaries other than the main one may or may
  604.     not be used in jspell-checking depending on the filename of the
  605.     input text file.
  606.  
  607.     Dictionary loading of the main user dictionary is similar to
  608.     that of base dictionary, with one minor difference explained in
  609.     the next paragraph.  The default main user dictionary name is
  610.     normally user.dic and defined in the configuration file
  611.     jspell.cfg (as the 13th entry).  It can be overridden by the
  612.     command line switch -ud for instance,
  613.  
  614.       jspell -ud math.dic <filename>
  615.  
  616.     will spell-check the file <filename> using the main user
  617.     dictionary  math.dic.
  618.  
  619.     The difference between the loading of the base dictionary and
  620.     the main user dictionary is that if both searches fail (one in
  621.     the current directory and the other in the  jspell directory)
  622.     then jspell exits with an error message in the former case,
  623.     while in the latter case jspell
  624.  
  625.       (i) does not complain anything in case the default main user
  626.           dictionary defined in jspell.cfg has been used,
  627.  
  628.       (ii) gives warning and option to choose between continue or
  629.            abort in case the command line defined main user
  630.            dictionary has been used.
  631.  
  632.     If the main user dictionary is not found in either of the
  633.     directories but some words are added into the main user
  634.     dictionary during a spell-check session, then a new dictionary
  635.     is created in the jspell directory.
  636.  
  637.     The default file specific dictionary of a file <filename>.<ext>
  638.     is defined to be a user dictionary with filename
  639.     <filename>.dic.
  640.  
  641.     Dictionary loading of the file specific dictionary, or file
  642.     dictionary for short, is the same as that of the main user
  643.     dictionary.  The default file dictionary name can be overridden
  644.     by the command line switch -fd -fd for instance,
  645.  
  646.       jspell -fd project1.dic <filename>
  647.  
  648.     will spell-check the file <filename> using the file dictionary
  649.     "project1.dic" (instead of the default one <filename>.dic).
  650.  
  651.     If the file dictionary is not found in either of the directories
  652.     but some words are added into the file dictionary during a
  653.     spell-check session, then a new dictionary is created in the
  654.     current directory.  (This is different from the main user
  655.     dictionary case.)
  656.  
  657.     You may use additional user dictionaries specific to a text file
  658.     <filename>.<ext> by specifying them in the file dictionary, say
  659.     <filename>.dic, in the following way, which is how jspell
  660.     supports the use of multiple user dictionaries.  Suppose that
  661.     you want to use two additional dictionaries "math.dic" and
  662.     "comp.dic". Then just add two lines +math.dic and +comp.dic at
  663.     the beginning of the file dictionary <filename>.dic---so the
  664.     content of the resulting file dictionary for our input file
  665.     <filename>.<ext> should look like:
  666.  
  667.       +math.dic
  668.       +comp.dic
  669.       <word1>
  670.       <word2>
  671.       ...
  672.       ...
  673.  
  674.     As usual, these additional user dictionaries are first searched
  675.     in the current directory and then in the jspell directory. If
  676.     both searches fail, then jspell exists with an error message. Up
  677.     to 9 additional user dictionaries can be used.
  678.  
  679.     Among the dictionaries mentioned above, the main user dictionary
  680.     and the file dictionary may be updated by a jspell session.  So
  681.     if these two dictionaries happen to have the same filename, then
  682.     the filename collision problem occurs, and jspell exists with an
  683.     appropriate error message.  Other types of dictionary name
  684.     collision is less harmful and thus silently ignored by jspell.
  685.     (Some computing resources are wasted due to the duplicate copy
  686.     of the same dictionary.)
  687.  
  688.     Since user dictionaries (main, file, or additional) can be
  689.     freely edited by any text editor, there is a possibility that an
  690.     illegitimate word creeps into one of these dictionaries.  If
  691.     jspell finds an illegitimate word during the initial dictionary
  692.     loading, then it exits with an error message at the bottom of
  693.     the screen indicating the first encounter of (i) the
  694.     illegitimate word <badword>, (ii) the dictionary that contains
  695.     <badword> and (iii) the line in which <badword> occurs.  You
  696.     should immediately delete or fix this <badword>.
  697.  
  698.     If the same word exists in more than one places---in different
  699.     dictionaries or in the same dictionary---then it is silently
  700.     ignored by jspell. (Some computing resources are wasted due to
  701.     the duplicate copy of the same word.)
  702.  
  703.     One final remark: extension of dictionary files need not
  704.     necessarily be .dic.  It's just convenient to stick to this
  705.     naming convention in most situations.
  706.  
  707.  
  708.   II.2  TeX-mode
  709.  
  710.   II.2.1  Selecting the TeX-mode
  711.  
  712.     This mode is automatically selected if the extension of the
  713.     input file is ".tex", case insensitive.  You may override this
  714.     convention by the command line switch -t[+-].   For instance,
  715.     you may force the TeX-mode to the file <filename>.<ext> by
  716.  
  717.       jspell -t <filename>.<ext>
  718.  
  719.     Conversely, you may force non-TeX-mode to the file
  720.     <filename>.tex by
  721.  
  722.       jspell -t- <filename>.tex
  723.  
  724.     -t+ has the same effect as -t.
  725.  
  726.  
  727.   II.2.2  Legitimate subwords in TeX
  728.  
  729.     First of all, any legitimate word in non-TeX-mode is legitimate
  730.     in the TeX-mode also.
  731.  
  732.     In addition, we can use the accenting commands as part of a
  733.     legitimate word.  Thus the following 21 strings are legitimate
  734.     subwords
  735.  
  736.        \`     \`{?}  \'     \'{?}  \^     \^{?}  \"
  737.        \"{?}  \~     \~{?}  \=     \={?}  \.     \.{?}
  738.        \u{?}  \v{?}  \H{?}  \c{?}  \d{?}  \b{?}  \t{??}
  739.  
  740.     where ? denotes any single character.
  741.  
  742.     Next, there are 11 special TeX commands that are legitimate
  743.     subwords:
  744.  
  745.       \oe \OE \ae \AE \aa \AA \o \O \l \L \ss
  746.  
  747.     which are used to generate the following symbols
  748.  
  749.       * omitted in this ASCII version of the manual *
  750.  
  751.     respectively.
  752.  
  753.     Further, we allow the use of braces { and } for various
  754.     circumstances like \ss{}, {\oe} etc.
  755.  
  756.     Finally, we allow the hyphenation command \- to be part of
  757.     legitimate words.
  758.  
  759.  
  760.   II.2.3  Ignoring the TeX commands
  761.  
  762.     First of all, jspell ignores all TeX (and LaTeX) commands
  763.     (except the 11 special ones mentioned in the previous section):
  764.     i.e., all words following the escape character `\'. Note that if
  765.     `\' is not used as an escape character, as in the second
  766.     occurrence in the command `\\', jspell doesn't ignore the
  767.     subsequent word---this is illustrated in the following example:
  768.  
  769.       We explain \fbox{gnus} in the next line. \\THis is ...
  770.  
  771.     jspell will ignore the command "fbox" but catch "THis" as a
  772.     misspelled word.
  773.  
  774.     Some TeX commands take arguments which need not be usual words.
  775.     For instance, in the text
  776.  
  777.       On this topic, readers are referred to \cite{Knu88a} ...
  778.  
  779.     we want the word "Knu" be ignored.  So jspell will ignore an
  780.     <word> appearing as \cite{<word>}.  Since <word> itself may
  781.     contain { and }, the exact rule is: ignore until the first right
  782.     brace that matches the first left brace after the command \cite,
  783.     where literal braces following the escape character \ are not
  784.     counted.
  785.  
  786.     Some TeX commands take more than one arguments.  jspell takes
  787.     this into account too: e.g., it ignores <word1> and <words2>
  788.     appearing as
  789.  
  790.       \newcommand{<word1>}{<word2>}
  791.  
  792.     Note that <word1> and/or <word2> can be rather long and may span
  793.     several lines.
  794.  
  795.     We call this number of arguments of a TeX command "arity". The
  796.     arity of \cite is 1, the arity of \newcommand is 2, and the
  797.     arity of \newenvironment is 3 etc.  In fact these arities of
  798.     TeX commands are user definable by editing the configuration
  799.     file "jsptex.cfg".  If a line in jsptex.cfg is
  800.  
  801.     <n>mycommand,
  802.  
  803.     where <n> is a numeral, then the arity of \mycommand will be set
  804.     to be <n>.  An exception to this is the <n> = 0 case.  This is
  805.     supplied to treat some commands like \input that has fuzzy
  806.     syntax.  (Both "\input <filename>" and "\input{<filename>}" are
  807.     accepted.)  Following are the the default arity/command pairs
  808.     defined in jsptex.cfg.
  809.  
  810.       0input
  811.       1include
  812.       1includeonly
  813.       1documentstyle
  814.       1newcounter
  815.       1hyphenation
  816.       1label
  817.       1ref
  818.       1bibitem
  819.       1pageref
  820.       1cite
  821.       1nocite
  822.       2newcommand
  823.       2renewcommand
  824.       2newtheorem
  825.       3newenvironment
  826.       3renewenvironment
  827.  
  828.     The commands \begin and \end are treated specially. The arity of
  829.     \begin is not fixed---normally it is 1, but sometimes it can be
  830.     2 as you can see in the following example:
  831.  
  832.       \begin{array}{llcr}
  833.  
  834.     We don't want to see jspell reporting "llcr" as a misspelled
  835.     word.  A similar situation arises when "array" in the example
  836.     above is replaced by one of "tabular", "figure" and "table".
  837.     Another thing that we should consider is that the commands
  838.     \begin and \end are used in setting on/off math ignore mode,
  839.     which is explained in detail in the following section.
  840.  
  841.     So these two special commands \begin and \end are hard-coded in
  842.     jspell and do not appear in the TeX command configuration file
  843.     jsptex.cfg.
  844.  
  845.     The number of commands that are accepted in jsptex.cfg can
  846.     be 32 at maximum.
  847.  
  848.  
  849.   II.2.4  Math ignore mode
  850.  
  851.     By default, jspell do not spell-check text in math mode which is
  852.     defined by one of the followings:
  853.  
  854.       $   <math mode>  $
  855.       $$  <math mode>  $$
  856.       \(  <math mode>  \)
  857.       \[  <math mode>  \]
  858.       \begin{math}       <math mode>    \end{math}
  859.       \begin{equations}  <math mode>    \end{equation}
  860.       \begin{eqnarray}   <math mode>    \end{eqnarray}
  861.       \begin{eqnarray*}  <math mode>    \end{eqnarray*}
  862.  
  863.     Math mode across multiple lines are supported of course.
  864.  
  865.     The reason why jspell ignores text in math mode is that many
  866.     nonwords may occur in math mode as in the following example:
  867.  
  868.       $$ {\sl XY}^2 + {\sl XZ}^2 = {\sl XZ}^2 $$
  869.  
  870.     On the other hand, we may want jspell not ignore the text in
  871.     math mode in the following example:
  872.  
  873.       $$ {\sl base}^2 + {\sl height}^2 = {\sl hypotenus}^2 $$
  874.  
  875.     (Note the typo "hypotenus" in math mode.)  If you prefer to
  876.     disable this math mode ignoring feature of jspell, then you can
  877.     do so by editing the configuration file jspell.cfg, the sixth
  878.     entry, to replace MathIgnore by MathNoIgnore.
  879.  
  880.     Alternatively math ignoring can be set/unset by the command line
  881.     switch -math[+-]
  882.  
  883.       jspell -math+ <filename>
  884.  
  885.     will force jspell to spell-check text in math mode and
  886.  
  887.       jspell -math- <filename>
  888.  
  889.     will force jspell to ignore text in math mode.  The switch
  890.     -math has the same effect as -math+.
  891.  
  892.  
  893.   II.2.5  Miscellanies
  894.  
  895.     TeX ignores any input after the percent symbol % until the end
  896.     of line.  So it could be desirable for jspell to follow this
  897.     after-%-ignoring convention of TeX. For example, we can think of
  898.     the following situation:
  899.  
  900.       Send \$25.00 to ...      % don't forget \ before $
  901.       Here is a tyypo ...
  902.  
  903.     If jspell gets no effect from %, then it will think that the
  904.     last character $ on the line containing % starts math mode, and
  905.     thus the word "tyypo" would not be caught as a misspelled word
  906.     (assuming that the math ignore mode is on).
  907.  
  908.     This after-%-ignore mode is set by the 10th entry of the
  909.     configuration file jspell.cfg:  if it is pIgnore, then jspell
  910.     ignores characters in a line after the first nonliteral
  911.     occurrence of %, and if it is pNoIgnore then % has no special
  912.     effect on the behavior of jspell.
  913.  
  914.     You can override this by the command line switch -percent[+-].
  915.     The switch -percent (or equivalently -percent+) set's the
  916.     after-%-ignore mode on regardless of what's been defined by the
  917.     configuration file jspell.cfg.  The switch -percent- is the
  918.     opposite of -percent+.
  919.  
  920.     We don't claim that jspell can handle all possible situations of
  921.     TeX appropriately.  For instance jspell doesn't understand the
  922.     following (unnatural) construction:
  923.  
  924.       ... the following displayed equation $% some comment
  925.       $ x^2 + y^2 = z^2.  $$ It is believed that above
  926.       argument was first invented by ...
  927.  
  928.     jspell thinks that "some comment" is in math mode and "It is
  929.     believed ..." is the beginning of displayed math mode, which is
  930.     absurd. So if you are determined to fool jspell, then it's
  931.     relatively easy to do so by using the comment character %---on
  932.     the other hand such a situation (that jspell is fooled) will
  933.     seldom occur unless you intentionally create that.
  934.  
  935.  
  936.   II.3  Running jspell, the spell checker
  937.  
  938.     This section describes the detail of the usage of the spell
  939.     checker jspell.  If you use jspell for the first time, then
  940.     perhaps the earlier section Test drive will be sufficient for
  941.     you.
  942.  
  943.   II.3.1  Overview
  944.  
  945.     To jspell-check an ASCII file <filename>, you first go to the
  946.     directory in which <filename> resides and then enter the command
  947.  
  948.       jspell [-options...] <filename>
  949.  
  950.     at the DOS prompt.  (<filename> may contain path. In this case
  951.     you don't have to go to the directory of <filename> of course.)
  952.  
  953.     The [-options...], which have been mentioned at least once in
  954.     earlier sections,  will be explained in detail in the next
  955.     section.
  956.  
  957.     In a typical situation of a jspell session, a misspelled word
  958.     <word> in <filename> (assuming that at least one misspelled word
  959.     exists) is highlighted and shown together with the surrounding
  960.     text in the 78x11 sized box occupying the upper half of the
  961.     screen.  <word> is also displayed in the row at the middle of
  962.     the screen right below the upper box, namely the edit row. Also
  963.     the action of the user on the previous misspelled word is
  964.     displayed at the bottom of the screen (unless <word> is the
  965.     first misspelled word in <filename>).
  966.  
  967.     Words in the jspell's dictionary that are *close* to <word> are
  968.     displayed in the lower left box: i.e., the suggestion area.  Up
  969.     to 16 suggested words can be displayed. Under the "Numbered"
  970.     option (which is the default), the highlighted numeral n is
  971.     shown in front of the n-th suggested word.  (For n > 8, @m is
  972.     shown in place of n where m := n - 8.)  These numerals give us a
  973.     handy way of selecting a word from the list of the suggested
  974.     words. We will discuss this in detail in (Section II.3.4). You
  975.     may disable this Numbered option by editing the 9th entry of the
  976.     configuration file jspell.cfg to replace "Numbered" by
  977.     "NoNumbered".
  978.  
  979.     The limit L on the length of the suggested words is 40, which is
  980.     the same as the maximum length for legitimate words. But when
  981.     there are more than 8 suggested words, then this limit L reduces
  982.     to 17 under the Numbered option and 19 under the NoNumbered
  983.     option.
  984.  
  985.     The third box in the lower right part of the screen shows menu
  986.     buttons.  Each menu button contains exactly one uppercase
  987.     letter, which is highlighted (or inverse-video'ed for Laptop
  988.     color option).  This capitalized letter is the command key for
  989.     that menu. More on this in the next section.
  990.  
  991.     The time necessary for jspell to prepare a suggested words list
  992.     is normally less than a fraction of a second for usual 386
  993.     machines.  But for longer words (with length, say > 10) and
  994.     slower machines, it might take several seconds.  Sometimes,
  995.     immediately after a word is spotted, you may realize that it's
  996.     not really a typo, and you are going to ignore it or add to a
  997.     user dictionary. So, naturally, you don't want to waste time
  998.     waiting for jspell to finish the preparation of the suggested
  999.     words list. In this case, you can just go ahead and do the
  1000.     appropriate action by pressing a command key or clicking the
  1001.     left mouse button.  Then jspell will abort preparing the
  1002.     suggested words list and do the action immediately.
  1003.  
  1004.     Whenever a dialog box is displayed, waiting for a user action,
  1005.     pressing the ESC key or clicking the right mouse button has the
  1006.     same effect as choosing the "Cancel" option.
  1007.  
  1008.     At exit, jspell creates a backup file with the name <filename>.bak
  1009.     (assuming that the input file has filename <filename>.<ext>) if
  1010.     (and only if) the "BackUp" option is selected, which is
  1011.     set/unset by the 7th entry of the configuration file jspell.cfg.
  1012.     The backup file <filename>.bak is created in the same directory
  1013.     as the input file.
  1014.  
  1015.  
  1016.   II.3.2  Capitalization of words
  1017.  
  1018.     We define four types of words according to the capitalization
  1019.     as follows.  A word <word> has capitalization type:
  1020.  
  1021.       "no-cap" if no uppercase letter appears in <word>,
  1022.           (e.g., apple)
  1023.       "first-only-cap" if the first letter of <word> is the
  1024.           only uppercase letter appearing in <word>, (e.g., Berlin)
  1025.       "all-cap" if all letters of <word> are uppercase,
  1026.           (e.g., IBM)
  1027.       "oddly-cap" otherwise. (e.g., TeX)
  1028.  
  1029.     How jspell handles the capitalization is best explained
  1030.     through an example:
  1031.  
  1032.     ┌────────────────────┬──────────────────────┬──────────────────┐
  1033.     │ word in dictionary │ jspell recognizes    │  jspell spots    │
  1034.     ├────────────────────┼──────────────────────┼──────────────────┤
  1035.     │   apple            │ apple, Apple, APPLE  │  APple           │
  1036.     │   Berlin           │ Berlin, BERLIN       │  berlin, BerLin  │
  1037.     │   IBM              │ IBM                  │  ibm, Ibm, iBm   │
  1038.     │   TeX              │ TeX                  │  tex, Tex, TEX   │
  1039.     └────────────────────┴──────────────────────┴──────────────────┘
  1040.  
  1041.  
  1042.   II.3.3  Menu
  1043.  
  1044.     User action can be made by pressing a command key or clicking
  1045.     the left mouse button.  The location of the currently
  1046.     highlighted area, as well as the key pressed or mouse button
  1047.     clicked, affects the action. For instance, pressing the command
  1048.     key ENTER adds the spotted word <spotted.word> into the user
  1049.     dictionary <user.dic> if the menu button [Add to user.dic] is
  1050.     being highlighted at that moment, but replaces <spotted.word> by
  1051.     a suggested word <suggested.word> if the suggested word
  1052.     <suggested.word> is being highlighted. You can move the
  1053.     highlighted area by arrow keys.
  1054.  
  1055.     From now on,  "use the menu button <menubutton>" means "click
  1056.     the left mouse button on <menubutton> or press ENTER while
  1057.     <menubutton> is being highlighted".
  1058.  
  1059.     If you press a key that is not a command key or click a mouse
  1060.     button when the mouse location is irrelevant, then it will be
  1061.     silently ignored by jspell.
  1062.  
  1063.     Following are the list of actions that can be made by the user.
  1064.  
  1065.       Get help:  On-line help screen pops up if the command key
  1066.          F1 is pressed.  You can escape the help screen by
  1067.          hitting ESC or get the second level help screen by
  1068.          hitting F1 again. Clicking the right mouse button has
  1069.          the same effect as hitting ESC.
  1070.  
  1071.       Edit:  When the edit row is being highlighted, you can edit
  1072.          the spotted/highlighted word in the edit row.  You can type
  1073.          in any legal characters and special characters.  If you
  1074.          have a US-keyboard and wants to enter extended ASCII
  1075.          character, then type in the corresponding ASCII code using
  1076.          the numeric keys while holding down the Alt key: e.g., you
  1077.          may use Alt-129 for entering umlaut u.
  1078.             If you want to insert a space inside a spotted word,
  1079.          then use Shift-<space> instead of <space>. This is because
  1080.          <space> is a command key for [Ignore].
  1081.              You can toggle between the insert mode and the
  1082.          overstrike mode by hitting the INS key.  The cursor
  1083.          is a half-block in the insert mode and an underscore in the
  1084.          overstrike mode.
  1085.              The usual editing keys like LeftArrow, RightArrow,
  1086.          HOME, END, Backspace, DEL, Ctrl-Backspace, Ctrl-T work as
  1087.          expected. ESC key clears the edit row. If ESC is pressed
  1088.          while the edit row is empty, then it works as an [Ignore]
  1089.          key.
  1090.              You may move the cursor by clicking the left mouse
  1091.          button on the position you want. (This cursor movement by
  1092.          mouse clicking should work even when the edit row is not
  1093.          being highlighted.)
  1094.  
  1095.       Ignore:  You can ignore the currently spotted word by hitting
  1096.          Alt-I or <space>.  Alternatively, you may use the menu
  1097.          button [Ignore].
  1098.  
  1099.       Global ignore:  You can ignore the currently spotted word to
  1100.          the rest of the file by hitting Alt-G or Ctrl-<space>.
  1101.          Alternatively, you may use the menu button [iGnore all].
  1102.  
  1103.       Replace: Refer to (Section II.3.4).
  1104.  
  1105.       Global replace:  Refer to (Section II.3.4).
  1106.  
  1107.       Mark:  Sometimes you may not be sure whether the spotted word
  1108.          is misspelled or not, and you don't have a dictionary at
  1109.          hand.  In this case you can "mark" the word by hitting
  1110.          Alt-M.  Then the spotted word will be marked by appending
  1111.          "QQ" at the end.  Alternatively, you may use the menu
  1112.          button [Mark].  Later you can change this marked word
  1113.          appropriately using a text editor.
  1114.  
  1115.       Global mark:  You can mark the currently spotted word <word>
  1116.          and all the subsequent occurrences of <word> by pressing
  1117.          the key Alt-K.  Alternatively, you may use the menu button
  1118.          [marK all].
  1119.  
  1120.       Add the spotted word into the main user dictionary:
  1121.          Refer to (Section II.3.5).
  1122.  
  1123.       Add the spotted word into the file specific dictionary]
  1124.          Refer to (Section II.3.5).
  1125.  
  1126.       Undo:  You may undo your last action, which is always
  1127.          displayed at the bottom of the screen, by pressing Alt-U.
  1128.          Alternatively, you may use the menu button [Undo]. A window
  1129.          will pop-up asking you to choose one among the three
  1130.          options "Undo", "Cancel" or "Undo further", whose meanings
  1131.          should be obvious.  Up to 400 levels of undoing is allowed.
  1132.  
  1133.       Exit:  You may exit from jspell before finishing
  1134.          spell-checking the current input file by hitting Alt-X, or
  1135.          alternatively, by using the menu button [eXit].  A window
  1136.          will pop-up asking you to choose one among the three
  1137.          options:
  1138.  
  1139.            Yes        (save changes before exit), or
  1140.            No         (do not save changes and exit), or
  1141.            Cancel     (do not exit, and continue jspell).
  1142.  
  1143.          By "change" we mean any replacement of words and/or
  1144.          addition of words to user dictionaries (main user
  1145.          dictionary or file specific dictionary).
  1146.  
  1147.     Among these twelve possible user actions, some need more
  1148.     detailed explanations, which are given in the following two
  1149.     sections.
  1150.  
  1151.     When you are done with the last misspelled word in the input
  1152.     text file, jspell opens a dialog box asking you to choose "Exit"
  1153.     or "Cancel", thereby giving you a chance of undoing the last
  1154.     action. Also jspell shows some information about the session
  1155.     such as the number of words processed, number of words added to
  1156.     the main user dictionary etc.
  1157.  
  1158.  
  1159.   II.3.4  [Replace] and [rePlace all]
  1160.  
  1161.     There are various ways of replacing the spotted word <word> by a
  1162.     correctly spelled word.
  1163.  
  1164.     First, if you want to replace <word> by the word in the edit
  1165.     row, then you may do so, by
  1166.  
  1167.       (i) pressing ENTER or Alt-R  while the edit row is
  1168.           highlighted, or
  1169.       (ii) use the menu button [Replace].
  1170.  
  1171.     (If the word in the edit row is the same as the spotted word,
  1172.     then jspell actually [Ignore]s instead of [Replace]ing.)
  1173.  
  1174.     Second, if you want to replace <word> by one of the suggested
  1175.     words, then you may do so by one of the following three methods:
  1176.  
  1177.       (i) hitting the highlighted (or Alt'ed and highlighted)
  1178.           numeral in front of the wanted word, or
  1179.       (ii) highlight the wanted word and press ENTER or Alt-R or
  1180.           click on the menu button [Replace], or
  1181.       (iii) just click on the wanted word in the suggestion area.
  1182.  
  1183.     The menu [rePlace all] is just the global version of [Replace].
  1184.     Note note that global replacement by a suggested word can be
  1185.     done by clicking mouse on that word while pressing down the Ctrl
  1186.     key.
  1187.  
  1188.     Things get a little bit complicated if the "correct word" you
  1189.     want to replace is illegitimate or not in the dictionary.  In
  1190.     the first case jspell asks the user confirmation.  In the latter
  1191.     case, jspell opens a pop-up window asking you to choose one of
  1192.     the following:
  1193.  
  1194.       Add to "<main user dic>" and Replace, or
  1195.       Add to "<file specific dic>" and Replace, or
  1196.       Ignore and Replace, or
  1197.       Cancel.
  1198.  
  1199.     The meanings of these four options should be obvious.  Such a
  1200.     "composite action" can be undone by user's request, like any
  1201.     other actions, of course.
  1202.  
  1203.  
  1204.   II.3.5  Adding spotted word to user dictionaries
  1205.  
  1206.     When the user wants to add a new word to the dictionary, the
  1207.     user has the option of choosing the main user dictionary or the
  1208.     file specific user dictionary.  You may do these actions by the
  1209.     menu [Add to <main user dic>] or [add To <file specific> dic]
  1210.     whichever is appropriate.
  1211.  
  1212.     If the spotted word has capitalization type "first-only-cap" or
  1213.     "all-cap", then jspell asks the user to choose the actual
  1214.     capitalization type to be put into the dictionary.  Note that an
  1215.     "oddly-cap"ped word, as well as a "no-cap"ped word, is directly
  1216.     put into the dictionary without such a confirmation step.
  1217.  
  1218.     If a word with the capitalization type first-only-cap or all-cap
  1219.     is spotted and you want to add this word to a user dictionary
  1220.     (main user or file specific) without altering the capitalization
  1221.     type, then you probably don't want be bothered by the dialog box
  1222.     which asks you to choose the actual capitalization type.  In
  1223.     this case you may skip the confirmation step by doing the action
  1224.     (either by command key or by mouse click) while pressing down
  1225.     the Shift key. (Recall that the Shift key has something to do
  1226.     with the upper/lower case of letters.)
  1227.  
  1228.     If the main user dictionary is initially empty but some words
  1229.     are added in there during a jspell session, then a fresh main
  1230.     user dictionary is created in the jspell directory (assuming
  1231.     that the file/path-name is allowed by DOS). If the file specific
  1232.     dictionary is initially empty but some words are added in there
  1233.     during a jspell session, then a fresh file specific dictionary
  1234.     is created in the current directory (with a similar assumption
  1235.     on the file/path-name).
  1236.  
  1237.  
  1238.   II.3,6  Miscellanies
  1239.  
  1240.     One of the first things that jspell does at the beginning of a
  1241.     session is to check whether the input file is really an ASCII
  1242.     text file.  jspell does this ASCII-test by examining the first
  1243.     1024 bytes of the input file.  If the NULL character exists in
  1244.     this beginning part of the input file, then jspell exits with an
  1245.     appropriate error message.
  1246.  
  1247.     There are certain restrictions to the input file, say
  1248.     <filename>.  If <filename> is read-only (i.e., not rewritable),
  1249.     then jspell exits with the message
  1250.  
  1251.       "<filename>" is READ_ONLY
  1252.  
  1253.     This is because the changes made by jspell cannot be saved in
  1254.     the read-only file <filename>.  A similar test is done on
  1255.     the main user dictionary and the file specific user dictionary.
  1256.  
  1257.     When the backup option is set, and if the input file has
  1258.     extension ".bak", then there is no way to make any change to the
  1259.     input file and at the same time keep the backup copy of the
  1260.     original with the filename <filename>.bak.  In this situation,
  1261.     you'll be warned: that is, you'll have the option of disabling
  1262.     the backup option for the session or just abort at that moment.
  1263.  
  1264.     jspell refuses to work on a file whose filename extension is
  1265.     ".dic".
  1266.  
  1267.     jspell needs about 400K bytes of free memory.  The rest of the
  1268.     memory is used as input file buffer.   If the input file size is
  1269.     so large that the input file buffer gets full while running
  1270.     jspell, then the overspilt text is saved to the disk.  You can't
  1271.     undo an action made on this already-saved part of the text.  But
  1272.     even if the buffer gets full and some part of the text is saved
  1273.     to the disk, if you abort jspell by the menu [eXit] and choose
  1274.     not to save the changes made so far, then it'll work without any
  1275.     problem: i.e., the input file remains intact.
  1276.  
  1277.  
  1278.   II.4  Configuration files and command line options
  1279.  
  1280.     jspell uses two configuration files, jspell.cfg and jsptex.cfg.
  1281.     Both are plain ASCII text files that can be freely edited by any
  1282.     text editor. The configuration files should exist in the jspell
  1283.     directory. But the current working directory is first searched
  1284.     as usual.
  1285.  
  1286.     In each lines of these two configuration files, if a space
  1287.     character or the TeX comment character % is encountered then the
  1288.     rest of the line is ignored.  In particular, if a line starts
  1289.     with a space of %, then the whole line is ignored.
  1290.  
  1291.     If any illegitimate entry is found in a configuration file, then
  1292.     jspell exists with an error message showing where it has
  1293.     happened.  It should be stressed that the order of the entries
  1294.     in the configurations files is important.  Be careful not to
  1295.     mess this up.
  1296.  
  1297.     jsptex.cfg has been explained in detail in (Section II.2.3).
  1298.     Hence we'll only look at jspell.cfg in this section.  A typical
  1299.     jspell.cfg file is shown below:
  1300.  
  1301.       AT           %1.  keyboard (AT or XT)
  1302.       VGA          %2.  video card  (CGA,EGA,VGA or Hercules)
  1303.       Enhanced     %3.  color option (Standard, Enhanced, Monochrome
  1304.                                       or Laptop)
  1305.       10           %4.  (0-99) (pop-up window explosion speed,
  1306.       delaying interval)
  1307.       *.dic *.txt  %5.  dictionary filenames pattern
  1308.       MathIgnore   %6.  MathIgnore or MathNoIgnore
  1309.                         (math ignore in TeX)
  1310.       BackUp       %7.  BackUp or NoBackUp
  1311.       8            %8.  (1-16) TabSize
  1312.       Numbered     %9.  Numbered or NoNumbered (suggested word list)
  1313.       pNoIgnore    %10. pIgnore or pNoIgnore  ('%' ignore in TeX)
  1314.       2            %11. (2-9) Minimum word length
  1315.       base.dic     %12. default base dictionary
  1316.       user.dic     %13. default main user dictionary
  1317.  
  1318.     The first three entries have already been explained fully in
  1319.     (Section I.4).
  1320.  
  1321.     The fourth entry is the delay interval (in milliseconds) of the
  1322.     explosion speed of pop-up windows.  It must be an integer in
  1323.     between 0 and 99.  Smaller value results in faster explosion.
  1324.  
  1325.     The fifth entry is for dictman only, and hence will not be
  1326.     explained here.
  1327.  
  1328.     The sixth entry is used to set/unset the math ignore mode. It
  1329.     should be either MathIgnore or MathNoIgnore.  This has effect
  1330.     only when the TeX mode is used.
  1331.  
  1332.     The seventh entry is used to set/unset the backup mode.  It
  1333.     should be either BackUp or NoBackUp.  If the backup mode is set,
  1334.     then a jspell leaves a backup <filename>.bak of the original
  1335.     input file <filename>.<ext>.  Otherwise no backup file will be
  1336.     left.  This has no effect on dictman.
  1337.  
  1338.     The eighth entry is the tab size.  If the input text file
  1339.     contains the tab characters (ASCII code 9), then it is expanded
  1340.     to n spaces where n is the number specified by this entry.  We
  1341.     require 1 <= n <= 16. This has no effect on dictman.
  1342.  
  1343.     If the ninth entry is Numbered, then jspell displays a
  1344.     highlighted numeral in front of each suggest word. (The numeral
  1345.     can be used to choose the corresponding word to replace the
  1346.     spotted word.) In case the mouse is installed, then you might
  1347.     want not to display those numerals.  Replace Numbered to
  1348.     NoNumbered to this end.  This has no effect on dictman.
  1349.  
  1350.     The tenth entry is about the after-%-ignoring feature in TeX. It
  1351.     should be either "pIgnore" or "pNoIgnore".  This has effect only
  1352.     when the TeX-mode is used.  If you choose pIgnore, then jspell
  1353.     ignores everything in a line after the first encounter of a
  1354.     nonliteral %.  Choosing pNoIgnore disables this feature.
  1355.  
  1356.     The eleventh entry sets the minimum word length MinWordLen. Any
  1357.     sequence of characters with length less than this variable
  1358.     MinWordLen will not be considered as a word by jspell and
  1359.     dictman. MinWordLen must take value in between 2 and 9.
  1360.  
  1361.     The last two entries are the default names of the base
  1362.     dictionary and the main user dictionary (in this order).
  1363.  
  1364.     Many of the configuration variables above can be overridden by
  1365.     command line switches as follows. The default base dictionary
  1366.     name is overridden by the switch -bd:
  1367.  
  1368.       jspell -bd <base dictionary> ...
  1369.  
  1370.     The main user dictionary name is overridden by the switch -ud:
  1371.  
  1372.       jspell -ud <main user dictionary> ...
  1373.  
  1374.     MinWordLen is overridden by the switch -len:
  1375.  
  1376.       jspell -len n ...,
  1377.  
  1378.     where 2 <= n <= 9.
  1379.  
  1380.     Math ignore mode is overridden by the switch -math[+-]: -math
  1381.     (or equivalently -math+) sets the math ignore mode on and -math-
  1382.     sets the math ignore mode off.
  1383.  
  1384.     After-%-ignore mode is similarly overridden by the switch
  1385.     -percent[+-].
  1386.  
  1387.     There are two more switches available.  One is used to override
  1388.     the default file dictionary name.  If the input file name is
  1389.     <filename>.<ext>, then the default file dictionary name is
  1390.     <filename}.dic.  But you can override this by the switch -fd:
  1391.  
  1392.       jspell -fd <file dictionary> ...
  1393.  
  1394.     The other is used to override the TeX-mode, which is set on/off
  1395.     if the filename extension is/(is not) ".tex".  The switch -t[+-]
  1396.     is used to override this convention:
  1397.  
  1398.       jspell -t <filename>.<ext>
  1399.  
  1400.     to force TeX-mode on the input file <filename>.<ext> and
  1401.  
  1402.       jspell -t- <filename>.tex
  1403.  
  1404.     to force non-TeX-mode on the input file <filename>.tex.
  1405.     -t+ has the same effect as -t.
  1406.  
  1407.     The list of all these 7 switches available can be displayed by
  1408.     entering the command
  1409.  
  1410.       jspell
  1411.  
  1412.     with no command line argument, as explained in the Test drive
  1413.     section.
  1414.  
  1415.     More than one switches can be used in any order: for instance,
  1416.     the command
  1417.  
  1418.       jspell -t -bd german.dic -len 3 text.1
  1419.  
  1420.     or equivalently,
  1421.  
  1422.       jspell -bd german.dic -len 3 -t text.1
  1423.  
  1424.     spell-checks the input file text.1 with TeX-mode on, MinWordLen
  1425.     = 3 and base dictionary = german.dic.
  1426.  
  1427.  
  1428.   II.5  Usage tips
  1429.  
  1430.     Each user dictionary can hold fairly large number of words---the
  1431.     limit is 5,000.  But it's a good idea to use user dictionaries
  1432.     only for technical words (used in various disciplines of science
  1433.     such as mathematics, medicine, psychology etc.) or personal
  1434.     words (like your friend's names). Words with general nature
  1435.     should be merged to a base dictionary using the accompanying
  1436.     dictionary manager dictman.  This is because there is a
  1437.     substantial difference in the speeds of loading base
  1438.     dictionaries and user dictionaries---base dictionaries are
  1439.     loaded into computer memory much faster.  (This has been
  1440.     discussed in (Section II.1.2).  Note that once the dictionaries
  1441.     are loaded into computer memory, there is no speed penalty for
  1442.     having lots of words from user dictionaries.) Also you can get
  1443.     significant space savings, both in disk and in the computer
  1444.     memory, by this dictionary merging.
  1445.  
  1446.     The rest of this section is devoted for TeX-mode.
  1447.  
  1448.     When spell-checking a TeX document (with lots of mathematics),
  1449.     it's in general better to run TeX before jspell.  For instance,
  1450.     if you ended a math mode started by \begin{eqnarray} with
  1451.     \end{eqnarray*} by mistake, then jspell will ignore all the rest
  1452.     of the file starting from \begin{eqnarray}.  Such a pitfall can
  1453.     be avoided by spell-checking only TeX-correct files.
  1454.  
  1455.     Another hard-to-catch pitfall may occur when you use the TeX
  1456.     commands  in the verbatim mode.  This manual uses tons of such
  1457.     constructions.
  1458.  
  1459.     Sometimes we need to use a misspelled word in a document.  For
  1460.     instance, this manual used the misspelled word "teh" several
  1461.     times.  But it is not a good idea to put this word "teh" in
  1462.     the file dictionary because that would let genuine typos of
  1463.     "teh" unspotted by jspell.  One way to overcome such a
  1464.     problem is to use a dummy TeX-command with arity 1: that is,
  1465.     define a command \dummy by
  1466.  
  1467.       \newcommand{\dummy}[1]{#1}
  1468.  
  1469.     Then put a line
  1470.  
  1471.       1dummy
  1472.  
  1473.     in the TeX configuration file jsptex.cfg.  Then whenever a
  1474.     misspelled word, say "teh", needs to be used in the document,
  1475.     use \dummy{teh}.  This command \dummy can be conveniently used
  1476.     in ignoring parts of the input text in other situations---for
  1477.     instance, a program listing in verbatim mode.
  1478.  
  1479.     Even if it is TeX-correct, there is some possibility that jspell
  1480.     is fooled: for instance, TeX doesn't complain anything (and
  1481.     produces the correct .dvi file) if you begin a math mode by $
  1482.     and end it by \).  But jspell is less tolerant on this kind of
  1483.     asymmetry.  Other ways of fooling jspell by use of the TeX
  1484.     comment character % has been discussed already in (Section II.2.5).
  1485. Chapter III.  User's guide for dictman ---------------------------
  1486.  
  1487.   III.1.  Introduction
  1488.  
  1489.     Entering the command
  1490.  
  1491.       dictman ?
  1492.  
  1493.     at the DOS prompt displays the following on the screen:
  1494.  
  1495.       Usage: dictman [-options...]
  1496.                option = -len n    (2 <= n <= 9)
  1497.                         -t[+-]
  1498.                         -math[+-]
  1499.                         -percent[+-]
  1500.  
  1501.     Note that dictman does not accept any input file as a command
  1502.     line argument.
  1503.  
  1504.     Each command line switch has the same function as in jspell:
  1505.     i.e., -len n is used to set the minimum value 2 <= n <= 9 for
  1506.     the legitimate word length, -t[+-] is to force TeX/non-TeX-mode,
  1507.     -math[+-] to force math-ignore/math-no-ignore mode and
  1508.     -percent[+-] to force after-%-ignore/ after-%-no-ignore mode.
  1509.     This should be enough explanation on the command line switches
  1510.     for dictman.
  1511.  
  1512.     An important difference between dictman and jspell exists in the
  1513.     way the TeX-mode is selected (in case it is not forced by the
  1514.     command line switch -t[+-]).  In jspell the default mode was
  1515.     determined by the extension of the input file name---the
  1516.     TeX-mode is selected if the extension is .tex and not selected
  1517.     otherwise.  In dictman, the TeX-mode is always assumed unless
  1518.     the contrary is forced by the switch -t-. This is because the
  1519.     name of a dictionary file containing words using TeX constructs,
  1520.     such as \", \oe etc., has no compelling reason to have the
  1521.     extension .tex.  Moreover, even if the non-TeX-mode is selected
  1522.     by the switch -t-, it has effect only on the menu item
  1523.     [UserDic][Read].
  1524.  
  1525.     dictman shares the two configuration files jspell.cfg, jsptex.cfg
  1526.     and the help message file jspell.hlp with jspell.  As was
  1527.     explained before, some of those configuration variables have no
  1528.     effect on dictman, and conversely, one of the variables, namely
  1529.     the fifth one, has effect on dictman only.  We will be back to
  1530.     this topic in (Section III.3).
  1531.  
  1532.     dictman provides us with pull-down menu and context sensitive
  1533.     help system.  Left mouse button is normally used in clicking and
  1534.     dragging while right mouse button is normally used for
  1535.     canceling.  Arrow keys and the usual command keys such as HOME,
  1536.     END, ENTER, ESC behave as expected.  Help key is F1 of course.
  1537.  
  1538.     If you need help on a particular menu item, then highlight that
  1539.     item and hit F1.  If you use mouse, then hit F1 while the (left)
  1540.     button is being pressed on the menu item.
  1541.  
  1542.     Throughout this manual, a menu item of dictman will be denoted in
  1543.     the following format:
  1544.  
  1545.       [first level][second level]
  1546.  
  1547.     For example, [File][Clear Screen] menu, which is used to clear
  1548.     the main display area, can be shown by pulling down the first
  1549.     level menu item [File].
  1550.  
  1551.     The main display area saves the previous 200 lines---you can
  1552.     scroll back and forth using the keys Ctrl-UpArrow,
  1553.     Ctrl-DownArrow, PageUp, PageDown, Ctrl-PageUp and Ctrl-PageDown.
  1554.     (If you use XT-keyboard, then use Shift-UpArrow and
  1555.     Shift-DownArrow instead of Ctrl-UpArrow and Ctrl-DownArrow
  1556.     respectively.)
  1557.  
  1558.     Regular expressions are used frequently in dictman. Our
  1559.     convention on regular expressions are as follows:
  1560.  
  1561.     * matches any string,
  1562.     ? matches any single letter,
  1563.     [<string>] matches a single letter as in the
  1564.         following examples:
  1565.         [arD] matches `a', `r' and `D'.
  1566.         [p-s] matches `p', `q', `r' and `s'.
  1567.         [3-5p-sXQa] matches `3', `4', `5' `p', `q', `r', `s',
  1568.                             `X', `Q' and `a'.
  1569.     \ is the escape character: for instance, the regular expression
  1570.     \*[a-c\-]?\\ matches any string of length 4 that starts with
  1571.     `*', ends with `\' and has `a', `b', `c' or `-' as the 2nd
  1572.     character.
  1573.  
  1574.     Note that we use above convention for filenames too.  This is a
  1575.     little bit different from the usual DOS file name wild card
  1576.     convention.  For instance the regular expression `*' matches all
  1577.     files in dictman, but it only matches files with no extension in
  1578.     usual DOS environments.
  1579.  
  1580.  
  1581.   III.2 Running dictman, the dictionary manager
  1582.  
  1583.     In this section, all the menu items are explained.  Some of the
  1584.     more important items are briefly explained here and then
  1585.     revisited (with details) in later sections.
  1586.  
  1587.     For the basic (but technical) definitions of words and
  1588.     dictionaries, the readers are referred to (Section II.1).
  1589.  
  1590.     When dictman starts, you will see five first level menu items:
  1591.     [File], [BaseDic], [UserDic], [Utilities] and [Help=F1].  We
  1592.     look at each of these five in the following subsections.
  1593.  
  1594.   III.2.1. [File]  menus
  1595.  
  1596.     Under this menu File], there are 4 second level menu items:
  1597.     [Directory], [Clear Screen], [Save Screen] and [Exit=Alt-X].
  1598.     These are the utilities related to files or the main display
  1599.     area.
  1600.  
  1601.     [Directory]  This menu item displays the directory listing of
  1602.       files x such that
  1603.         (i) the filename of x matches the current dictionary name
  1604.             pattern, and
  1605.         (ii) x exists in the current directory or in the jspell
  1606.             directory.
  1607.       You'll get prompted to
  1608.       enter the dictionary name pattern in a dialog box.  The default
  1609.       pattern is given in the configuration file jspell.cfg as the 5th
  1610.       entry.  More than one regular expressions separated by spaces are
  1611.       allowed in this pattern.
  1612.  
  1613.     [Clear Screen]  Clears the main display area.
  1614.  
  1615.     [Save Screen]  Saves the current content of the main display
  1616.       area to a file "snapshot.0".  If snapshot.<n> exists already,
  1617.       then it is saved as snapshot.<n+1>, where n = 0, ... 8.   If
  1618.       you execute this menu item when n reached 9, then it is
  1619.       written over snapshot.0 with a warning message.
  1620.  
  1621.     [Exit=Alt-X]  Exits dictman.  Asks whether to save any change
  1622.       made during the session.
  1623.  
  1624.  
  1625.   III.2.2.  [BaseDic] menus
  1626.  
  1627.     Under this menu [BaseDic], there are 10 second level menu items:
  1628.     [Load], [Save], [Insert a word], [Delete a word], [Delete
  1629.     Words], [Count], [Find], [Clear], [Optimize] and [Expand].
  1630.     These are the utilities related to base dictionaries.
  1631.  
  1632.       [Load]  Loads a base dictionary into the computer memory.
  1633.         Current content of the combined base/user dictionary in the
  1634.         memory is erased. You are prompted to enter the filename.
  1635.         The default filename is given in the configuration file
  1636.         jspell.cfg as the 12th entry.  The default directory
  1637.         conforms to the directory searching rule as explained in
  1638.         (Section II.1.3).  Gives warning if the dictionary file is
  1639.         read-only.
  1640.  
  1641.       [Save]  Saves the current base dictionary in the memory to the
  1642.         disk.  You'll get prompted to enter the file name.  If the
  1643.         dictionary file is read-only, then gives warning and aborts
  1644.         the save action.
  1645.  
  1646.       [Insert a word]  Inserts a word to the base dictionary. You'll
  1647.         get prompted to enter the word.  The TeX-mode is always
  1648.         assumed.
  1649.  
  1650.       [Delete a word]  Deletes a single word from the base
  1651.         dictionary. You'll get prompted to enter the word.  The
  1652.         TeX-mode is always assumed.
  1653.  
  1654.       [Delete Words]  Deletes all words in a file <filename> from
  1655.         the base dictionary.  You'll get prompted to enter the
  1656.         <filename>.  The file <filename> must contain one word per
  1657.         each line, because only the first legitimate word in a line
  1658.         is read. The user dictionary need be empty to execute this
  1659.         menu item. The TeX-mode is always assumed.
  1660.  
  1661.       [Count] Counts the number of words in the base dictionary that
  1662.         match the input <pattern>.  You'll get prompted to enter a
  1663.         regular expression for this <pattern>.
  1664.  
  1665.       [Find]  Finds (and displays) the words in the base dictionary
  1666.         that match the input <pattern>.  You'll get prompted to
  1667.         enter a regular expression for this <pattern>.  Up to 80
  1668.         words can be displayed.
  1669.  
  1670.       [Clear] Clears the base dictionary from the computer memory.
  1671.  
  1672.       [Optimize]  Using common prefix/suffixes, optimizes the base
  1673.         dictionary. For instance, "wanted" is absorbed to "want"
  1674.         (assuming that both words exists).  Substantial space saving
  1675.         is obtained by doing this. (For English only in the current
  1676.         version.)  The user dictionary need be empty to execute this
  1677.         menu item.
  1678.  
  1679.       [Expand]  Write the entire content of the base dictionary in
  1680.         the computer memory to a text file, one word per each line,
  1681.         sorted alphabetically.  You'll get prompted to enter the
  1682.         file name.
  1683.  
  1684.  
  1685.   III.2.3.  [UserDic] menus
  1686.  
  1687.     Under this menu [UserDic], there are 7 second level menu items:
  1688.     [Read], [Save], [Count], [Find], [Clear] and [Merge to BaseDic].
  1689.     These are the utilities related to user dictionaries.
  1690.  
  1691.     [Read]  Reads a text file and inserts all new legitimate words
  1692.       in it, that are NOT already in the combined base/user
  1693.       dictionary, into the user dictionary.  Existing data are not
  1694.       cleared.  You'll get prompted to enter the file name. Warns if
  1695.       the file is read-only.  The TeX-mode is assumed unless the
  1696.       contrary is forced by the command line switch -t-. Since a
  1697.       user dictionary can hold at most 5,000 words, all words in the
  1698.       user dictionary are automatically moved to the base dictionary
  1699.       each time the user dictionary gets full (i.e., reaches the
  1700.       5,000 word limit).  So, for instance, if 11,200 words are read
  1701.       from a text file using this menu item, then 10,000 words will
  1702.       be read into the base dictionary and the remaining 1,200 words
  1703.       will be read into the user dictionary .
  1704.  
  1705.     [Save]  Saves the user dictionary in the computer memory to a
  1706.       disk file. You'll get prompted to enter the file name.  If the
  1707.       file is read-only, then gives warning and aborts the save
  1708.       action.
  1709.  
  1710.     [Count]  Counts the number of words in the user dictionary that
  1711.        match the input <pattern>.  You'll get prompted to enter a
  1712.        regular expression for this <pattern>.
  1713.  
  1714.     [Find]  Finds (and displays) the words in the user dictionary
  1715.        that match the input <pattern>.  You'll get prompted to enter
  1716.        a regular expression for this <pattern>. Up to 80 words can
  1717.        be displayed.
  1718.  
  1719.     [Clear]  Clears the user dictionary from the computer memory.
  1720.  
  1721.     [Merge to BaseDic]  Merges (i.e., moves) all words from the user
  1722.        dictionary to the base dictionary.  Normally, you should
  1723.        execute  the menu item [BaseDic][Optimize] right after this.
  1724.  
  1725.  
  1726.   III.2.4.  [Utilities] menus
  1727.  
  1728.     Under this menu [Utilities], there are 5 second level menu
  1729.     items:  [Legal Characters], [Legitimacy], [Count], [Find] and
  1730.     [Clear].  These are the utilities related to the combined
  1731.     base/user dictionaries.
  1732.  
  1733.     [Legal Characters]  Prints all the characters (legal and/or
  1734.        special), with their ASCII codes, that can be used in words.
  1735.  
  1736.     [Legitimacy]  Tests whether a word is legitimate.  You'll get
  1737.         prompted to enter the word.  The TeX-mode is always assumed.
  1738.  
  1739.     [Count]  Counts the number of words in the combined base/user
  1740.         dictionary that match the input <pattern>.  You'll get
  1741.         prompted to enter a regular expression for this <pattern>.
  1742.  
  1743.     [Find]  Finds (and displays) the words in the combined base/user
  1744.        dictionary that match the input <pattern>. You'll get
  1745.        prompted to enter a regular expression for this <pattern>.
  1746.        Up to 80 words can be displayed.
  1747.  
  1748.     [Clear]  Clears the combined base/user dictionary from the
  1749.       computer memory.
  1750.  
  1751.  
  1752.   III.2.5.  [Help=F1] menus
  1753.  
  1754.     Under this menu [Help=F1], there are 5 second level menu items:
  1755.     [About], [Getting Help], [Keyboard & Mouse], [Configuration] and
  1756.     [Manual].  These are the on-line help messages of dictman.
  1757.  
  1758.     [About]  About dictman.
  1759.  
  1760.     [Getting Help]  How to get on-line help.
  1761.  
  1762.     [Keyboard & Mouse]  Explains the basic usage of the keyboard and
  1763.        the mouse in dictman.
  1764.  
  1765.     [Configuration]  Some information on hardware compatibility and
  1766.        configuration.
  1767.  
  1768.     [Manual] A short manual of dictman.
  1769.  
  1770.  
  1771.   III.3.  Dictionary maintenance
  1772.  
  1773.   III.3.1.  Merging user dictionary to base dictionary
  1774.  
  1775.     Although each user dictionary can hold up to 5,000 words, it's a
  1776.     good idea to keep the size of a user dictionary far less than
  1777.     this limit.  The reason is two-fold: first, dictionary loading
  1778.     of base dictionary is several times faster than that of user
  1779.     dictionary. Second, base dictionary is more space efficient than
  1780.     user dictionary. This is due to the inherent structural
  1781.     difference between the two types of dictionaries.  Base
  1782.     dictionary is built to be efficient in space and time.  User
  1783.     dictionary is built for easy maintenance---it can be managed by
  1784.     direct editing by any text editor.
  1785.  
  1786.     When jspell is used over a network, several users may share the
  1787.     same base dictionary.  So it may not be always the best to merge
  1788.     all words in all user dictionaries to the base dictionary.  The
  1789.     rule of thumb is that words with general nature should be merged
  1790.     to the base dictionary and words with personal or special nature
  1791.     (e.g., friends' names or technical jargons) should be kept in
  1792.     user dictionaries.
  1793.  
  1794.     Normally, only one base dictionary should be sufficient for a
  1795.     language.  For instance, american.dic, british.dic, german.dic,
  1796.     french.dic etc.
  1797.  
  1798.     ** An example of dictionary merging procedure:  Suppose that we
  1799.     want to merge all words of the main user dictionary user.dic to
  1800.     the base dictionary base.dic.  In any directory, start dictman
  1801.     by the command
  1802.  
  1803.       dictman
  1804.  
  1805.     Load the base dictionary by the menu [BaseDic][Load]. Then read
  1806.     the user dictionary by the menu [UserDic][Read].  Be careful to
  1807.     check the full pathname of the dictionary files. Merge the user
  1808.     dictionary to the base dictionary by the menu [UserDic][Merge to
  1809.     BaseDic].  Now the user dictionary will be empty because all
  1810.     words have been moved to the base dictionary. Then optimize the
  1811.     base dictionary by the menu [BaseDic][Optimize].
  1812.  
  1813.     Finally save the base dictionary by the menu [BaseDic][Save]. At
  1814.     this point the user dictionary file still exists in the disk.
  1815.     Delete the user dictionary by a DOS command (after you exit from
  1816.     dictman). (If you want to keep the old user dictionary file,
  1817.     then rename user.dic to another, say userold.dic).
  1818.  
  1819.  
  1820.   III.3.2  Deleting words from a base dictionary
  1821.  
  1822.     You may want to delete a word from a base dictionary for various
  1823.     reasons.  The obvious situation is that you found a misspelled
  1824.     word in your base dictionary.  No matter how you are cautious,
  1825.     some words in most user dictionaries (or base dictionaries after
  1826.     merging) are misspelled.  (Typical public domain word lists
  1827.     contain several misspelled words in every thousand words.  Spell
  1828.     checkers included in leading commercial word processors have
  1829.     fewer misspelled words but not perfect.)
  1830.  
  1831.     Also it may happen that you want to delete a correct-spelled
  1832.     word from your base dictionary.  "abut" and "manger" are
  1833.     examples of such words.  They are more likely to be typos of
  1834.     "about" and "manager" respectively.
  1835.  
  1836.     There are two menu items in dictman that are used in deleting
  1837.     words.  One is [BaseDic][Delete a word] and the other is
  1838.     [BaseDic][Delete Words].  Using the first, you can delete a word
  1839.     that you type in at the prompt.  Using the second, you can
  1840.     delete a list of words saved in a text file, one word per line.
  1841.     If, for some reason, you have a to-be-deleted-words file that
  1842.     contains more than one word per line, then use the menus
  1843.     [UserDic][Read] followed by [UserDic][Save] to obtain a
  1844.     one-word-per-line text file.  (Incidentally, the resulting file
  1845.     will be alphabetically sorted.)
  1846.  
  1847.  
  1848.   III.3.3.  Building up your own base dictionary
  1849.  
  1850.     This section is about building up a base dictionary starting
  1851.     from scratch.  You will definitely need to do this if you use
  1852.     any language other than English (in fact, American English).
  1853.     Normally you will need two steps in doing this:
  1854.  
  1855.     (i) Prepare a word list.
  1856.     (ii) Build a base dictionary from the word list.
  1857.  
  1858.     The easiest way to prepare a word list is to use an already
  1859.     compiled list of words.  It should be not too difficult to
  1860.     obtain a public domain word list by anonymous FTP.  The drawback
  1861.     of this method is that such a list usually contains a lot of
  1862.     misspelled words.
  1863.  
  1864.     A harder method is to type each and every word appearing in a
  1865.     well-known dictionary yourself.  Not recommended---very time
  1866.     consuming and unreliable (i.e., lots of typos).
  1867.  
  1868.     Here is a lazy way: first prepare a short list of very
  1869.     frequently used words.  (In English, words such as "the", "of",
  1870.     "to", "this", "that", "be", "is", "are", "go", "come" ... may be
  1871.     used.) You build a small base dictionary consisting of these
  1872.     words as explained in (Section III.3.1).  Then you just do
  1873.     spell-checking using this tiny base dictionary, collecting new
  1874.     words in your main user dictionary each time you use jspell.
  1875.     When the main user dictionary gets large, say > 500 words, then
  1876.     merge it to the base dictionary.
  1877.  
  1878.     Since an ordinary person uses less than 3,000 words excluding
  1879.     technical words in his/her specialization, your base dictionary
  1880.     will soon get stabilized (i.e., no fuss of adding too many words
  1881.     in a single spell-check session).  (The number of words in the
  1882.     King James Version Bible is less than 13,000 despite the fact
  1883.     that it contains so many geographical and personal names.)
  1884.  
  1885.     If you are going to spell-check files that are prepared by
  1886.     yourself only, then this lazy method is not bad. You will have
  1887.     the advantage of having a compact (and hence fast loading)
  1888.     dictionary.  So this method is recommended for users of old
  1889.     XT-computers.
  1890.  
  1891.     Another good method is to use other available spell checkers.
  1892.     You first grab tons of text files. (Well, 10 Meg should be
  1893.     sufficient. Other than your own documents, Usenet is an
  1894.     excellent source of such text files in your specialization
  1895.     field.)  Using the method in (Section III.3.1), you build a base
  1896.     dictionary, which is very likely to contain lots of misspelled
  1897.     words.  Then get an ASCII text file, say <mywords> consisting of
  1898.     the words in the base dictionary using the menu [BaseDic][Expand].
  1899.     (The reason why we are not using user dictionary instead is
  1900.     because of the limit of 5,000 words for user dictionaries.) Then
  1901.     spell-check <mywords> using your spell-checker---noninteractive
  1902.     one is just fine.  Be sure to use a reliable spell-checker---
  1903.     some of them contain too many misspelled words (UNIX "spell" is
  1904.     one such notorious example. "ispell" is better.)   To increase
  1905.     the reliability, use several different spell checkers. After you
  1906.     have obtained a word list in this way, you can build the base
  1907.     dictionary with decent reliability.
  1908.  
  1909.     Don't be ambitious to build a large dictionary---because it will
  1910.     be tedious, unimaginative, time consuming, and (most importantly)
  1911.     unnecessary.
  1912. Appendix A.  Networked mode
  1913.  
  1914.     Let's call the directory in which jspell.exe resides the "jspell
  1915.     executable directory", and denote it by DIR_EXE. jspell runs in
  1916.     the networked mode if a file named "network" exists in the
  1917.     jspell executable directory DIR_EXE. Otherwise jspell runs in
  1918.     the single user mode.  The content of the file "network" does not
  1919.     matter.
  1920.  
  1921.     In the networked mode, we use a directory called the "jspell
  1922.     configuration directory", which is denoted by DIR_CFG. Normally,
  1923.     this jspell configuration directory DIR_CFG is defined by the
  1924.     environment variable JSPELL_DIR.  For instance, if you want the
  1925.     jspell configuration directory to be C:\MYDIC, then
  1926.  
  1927.       set JSPELL_DIR=C:\MYDIC
  1928.  
  1929.     command should be executed prior to jspell.  (Normally, this
  1930.     should be done at booting time by autoexec.bat.) In case the
  1931.     environment variable JSPELL_DIR is not defined, then jspell uses
  1932.     the root directory of the current drive as the default jspell
  1933.     configuration directory.
  1934.  
  1935.     jspell.cfg, jsptex.cfg and base.dic are first searched in the
  1936.     current directory, and then in DIR_CFG. So each user can set
  1937.     his/her own configuration by putting personal configuration
  1938.     files jspell.cfg and jsptex.cfg in the directory DIR_CFG. If
  1939.     jspell fails to find jspell.cfg, then it'll use the default file
  1940.     jspell.cfg in DIR_EXE.  The same is true for jsptex.cfg and
  1941.     base.dic.
  1942.  
  1943.     The main user dictionary is searched in the current directory
  1944.     and then in DIR_CFG but NOT in DIR_EXE.  It's o.k. not to have
  1945.     the main user dictionary in which case it is simply treated as
  1946.     empty, and a fresh main user dictionary will be created in
  1947.     DIR_CFG if a word is put there during a jspell session.
  1948.  
  1949.     File specific user dictionary search rule is the same as that of
  1950.     the main user dictionary except that the fresh dictionary is
  1951.     created (if not already exist) in the current directory instead
  1952.     of DIR_CFG.
  1953.  
  1954.     Additional user dictionary search rule is the same as that of
  1955.     the base dictionary.
  1956. Appendix B.  Frequently Asked Questions
  1957.  
  1958.     Q1.  Sometimes my computer hangs while loading the base dictionary.
  1959.  
  1960.     Ans. Some of your utilities, especially TSR's, may be buggy. For
  1961.       instance, the combination of the expanded memory manager
  1962.       "emm4j.sys" supplied in DOS4.0 and the popular disk-cache
  1963.       utility "superpck" will cause such a problem.
  1964.  
  1965.  
  1966.     Q2.  What's the limitation of jspell?
  1967.  
  1968.     Ans. No limit on input file length.  (Some limitation related to
  1969.       [Undo] may exist as explained at the end of (Section II.3.6).)
  1970.       Each line in the input file should have length <= 512
  1971.       (excluding the end of line character). The length of filenames
  1972.       (including path) is limited by 80. Foreign language base
  1973.       dictionary cannot be big due to the lack of support of
  1974.       prefix/suffix. (I have a report saying that 23,000 German word
  1975.       base dictionary is o.k. but 27,000 words cause insufficient
  1976.       memory error.)  This will be improved in the future versions.
  1977.  
  1978.  
  1979.     Q3.  I don't like the Enhanced color scheme of jspell.
  1980.  
  1981.     Ans.  You can switch to the Standard color scheme (or to the
  1982.       Monochrome or Laptop color scheme) by modifying the third line
  1983.       of the configuration file jspell.cfg appropriately.
  1984.  
  1985.  
  1986.     Q4.  What's the plan of improving jspell in the future
  1987.      versions?
  1988.  
  1989.     o  Dynamic (i.e., user customizable) prefix/suffix.  (Then jspell
  1990.        can claim to be truly international spell-checker.)
  1991.  
  1992.     o  Foreign dictionaries (German, French, Spanish, Portuguese,
  1993.        Italian ...) and British dictionary.
  1994.  
  1995.     o  Support of german.sty (and other <language>.sty if exists).
  1996.  
  1997.     o  Treatment of capitalization of umlauted characters.
  1998.  
  1999.     o  Some editing capability not limited to the highlighted area.
  2000.  
  2001.     o  Better treatment of hyphenated words in dictionary.  (For
  2002.        instance,  a hyphenated word should be in dictionary when all
  2003.        the hyphenation commands \- are stripped off.)
  2004.  
  2005.     o  Allow words to contain digits[0-9], period[.], dash[-] and
  2006.        space[ ].
  2007.  
  2008.     o  Support of 80x50 mode, 132x50 mode etc.
  2009.  
  2010.     o  jspell386 and/or jspell OS/2.  This will not only increase
  2011.        the speed and dictionary size but also enables the
  2012.        implementation of sophisticated data structures of word list
  2013.        that will result in more intelligent word suggestion.
  2014.  
  2015.     o  Treatment of hyphenated words in input files (across two
  2016.        lines).
  2017.  
  2018.     o  TSR will be very useful in writing short messages (e.g.,
  2019.        email message). Since jspell has no way of knowing how the
  2020.        text is stored in the memory under the editor in use, it'll
  2021.        read the text from the screen (i.e., video memory).
  2022.  
  2023.        For instance we could implement the following: if you move
  2024.        the cursor inside a word (whose spelling is doubtful) and hit
  2025.        the hot-key, then jspell opens a pop-up window indicating
  2026.        whether the word is correctly spelled and shows the suggested
  2027.        word list in case the word is found to be misspelled.
  2028.  
  2029.     o  The ability to load input file(s) within jspell. (Open a
  2030.        window of file lists from which the user can choose one by
  2031.        clicking mouse or something.)
  2032.  
  2033.     o  Detection of repeated words: e.g., "the the", "of of" etc.
  2034.  
  2035.     o  Lookup option:
  2036.  
  2037.          jspell -lookup <word>
  2038.  
  2039.        tells whether <word> is in the dictionary and also finds all
  2040.        close words.
  2041.  
  2042.  
  2043.     Q5. What constitutes the "low-cost upgrade"?
  2044.  
  2045.                         │  Charges
  2046.       ──────────────────┼────────────────────────────────
  2047.       Bug fix           │  $2.00 for diskette
  2048.       ──────────────────┼────────────────────────────────
  2049.       Real Improvement  │  $5.00 for diskette only
  2050.                         │  $12.00 for diskette and manual
  2051.  
  2052.       In case the program can be delivered electronically (i.e.,
  2053.       free of cost), then $2.00 shipping charge may be deducted.
  2054. Appendix C.  History
  2055.  
  2056.  
  2057.     *** Version 2.0 (Nov.15, 1993) ***
  2058.  
  2059.     Released as a shareware.
  2060.  
  2061.       o  Complete documentation
  2062.       o  Streamlined base.dic (39,000+ words).  More than a hundred
  2063.          misspelled words have been deleted.
  2064.       o  Consistent directory searching rule.
  2065.       o  Configurable default base dictionary name and main user
  2066.          dictionary name in jspell.cfg.
  2067.       o  More command line options in jspell and dictman.
  2068.       o  Bug fix:
  2069.          (i) During scrolling a help screen of dictman,
  2070.              some garbage could appear occasionally.
  2071.          (ii) jsptex.cfg had no effect on dictman.
  2072.          (iii) Couldn't suggest "Thsi" ==> "This".
  2073.  
  2074.  
  2075.     *** Version 1.99-beta (Oct.18, 1993) ***
  2076.  
  2077.     Released only to a VERY small number of beta testers.
  2078.  
  2079.       o  Network support.
  2080.       o  The limit on the length of suggested words is increased
  2081.          from 17 to 40.
  2082.       o  TeX constructs \begin{table}[htpb] and \begin{figure}[htpb]
  2083.          are correctly handled.
  2084.       o  Some minor improvements in dictman.
  2085.  
  2086.  
  2087.     *** Version 1.84-beta (Oct.11, 1993) ***
  2088.  
  2089.    Not released.
  2090.  
  2091.       o  Global ignore is now done by Alt-G and/or [iGnore all]
  2092.          button. Similar changes to [rePlace all] and [marK all].
  2093.       o  Digits at the left of suggested words are highlighted to
  2094.          indicate that they are command keys.
  2095.       o  If a command key (like <space> for [Ignore]) is pressed
  2096.          during the dictionary look-up process for suggesting words,
  2097.          then the action is immediately taken (i.e.,  without
  2098.          completing the preparation of the suggested word list).
  2099.       o  Laptop color option added. (B/W with no bright white)
  2100.       o  Shift-Alt-A and Shift-Alt-T enter word to dictionary
  2101.          without asking capitalization.  The same is true for
  2102.          Shift-click.
  2103.       o  Bug fix:
  2104.          (i) Math-ignore mode related bugs.
  2105.          (ii) If the input file size is in between 1025 bytes and
  2106.              2048 bytes, and if Alt-X is hit when more than 1024
  2107.              bytes are done, then the output file may be messed up
  2108.              at the tail part.
  2109.          (iii) dictman [UserDic][Read] menu couldn't handle some TeX
  2110.              constructions including the hyphenation command \-.
  2111.          (iv) If the input filename is user.<ext>, then file
  2112.              dictionary get's the name user.dic}---thus filename
  2113.              collision.
  2114.          (v) dictman [UserDic][Read] menu hangs the computer if
  2115.              applied to large (> 1M bytes) files.
  2116.  
  2117.  
  2118.     *** Version 1.81beta (Oct. 1, 1993) ***
  2119.  
  2120.     Released only to a small number of beta testers.
  2121.  
  2122.       o  Customizable list of TeX commands for ignoring the
  2123.          subsequent words.
  2124.       o  Improved dictman in initial building up of base
  2125.          dictionaries. (The input word list file can contain more
  2126.          than 5,000 words.)
  2127.       o  Command line option of choosing base dictionary and/or file
  2128.          dictionary added.
  2129.       o  The TeX hyphenation command \- is now considered as a
  2130.          legitimate subword.
  2131.       o  The command key letters in the menu buttons are highlighted.
  2132.       o  Combined the help files jspell.hlp and dictman.hlp.
  2133.       o  Some more little improvements.
  2134.       o  Bug fix:
  2135.          (i) Memory related bugs in multilevel undoing of (global)
  2136.              replacement actions.
  2137.          (ii) Erratic behavior in math ignore mode.
  2138.          (iii) NoBackUp option doesn't work as expected.
  2139.  
  2140.  
  2141.     *** Version 1.8beta (Sep. 19, 1993) ***
  2142.  
  2143.     Released only to a small number of beta testers.
  2144.  
  2145.       o  Dictionary manager dictman.exe added.
  2146.       o  File specific dictionary, multiple user dictionary support.
  2147.       o  Accepts foreign characters by
  2148.           (i) extended ASCII code (e.g., 129 for umlaut u etc.), and/or
  2149.           (ii) TeX/LaTeX commands (e.g., \"u, \H{o}, \L, \ss etc.).
  2150.       o  Much better interface w/ mouse support.
  2151.       o  Multilevel undo up to 400 steps
  2152.       o  Better TeX/LaTeX support including the math-ignore mode.
  2153.       o  Better word suggestion scheme for capitalized words.
  2154.       o  Deleted hundreds of misspelled words from base.dic.
  2155.       o  Numerous little improvements.
  2156.       o  Bug fix:
  2157.          (i) Occasional name switching of the input file
  2158.            <filename>.<ext> and the backup file <filename>.bak when
  2159.            the input file is large (e.g., above 300K bytes).
  2160.  
  2161.  
  2162.     *** Version 1.01 (Jun. 3, 1993) ***
  2163.  
  2164.       Fixed some bugs related to the installation.  Made available by
  2165.       anonymous FTP at
  2166.         garbo.uwasa.fi:pc/spell/jspel101.zip, and
  2167.         Simtel (and its mirrors sites) msdos/tex/jspel101.zip
  2168.  
  2169.  
  2170.     *** Version 1.0 (May 29, 1993) ***
  2171.  
  2172.       First public release.  Made available by anonymous FTP at
  2173.         garbo.uwasa.fi:pc/spell/jspell10.zip
  2174. Index
  2175.  
  2176.     Not prepared for this shareware version. (I gave up preparing the
  2177.     index by hand---it was just too tedious.)
  2178.  
  2179.