Category : EmTeX is a TeX/LaTeX document editor
Archive   : TEXWARE.ZIP
Filename : TEXCHK.DOC

 
Output of file : TEXCHK.DOC contained in archive : TEXWARE.ZIP
NAME
TEXCHK - syntax checker for LaTeX.

SYNOPSIS
texchk [ -v -c -r -2 ] [ 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{}'
'\end{} 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).

-r Control characters (codes 0-31) are allowed.

-2 TeX 2.x. Causes an error message when a character in the
range 128-255 is encountered. Without -2, these characters
are valid.

AUTHOR
JP Massar, Thinking Machines Corporation

ADAPTION FOR DOS AND OS/2
Eberhard Mattes

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.
==============================================================================
TEXCHK.DOC 08.08.1990
==============================================================================

Funktion:
---------

Syntax-Checker fr LaTeX


Aufruf:
-------

texchk [-v] [-c] [-r] [-2] [datei_1] [datei_2] ...


Beschreibung:
-------------

Ohne Angaben von Dateinamen liest texchk von der Standardeingabe
(normalerweise Tastatur) und schreibt Fehlermeldungen und
anderes in die Standardausgabe (normalerweise Bildschirm).
Wenn Dateinamen angegeben sind, werden alle Dateien nacheinander
gelesen und berprft.

texchk berprft die korrekte Schachtelung der geschweiften
Klammern `{' `}' und der eckigen Klammern `[' `]', von
`\begin{environment}' `\end{environment} und der Math-Mode- und
Displayed-Math-Mode-Konstruktionen. Wenn eine ungltige Schachtelung
erkannt wird, gibt texchk eine Fehlermeldung bestehend aus
Fehlergrund, Zeilennummer und Quelltext der Zeile, in welcher
der Fehler auftrat, aus.

Im allgemeinen bricht das Programm ab, sobald der erste Fehler
gefunden und angezeigt wurde, da weitere Diagnoseversuche
wahrscheinlich zu einer ganzen Menge von Meldungen von
Folgefehlern fhren wrde.

Im Unterschied zu LaTeX ist texchk schnell. Es kann sich innerhalb
von wenigen Sekunden durch eine groáe Datei durchfr„sen und kann
mehrfach benutzt werden ohne daá die CPU um Gnade fleht.


Kommandozeilenoptionen:
-----------------------

-v Verbose. Zeigt ein Protokoll der begonnenen und
beendeten Environments an, zusammen mit der
jeweiligen Zeilennummer. Dies dient haupts„chlich dazu,
zu sehen, daá texchk tats„chlich etwas macht wenn
man es auf eine groáe Datei ansetzt. (Die Ausgabe
ist auch ein wenig interessant).

-c Check. Bewirkt den Vergleich eines jeden Kommandos
(z.B. \hspace, \mbox) mit einer Liste bekannter
Kommandos. Wenn das Kommando nicht in der Liste ist,
wird eine Warnung ausgegeben. Zus„tzlich wird jedes
Kommando daraufhin berprft, ob es nur im Mathematikmodus
erlaubt ist. Wenn dem so ist und Mathematikmodus nicht
aktiv ist, wird eine Fehlermeldung ausgegeben (und die
šberprfung fortgesetzt).

-r Steuerzeichen (Codes 0-31) zulassen. Ohne -r ergeben diese
Zeichen eine Fehlermeldung.

-2 Ohne -2 l„át texchk alle Zeichen mit Codes im Bereich
128-255 zu. Wenn -2 angegeben wird, ergeben solche Zeichen
eine Fehlermeldung.


Autor:
------

Originalprogramm (Public Domain):
JP Massar, Thinking Machines Corporation

DOS- und OS/2-Implementation sowie šbersetzung der Anleitung:
Eberhard Mattes


Fehler:
-------

texchk ist nicht perfekt. Es ist durchaus m”glich daá ein von texchk
gemeldeter `Fehler' berhaupt kein Fehler fr LaTeX darstellt.
Die Anzahl von Argumenten, die Anwesenheit optionaler Argumente, usw.
wird nicht berprft. texchk weiá nicht, daá gewisse Kommandos nur
in gewissen Modi verwendet werden k”nnen. Es weiá nicht, daá
`[' und `]' im Text verwendet werden k”nnen, ohne notwendigerweise
paarweise aufzutreten. Auáerdem wird texchk z.B. durch \left] total
verwirrt. Obwohl die $$-Konstruktion von TeX nicht offiziell zu
LaTeX geh”rt, versteht texchk diese.


Žnderungen:
-----------

15.07.90 Neue Option: -2
Alle Zeichen mit Codes 128-255 zul„ssig
\relax ist nun bekanntes Kommando (fr -c)

22.07.90 Neue Option: -r


  3 Responses to “Category : EmTeX is a TeX/LaTeX document editor
Archive   : TEXWARE.ZIP
Filename : TEXCHK.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/