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

Rolf Turner r.turner at auckland.ac.nz
Sun Apr 16 03:31:55 CEST 2017

See inline below.

On 16/04/17 12: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 "?

*Look* at the result for crying out loud!  A keyboard double quote mark 
is always rendered as two acute accents, which is OK at the end of a 
quotation, but you want two acute accents at the beginning.

> 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

Not sure about this.  Perhaps the warning is because the tail of the "g" 
in "managed" is sticking down too far into the next line.

> 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?

The vertical rules are the vertical rules!!! As in ... l|l|l ...

Avoid them by leaving them out.  Use ...lll... .

These days typographers frown on vertical rules for some reason.  One is 
often exhorted to use the booktabs package which forbids them.  I'm not 
sure I completely agree with the typographers.  Apparently Lamport 
didn't, when he wrote "LaTeX:  A  Document Preparation System", for he 
used vertical rules freely.

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

No.  None do, really.

> 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?

Perhaps: ... findings \texttt{ :-) }

Or put \usepackage{wasysym} in your preamble and use \smiley.

> Warning 9 in wms.tex line 348: `}' expected, found `)'.
> Your welcome to test it yourself and submit your findings :)
>                                                            ^
> Warning 10 in wms.tex line 350: Solo `}' found.
> some WMs and not on others.}
>                            ^

Well, it looks to me like you've got an unbalanced brace, i.e. a right 
"}" with no balancing left "{".

> # If I write something like this (and that too).
> # What do I do to not upset chktex?

Do things correctly?

You should also learn some English; it's "you're welcome" not "your welcome"


Rolf Turner

Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

More information about the texhax mailing list