ChkTeX on Mac OS X
(with BBEdit)

ChkTeX is a very nice LaTeX semantic checker.


To install it on Mac OS X you will need to have the developer tools installed (they come with the Mac OS X installer CD's, but they are not installed by default), have administrative access, and follow the following instructions:

(This works for ChkTeX 1.6.4 on Mac OS X 1.4.10)

  1. Download ChkTeX from <>.
  2. Untar the archive, e.g. double-click it in the Finder, and move the resulting folder to a place of your liking (for example, /Applications/ChkTeX/).
  3. Open the Terminal application.
  4. In the Terminal "cd" to the directory were ChkTeX resides. For example,
    cd /Applications/ChkTeX/chktex-1.6.4/
  5. In the terminal run "./configure".
  6. In the terminal run "make".
  7. In the terminal run "sudo make install". It will ask you for your administrator password.
  8. Modify the "chktexrc" in "/usr/local/etc/chktexrc" to your liking, using a text editor; or better still, create "~/.chktexrc" file as per the instructions in ChkTeX's manual (for which you can find a DVI in the source folder after running make).

BBEdit Script

To interface ChkTeX with BBEdit (tested with version 8.7) click here to get the script, copy it to a new script in the Script Editor application and save it in ~/Library/Application Support/BBEdit/Scripts (or a subdirectory of this folder). To use it open a LaTeX file (the BBEdit source language of the file must be "TeX"; BBEdit does this automatically if the suffix of the file is ".tex") and run the script from BBEdit's script menu or palette.

Here is how the interface looks like:

ChkTeX for BBEdit interface

Script version history:

1.0 (10/8/07) Initial public release.
1.1 (10/8/07) Works with paths that have spaces.
1.2 (10/12/07) Uses BBEdit's selected source language to identify if a document is a TeX file. Also, it can be used as a menu script in BBEdit (see John Gruber's Daring Firewall Blog page on his CSS Syntax Checker for BBEdit and TextWrangler for an explanation of what this feature is).


If you do not own BBEdit I created a droplet application on which one can drop LaTeX files (suffix .tex) and it will create a file with the same base name, but with suffix .err, where all of ChkTeX error messages are. Click here to download it.

Copyright ©2007 Ramón M. Figueroa-Centeno. All Rights Reserved.


Page updated: Sunday, April 4, 2010 11:32 PM HST