Next: Dumping Configuration Values, Previous: Specifying Options, Up: Customizing Aspell [Contents]
The following is a list of available options broken down by category. Each entry has the following format:
- option[,single-letter-abbreviation]
(type) description
Where single letter options are specified as they would appear at the command line, ie with the preceding dash. Boolean single letter options are specified in the following format:
-<abbreviation to enable>|-<abbreviation to disable>
option is one of the following: boolean, string, file, dir, integer, or list.
String, file, dir, and integer types are all value options which can only take a specific type of value.
The following options may be used to control which dictionaries to use and how they behave (for more information see How Aspell Selects an Appropriate Dictionary):
(string) Base name of the dictionary to use. If this option is specified then Aspell will either use this dictionary or die.
(dir) Location of the main word list.
(string)
Language to use. It follows the same format of the LANG
environment variable on most systems. It consists of the two letter
ISO 639 language code and an optional two letter
ISO 3166 country code after a dash or underscore. The
default value is based on the value of the LC_MESSAGES
locale.
(string) The preferred size of the word list. This consists of a two char digit code describing the size of the list, with typical values of: 10=tiny, 20=really small, 30=small, 40=med-small, 50=med, 60=med-large, 70=large, 80=huge, 90=insane.
(list) Any extra information to distinguish two different words lists that have the same lang and size.
(list) Search path for word list information files.
(file) Personal word list file name.
(list)
UTF-8 files of additional words to accept. Non-word characters will be removed from the start and end of each word and if the word is then considered valid for the current language it will be added. Otherwise it will be silently ignored.
The --dont-clean-words option can be used to prevent the removal of non-word characters. The --dont-skip-invalid-words can be used to try harder to accept the word; if a word contains a character that the language can’t handle it will still be ignored (for example a Cyrillic letter in a Latin based language).
If words are not being added that you expect to, use the
aspell clean
to find out why.
(file) Replacements list file name.
(list) Extra dictionaries to use.
(list) create dictionary aliases. Each entry has the form ‘from to’. Will override any system dictionaries that are present.
(boolean)
Disable use of personal, replacement & session dictionaries. Any dictionaries specified using ‘extra-dicts’ will still be used.
These options control the encoding the document is expected to be in and how it is displayed.
(string) The encoding the input text is in. Valid values include, but not limited to, ‘iso-8859-*’, ‘utf-8’, ‘ucs-2’, ‘ucs-4’. When using the Aspell utility the default encoding is based on the current locale. Thus if your locale currently uses the ‘utf-8’ encoding than everything will be in UTF-8. The ‘ucs-2’ and ‘ucs-4’ encodings are intended to be used by other programs using the Aspell library and is not supported by the Aspell utility.
(boolean) Perform Unicode normalization. Enabled by default.
(boolean) Avoid lossy conversions when normalizing. Lossy conversions includes compatibility mappings such as splitting the letter ‘OE’ (U+152) into ‘O’ and ‘E’ (when the combined letter is not available), and mappings which will remove accents. Disabled by default except when creating dictionaries.
(string) The normalization form the output should be in. This option primarily effects the normalization form of the suggestions as when spell checkering as the actual text is unchanged unless there is an error. Valid values are ‘none’, ‘nfd’ for fully decomposition (Normalization Form D), ‘nfc’ for Normalization Form C, or ‘comp’ for fully composed. ‘comp’ is like ‘nfc’ except that full composition is used rather than canonical composition. The normalize option must be enabled for this option to be used.
(boolean) Set to true when the current language requires Unicode normalization. This is generally the case when private use characters are used internally by Aspell or when Normalization Form C is not the same as full composition.
These options control the behavior of Aspell when checking documents.
(integer) Ignore words with N characters or less
(boolean) Ignore commands to store replacement pairs.
(boolean) Save the replacement word list on save all.
(file) The base name of the keyboard definition file to use (see Notes on Typo-Analysis)
(mode) Suggestion mode = ‘ultra’ | ‘fast’ | ‘normal’ | ‘slow’ | ‘bad-spellers’ (see Notes on the Different Suggestion Modes)
(list) Characters to use when a word into two in the suggestion list. Setting this option to the empty list disables word splitting.
(boolean) Ignore case when checking words.
(boolean) Ignore accents when checking words – currently ignored.
These options control Aspell’s filters that filter out text that should not be spell checked.
(string)
Sets the filter mode. A mode is a collection of individual filters
that work well together. Possible values include, but not limited to,
‘none’, ‘url’ (the normal default), ‘email’, ‘markdown’,
‘html’, ‘tex’, texinfo
, or ‘nroff’ (default for ‘aspell pipe’).
For a complete list use ‘aspell dump modes’.
The shortcut options -e may be used for email, -H for HTML, -M for Markdown, -t for TeX, or -n for Nroff.
(list) Individual filters to use, use ‘aspell dump filters’ for a complete list.
(list) Where to look when loading filter and filter modes.
The none mode is exactly what it says. It turns off all filters.
The url filter/mode skips over URLs, host names, and email addresses. Because this filter is almost always useful and rarely does any harm it is enabled in all modes except none. To turn it off either select the none mode or use rem-filter option after the desired mode is selected.
The email mode skips over quoted text.
(list) Email quote characters. Defaults to ‘>’ and ‘|’.
(integer) The number of characters that can appear before the quote character. Defaults to 10.
The markdown filter/mode skips over code and links in Markdown documents. The mode also handles HTML via the html filter which runs after the Markdown filer.
Properly parsing Markdown requires reading the entire document in at once, which doesn’t fit well into the existing filter framework so the filter parses the document a line at a time and makes a best guess when a line ends without enough information to correctly parse a a tag. For example in the following:
`This looks like inline code But it's not, becuase the of the blank line.
the first line will be incorrectly skipped.
(boolean) Enables or disables support for HTML tags that might span multiple lines (outside of HTML blocks). Enabled by default (to disable from the command line use ‘--dont-markdown-multiline-tags’).
(boolean) Controls if ref lables are skipped. For example, when this option is enabled ‘[ref]’ will be skipped over in:
[link][ref] [ref]: #c2 "Chapter 2"
Enabled by default (to disable from the command line use ‘--dont-markdown-skip-ref-labels’).
The Markdown filter also supports the markdown-raw-start-tags and markdown-block-start-tags list options. These options are a list of HTML tags that start an HTML block. If the block starts with a tag listed in markdown-raw-start-tags then the block ends with the corresponding closing tag. If the block starts with a tag listed in markdown-block-start-tags then the block ends with a blank line. The defaults for these two options are taken from the CommonMark spec (version 0.29, 2019-04-06).
The SGML filter allows you to spell check SGML, HTML, XHTML, and XML files. In most cases everything within a tag ‘<tag attrib=value attrib2="a whole sentence">’ will be skipped by the spell checker. The SGML/HTML/XML that Aspell supports is a slight superset of most DTDs (Document Type Definitions) and can spell check the often non-conforming HTML found on the web.
This filter will also translate SGML characters of the form ‘&#num;’. Other SGML characters such as ‘&’ will simply be skipped over so that the word ‘amp’, for example, will not be spell checked. Eventually full support for properly translating SGML characters will be added.
(list) tags whose contents will also be skipped by the spell checker. For example, if you wish to leave a misspelling in a document and not have them flagged as misspellings, you could surround them with a <nospellcheck> tag:
<TD><FONT size=2><NOSPELLCHECK>leviosa</NOSPELLCHECK> is what Mr. Potter said</FONT></TD>
And put that word in the skip config directive:
add-sgml-skip nospellcheck
(list) attributes whose values you do want spell checked. By default, ’alt’ (<img> alternate text) is a member of the check list since it is text that is seen by a web page viewer. You may also want ’value’ to be on the check list since that is the text put on buttons:
add-sgml-check value
In this case ‘<input type=button value="Donr">’ will be flagged as a misspelling.
The html filter is like the SGML filter but specialized for HTML.
(list) HTML attributes to always check, such as alt= (alternate text).
(list) HTML tags to always skip the contents of, such as <script>. Defaults to ’script’ and ’style’.
The tex (all lowercase) filter hides TeX/LaTeX commands and corresponding parameters that are not readable text in the output from Aspell. It also skips over TeX comments by default.
(list) Controls which TeX commands should have certain parameters and/or options also skipped over. Commands that are not specified will have all their parameters and/or options checked. The format for each item is
<command> <a list of p,P,o and Os>
The first item is simply the command name. The second item controls which parameters to skip over. A ’p’ skips over a parameter while a ’P’ doesn’t. Similarly an ’o’ will skip over an optional parameter while an ’O’ doesn’t. The first letter on the list will apply to the first parameter, the second letter will apply to the second parameter etc. If there are more parameters than letters Aspell will simply check them as normal. For example the option
add-tex-command rule pp
will skip over the first two parameters of the rule
command
while the option
add-tex-command foo Pop
will check the first parameter of the foo
command, skip
over the next optional parameter, if it is present, and will skip over
the second parameter — even if the optional parameter is not present
— and will check any additional parameters.
A ‘*’ at the end of the command is simply ignored. For example the option
add-tex-command enlargethispage p
will ignore the first parameter in both enlargethispage and enlargethispage*.
The defaults are designed to work well with typical LaTeX documents. Use ‘aspell --reset-tex-command config tex-command’ for the current defaults.
(boolean) Check TeX comments. Defaults to false.
The texinfo filter allows you to spell check Texinfo
files. It will skip over Texinfo commands and their parameters
when appropriate. It will also skip over some Texinfo environments
such as example
.
The Texinfo filter has special code to deal with the @table
and related commands. It will apply the formatting command to each of
the @item
or @itemx
commands just like Texinfo
will. This means that if the formatting command is @code
and and the @code
command is a member of the
texinfo-ignore option than the Texinfo filter will ignore the
parameter of the @item
command as if the parameter was also
the parameter of the @code
command.
The Texinfo filter will also skip over the ‘\input texinfo’ line.
(list) Texinfo command to ignore the parameters of.
(list) Texinfo environments to ignore.
The nroff filter mode allows you to check the spelling of
Nroff documents.
It is enabled by default when ‘aspell pipe’ is used. When
checking documents with ‘aspell check’ it is automatically
enabled if the first three characters of the file being checked are
.\"
(a nroff
comment marker) or the file name ends in
a one of the following suffixes:
This filter mode skips following nroff
language
elements:
nroff
registers (both traditional two-letter
names and GNU nroff long names)
ds
, de
, nr
,
do
, so
.
\f
) and size switch (\s
)
escapes
\(
) and extended (\[comp1 comp2 …]
) form.
The context filter can be used to spell check source codes, HTML sources and other texts which consist of different contexts. Because this filter is meant to build other filter modes, there is no context mode.
The filter distinguishes between visible and invisible contexts. The visible ones will be spell checked and the invisible ones will be ignored.
(boolean) Switches the context which should be visible to Aspell. When false (the default) the initial context is hidden and only delimited ones are visible. When true the initial context is visible while the delimited ones are hidden.
(list) The context delimiters specified as a space separated pairs. To indicate that a context is always closed by end of line use ‘\0’ sequence as closing delimiter. For example the defaults (for historical reasons) are:
add-context-delimiters /* */ add-context-delimiters // \0 add-context-delimiters " "
which (when context-visible-first is false) spell check C/C++ comments and string literals.
The ccpp filter mode is a context filter that will limit spell checking to C/C++ comments and string literals. Any code in between will be left alone.
These may be used to control the behavior of compound words (for more information see Controlling the Behavior of Compound Words):
(boolean) consider run-together words valid
(integer) maximum number of words that can be strung together
(integer) minimal length of interior words
(boolean) consider camelCase words valid
Miscellaneous other options that don’t fall under any other category
(file) Main configuration file. This file overrides Aspell’s global defaults.
(dir) location of main configuration file
(dir) location of language data files
(dir) alternative location of language data files. This directory is searched before data-dir. It defaults to the same directory the actual main word list is in (which is not necessarily dict-dir)
(dir) location for personal files
(file) personal configuration file. This file overrides options found in the global conf file
(file) use this keyboard layout for suggesting possible words. These spelling errors happen if a user accidently presses a key next to the intended correct key. The default is keyboard standard. If you are creating documents, you may want to set it according to your particular type of keyboard. If spellchecking documents created elsewhere, you might want to set this to the keyboard type for that locale. If you are not sure, just leave this as standard
(dir) prefix directory
(boolean) set the prefix based on executable location (only works on WIN32 and when compiled with --enable-win32-relocatable)
(boolean)
Create a backup file by appending .bak to the file name. This
applies when the command is check
and the backup file is
only created if any spelling modifications take place.
(boolean)
Time load time and suggest time in pipe
mode.
(boolean)
Use byte offsets instead of character offsets in pipe
mode.
(boolean)
Reverse the order of the suggestions list in pipe
mode.
(string) the keymapping to use. Either aspell for the default mapping or ispell to use the same mapping that the Ispell utility uses.
(boolean)
make possible root/affix combinations not in the dictionary in
pipe
mode.
(boolean)
Suggest possible replacements in pipe
mode. If false Aspell
will simply report the misspelling and make no attempt at suggestions
or possible corrections.
Next: Dumping Configuration Values, Previous: Specifying Options, Up: Customizing Aspell [Contents]