-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ispell.1X
1645 lines (1645 loc) · 46 KB
/
ispell.1X
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\"
.\" $Id: ispell.1X,v 1.103 2019-08-09 21:42:38-07 geoff Exp $
.\"
.\" Copyright 1992, 1993, 1999, 2001, 2005, Geoff Kuenning, Claremont, CA
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All modifications to the source code must be clearly marked as
.\" such. Binary redistributions based on modified source code
.\" must be clearly marked as modified versions in the documentation
.\" and/or other materials provided with the distribution.
.\" 4. The code that causes the 'ispell -v' command to display a prominent
.\" link to the official ispell Web site may not be removed.
.\" 5. The name of Geoff Kuenning may not be used to endorse or promote
.\" products derived from this software without specific prior
.\" written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Log: ispell.1X,v $
.\" Revision 1.103 2019-08-09 21:42:38-07 geoff
.\" Remove ancient commentary about performance from BUGS.
.\"
.\" Revision 1.102 2017-11-13 11:37:15-08 geoff
.\" Many cleanups from Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
.\"
.\" Revision 1.101 2015-02-08 00:35:41-08 geoff
.\" Identify helper programs as such in the synopsis (patch from Eric S. Raymond).
.\"
.\" Revision 1.100 2013-04-03 16:38:30-07 geoff
.\" Add a warning about the -C option's dangers.
.\"
.\" Revision 1.99 2009-01-01 14:55:32-08 geoff
.\" Get rid of a .IR that actually belongs in config.X (Richard Roger).
.\"
.\" Revision 1.98 2005-09-05 23:31:32-07 geoff
.\" Get the version described from version.h, rather than hardwiring it.
.\"
.\" Revision 1.97 2005/05/01 22:35:00 geoff
.\" Make the backup-file extension configurable.
.\"
.\" Revision 1.96 2005/04/26 22:42:22 geoff
.\" Remove fixispell-a, since it doesn't really do the job
.\"
.\" Revision 1.95 2005/04/14 23:11:36 geoff
.\" Document the -w switch to icombine.
.\"
.\" Revision 1.94 2005/04/14 21:25:52 geoff
.\" Document MUNCHDEBUGDIR and ISPELL_CHARSET.
.\"
.\" Revision 1.93 2005/04/14 14:38:23 geoff
.\" Update license. Incorporate Ed Avis's changes. Document fixispell-a.
.\" Add the -o flag. Make certain external references configurable.
.\" Document -e5.
.\"
.\" Revision 1.92 2001/10/01 23:32:07 geoff
.\" Remove an obsolete reference to sq.
.\"
.\" Revision 1.91 2001/07/25 21:51:46 geoff
.\" Minor license update.
.\"
.\" Revision 1.90 2001/07/23 20:24:03 geoff
.\" Update the copyright and the license.
.\"
.\" Revision 1.89 2001/07/23 19:36:49 geoff
.\" Document that -w doesn't work with /
.\"
.\" Revision 1.88 2000/08/24 06:48:40 geoff
.\" Document correct_verbose_mode.
.\"
.\" Revision 1.87 1999/01/07 01:22:40 geoff
.\" Update the copyright.
.\"
.\" Revision 1.86 1999/01/05 20:40:26 geoff
.\" Improve the documentation of -F
.\"
.\" Revision 1.85 1999/01/03 01:46:31 geoff
.\" Document the -F (external deformatter) switch.
.\"
.\" Revision 1.84 1998/07/12 20:42:15 geoff
.\" Document the -k switch and associated environment variables. Fix a
.\" couple of places where ispell wasn't italicized.
.\"
.\" Revision 1.83 1995/11/08 05:09:12 geoff
.\" Document the new ispell-4-like interactive mode.
.\"
.\" Revision 1.82 1995/11/08 04:53:34 geoff
.\" Change the HTML-mode documentation to reflect the compatibility
.\" improvements and flag renaming I did.
.\"
.\" Revision 1.81 1995/10/25 04:05:20 geoff
.\" Documentation for html-mode added by Gerry Tierney 10/14/1995.
.\"
.\" Revision 1.80 1995/01/08 23:23:31 geoff
.\" Document the new personal-dictionary behavior (dictionary named after
.\" the hash file is preferred).
.\"
.\" Revision 1.79 1994/10/25 05:46:02 geoff
.\" Document the new DICTIONARY variable, and improve the documentation of
.\" the -d flag.
.\"
.\" Revision 1.78 1994/09/16 05:06:58 geoff
.\" Make it clear that the + command doesn't change the string-character
.\" type.
.\"
.\" Revision 1.77 1994/04/27 01:50:35 geoff
.\" Remove the bug about the tex parser getting confused by \endxxx.
.\"
.\" Revision 1.76 1994/03/21 01:54:08 geoff
.\" Document the '&' command in -a mode.
.\"
.\" Revision 1.75 1994/03/15 06:24:26 geoff
.\" Document the changes to the +/-/~ commands and the -T switch.
.\"
.\" Revision 1.74 1994/01/25 07:11:39 geoff
.\" Get rid of all old RCS log lines in preparation for the 3.1 release.
.\"
.\"
.TH ISPELL 1 local
.SH NAME
ispell, buildhash, munchlist, findaffix, tryaffix, icombine, ijoin \- Interactive
spelling checking
.SH SYNOPSIS
.B ispell
.RI [ common-flags ]
.RB [ \-M | \-N ]
.RB [ \-L \fIcontext\fP ]
.RB [ \-V ]
files
.br
.B ispell
.RI [ common-flags ]
.B \-l
.br
.B ispell
.RI [ common-flags ]
.RB [ \-f
file]
.RB [ \-s ]
.RB [ \-a | \-A ]
.br
.B ispell
.RB [ \-d
.IR file ]
.RB [ \-w
.IR chars ]
.B \-c
.br
.B ispell
.RB [ \-d
.IR file ]
.RB [ \-w
.IR chars ]
.BR \-e [ e ]
.br
.B ispell
.RB [ \-d
.IR file ]
.B \-D
.br
.B ispell
.BR \-v [ v ]
.IP \fIcommon-flags\fP:
.RB [ \-t ]
.RB [ \-n ]
.RB [ \-H ]
.RB [ \-o ]
.RB [ \-b ]
.RB [ \-x ]
.RB [ \-B ]
.RB [ \-C ]
.RB [ \-P ]
.RB [ \-m ]
.RB [ \-S ]
.RB [ \-d
.IR file ]
.RB [ \-p
.IR file ]
.RB [ \-w
.IR chars ]
.RB [ \-W
.IR n ]
.RB [ \-T
.IR type ]
.RB [ \-k\fIname\fP
.IR list ]
.RB [ \-F
.IR program ]
.PP
Helper programs:
.PP
.B buildhash
.RB [ \-s ]
.I
dict-file affix-file hash-file
.br
.B buildhash
.B \-s
.I
count affix-file
.if n .TP 10
.if t .PP
.B munchlist
.RB [ \-l
.IR aff-file ]
.RB [ \-c
.IR conv-file ]
.RB [ \-T
.IR suffix ]
.if n .br
.RB [ \-s
.IR hash-file ]
.RB [ \-D ]
.RB [ \-v ]
.RB [ \-w
.IR chars ]
.RI [ files ]
.if n .TP 10
.if t .PP
.B findaffix
.RB [ \-p | \-s ]
.RB [ \-f ]
.RB [ \-c ]
.RB [ \-m
.IR min ]
.RB [ \-M
.IR max ]
.RB [ \-e
.IR elim ]
.if n .br
.RB [ \-t
.IR tabchar ]
.RB [ \-l
.IR low ]
.RI [ files ]
.PP
.B tryaffix
.RB [ \-p | \-s]
.RB [ \-c ]
.I expanded-file
.IR affix [ +addition ]
\&...\&
.PP
.B icombine
.RB [ \-T
.IR type ]
.RB [ \-w
.IR chars ]
.RI [ aff-file ]
.PP
.B ijoin
.RB [ \-s | \-u ]
.I join-options
.I file1
.I file2
.SH DESCRIPTION
.PP
.I Ispell
is fashioned after the
.I spell
program from ITS (called
.I ispell
on Twenex systems.) The most common usage is "ispell filename". In this
case,
.I ispell
will display each word which does not appear in the dictionary at the
top of the screen and allow you to change it. If there are "near
misses" in the dictionary (words which differ by only a single letter, a
missing or extra letter, a pair of transposed letters, or a missing
space or hyphen), then they are
also displayed on following lines.
As well as "near misses", ispell may display other guesses
at ways to make the word from a known root, with each guess preceded
by question marks.
Finally, the line containing the
word and the previous line
are printed at the bottom of the screen. If your terminal can
display in reverse video, the word itself is highlighted. You have the
option of replacing the word completely, or choosing one of the
suggested words. Commands are single characters as follows
(case is ignored):
.PP
.RS
.IP R
Replace the misspelled word completely.
.IP Space
Accept the word this time only.
.IP A
Accept the word for the rest of this
.I ispell
session.
.IP I
Accept the word, capitalized as it is in the
file, and update private dictionary.
.IP U
Accept the word, and add an uncapitalized (actually, all lower-case)
version to the private dictionary.
.IP 0\(en\fIn\fR
Replace with one of the suggested words.
.IP L
Look up words in system dictionary (controlled by the WORDS
compilation option).
.IP X
Write the rest of this file, ignoring misspellings, and start next file.
.IP Q
Exit immediately and leave the file unchanged.
.IP !
Shell escape.
.IP ^L
Redraw screen.
.IP ^Z
Suspend ispell.
.IP ?
Give help screen.
.RE
.PP
If the
.B \-M
switch is specified,
a one-line mini-menu at the bottom of the screen will
summarize these options.
Conversely, the
.B \-N
switch may be used to suppress the mini-menu.
(The minimenu is displayed by default if
.I ispell
was compiled with the MINIMENU option,
but these two switches will always override the default).
.PP
If the
.B \-L
flag is given, the specified number is used as the number of
lines of context to be shown at the bottom of the screen
(The default is to calculate the amount of context as a certain percentage
of the screen size).
The amount of context is subject to a system-imposed limit.
.PP
If the
.B \-V
flag is given, characters that are not in the 7-bit ANSI printable
character set will always be displayed in the style of "cat \-v", even if
.I ispell
thinks that these characters are valid ISO Latin-1 on your system.
This is useful when working with older terminals.
Without this switch,
.I ispell
will display 8-bit characters "as is" if they have been defined as
string characters for the chosen file type.
.PP
"Normal" mode, as well as the
.BR \-l ,
.BR \-a ,
and
.B \-A
options and interactive mode (see below) also
accepts the following "common" flags on the command line:
.RS
.IP \fB\-t\fR
The input file is in TeX or LaTeX format.
.IP \fB\-n\fR
The input file is in nroff/troff format.
.IP \fB\-H\fR
The input file is in SGML/HTML format.
(This should really be
.BR \-s ,
but for historical reasons that flag was already taken.)
.IP \fB\-o\fR
The input file should be treated as ordinary text. (This could be used
to override DEFTEXFLAG.)
.IP \fB\-b\fR
Create a backup file by appending "!!BAKEXT!!"
to the name of the input file.
.IP \fB\-x\fR
Delete the backup file after spell-checking is finished.
.IP \fB\-B\fR
Report run-together words with missing blanks as spelling errors.
.IP \fB\-C\fR
Consider run-together words as valid compounds.
.IP \fB\-P\fR
Don't generate extra root/affix combinations.
.IP \fB\-m\fR
Make possible root/affix combinations that
aren't in the dictionary.
.IP \fB\-S\fR
Sort the list of guesses by probable correctness.
.IP "\fB\-d\fR file"
Specify an alternate dictionary file.
For example, use
.B "\-d deutsch"
to choose a German dictionary in a German installation.
.IP "\fB\-p\fR file"
Specify an alternate personal dictionary.
.IP "\fB\-w\fR chars"
Specify additional characters that can be part of a word.
.IP "\fB\-W\fR n"
Specify length of words that are always valid.
.IP "\fB\-T\fR type"
Assume a given formatter type for all files.
.RE
.PP
The
.BR \-H ,
.BR \-n ,
.BR \-t ,
and
.B \-o
options select whether
.I ispell
runs in
HTML
.RB ( \-H ),
nroff/troff
.RB ( \-n ),
TeX/LaTeX
.RB ( \-t ),
or ordinary text
.RB ( \-o )
input mode.
mode.
(The default mode is controlled by the DEFTEXFLAG installation option,
but is normally nroff/troff mode for historical reasons.)
Unless overridden by one of the mode-selection switches,
TeX/LaTeX mode is automatically selected if an input file has
the extension ".tex", and HTML mode is automatically selected if an
input file has the extension ".html" or ".htm".
.PP
In HTML mode, HTML tags delimited by <> signs are skipped, except that
the "ALT=" construct is recognized if it appears with no spaces around
the equals sign, and the text inside is spell-checked.
.PP
In TeX/LaTeX mode, whenever a backslash ("\e") is found,
.I ispell
will skip to the next whitespace or TeX/LaTeX delimiter. Certain commands
contain arguments which should not be checked, such as labels and reference
keys as are found in the \ecite command, since they contain arbitrary,
non-word arguments. Spell checking is also suppressed when in math mode.
Thus, for example, given
.PP
.RS
\echapter {This is a Ckapter}
\ecite{SCH86}
.RE
.PP
.I ispell
will find "Ckapter" but not "SCH".
The
.B \-t
option does not recognize the TeX comment character "%", so comments are
also spell-checked.
It also assumes
correct LaTeX syntax. Arguments to infrequently used commands and some
optional arguments are sometimes checked unnecessarily.
The bibliography will not be checked if
.I ispell
was compiled with
.B IGNOREBIB
defined. Otherwise, the bibliography will be checked but the reference
key will not.
.PP
References for the
!!TIB_XREF!!
bibliography system, that is, text between a ``[.'' or ``<.'' and
``.]'' or ``.>'' will always be ignored in TeX/LaTeX mode.
.PP
The
.B \-b
and
.B \-x
options control whether
.I ispell
leaves a backup (!!BAKEXT!!\&) file for each input file.
The !!BAKEXT!!\& file contains
the pre-corrected text. If there are file opening or writing errors,
the !!BAKEXT!!\& file may be left for recovery purposes even with the
.B \-x
option.
The default for this option is controlled by the DEFNOBACKUPFLAG
installation option.
.PP
The
.B \-B
and
.B \-C
options control how
.I ispell
handles run-together words, such as "notthe" for "not the".
If
.B \-B
is specified, such words will be considered as errors, and
.I ispell
will list variations with an inserted blank or hyphen as possible
replacements.
If
.B \-C
is specified, run-together words will be considered to be
valid compounds, so long as both components are in the dictionary, and
each component is at least as long as a language-dependent minimum (3
characters, by default).
This is useful for languages such as German and Norwegian, where
many compound words are formed by concatenation.
(Note that compounds formed from three or more root words will still
be considered errors).
The default for this option is language-dependent;
in a multi-lingual installation the default may vary depending on
which dictionary you choose.
.B Warning:
the
.B \-C
option can cause
.I ispell
to recognize non-words and misspellings.
Use it with caution!
.PP
The
.B \-P
and
.B \-m
options control when
.I ispell
automatically generates suggested root/affix combinations for possible
addition to your personal dictionary.
(These are the entries in the "guess" list which are preceded by question
marks.)
If
.B \-P
is specified, such guesses are displayed only if
.I ispell
cannot generate any possibilities that match the current dictionary.
If
.B \-m
is specified, such guesses are always displayed.
This can be useful if the dictionary has a limited word list, or a word
list with few suffixes.
However, you should be careful when using this option, as it can
generate guesses that produce invalid words.
The default for this option is controlled by the dictionary file used.
.PP
The
.B \-S
option suppresses
.IR ispell "'s"
normal behavior of sorting the list of possible replacement words.
Some people may prefer this, since it somewhat enhances the probability
that the correct word will be low-numbered.
.PP
The
.B \-d
option is used to specify an alternate hashed dictionary file,
other than the default.
If the filename does not contain a "/",
the library directory for the default dictionary file is prefixed;
thus, to use a dictionary in the local directory "\-d \&./xxx.hash" must
be used.
This is useful to allow dictionaries for alternate languages.
Unlike previous versions of
.IR ispell ,
a dictionary of
.I /dev/null
is invalid, because the dictionary contains the affix table.
If you need an effectively empty dictionary, create a one-entry list
with an unlikely string (e.g., "qqqqq").
.PP
The
.B \-p
option is used to specify an alternate personal dictionary file.
If the file name does not begin with "/", $HOME is prefixed. Also, the
shell variable WORDLIST may be set, which renames the personal dictionary
in the same manner. The command line overrides any WORDLIST setting.
If neither the
.B \-p
switch nor the WORDLIST environment variable is given,
.I ispell
will search for a personal dictionary in both the current directory
and $HOME, creating one in $HOME if none is found.
The preferred name is constructed by appending ".ispell_" to the base name
of the hash file.
For example, if you use the English dictionary, your personal
dictionary would be named ".ispell_english".
However, if the file ".ispell_words" exists, it will be used as the
personal dictionary regardless of the language hash file chosen.
This feature is included primarily for backwards compatibility.
.PP
If the
.B \-p
option is
.I not
specified,
.I ispell
will look for personal dictionaries in both the current directory and
the home directory.
If dictionaries exist in both places, they will be merged.
If any words are added to the personal dictionary, they will be
written to the current directory if a dictionary already existed in
that place;
otherwise they will be written to the dictionary in the home directory.
.PP
The
.B \-w
option may be used to specify characters other than alphabetics
which may also appear in words. For instance,
.B \-w
"&" will allow "AT&T"
to be picked up. Underscores are useful in many technical documents.
There is an admittedly crude provision in this option for 8-bit international
characters.
Non-printing characters may be specified in the usual way by inserting a
backslash followed by the octal character code;
e.g., "\e014" for a form feed.
Alternatively, if "n" appears in the character string, the (up to)
three characters
following are a DECIMAL code 0\(en255, for the character.
For example, to include bells and form feeds in your words (an admittedly
silly thing to do, but aren't most pedagogical examples):
.PP
.RS
n007n012
.RE
.PP
Numeric digits other than the three following "n" are simply numeric
characters. Use of "n" does not conflict with anything because actual
alphabetics have no meaning - alphabetics are already accepted.
.I Ispell
will typically be used with input from a file, meaning that preserving
parity for possible 8 bit characters from the input text is OK. If you
specify the \-l option, and actually type text from the terminal, this may
create problems if your stty settings preserve parity.
.PP
It is not possible to use
.B \-w
with certain characters.
In particular, the flag-marker character for the language (defined in
the affix file, but usually "/") can never be made into a word character.
.PP
The
.B \-W
option may be used to change the length of words that
.I ispell
always accepts as valid.
Normally,
.I ispell
will accept all 1-character words as valid, which is equivalent to
specifying "\fB\-W 1\fR."
(The default for this switch is actually controlled by the MINWORD
installation option, so it may vary at your installation.)
If you want all words to be checked against the dictionary, regardless
of length, you might want to specify "\fB\-W 0\fR".
On the other hand, if your document specifies a lot of three-letter acronyms,
you would specify "\fB\-W 3\fR" to accept all words of three letters or
less.
Regardless of the setting of this option,
.I ispell
will only generate words that are in the dictionary as suggested replacements
for words;
this prevents the list from becoming too long.
Obviously, this option can be very dangerous, since short misspellings may
be missed.
If you use this option a lot, you should probably make a last pass without it
before you publish your document, to protect yourself against errors.
.PP
The
.B \-T
option is used to specify a default formatter type for use in
generating string characters.
This switch overrides the default type determined from
the file name.
The
.I type
argument may be either one of the unique names defined in the language
affix file (e.g.,
.BR nroff )
or a file suffix including the dot (e.g.,
.BR .tex ).
If no
.B \-T
option appears and no type can be determined from the file name, the default
string character type declared in the
language affix file will be used.
.PP
The
.B \-k
option is used to enhance the behavior of certain deformatters.
The
.I name
parameter gives the name of a deformatter keyword set (see below), and the
.I list
parameter gives a list of one or more keywords that are to be treated
specially.
If
.I list
begins with a plus (+) sign, it is added to the existing keywords;
otherwise it replaces the existing keyword list.
For example,
.B "\-ktexskip1 +bibliographystyle"
adds "bibliographystyle" to the TeX skip-1 list, while
.B "\-khtmlignore pre,strong"
replaces the HTML ignore list with "pre" and "strong".
The lists available are:
.IP texskip1
TeX/LaTeX commands that take a single argument that should not be
spell-checked, such as "bibliographystyle". The default is
"end", "vspace", "hspace", "cite", "ref", "parbox", "label", "input",
"nocite", "include", "includeonly", "documentstyle", "documentclass",
"usepackage", "selectlanguage", "pagestyle", "pagenumbering",
"hyphenation", "pageref", and "psfig", plus "bibliography" in some
installations.
These keywords are case-sensitive.
.IP texskip2
TeX/LaTeX commands that take two arguments that should not be
spell-checked, such as "setlength". The default is
"rule", "setcounter", "addtocounter", "setlength", "addtolength", and
"settowidth".
These keywords are case-sensitive.
.IP htmlignore
HTML tags that delimit text that should not be spell-checked until the
matching end tag is reached. The default is
"code", "samp", "kbd", "pre", "listing", and "address".
These keywords are case-insensitive.
(Note that the content inside HTML tags, such as HREF=, is not normally
checked.)
.IP htmlcheck
Subfields that should be spell-checked even inside HTML tags. The
default is "alt", so that the ALT= portion of IMG tags will be
spell-checked.
These keywords are case-insensitive.
.PP
All of the above keyword lists can also be modified by environment
variables whose names are the same as above, except in uppercase,
e.g., TEXSKIP1.
The
.B \-k
switch overrides (or adds to) the environment variables, and the
environment variables override or add to the built-in defaults.
.PP
The
.B \-F
switch specifies an external deformatter program.
This program should read data from its standard input and write to its
standard output.
The program
.I must
produce exactly one character of output for each character of input,
or ispell will lose synchronization and corrupt the output file.
Whitespace characters (especially blanks, tabs, and newlines) and
characters that should be spell-checked should be passed through
unchanged.
Characters that should not be spell-checked should be converted into
blanks or other non-word characters.
For example, an HTML deformatter might turn all HTML tags into
blanks, and also blank out all text delimited by tags such as "code"
or "kbd".
.PP
The
.B \-F
switch is the preferred way to deformat files for ispell, and
eventually will become the only way.
.PP
If
.I ispell
is invoked without any filenames or mode switches, it enters an
interactive mode designed to let the user check the spelling of
individual words.
The program repeatedly prompts on standard output with "word:" and
responds with either "ok" (possibly with commentary), "not found", or
"how about" followed by a list of suggestions.
.PP
The
.B \-l
or "list" option to
.I ispell
is used to produce a list of misspelled words from the standard input.
.PP
The
.B \-a
option
is intended to be used from other programs through a pipe. In this
mode,
.I ispell
prints a one-line version identification message, and then begins
reading lines of input. For each input line,
a single line is written to the standard output for each word
checked for spelling on the line. If the word
was found in the main dictionary, or your personal dictionary, then the
line contains only a '*'. If the word was found through affix removal,
then the line contains a '+', a space, and the root word.
If the word was found through compound formation (concatenation of two
words, controlled by the
.B \-C
option), then the line contains only a '\-'.
.PP
If the word
is not in the dictionary, but there are near misses, then the line
contains an '&', a space, the misspelled word, a space, the number of
near misses,
the number of
characters between the beginning of the line and the
beginning of the misspelled word, a colon, another space,
and a list of the near
misses separated by
commas and spaces.
Following the near misses (and identified only by the count of near
misses), if the word could be formed by adding
(invalid) affixes to a known root,
is a list of suggested derivations, again separated by commas and spaces.
If there are no near misses at all, the line format is the same, except
that the '&' is replaced by '?' (and the near-miss count is always zero).
The suggested derivations following the near misses are in the form:
.PP
.RS
[prefix+] root [\-prefix] [\-suffix] [+suffix]
.RE
.PP
(e.g., "re+fry-y+ies" to get "refries")
where each optional
.I pfx
and
.I sfx
is a string.
Also, each near miss or guess is capitalized the same as the input
word unless such capitalization is invalid;
in the latter case each near miss is capitalized correctly
according to the dictionary.
.PP
Finally, if the word does not appear in the dictionary, and
there are no near misses, then the line contains a '#', a space,
the misspelled word, a space,
and the character offset from the beginning of the line.
Each sentence of text input is terminated
with an additional blank line, indicating that
.I ispell
has completed processing the input line.
.PP
These output lines can be summarized as follows:
.PP
.RS
.IP OK:
*
.IP Root:
+ <root>
.IP Compound:
\-
.IP Miss:
& <original> <count> <offset>: <miss>, <miss>, \&...\&, <guess>, \&...\&
.IP Guess:
? <original> 0 <offset>: <guess>, <guess>, \&...\&
.IP None:
# <original> <offset>
.RE
.PP
For example, a dummy dictionary containing the words "fray", "Frey",
"fry", and "refried" might produce the following response to the
command "echo 'frqy refries' | ispell \-a \-m \-d \&./test.hash":
.RS
.nf
(#) International Ispell Version 3.0.05 (beta), 08/10/91
& frqy 3 0: fray, Frey, fry
& refries 1 5: refried, re+fry-y+ies
.fi
.RE
.PP
This mode
is also suitable for interactive use when you want to figure out the
spelling of a single word.
.PP
The
.B \-A
option works just like
.BR \-a ,
except that if a line begins with the string "&Include_File&", the rest
of the line is taken as the name of a file to read for further words.
Input returns to the original file when the include file is exhausted.
Inclusion may be nested up to five deep.
The key string may be changed with the environment variable
.B INCLUDE_STRING
(the ampersands, if any, must be included).
.PP
When in the
.B \-a
mode,
.I ispell
will also accept lines of single words prefixed with any
of '*', '&', '@', '+', '-', '\(ti', '#', '!', '%', '`', or '^'.
A line starting with '*' tells
.I ispell
to insert the word into the user's dictionary (similar to the I command).
A line starting with '&' tells
.I ispell
to insert an all-lowercase version of the word into the user's
dictionary (similar to the U command).
A line starting with '@' causes
.I ispell
to accept this word in the future (similar to the A command).
A line starting with '+', followed immediately by
.B tex
or
.B nroff
will cause
.I ispell
to parse future input according the syntax of that formatter.
A line consisting solely of a '+' will place
.I ispell
in TeX/LaTeX mode (similar to the
.B \-t
option) and '-' returns
.I ispell
to nroff/troff mode (but these commands are obsolete).
However, the string character type is
.I not
changed;
the '\(ti' command must be used to do this.
A line starting with '\(ti' causes
.I ispell
to set internal parameters (in particular, the default string
character type) based on the filename given in the rest of the line.
(A file suffix is sufficient, but the period must be included.
Instead of a file name or suffix, a unique name, as listed in the language
affix file, may be specified.)
However, the formatter parsing is
.I not
changed; the '+' command must be used to change the formatter.
A line prefixed with '#' will cause the
personal dictionary to be saved.
A line prefixed with '!' will turn on
.I terse
mode (see below), and a line prefixed with '%' will return
.I ispell
to normal (non-terse) mode.
A line prefixed with '`' will turn on verbose-correction mode (see below);
this mode can only be disabled by turning on terse mode with '%'.
.PP
Any input following the prefix
characters '+', '-', '#', '!', '%', or '`' is ignored, as is any input
following the filename on a '\(ti' line.
To allow spell-checking of lines beginning with these characters, a
line starting with '^' has that character removed before it is passed
to the spell-checking code.
It is recommended that programmatic interfaces prefix every data line
with an uparrow to protect themselves against future changes in
.IR ispell .
.PP
To summarize these:
.PP
.RS
.IP *
Add to personal dictionary
.IP @
Accept word, but leave out of dictionary
.IP #
Save current personal dictionary
.IP \(ti
Set parameters based on filename
.IP +
Enter TeX mode
.IP -
Exit TeX mode
.IP !
Enter terse mode
.IP %
Exit terse mode
.IP "`"
Enter verbose-correction mode
.IP ^
Spell-check rest of line
.fi
.RE
.PP
In
.I terse
mode,
.I ispell
will not print lines beginning with '*', '+', or '\-', all of which
indicate correct words.
This significantly improves running speed when the driving program is
going to ignore correct words anyway.
.PP
In
.I verbose-correction
mode,
.I ispell
includes the original word immediately after the indicator character
in output lines beginning with '*', '+', and '\-', which simplifies
interaction for some programs.
.PP