[Tex/LaTex] Language and spell check


How can I declare a language on Latex and have a grammar/spell check on the text?

I would like to have highlighted the words that are not recognized by the system for the given language (English).

For the moment I am using TeXStudio on Windows 10.

Best Answer

According to the Texstudio manual, the standard distribution already has an English spellchecker. You perform a spell check by using the shortcut Ctrl+Shift+F7. Spell checking will start at the cursor position and not at the beginning of the document.

In addition, you may use a ‘magic comment’ in your TeX- source file:

% !TeX spellcheck = en_GB 

If this comment is present in a file, the given language is automatically used for spell checks.


% !TeX spellcheck = en_US 

if you prefer US spelling. You use this code in all .tex-files you want to spell check, i.e. both in the main file and in the chapter files, if your sources are divided in multiple chapters.

Remember, the percent sign is mandatory.

Section 1.4 in the manual has detailed information how to set up different languages and perform spell checks (and grammar checks).

Related Question