[texhax] chktex, are it's reports any good?

David Carlisle d.p.carlisle at gmail.com
Sun Apr 16 11:16:47 CEST 2017

On 16 April 2017 at 01:50, <great123456 at mail.com> wrote:

> A few days ago I found and ran chtex over my source. Though my source
> produces correct results when latex runs it over I did get a surprising
> amount of warnings. I have been rather through about reading about
> latex, so some things are easy to fix but hard to understand why they are
> wrong, the opposite is true for others so please land a hand (I have
> removed duplicate warnings).
> Thanks,
> David
> % chktex wms.tex
> ChkTeX v1.7.1 - Copyright 1995-96 Jens T. Berger Thielemann.
> Compiled with PCRE regex support.
> Warning 18 in wms.tex line 36: Use either `` or '' as an alternative to
> `"'. Also, several of the WMs advertize "session managment" which should
> remember ^
> # What is wrong with "?

" is never correct as an input character. Depending on the font encoding in
use it may, produce a double right quote
but even that is not guaranteed in general. use ` ` ' '  (without the

> Warning 13 in wms.tex line 39: Intersentence spacing (`\@') should
> perhaps be used.
> is managed when restarting the WM. So "session management" means several
> things ^
> # I'm lost here

after WM. the . is taken to be marking an abbreviation so if, as seems
likely given the capital S following,
you want an end of sentence here you need to mark that with \@

> Warning 44 in wms.tex line 52: User Regex: -2:Vertical rules in tables
> are ugly. \begin{tabular}{l|l|l|l|l|l|l|l|l|l}
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> # What is a vertical rule, and how do I avoid it?

Se the booktabs package for a diatribe on the evils of vertical rules:-)
Unlike the others this is simply suggesting a stylistic choice, that you
vertical rules in tables (by not using |)

> Warning 1 in wms.tex line 338: Command terminated with space.
> \cleardoublepage
>                 ^
> # Don't all commands end with a space?

well yes but if it was "\LaTeX is weird"  the space intended to be output
just be taken as a command termination, and you'd need \LaTeX\ is
Presumably the checking command can not classify commands that produce
text from those like \cleardoublepage that do not. So the warning is
spurious here.

> Warning 26 in wms.tex line 348: You ought to remove spaces in front of
> punctuation.
> Your welcome to test it yourself and submit your findings :)
>                                                          ^
> # How do you make a smiley then?
> Warning 9 in wms.tex line 348: `}' expected, found `)'.
> Your welcome to test it yourself and submit your findings :)

again this is implementing a style suggestion based on classical
english punctuation. If you are making smiley's (or if you are French)
this advice is probably not right for your uses.

> Warning 10 in wms.tex line 350: Solo `}' found.
> some WMs and not on others.}
>                            ^
> # If I write something like this (and that too).
> # What do I do to not upset chktex?

That looks like a TeX syntax error if it really is an unmatched }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20170416/c93cf43e/attachment.html>

More information about the texhax mailing list