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.
It is written in ANSI C and compiles silently under GCC using “-Wall -ansi -pedantic” and almost all warning flags. This means that you can compile & use the program on your favorite machine. Full source included.
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 AUC-TEX Emacs mode, CygnusED, GoldEd and various Amiga message browsers.
The program itself does not have any machine requirements; Amiga, MSDOS and OS/2 binaries are available. Of course, you’ll need ARexx and ScMsg or VBrowse to benefit from the ARexx scripts.
ChkTEX begins to get quite a few bells & 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.
Modifications and additions since v1.6:
Modifications and additions since v1.5:
Modifications and additions since v1.4:
Modifications to the executable itself:
Done much of the same with the italic correction detection part, too...
Along with this goes more code elegance and utilization of macro processing and the C language. Take a look at “Resource.[ch]”.
New concepts introduced in the setup file:
Various other stuff I’ve done to the product:
For those of you who don’t wish to mess with Emacs, I’ve included a trivial lacheck ChkTEX interface.
This means that you now can use ChkTEX just as easily as lacheck when you’re running AUC-TEX.
|
Still, it is important to realize that the output from ChkTEX is only intended as a guide to fixing faults. However, 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.
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
‘ChkTEX’ is made available under the concept of Gift-Ware, which is a variant of Share-Ware. Share-Ware software authors often release ‘crippled’ versions of their products, i.e. these programs do not support the same functionality as the registered versions you get when sending monetary contributions to the authors. It all comes down to ‘pay for the software you are using’ in Share-Ware terms. With Gift-Ware registration it is different, you are not required to contribute money, but a gift will do. With ‘ChkTEX’ you always get a fully functional program, there is no ‘crippled’ test release which you can try for a limited time and then have to pay for in order to receive the working registered version.
It may seem as if ‘ChkTEX’ was free, but this is not the case. Although there is no need to pay the author in order to get a fully functional version of the program you should consider making a contribution. You don’t need to feel guilty if you cannot or do not want to give me something in return for the work I have put into ‘ChkTEX’. Show me that it was worth spending so much time listening to users, updating, rewriting and enhancing this program. Your contributions will provide the motivation for me to keep developing the program.
Send your contribution to the following address:
Jens Berger
Spektrumvn. 4
N-0666 Oslo
Norway
A few words on installation on various platforms:
If you’re running Emacs, you may wish to copy the file “chktex.el” to your elisp source directory, and add the following line to your “.emacs” file:
(require 'chktex)
|
If you haven’t installed any software like this before, that is distributed in source form, here are some guidelines to help you install it locally at your account. Please note that a mail to the system administrator may be less work for you. :-)
We assume that you have put the archive (“chktex.tar.gz”) in a subdir of yours, with path “~/tmp”. We further assume that your shell is “csh” or “tcsh”. Do the following:
> cd ~/tmp
> gunzip chktex.tar.gz > tar xf chktex.tar |
This option needs the path of your elisp directory as argument, e.g. “--enable-emacs-hack=/home/myself/elisp” or similar.
You’ll also have to add the following line to your “.emacs” file:
(require 'chktex)
|
You can now access ChkTEX from the “Command” menu in AUC-TEX. To cycle through the messages, type C-x `.
While more stable than the previous solution, this is also significantly less elegant -- in computing terms, this is the “brute force” approach.
This may be useful if you’re running short of disk space (the time savings are neglible).
If you are installing the program on your local account, use the following command:
> configure --prefix ~/
|
Add eventual extra flags as specified above. This command will generate a significant amount of output, this can usually be ignored.
> make
> make install |
> rehash
|
To make the remaining parts of your system aware of this, you’ll have to log out and re-log in, I’m afraid. However, you should delay this until you’ve completed this installation procedure.
> make check
|
Now, I would suggest that you take a peak at the “OpSys.c” file, and edit it appropiately, for more comfort. This should not be necessary, though, at least not the first time.
Finally, you may now compile and link all .c files. Define “HAVE_CONFIG_H” to 1
(on the command-line, for instance). If the “config.h” you wish to use has
another name, define “CONFIG_H_NAME” to that (in that case, don’t define
“HAVE_CONFIG_H”).
Put the directory path of the “chktexrc” file in a environment variable named
“CHKTEXRC”. The files “deweb.in” and “chkweb” should be moved to a directory in
your path. These files may need further setup, as they haven’t got the location of
perl initialized.
If your compiler/the compiled program complains (or crashes!), you may try the
hints listed below. Please note that it only makes sense to try these hints if your
compiler fails to produce a working program.
Note: You must install the new “chktexrc” file; ChkTEX will fail to function unless!
After doing this, you may enhance ChkTEX’ behaviour by reading/editing the “chktexrc” file.
Amiga v2.04+ users may wish to note that you may pass the files that ChkTEX is to process by shift-clicking them. In addition, you may specify the arguments as tooltypes to the main program icon, using the Info menu option. For instance, if you wish to make the ‘fancy’ output the default when starting from Workbench, enter the following as a tooltype:
Verbosity=2
|
We use the WB2Argv package (also developed by me, available on Aminet as “dev/c/WB2Argv.lha”), and will fold case until the “=” character, in tradition with the case-insensitivity of Amiga OS. In all other respects (and platforms), the options listed below are case-sensitive.
A UNIX-compliant template format follows:
chktex | [-hiqrW] [-v[0-...]] [-l <rcfile>] [-[wemn] <[1-42]|all>] [-d[0-...]] [-p <pseudoname>] [-o <outputfile>] [-[btxgI][0|1]] file1 file2 ... |
These are the options ChkTEX currently accepts. Please note that single-lettered options requiring a numerical or no argument may be concatenated. E.g. saying “-v0qb0w2” is the same as saying “-v0 -q -b0 -w2”, except for being less to type.
Enough general talk; here’s a rather detailed description of all options:
Value | Dumps. . . |
1 | All warnings available and their current status. |
2 | Statistics for all lists in the resource file. |
4 | The contents of all lists in the resource file. |
8 | Misc. other status information. |
16 | Run-time info (note that this isn’t widely used). |
It is possible to install versions of ChkTEX that ignore this flag; this means that it is not certain that this flag works.
The default is mode 1 (that is, the second entry in the “chktexrc” file), using -v without any parameter will give you mode 2.
File:Line:Column:Warning number:Warning message
|
The colons may be replaced with another string; use the -s switch for
this.
As the program does not output all errors in quite order, this output
format is also suitable for piping through “sort”.
"File", line Line: Warning message
|
To utilize this, type M-x compile RET. Delete whatever is written in the minibuffer, and type chktex -v3 texfile.tex, and you should be able to browse through the error messages. Use C-x ` to parse the messages.
Code | Description |
%b | String to print between fields (from -s option). |
%c | Column position of error. |
%d | Length of error (digit). |
%f | Current filename. |
%i | Turn on inverse printing mode. |
%I | Turn off inverse printing mode. |
%k | kind of error (warning, error, message). |
%l | line number of error. |
%m | Warning message. |
%n | Warning number. |
%u | An underlining line (like the one which appears when using “-v1”). |
%r | Part of line in front of error (‘S’ - 1). |
%s | Part of line which contains error (string). |
%t | Part of line after error (‘S’ + 1). |
Other characters will be passed literally; thus you can say “%%” to achieve a single percent sign in the output. Please note that we may introduce other specifiers in the future, so don’t abuse this feature for other characters.
Also, note that we do not support field lengths (yet). This may come in the future, if I get the time...
The -v command is implemented by indexing into the “chktexrc” file; read that for seeing how each format is implemented. If you find yourself using a particular format often by using the -f switch, consider putting it in the “chktexrc” file instead.
The default is to use the same mode as specified with the -v switch; using -V without any parameter will give you mode 1.
This switch was implemented because GNU less has problems with the escape codes ChkTEX uses for displaying inverse text. Under UNIX, there’s another way around, though, which is slightly more elegant. Add the following line to your “.envir” file:
setenv LESS -r
|
We will only assume this name for the uppermost file; files that this one in turn \input are presented under their original names. This seems most logical to me.
If you don’t specify any input LATEX-files on the commandline, we’ll read from stdin. To abort stdin input, press the following keycombinations:
Machine | Key-combination |
Amiga | Ctrl + \ |
UNIX | Ctrl + D |
MS-DOS | Ctrl + Z, followed by return. |
By default, we’re using the 1994 version of GNU’s “getopt()” routine. For those of you who have only used the Amiga’s “ReadArgs()”, here are some quick instructions:
You should also take a look at the “chktexrc” file. As the file is self-documenting; you should be able to get the meaning of each keyword by simply reading the file. The method for finding it, however, has grown rather complex. An outline is given below.
If ChkTEX finds multiple files when searching, each and everyone will be read in the order specified below. The “Keyword ={ item item ...}” may thus be necessary to reset previously defined lists.
In this list, “$foo” is assumed to be the environment variable “foo”:
Machine | Directory |
2.04+ Amiga | ENV:.chktexrc |
1.3 Amiga | S:.chktexrc |
UNIX | “$HOME/.chktexrc” or “$LOGDIR/.chktexrc” |
MSDOS | Program installation path |
Machine | Directory |
Amiga | “$CHKTEXRC/.chktexrc” |
UNIX | “$CHKTEXRC/.chktexrc” |
MSDOS | “$CHKTEXRC\chktexrc”, “$CHKTEX_HOME\chktexrc” or “$EMTEXDIR\data\chktexrc” |
If you for some reason wish to undo what the previous files may have done, you may say “CmdLine { -g0 -r }” somewhere in the “chktexrc” file; this will reset all previous settings.
I’ve tried to collect some advice that may be useful -- if you have a favourite hint, feel free to send it to me!
% ChkTeX will ignore material within this environment
\newenvironment{ignore}{}{} |
In addition, you should add the item “ignore” to the “VerbEnvir” entry in the “chktexrc” file.
No fatal ones, I think, but the program currently has some problems when a LATEX command/parameter stretch over a two lines -- some extra spaces may be inserted into the input. I regard the program as fairly well tested; using the SAS/C “cover” utility I was able to make sure that approximately 95% of the code has actually been run successfully in the final version. This does indeed leave some lines; most of these are procedure terminating brackets or “can’t happen” lines, though.
We’ve got some problems when isolating the arguments of a command. Although improved, it will certainly fail in certain cases; ChkTEX can for instance not handle arguments stretching over two lines. This also means that “WIPEARG” entries in the “chktexrc” file will only have the first half of their argument wiped if the argument stretches over two lines. We will, however, take care not to wipe parenthesis in such cases, in order to avoid false warnings.
Before submitting a bug report, please first see whether the problem can be solved by editing the “chktexrc” file appropiately.
This shell script is provided for checking CWEB files. The template is as follows:
chkweb [options] file1 file2 ...
|
As you may see from the script, it is only a trivial interface towards deweb and ChkTEX.
It does not support any individual options on the command line -- all options found will
be passed onto ChkTEX. If “--” or a filename is found, the remaining parameters will be
ignored. The only real intelligence it features is that it will try to append .w to filenames
it can’t find.
If no filenames are given, we will read from stdin.
This program strips away C code and CWEB commands from CWEB sources. It is called
with the following synopsis:
deweb filters away all C & CWEB commands from a CWEB source code. This leaves
only the LATEX code. This stripped code, in turn, may then be passed to a suitable
syntax checker for LATEX, like ChkTEX and lacheck, or spell-checkers like
ispell.
When deweb strips away the C code from your CWEB source, it tries to preserve line
breaks. This means that the error reports from your favorite tool will be correct
regarding to line numbers. In most cases, the column position will also be correct. This
significantly simplifies finding the errors in the LATEX source (in contrast to
the output from cweave, which output is truly difficult to figure anything out
from).
deweb accepts a list of filenames on the argument line, and will send its output to
stdout. If no filenames are given, it will read from stdin, acting as a filter. No options are
currently accepted.
Macho users may try to pipe the output from deweb directly into LATEX,
theoretically, this should work. This would ease the debugging of the LATEX code
significantly, as when LATEX complains about wrong syntax, you’ll be able to find the
erroneous line much more easily. Don’t expect that the output looks very much like the
final one, though.
deweb should now understand all correct CWEB opcodes. If it complains about not
understanding a correct opcode, please inform the author.
deweb will not even compile under Perl versions before perl v5. Unfortunately, this means
that we can’t even tell the user why we failed; Perl will just complain about not being
able to compile the regexps.
Below is a description of all error-messages ChkTEX outputs. Error messages set in italic
type are turned off by default. Where margin paragraphs are listed in the text,
they refer to the keyword in the “chktexrc” file which controls the discussed
warning.
Command
terminated
with
space. You tried to terminate a command with a blank space. Usually, this is
an error as these are ignored by LATEX. In most cases, you would like
to have a real space there.
\LaTeXis a typesetter.
Non-breaking
space
(`~')
should
have
been
used. When reading a document, it is not very pretty when references are split
across lines. If you use the ~ character, LATEX will assign a very high
penalty for splitting a line at that point. ChkTEX issues this warning
if you have forgot to do this.
Please refer to figure \ref{foo}. You
should
enclose
the
previous
parenthesis
with
`{}'. This is a warning which you may ignore, but for maximum aestethic
pleasure, you should enclose your bracket characters with ‘{}’s.
$ [(ab)^{-1}] \^{-2}$
Italic
correction
(`\/')
found
in
non-italic
buffer. If you try to use the \/ command when ChkTEX believes that the
buffer is not outputted as italic, you’ll get this warning.
This is an\/ example
Italic
correction
(`\/')
found
more
than
once. If the buffer is italic, and you try to use the \/ command more than
once, you’ll get this warning.
This {\it example\/\/} is not amusing.
No
italic
correction
(`\/')
found. You get this error if ChkTEX believes that you are switching from italic
to non-italic, and you’ve forgot to use the \/ command to insert that
extra little spacing. If you use the “em” option, you may ignore this
warning.
This {\it example } is not amusing, either.
Accent
command
`command'
needs
use
of
`command'. If you’re using accenting commands, ‘i’ and ‘j’ should lose their dots
before they get accented. This is accomplished by using the \i, \j,
\imath and \jmath command.
This is an example of use of accents: \'{i}.
Wrong
length
of
dash
may
have
been
used. This warning suggests that a wrong number of dashes may have been
used. It does this by classifying the dash according to the the character
in front and after the dashes.
If they are of the same type, ChkTEX will determine which keyword
to use in the “chktexrc” file. If not, it will shut up and accept that it
doesn’t know.
This is more or less correct, according to my references. Hopefully this check
can be even more improved (suggestions?).
It wasn't anything - just a 2---3 star--shots. `%s'
expected,
found
`%s'. Solo
`%s'
found. You get this warning whenever brackets or environments don’t match.
ChkTEX expect to find matching brackets/environments in the same
order as their opposites were found, and no closing delimiters which
haven’t been preceded by an opening one.
While bracket matching is not an explicit error, it is usually a sign that
something is wrong.
You
should
use
`%s'
to
achieve
an
ellipsis. Simply typing three “.” in a row will not give a perfect spacing withing
the between the dots. The \ldots is much more suitable for this.
In math mode, you should also distinguish between \cdots and \ldots;
take a look at the example below.
Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$.
Interword
spacing
(`\ ')
should
perhaps
be
used. One of the specified abbreviations were found. Unless you have
previously said \frenchspacing, you’ll have incorrect spacing, which
one should avoid if possible.
This is an example, i.e. an demonstration. Intersentence
spacing
(`\@')
should
perhaps
be
used. LATEX’ detection of whether a period ends a sentence or not, is only
based upon the character in front of the period. If it’s uppercase, it
assumes that it does not end a sentence. While this may be correct in
many cases, it may be incorrect in others. ChkTEX thus outputs this
warning in every such case.
I've seen an UFO! Right over there! Could
not
find
argument
for
command. ChkTEX will in some cases need the argument of a function to detect an
error. As ChkTEX currently processes the LATEX file on a line-by-line
basis, it won’t find the argument if the command which needed it was
on the previous line. On the other hand, this may also be an error; you
ought to check it to be safe.
$\hat$ No
match
found
for
`%s'. This warning is triggered if we find a single, opening bracket or
environment. While bracket matching is not an explicit error, it is
usually a sign that something is wrong.
Mathmode
still
on
at
end
of
LaTeX
file. This error is triggered if you at some point have turned on mathmode,
and ChkTEX couldn’t see that you remembered to turn it off.
Number
of
`character'
doesn't
match
the
number
of
`character'. Should be self-explanatory. ChkTEX didn’t find the same number of an
opening bracket as it found of a closing bracket.
You
should
use
either
``
or
''
as
an
alternative
to
`"'. Self-explanatory. Look in the example, and you’ll understand why.
This is an "example" You
should
use
"'"
(ASCII
39)
instead
of
"'"
(ASCII
180). On some keyboards you might get the wrong quote. This quote looks,
IMHO, ugly compared to the standard quotes, it doesn’t even come out
as a quote! Just see in the example.
``There's quotes and there's quotes ''
User-specified
pattern
found. A substring you’ve specified using USERWARN in the “chktexrc” file, has
been found. This
command
might
not
be
intended. I implemented this because a friend of mine kept on making these
mistakes. Easily done if you haven’t gotten quite into the syntax of
LATEX.
\LaTeX\ is an extension of \TeX\. Right? Comment
displayed. ChkTEX dumps all comments it finds, which in some cases is useful.
I usually keep all my notes in the comments, and like to review
them before I ship the final version. For commenting out parts of the
document, the “comment” environment is better suited.
Either
''\,'
or
'\,''
will
look
better. This error is generated whenever you try to typeset three quotes in a
row; this will not look pretty, and one of them should be separated from
the rest.
```Hello', I heard him said'', she remembered.
Delete
this
space
to
maintain
correct
pagereferences. This message, issued when a space is found in front of a \index, \label
or similar command (can be set in the “chktexrc” file). Sometimes,
this space may cause that the word and the index happens on separate
pages, if a pagebreak happens just there.
You might also use this warning to warn you about spaces in front of
footnotes; however, the warning text may not be entirely correct then.
Indexing text \index{text} is fun! You
might
wish
to
put
this
between
a
pair
of
`{}' This warning is given whenever ChkTEX finds a “”’ or a “_”
followed by either two or more numberic digits or two or more alphabetic
characters. In most situations, this means that you’ve forgotten some
{}’s.
$5\cdot10^10$ You
ought
to
remove
spaces
in
front
of
punctuation. This warning is issued if ChkTEX finds space in front of an
end-of-sentence character.
Do you understand ? Could
not
execute
LaTeX
command. Some LATEX commands will be interpreted by ChkTEX; however,
some of them are sensible to errors in the LATEX source. Most notably,
the \input command relies on that the input file exists...
Don't
use
\/
in
front
of
small
punctuation. Italic correction should generally not be used in front of small
punctuation characters like ‘.’ and ‘,’; as it looks better when the
preceding italic character leans “over” the punctum or comma.
It is just a {\it test\/}, don't think anything else. $\times$
may
look
prettier
here. In ASCII environments, it is usual to use the ‘x’ character as an infix
operator to denote a dimension. The mathemathical symbol × provided
by the $\times$ command is better suited for this.
The program opens a screen sized 640x200 pixels. Multiple
spaces
detected
in
output. This warning, intended for the novice, will remind you that even if you
type multiple spaces in your input, only a single space will come out.
Some ways to come around this is listed below.
White is a beautiful colour.
This
text
may
be
ignored. Certain implementations of the verbatim environment and derivations
of that, ignore all text on the same line as \end{verbatim}. This will
warn you about this.
Use
`
to
begin
quotation,
not
'. Use
'
to
end
quotation,
not
`. Don't
mix
quotes. Proper quotations should start with a ` and end with a '; anything else
isn’t very pretty. Both these warnings are relative to this; look in the
example below.
There are `'examples'' and there are ``examples``.
You
should
perhaps
use
`cmd'
instead. Most mathematical operators should be set as standard roman font,
instead of the math italic LATEX uses for variables. For many
operators, LATEX provides a pre-defined command which will typeset
the operator correctly. Look below for an illustration of the point.
$sin^2 x + cos^2 x = 1$ You
should
put
a
space
in
front
of/after
parenthesis. You
should
avoid
spaces
in
front
of/after
parenthesis. Outside math mode, you should put a space in front of any group of
opening parenthesis, and no spaces after. If you have several after each
other, you should of course not put a space in between each; look in the
example below. Likewise, there should not be spaces in front of closing
parenthesis, but there should be at least one after.
This( an example( Nuff said )), illustrates( ``my'' )point.
You
should
not
use
punctuation
in
front
of/after
quotes. For best looking documents, you should decide on how you wish to put quotes
relative to punctuation. ChkTEX recognizes two styles; you may specify
which you use in the “chktexrc” file. A description on each style
follows:
However, it may in certain cases be ambigious. Consider the following
example from a fictious “vi(1)” tutorial (quote taken from the Jargon
file):
Then delete a line from the file by typing ``dd.'' That would be very bad -- because the reader would be prone to type
the string d-d-dot, and it happens that in “vi(1)” dot repeats the last
command accepted. The net result would be to delete two lines!
This problem is avoided using logical style, described below.
Then delete a line from the file by typing ``dd''. Double
space
found. This warning is triggered whenever ChkTEX finds a space in front of
a hard space, or vice versa. This will be rendered as two spaces (which
you usually don’t wish).
For output codes, see table ~ \ref{foo}.
You
should
put
punctuation
outside
inner/inside
display
math
mode. As recommended in the TEXbook, you should try to put punctuation
outside inner math mode, as this is gets formatted better.
Similarily, you should let any final punctuation in display math mode end up
within it. Look at the following example, which was taken from the
TEXbook:
for $x = a,b$, or $c$.
You
ought
to
not
use
primitive
TeX
in
LaTeX
code. This warning is triggered whenever you use a raw TEX command which
has been replaced by a LATEX equivalent. If you consider yourself a
purist (or want to be sure your code works under LATEX3), you should
use the LATEX equivalent.
You
should
remove
spaces
in
front
of
`%s' Some commands should not be prepended by a space character, for
cosmetical reasons. This notes you of this whenever this has happened.
This is a footnote \footnotemark[1] mark.
`%s'
is
normally
not
followed
by
`%c'. LATEX’ error message when calling \left \{ instead of left \{ is
unfortunately rather poor. This warning detects this and similar errors.
In a somewhat prioritized sequence, this is what I’d like to put into the program -- if I
have the time.
It would also be nice to investigate the field of “globally” oriented
warnings; i.e. warnings regarding the document as a whole. Currently,
ChkTEX operates mainly on a local/“greedy” basis.
If you have suggestions/ideas on this topic, they’re certainly welcome,
including references to literature.
As most other living creatures, I have only a limited amount of time. If you like
ChkTEX and would like to help improving it, here’s a few things I would like to receive.
The following ideas are given:
This doesn’t mean that I’m not willing to restructure the document at all. This
manual already uses some kind of preprocessing in order to achieve HTML
output via LATEX2html, I’m willing to do the same in order to produce
troff output.
Of course, I’ll provide whatever help necessary to modify the sources to fit
to the new platform. Take contact if you’re interested. I will include your
compiled binary in the distribution, and give you credit where appropiate.
Just one request: If you have to modify the sources in order to make
ChkTEX compile & work on the new platform, please enclose your changes
in something like “#ifdef __PLATFORM__...code...#endif”! It makes life
so much easier later, when we try to merge the two source trees.
I don’t have GoldEd in my possession; the script was just modelled after Juergen
Zeschky’s, (<juergen@sokrates.nbg.de>) PGP GoldED interface.
Of course, people doing any of this will be mentioned in this document, and thus
receive eternal glory and appreciation.
This program uses the “getopt()” routine, as supplied from GNU. The source
included in this distribution has been modified slightly. To make the use of
C2LOCAL easier, portions which were #ifdef’ed out, have now been commented
out.
Where trademarks have been used, the author is aware of that they belong to
someone, and has tried to stick to the original caps.
A quick summary of who I am and what I do:
I’m 21 years old, and live in Oslo, the capital of Norway. I’m currently studying maths
and computer science at the University of Oslo; planning to get a degree within
mathematical modeling, with a dash of physics and emphazing the computer part of the
study. More precisely, in autumn’96 my studies consist of mathematical analysis,
statistics & probability calculations plus studying the relationship between society and
computers.
At home I now possess 4 computers, of which 1 is regular use: A vanilla Amiga
1200, expanded only by a HD. The others are a 80286 PC and an Amiga 500,
both semi-out-of-order. The last one is a Commodore VIC-20, which for some
peculiar reason never seems to be used. Plans are to get a Linux-capable PC,
though.
Most of the time in front of these computers (including SGI Indy’s and SPARC
stations at our university) is spent on C and shell programming, plus some
text-processing.
C and shell programming are not my only knowledge areas regarding computers,
however. I write the following languages more or less: Perl, Motorola 68000 assembly
code, ARexx, Simula, C++, LATEX, HTML, AmigaGuide, Amos Basic and Installer
LISP. Once I also mastered Commodore Basic V2, the “language” included with my
VIC-20.
However, I also try to not to end up as a computer nerd. Thus, in addition to the
compulsory (?) interest for computers, I am a scout. Still running into the woods,
climbing the trees, falling down and climbing up once more, in other words. To be more
specific, I am a now a troop leader for ‘Ulven’ scout-group; Norwegian Scouts
Association. I am also a active rover in ‘Vålerenga’ scout-group.
Certainly a lot more to tell (I play the piano and like cross-country skiing, for
instance); but I’ll stop here before you fall asleep...:-)
The author wishes to thank the following people (in alphabetical order):
In addition, he sent me a huge list of 238 common English abbreviations, for
inclusion in the “chktexrc” file! Together with the enhanced abbreviation
recognizer, I do now believe most abbreviations should be catched...:-)
Finally, he has also given me valuable hints for improving the program’s
outputting routine, and given me lots of suggestions for filtering
unnecessary/false warnings away.
He has also kept on beta-testing later versions of ChkTEX, giving me
bug-reports and enhancements requests.
Has also provided some OS-oriented code.
If you wish to contact me for any reason or would like to participate in the development
of ChkTEX, please write to:
Jens Berger
Any signs of intelligent life are welcomed; that should exclude piracy.
Since the original author is unreachable, the maintainer these days is:
Baruch Even
Have fun.
5.3 DeWEB
5.3.1 Bugs
6 Explanation of error messages
Silent Warning 1:
LATEXis a typesetter.
\LaTeX\ is a typesetter.
LATEX is a typesetter.
Linker Warning 2:
Please refer to figure 11.
Please refer to figure~\ref{foo}.
Please refer to figure 11.
Warning 3:
[(ab)-1]-2
${[{(ab)}^{-1}]}^{-2}$
[(ab)-1]-2
Italic
ItalCmd
NonItalic Warning 4:
This is an example.
This is an example.
This is an example.
Italic
ItalCmd
NonItalic Warning 5:
This example is not amusing.
This {\it example\/} is not amusing.
This example is not amusing.
Italic
ItalCmd
NonItalic Warning 6:
This example is not amusing, either.
This {\it example\/} is not amusing, either.
This example is not amusing, either.
IJAccent Warning 7:
This is an example of use of accents: í.
This is an example of use of accents: \'{\i}.
This is an example of use of accents: í.
HyphDash
NumDash
WordDash Warning 8:
Character type Keyword in “chktexrc” file
Space WordDash
Number NumDash
Alphabetic character HyphDash
It wasn’t anything - just a 2--3 star-shots.
It wasn't anything --- just a 2--3 star-shots
It wasn’t anything -- just a 2-3 star-shots.
Warning 9:
Warning 10:
CenterDots
LowDots Warning 11:
Foo...bar. 1,...,3. 1 + ... + 3. 1,,3.
Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$.
Foo...bar. 1,...,3. 1 + + 3. 1,...,3.
Abbrev Warning 12:
This is an example, i.e. an demonstration.
This is an example, i.e.\ an demonstration.
This is an example, i.e. an demonstration.
Warning 13:
I’ve seen an UFO! Right over there!
I've seen an UFO\@! Right over there!
I’ve seen an UFO! Right over there!
Warning 14:
This will give a LATEX error...
$\hat{a}$
â
Warning 15:
MathEnvir Warning 16:
Warning 17:
Warning 18:
This is an ”example”
This is an ``example''
This is an “example”
Warning 19:
“Theres quotes and theres quotes
``There's quotes and there's quotes''
“There’s quotes and there’s quotes”
Userwarn Warning 20:
Warning 21:
LATEX is an extension of TEXṘight?
\LaTeX\ is an extension of \TeX. Right?
LATEX is an extension of TEX. Right?
Warning 22:
Warning 23:
“‘Hello’, I heard him said”, she remembered.
``\,`Hello', I heard him said'', she remembered.
“ ‘Hello’, I heard him said”, she remembered.
PostLink Warning 24:
Indexing text\index{text} is fun!
Warning 25:
5 . 1010
$5\cdot10^{10}$
5 . 1010 Warning 26:
Do you understand ?
Do you understand?
Do you understand?
Warning 27:
Italic
ItalCmd
NonItalic Warning 28:
It is just a test, don’t think anything else.
It is just a {\it test}, don't think anything else.
It is just a test, don’t think anything else. Warning 29:
The program opens a screen sized 640x200 pixels.
The program opens a screen sized $640\times200$ pixels.
The program opens a screen sized 640 × 200 pixels. Warning 30:
White is a beautiful colour.
White~~~~~{ }{ }{ }\ \ \ is a beautiful colour.
White is a beautiful colour.
VerbEnvir Warning 31:
Warning 32:
Warning 33:
Warning 34:
There are ‘’examples” and there are “examples“.
There are ``examples'' and there are ``examples''.
There are “examples” and there are “examples”.
MathRoman Warning 35:
sin2x + cos2x = 1
$\sin^2 x + \cos^2 x = 1$
sin2x + cos2x = 1 Warning 36:
Warning 37:
This( an example( Nuff said )), illustrates( “my” )point.
This (an example (Nuff said)), illustrates (``my'') point.
This (an example (Nuff said)), illustrates (“my”) point.
QuoteStyle Warning 38:
Then delete a line from the file by typing “dd.”
Then delete a line from the file by typing “dd”. Warning 39:
For output codes, see table 1.1.
For output codes, see table~\ref{foo}.
For output codes, see table 1.1.
MathEnvir Warning 40:
for x = a,b, or c.
for $x = a$, $b$, or $c$.
for x = a, b, or c.
Primitives Warning 41:
NotPreSpaced Warning 42:
This is a footnote 1 mark.
This is a footnote\footnotemark[1] mark.
This is a footnote1 mark.
NoCharNext Warning 43:
7 Future plans
8 Notes
8.1 Wish to help?
8.2 Caps and stuff
9 About the author
10 Thanks
Russ Bubley
russ@scs.leeds.ac.uk
He has been the main external beta-tester for this program, sending me loads
and loads of understandable and reproducible bug reports. If you somehow
think that ChkTEX is well-behaved and free from bugs, send warm thoughts
to Russ. He has also provided ideas for enhanced checks and so forth.
Gerd Böhm
Gerd.Boehm@physik.uni-regensburg.de
Improved and bug-fixed the MS-DOS port of ChkTEX v1.4, sending me
ready-to-yank code patches. The original port didn’t respect all the peculiarities
of the MS-DOS file-system, unfortunately.
Lars Frellesen
frelle@math-tech.dk
Sent a few bug reports regarding the filtering of messages. He has also helped
me to expand the “SILENT” keyword in the “chktexrc” file.
Wolfgang Fritsch
fritsch@hmi.de
Author of the OS/2 port, which he did using the emx compiler. Please direct
questions regarding strictly to that port to him (I would like to receive a
carbon copy, though).
Stefan Gerberding
stefan@inferenzsysteme.informatik.th-darmstadt.de
First one to report the Enforcer hit in v1.2 when using ChkTEX as a pipe.
Also came with suggestions to make ChkTEX more easily compile on early
gcc compilers.
Kasper B. Graversen
kbg2001@internet.dk
Lots of creative suggestions and improvements. Several of the warnings implemented
were based on his ideas. In addition, he has given advice for improving the
existing warnings.
Frank Luithle
f_luithle@outside.sb.sub.de
Wrote a translation for v1.0. Unfortunately, he remained unreachable after
that...:-/
Nat
nat@nataa.frmug.fr.net
Reported the same bug as Gerberding. In addition, he taught me a few tricks
regarding the use of gcc + made me understand that the ANSI standard isn’t
unambigious; at least the getenv() call seem to be open for interpretations.
Many possible incompatibilities have been removed due to these lessons.
Michael Sanders
sanders@umich.edu
Has found some of the bugs in this beast; both obscure and long-lived. Has
also provided motivation to clarify this document.
Bjørn Ove Thue
bjort@ifi.uio.no
Author of the MSDOS port; please direct questions regarding strictly to that
port to him (I would like to receive a carbon copy, though).
Martin Ward
Martin.Ward@durham.ac.uk
Sent a few bug-reports; also gave me information upon where to find regexp
code. He also provided a Perl script for checking ordinary text, which ideas I
was able to implement in ChkTEX. In addition, he sent me the source code
for lacheck; which also inspired some of the warnings.11 Contacting the author
Spektrumvn. 4
N-0666 Oslo
Norway
E-mail: <jensthi@ifi.uio.no>
E-mail: <chktex@ev-en.org>