TEXCHK

Section: User Commands (1)
Updated: 3/13/85
Index Return to Main Contents
 

NAME

TEXCHK - syntax checker for LaTeX.  

SYNOPSIS

texchk [ -v -c ] [ file1 file2 ... ]  

DESCRIPTION

By default texchk reads from standard input and outputs error messages and whatnot to standard error. If filenames are given as arguments, each file is read and parsed in turn.

texchk checks for the proper nesting of matching '{' '}' and '[' ']' pairs, matching '\begin{<environment>}' '\end{<environment>} pairs, and Math Mode and Display Math Mode constructs. If improper nesting is detected, an error message consisting of a reason, a line number, and the actual line of text on which the error occurred is displayed.

In general, the program will halt after finding and printing the first error, because attempts at further diagnosis would likely result in a stream of spurious error messages.

Unlike LaTeX texchk is fast. It can grovel over a large file in a matter of a few seconds, and can be run repeatedly without causing the CPU to beg for mercy.

The command line options are:

-v
Verbose option. Produces on the standard output a trace of each environment texchk enters and leaves, along with the number of the line it is currently processing. This is used basically to assure yourself that texchk is actually doing something, if you give it a huge file to process. (And is mildly interesting).
-c
Check mode. Tells texchk to check each keyword (e.g., \hspace, \mbox) in the file against a list of known keywords, and issue a warning if the keyword is not in the list. Also, each keyword is checked as to whether it is only legal if given inside of math mode, and if so and if math mode is not enabled, an error message is given (but processing continues).
 

FILES

/usr/src/local/cmd/texchk              source directory.

/usr/local/texchk                      executable image.
 

AUTHOR

JP Massar, Thinking Machines Corporation  

BUGS

texchk makes no claims to being perfect. It is quite possible that an 'error' flagged by texchk is not really an error at all if run through LaTeX.

It does not check for number of arguments, presence of optional arguments, etc.

It does not know that certain keywords can only be used in certain modes.

It does not understand that '[' and ']' can be used in regular text without necessarily being paired. Also, \left], for example, will confuse it totally.

Although not officially part of LaTeX, texchk understands the '$$' construct of TeX.


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILES
AUTHOR
BUGS

This document was created by man2html, using the manual pages.
Time: 06:40:06 GMT, December 12, 2024