adding spelling dictionaries to TeXWorks

May 25, 2013

I started using LaTeX while working on a qualifying paper as a graduate student at Rutgers.  At that point I was still using Windows and Word, and I just couldn’t get the paper to look like I wanted it to in Word, despite having used it for a decade and having taught it to high school students for a year.  That’s not to say that I couldn’t have done it in Word, just that even after a decade I found Word completely unintuitive and difficult to customize.  Switching to LaTeX made it possible for me to end up with a document that looked professionally typeset and appeared exactly as I wanted, with little explicit formatting on my part.  LaTeX also eased my transition to Ubuntu, since I could continue using TeXWorks, whereas I wouldn’t have been able to continue using Word (at least not without Wine).

Before I switched to TeX I was afraid it would be difficult to compose in, since TeXWorks and other TeX editors aren’t WYSIWYG, so you don’t see things like italics or font faces in the document you’re editing.  However, for me it didn’t take long to adjust to typing in the editor on the left side of the screen and hitting Ctrl+t whenever I wanted to see what the formatting looked like (Ctrl+t typesets the document and also saves it).  Another nice feature is that converts from WYSIWYG editors don’t have to give up their little red underlining for misspelled words.  You just have to have to right spelling dictionary installed and then tell the editor to use that dictionary (under Edit > Spelling).  Unfortunately, the current default version of TeXWorks for Ubuntu only comes preinstalled with spelling dictionaries for British and South African English (who knows why — the last default package had only Canadian English).  Oh noes!

Luckily it’s not difficult to install a new spelling dictionary.  What I was looking for is the US English dictionary — en_US.  This consists of two parts: en_US.aff and en_US.dict.  These files are included in the OpenOffice en_US spelling dictionary available here:  You’ll have to download the file, then extract the contents using, e.g., Archive Manager.

Once you have the two files (en_US.aff and en_US.dict) you’ll have to copy them to the correct location.  For Ubuntu this is /usr/share/myspell/dicts.  Copying to this directory requires administrative privileges, so I recommend copying them using the terminal (I’ve gotten myself into trouble using the Nautilus file browser as root).  To do this you’ll use the copy utility: sudo cp <file location> /usr/share/myspell/dicts.  In my case I had the files in my Downloads folder of my home directory, so the exact command I used was sudo cp ./Downloads/en_US.aff /usr/share/myspell/dicts.  Do this for both files, and you’re done!  After restarting TeXWorks you’ll be able to select the en_US spelling dictionary and spellcheck your work in US English.


One Response to “adding spelling dictionaries to TeXWorks”

  1. netblue30 Says:

    Try this:

    $ apt-cache search hunspell

    It will give you a list with all dictionary packages for hunspell. Pick the one you need and install it:

    $ sudo apt-get install hunspell-en-us

    Then do the same for myspell:

    $ apt-cache search myspell
    $ myspell-es

    Some languages appear in myspell list, others in hunspell list. Some of them are in both lists.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: