How to Add LaTeX-sensitive Spell Checking for Emacs with ISPELL v. 3.1

This page was last updated on September 1, 1999.

You can now spell-check your LaTeX documents from within Emacs with ISPELL v.3.1. Note: this is a special version that has been ported to work with Windows by Gerd Boehm. Neither of us is responsible for performance problems. I have had really good luck with it, however!

In accordance with the spirit of the GNU license, I have done some pre-setting up and have re-packaged the U.S. English version of the software to make it easier to work with. The steps below are just a suggestion and examples of how to set up ISPELL. The original version (with many languages other than U.S. English) may be found at:, and more information can be found at the ISPELL home page.

When you are done installing, you should be able to spell-check your document from within Emacs from the menu Edit->Spell->Check Buffer

1) Download the file

2) Unzip the file with WinZip into c:\ your root directory. It should create the directory c:\ispell and place the files in there.

3) Download the file ispell.el into your c:\emacs\site-lisp directory.

4) Edit your AUTOEXEC.BAT file to add the path c:\ispell\bin . You can simply add the line:

SET PATH=%PATH%;c:\ispell\bin 
 to your existing AUTOEXEC.BAT file.

5) The following instructions are from Piet Tutelaers' readme file, with minor changes. Windows 95\98 users have to add the following line to their CONFIG.SYS:


And Win/NT users need the following line in their CONFIG.NT (or CONFIG.SYS):


6) Do one of the following:

a) If you are using the _emacs file from this web site's Emacs installation section, you may simply replace that file with this one: _emacs


b) Add the following lines to your c:\emacs\_emacs file before the last section where tex-site is loaded:

;; use ISPELL on PC 3.1.20

(autoload 'ispell-word "ispell"
"Check the spelling of word in buffer." t)
(global-set-key "\e$" 'ispell-word)
(autoload 'ispell-region "ispell"
"Check the spelling of region." t)
(autoload 'ispell-buffer "ispell"
"Check the spelling of buffer." t)
(autoload 'ispell-complete-word "ispell"
"Look up current word in dictionary and try to complete it." t)
(autoload 'ispell-change-dictionary "ispell"
"Change ispell dictionary." t)
(autoload 'ispell-message "ispell"
"Check spelling of mail message or news post.")
;still necessary
(setenv "TEMP" "c:/windows/temp")
(setenv "TMP" "c:/windows/temp")
; helpful
(setq text-mode-hook '(lambda ()
(local-set-key "\M-\t" 'ispell-complete-word)))
(setq tex-mode-hook '(lambda ()
(local-set-key "\M-\t" 'ispell-complete-word)))
(setq latex-mode-hook '(lambda ()
(local-set-key "\M-\t" 'ispell-complete-word)))
; enable tex parser, also very helpful
(setq ispell-enable-tex-parser t)

7) Re-boot.

8) Spell-check from within Emacs by choosing Edit -> Spell from the menu bar.