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.

  • 1
    This is not a TeX/Latex/ question, because it depends on your editor. You need to give information regarding your editor, and which operating system you are running.
    – Sveinung
    Commented Jan 4, 2017 at 9:34
  • I updated... I thought there was a package or something like that
    – user25954
    Commented Jan 4, 2017 at 9:50
  • Regarding the question on a LaTeX package, there is the question tex.stackexchange.com/q/42843/9075.
    – koppor
    Commented Jun 6, 2022 at 14:20

1 Answer 1


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).

  • Shall the code be in the main.tex file?
    – user25954
    Commented Jan 4, 2017 at 12:20
  • 2
    In all .tex-files you want to spell check (i.e. also at the top of any chapter files, if your sources is divided in multiple files).
    – Sveinung
    Commented Jan 4, 2017 at 12:40
  • 2
    @user25954 If you enable the spellchecking via the preferences of Texstusio and select your language there, you don't have to use any code, it will automatically check the spelling in all your open documents. Read the links to the manual. Commented Jan 4, 2017 at 12:56
  • did not know why was in german... thanks a lot!
    – user25954
    Commented Jan 5, 2017 at 10:14

You must log in to answer this question.

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