Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can you spellcheck your LaTeX document for English/German/Finnish?

I would like to check my spelling for one of my white papers. Its comments are written in German, TODO -comments in Finnish and codes in English.

I know how you can spellcheck English but not the other two languages.

I am using at the moment the method of moving my documents to OpenOffice and then spell checking there. However, this is very ineffective.

I would like to

  1. find parts of code in different languages
  2. put these parts to separate files such that I can spellcheck them
  3. and then combine the spellchecked files back to one
share|improve this question
up vote 9 down vote accepted

I think you can setup multiple spelling files in VIM to work together.

set spelllang=en,de
  • Read up the VIM pages for configurations (and, if required, creation of new spelling files)
  • You may need to fetch some of the .spl spelling files if they are not available in your spell/ directory
  • Check specifically, spl files, sug files, spellang, spellsuggest

You can also check Vimchant : Fast on-the-fly spell-checker based on Enchant


Using latexmk, vim spell checking and vim latex-suite
(it also refers to Sourceforge Kile, an Integrated LaTeX Environment)

share|improve this answer

You use aspell. Granted there's a built in checked in vim 7, but I don't know if it supports TeX. I do know that aspell does.

share|improve this answer

Here is what I am using in my Makefile to invoke hunspell (notice the -t parameter for LaTeX compatibility):

spell-check: $(FILE).tex
    hunspell -d en_GB -t $<

You have to check the available dictionaries on your system (on my Ubuntu I used 'locate .dic'). And I suppose you can create a macro in vim to call this specific command.

Edit:

Hunspell has its own dictionaries (see the list of hunspell dictionaries), and you can use myspell dictionaries as well, as hunspell is based on myspell

share|improve this answer
1  
I found dictionaries for German and English. However, I cannot find the dictionary for Finnish. For instance, no dictionary for Finnish at ftp.vim.org/vim/runtime/spell – Masi Aug 11 '09 at 13:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .