If I use ChkTeX for the following LaTeX source:
\documentclass{article}
\begin{document}
The quick {\itshape brown fox\/} jumps over the {\bfseries lazy dog}.
\end{document}
then I get a warning:
ChkTeX v1.7.6 - Copyright 1995-96 Jens T. Berger Thielemann.
Compiled with PCRE regex support.
Warning 1 in test.tex line 3: Command terminated with space.
The quick {\itshape brown fox\/} jumps over the {\bfseries lazy dog}.
^
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.
I know what ChkTeX means and I can remove/suppress this warning by
- inserting
{}
just after\itshape
(though it inserts an extra space), - per line suppression,
% chktex 1
, or - adding
\itshape
in theSilent
section of the customchktexrc
file.
But my question is why \itshape
is not listed in Silent
of the default chktexrc
, while \bfseries
and \slshape
etc. are there.
Is there some typesetting reason to separate \itshape
from other commands like \bfseries
and \slshape
? Or is it just missing in the default chktexrc
, which is an issue that should be fixed in the ChkTeX repository?
Best Answer
Full disclosure: I am the current maintainer of ChkTeX.
I don't know of any reason for
\itshape
not to be inSilent
, but it was written a long time ago (several maintainers ago) and I have not done a good job of keeping it up to date. Frankly, like @david-carlisle, I don't find that particular warning that helpful and so I have turned off. That means I don't find any of these false positives and so I don't add them to the defaultchktexrc
. It's sort of a self-perpetuating cycle.I think you should do or more of the following:
\itshape
toSilent
in your localchktexrc
.