chktex – How to Prevent `You Should Put a Space in Front of Parenthesis` Message for Text in textit

chktex

For following text \textit{submitTest()} I am getting a warning message which is:

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


This warning message is suppress when I replace it into: \textit{submitTest\,()}, I believe from chktex.

Is it possible to prevent this message for textes take place in \textit{}?


Example code piece:

\documentclass[10pt,journal,compsoc]{IEEEtran}
\usepackage[table]{xcolor}

\begin{document}
\textit{testJob()}
\end{document}

$ chktex --version
ChkTeX v1.7.6 - Copyright 1995-96 Jens T. Berger Thielemann.
Compiled with POSIX extended regex support.
$ chktex base.tex
ChkTeX v1.7.6 - Copyright 1995-96 Jens T. Berger Thielemann.
Compiled with POSIX extended regex support.
Warning 36 in base.tex line 5: You should put a space in front of parenthesis.
\textit{testJob()}
               ^
No errors printed; One warning printed; No user suppressed warnings; No line suppressed warnings.
See the manual for how to suppress some or all of these warnings/errors.

Best Answer

I'll point you to my answer to a similar question for several ways to suppress this warning. The only difference is that instead of editing the NumDash section, you could add \textit to WipeArg (to ignore all warnings inside \textit. If you were to do that though, I would suggest creating a semantic macro, like \code and adding that instead. (I would suggest that anyway since I believe in semantic markup.) There are many reasons to use \textit and only some of them would want to ignore errors.

But if turning it off in Emacs is what you wanted then great! Though I'm curious how it got turned on without you knowing.