Currenty I am on LaTeX-mode-hook using flycheck.

(setq LaTeX-item-indent 0)
(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
(add-hook 'LaTeX-mode-hook 'hl-todo-mode)
(require 'tex)

(add-hook 'LaTeX-mode-hook (lambda ()
  (TeX-global-PDF-mode t)

(setq flyspell-issue-message-flag nil
      ispell-local-dictionary "en_US"
      ispell-program-name "aspell"
      ispell-extra-args '("--sug-mode=ultra"))

(dolist (hook '(text-mode-hook))
     (add-hook hook (lambda () (flyspell-mode 1))))
    (dolist (hook '(change-log-mode-hook log-edit-mode-hook))
      (add-hook hook (lambda () (flyspell-mode -1))))

For example I am getting following flycheck-warning message when I write function() into my .tex file:

You should put a space in front of parenthesis. [36]

[Q] Is there any way to ignore specific flycheck-warning messages?

  • Please see this answer to a similar question for all the ways to suppress certain warnings. In this case, I think what you want is to add --nowarn 36 to the CmdLine section of your chktexrc file. Apr 25 at 16:31

1 Answer 1


You don't disable warning messages at the flycheck level; you disable them using the underlying checker, which in your case for latex-mode is chktex. One can find the underlying checker by running M-x flycheck-describe-checker RET.

The chktex manual explains how to do per line suppression by adding a case-insensitive comment to the end your line % chktex ## where ## is the error number. In your case you would add % chktex 36.

  • Should I add % chktex 36 into each line I don't want flyspell activated?
    – alper
    Jun 3, 2020 at 12:38
  • Not quite. The error code 36 is specific to neglecting to put a space in front of the parenthesis. Not all lines will have an error code of 36, because chktex might warn you about other things. Generally the idea behind linters like chktex is they tell you "hey, you might be doing something wrong" and you adding that comment tells chktex "thanks for the warning, but I'm doing this intentionally." You can disable a particular code for the whole file using % chktex-file 36 or in a chktexrc configuration file as explained in the manual linked above. Jun 4, 2020 at 13:12
  • Cool adding % chktex-file 36 actually suppress all the warning messages in the complete latex file
    – alper
    Jul 6, 2020 at 17:56
  • Is it also possible to completely disable chktex in the buffer?
    – alper
    Apr 24 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.