ChkTeX - LaTeX semantic checker

I, Ivan Andrus, am the newest maintainer of ChkTeX and released version 1.6.6 on April 7, 2012 and version 1.7.2 on April 18, 2013. Many thanks to Baruch Even who has been maintaining ChkTeX by himself for quite some time. Many thanks also to the TeX Live maintainers (Peter Breitenlohner in particular) for supplying many patches, and to Antonio DiCesare for many bug reports and suggestions.

Development happens in a Subversion repository on Savannah. ChkTeX has been stable for a long time, and bug fixes will continue to be done if necessary on the 1.6 version branch. I have implemented a few new features on the trunk and started numbering these versions at 1.7.

The latest stable versions are:

|             #####  ###       ###    ########     ###     ##
|           ###   ##  ##        ##       ##          ##   #
|          @@         @@ @@@    @@  @@   @@  #######  @@ @
|          @@         @@@  @@   @@ @@    @@   ##   #   @@
|          &&         &&   &&   &&&&     &&   @@      & &&
|           &&&   &&  &&   &&   && &&    &&   @@@@   &   &&
|             %%%%%  %%%   %%% %%%  %%%  %%   &&   %%%    %%% v1.7.2
|                                             &&   &
|                                            %%%%%%%

Major new features of the 1.7 branch include

Introduction

This program has been written in frustration because some constructs in LaTeX are sometimes non-intuitive, and easy to forget. It is _not_ a replacement for the built-in checker in LaTeX; however it catches some typographic errors LaTeX oversees. In other words, it is Lint for LaTeX. Filters are also provided for checking the LaTeX parts of CWEB documents. Features are summarized below or you can read the manual (pdf).

The program also supports output formats suitable for further processing by editors or other programs, making errors easy to cycle through. Software is provided for beautifully interfacing against the AUCTeX Emacs mode. It is known to interface with LyX. There are also 3rd party interfaces to BBEdit and TeXShop. If you would like an interface to your editor of choice, or even better if you can provide one, please let me know.

Features

ChkTeX begins to get quite a few bells and whistles now. However, you should be aware of that in most cases, all this is transparent to the user. As you will see, ChkTeX offers the ability to adapt to many environments and configurations. See the NEWS file for information about new features and when they were added.

Feature list

     * Supports over 40 warnings. Warnings include:
          + Commands terminated with space. Ignores ``\tt'', etc.
          + Space in front of references instead of ``~''.
          + Forgetting to group parenthesis characters when
            sub-/superscripting.
          + Italic correction (``\/'') mistakes (double, missing,
            unnecessary).
          + Parenthesis and environment matching.
          + Ellipsis detection; also checks whether to use ``\dots'',
            ``\cdots'' or ``\ldots''.
          + Enforcement of normal space after abbreviation. Detects most
            abbreviations automagically.
          + Enforcement of end-of-sentence space when the last sentence
            ended with capital letter.
          + Math-mode on/off detection.
          + Quote checking, both wrong types (``"'') and wrong direction.
          + Recommends splitting three quotes in a row.
          + Searching for user patterns (regular expression or literal).
          + Displays comments.
          + Space in front of ``\label'' and similar commands.
          + Use of ``x'' instead of ``$\times$'' between numbers.
          + Multiple spaces in input which will be rendered as one space
            (or multiple spaces, where that is undesirable).
          + Warns about text which may be ignored.
          + Mathematical operators typeset as variables.
          + No space in front of/after parenthesis.
          + Demands a consistent quote style.
          + Punctuation inside inner math mode/outside display math mode.
          + Use of TeX primitives where LaTeX equivalents are available.
          + Space in front of footnotes.
          + Bogus characters following commands.
     * Fully customizable. Intelligent resource format makes it possible
       to make ChkTeX respect your LaTeX setup. Even command-line options
       may be specified globally in the ``chktexrc'' file.
     * Warnings can be suppressed on single lines or files via LaTeX comments.
     * Supports ``\input'' command; both TeX and LaTeX version. Actually
       includes the files. ``TEXINPUTS''-equivalent search path.
     * Intelligent warning/error handling. The user may promote/mute
       warnings to suit his preferences. You may also mute warnings in
       the header of a file; thus killing much unwanted garbage.
     * Scripts included for checking CWEB files written in LaTeX.
       (Requires perl v5).
     * Supports both LaTeX 2.09 and LaTeX2e.
     * Flexible output handling. Has some predefined formats and lets the
       user specify his own format. Uses a ``printf()'' similar syntax.
       ``lacheck'' compatible mode included for interfacing with the
       AUCTeX Emacs mode.
     * Wildcard matching (Amiga only). Matches file patterns internally,
       thus saving a lot of work. This is, however, platform-specific
       code -- on UNIX boxes this is done by the shell.
     * Written in ANSI C. ``configure'' script included for easy setup
       and installation on UNIX systems.

Still, it is important to realize that the output from ChkTeX is only intended as a guide to fixing faults. It is by no means always correct. This means that correct LaTeX code may produce errors in ChkTeX, and vice versa: Incorrect LaTeX code may pass silently through.

Legal stuff

   ChkTeX, documentation, installations scripts, CWEB filters and other
   materials provided are copyright  1995-96 Jens T. Berger Thielemann,
   unless explicitly stated otherwise.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or (at
   your option) any later version.

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to:

     The Free Software Foundation, Inc.
     675 Mass Ave
     Cambridge
     MA 02139
     USA

Last modified by Ivan Andrus on 2012-05-28.