File: ChkTeX.tex.in

package info (click to toggle)
chktex 1.6.3-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 944 kB
  • ctags: 521
  • sloc: ansic: 3,875; makefile: 277; sh: 179; perl: 92; lisp: 24
file content (1810 lines) | stat: -rw-r--r-- 70,131 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
%%
%%  ChkTeX v@PACKAGE_VERSION@, LaTeX documentation for ChkTeX program.
%%  Copyright (C) 1995-96 Jens T. Berger Thielemann
%%
%%  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.
%%
%%  Contact the author at:
%%              Jens Berger
%%              Spektrumvn. 4
%%              N-0666 Oslo
%%              Norway
%%              E-mail: <jensthi@ifi.uio.no>
%%
%% NOTE: This file is written in LaTeX, and should be compiled
%% before viewing. If you don't know how to do this, consult
%% your local TeX guru. If you don't possess LaTeX, you are
%% assumed to not need this program; so there's no text version
%% of this file...
%%
%% You may still be able to view the DVI or PostScript versions of
%% this file, though, they are included in the archive.
%%



\documentstyle[a4, array, tabularx, verbatim, multicol]{article}
%latex
\nonfrenchspacing
\newcounter{errornum}
\setcounter{errornum}{1}
%endlatex
\newcommand{\jtbt}{Jens~T. Berger~Thielemann}
\newcommand{\Cmd}[1]{``{\tt{}#1}''}
\newcommand{\rsrc}{``{\tt{}chktexrc}''}
\newcommand{\chktex}{Chk\TeX}

%latex
\newcolumntype{Y}{>{\raggedright\arraybackslash}X}
\newcommand{\fmted}[1]{%
  {\noindent\large%
    \begin{tabularx}{\linewidth}{lY}%
      \bf Warning \theerrornum:  & \tt #1%
    \end{tabularx}}\stepcounter{errornum}\nopagebreak[4]}

\newenvironment{errdesc}[1]{\noindent\fmted{#1}\begin{quote}}{\end{quote}%
\pagebreak[3]}

\newenvironment{html}{\comment}{\endcomment}
\newenvironment{rawhtml}{\comment}{\endcomment}

\makeatletter
\@namedef{errdesc*}#1{\begin{errdesc}{\textit{#1\/}}}
\@namedef{enderrdesc*}{\end{errdesc}}
\@ifundefined{textit}{\gdef\textit#1{{\it #1\/}}}\relax
\@ifundefined{LaTeXe}{\gdef\LaTeXe{\LaTeX2${}_{\textstyle\varepsilon}$}}\relax
\makeatother


\newenvironment{errexam}
{
\vskip 0pt plus 5pt
\begin{center}
}
{\end{center}}
\columnseprule 0.1pt

%!\newcommand{\BS}{\verb@\@}
%!\newcommand{\chktex}{ChkTeX}
%!\newcommand{\slash}{/}
%endlatex


\title{\chktex\ v@PACKAGE_VERSION@}
\author{Jens~T. Berger~Thielemann}
\date{\today}


\begin{document}
\maketitle

%latex
\newcommand{\BS}{\char`\\}
%endlatex
\section{Introduction}

This program has been written in frustration because some constructs in
\LaTeX\ are sometimes non-intuitive, and easy to forget. It is {\em
  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
\Cmd{-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; However compiling
for other platforms has not been done for a long time now so the code has been
removed. If interest rises it can be resurrected.


\section{Features}
\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.

\subsection{New features}

Modifications and additions since v1.6:
\begin{itemize}
  \item Improved the build system
  \item Better fixes for memory access errors
\end{itemize}

Modifications and additions since v1.5:
\begin{itemize}
  \item Fixed a crash when running from emacs
  \item Fixed a crash when checking our own manual
  \item Added \tt{\BS{}verb*} support
\end{itemize}

Modifications and additions since v1.4:

\subsubsection{Program}

Modifications to the executable itself:
\begin{itemize}
\item As usual, a few more warnings:
  \begin{itemize}
  \item No space or similar in front/after parenthesis.
  \item Demands a consistent quote style.
  \item Double spaces in input which will not be rendered as one.
  \item Punctuation malplaced regarding to math mode.
  \item Warns about \TeX\ primitives.
  \item Space in front of footnotes.
  \item Bogus {\tt\BS{}left} and {\tt\BS{}right} commands.
  \end{itemize}

\item The abbreviation recognizer has (for the last time?) been
  redesigned. We now produce far less false warnings, catch more
  cases and do all this faster than before. Seems like a win.

  Done much of the same with the italic correction detection part,
  too\ldots
\item Some bugs have been silently fixed. Hot spots in the program
  have been optimized; in certain cases this in fact doubles the
  speed!

  Along with this goes more code elegance and utilization of macro
  processing and the C language. Take a look at \Cmd{Resource.[ch]}.

\item It's possible to specify separate output-formats depending on
  whether you are sending the output to a file/pipe or to a
  terminal.

\item Column positions are finally correct; we now expand tabs
  correctly.
\item \chktex\ will now recursively search for {\tt\BS{}input}'ed
  files, both in the document and on the commandline. See the 
  \rsrc\ file for more info.
\item The debug switch is now more intelligent; if you wish to hack
  a bit on \chktex\ for yourself, it is possible to produce
  selective debugging output. The feature can also be disabled
  altogether.
\item MS-DOS and OS/2 version of the program is now more flexible
  and well-behaved, thanks to Gerd B\"ohm.
\item You may now say \Cmd{-wall} to make all messages warnings, and
  turn them on.
\item Uses termcap on UNIX boxes; this should ensure that \Cmd{-v2}
  (or more precisely: \Cmd{\%i} and \Cmd{\%I}) works regardless to
  what terminal you are using.
\end{itemize}

\subsubsection{Resource file}

New concepts introduced in the setup file:
\begin{itemize}
\item You may now specify both case-sensitive and case-insensitive
  user patterns in the \rsrc\ file. In addition; it is now possible
  to reset/clear lists.
\item It is possible to specify how many arguments
  (optional/required) \Cmd{WIPEARG} should wipe; it behaves also
  somewhat more intelligent when the arguments stretch over multiple
  lines.
\item Global files will be read {\em in addition\/} to local ones. The
  searching order has also been reversed in order to make this more
  intelligent.
\end{itemize}


\subsubsection{Other}
Various other stuff I've done to the product:

\begin{itemize}
\item The documentation has been polished and should now be easier
  to use in practical situations.
\item \Cmd{check} target in \Cmd{Makefile}, so you can check that
  the installation succeeded. In fact, the \Cmd{Makefile} has been
  enhanced in several other ways too, amongst other it is now GNU
  conforming.
\item \Cmd{deweb} is now documented; you may say \Cmd{man~deweb} to
  get a few words of advice. The support script ({\tt chkweb}) does
  now behave as the remaining package (accepting stdin input and flags).
\item I've written an Emacs hack which magically adds \chktex\ to the
  list of AUC-\TeX\ commands; thus making the use of the program even
  more trivial.

  For those of you who don't wish to mess with Emacs, I've included a trivial
%latex
  $\mbox{lacheck}\leftrightarrow\mbox{\chktex}$
%!lacheck <-> \chktex\ %
%endlatex
  interface.

  This means that you now can use \chktex\ just as easily as lacheck
  when you're running AUC-\TeX.

\item Added an ARexx script which lets \chktex\ talk to VBrowse, the
  message browser of Volker Barthelmann's freely distributable ANSI
  C compiler. The browser itself is available on Aminet as
  \Cmd{dev/c/vbcc.lha}.
\end{itemize}

\subsection{Feature list}

\begin{itemize}
\item Supports over 40 warnings. Warnings include:
%latex
  \begin{multicols}{2}
    \begin{flushleft}
%endlatex
      \begin{itemize}
      \item Commands terminated with space. Ignores \Cmd{\BS{}tt}, etc.
      \item Space in front of references instead of \Cmd{\~{}}.
      \item Forgetting to group parenthesis characters when
        sub-\slash{}super\-scripting.
      \item Italic correction (\Cmd{\BS/}) mistakes (double,
        missing, unnecessary).
      \item Parenthesis and environment matching.
      \item Ellipsis detection; also checks whether to use
        \Cmd{\BS{}dots}, \Cmd{\BS{}cdots} or \Cmd{\BS{}ldots}.
      \item Enforcement of normal space after abbreviation. Detects
        most abbreviations automagically.
      \item Enforcement of end-of-sentence space when the last
        sentence ended with capital letter.
      \item Math-mode on/off detection.
      \item Quote checking, both wrong types (\Cmd{"}) and wrong
        direction.
      \item Recommends splitting three quotes in a row.
      \item Searching for user patterns.
      \item Displays comments.
      \item Space in front of \Cmd{\BS{}label} and similar commands.
      \item Use of \Cmd{x} instead of \Cmd{\$\BS{}times\$} between numbers.
      \item Multiple spaces in input which will be rendered as one
        space (or multiple spaces, where that is undesirable).
      \item Warns about text which may be ignored.
      \item Mathematical operators typeset as variables.
      \item No space in front of/after parenthesis.
      \item Demands a consistent quote style.
      \item Punctuation inside inner math mode/outside display math
        mode.
      \item Use of \TeX\ primitives where \LaTeX\ equivalents are
        available.
      \item Space in front of footnotes.
      \item Bogus characters following commands.
      \end{itemize}
%latex
    \end{flushleft}
  \end{multicols}
%endlatex
\item 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 \rsrc\ file.
\item Supports \Cmd{\BS{}input} command; both \TeX\ and \LaTeX\ version.
  Actually includes the files. \Cmd{TEXINPUTS}-equivalent search path.
\item 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.
\item Scripts included for checking CWEB files written in \LaTeX.
  (Requires perl v5).
\item Supports both \LaTeX\ 2.09 and \LaTeXe{}.
\item Flexible output handling. Has some predefined formats and lets
  the user specify his own format.  Uses a \Cmd{printf()} similar
  syntax. \Cmd{lacheck} compatible mode included for interfacing with
  the AUC-\TeX\ Emacs mode.
\item Written in ANSI C\@. \Cmd{configure} script included for easy
  setup and installation on UNIX systems.
\end{itemize}

Still, it is important to realize that the output from \chktex\ is
only intended as a {\em 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.



\section{Legal stuff}

\chktex{}, documentation, installations scripts, CWEB filters and other
materials provided are copyright \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:
\begin{quote}
    The  Free  Software Foundation, Inc. \\
    675 Mass Ave \\
    Cambridge    \\
    MA 02139     \\
    USA
\end{quote}




\begin{html}
\section{Availability}

This program will be uploaded to CTAN\@; thus it can be
found at any mirrors of those.
\end{html}

\section{Installation}

A few words on installation on various platforms:

\begin{description}
\item[UNIX:] Type \Cmd{configure}, \Cmd{make} and finally
  \Cmd{make~install}. To make sure everything proceeded correctly,
  type \Cmd{make~check}.  If you don't have superuser privileges and thus
  access to the default system areas, you should type
  \Cmd{configure~--help} to help you set up correct paths.

  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 (\Cmd{chktex.tar.gz}) in a
  subdir of yours, with path \Cmd{\~{}/tmp}. We further assume that
  your shell is \Cmd{csh} or \Cmd{tcsh}. Do the following:

  \begin{enumerate}
  \item First of all, unpack the archive contents.

\begin{verbatim}
> cd ~/tmp
> gunzip chktex.tar.gz
> tar xf chktex.tar
\end{verbatim}

  \item Now, we can configure the program.  There are some
    configuration options you should know about:
    \begin{description}
    \item[\Cmd{--enable-emacs-hack}:] Install a small file which
      adds \chktex\ to the command menu of AUC-\TeX. This is to be
      considered as a hack, and may break in future versions of
      AUC-\TeX. It works fine under AUC-\TeX\ v2.9, though.

      This option needs the path of your elisp directory as argument,
      e.g. \Cmd{--enable-emacs-hack=/home/myself/elisp} or similar.

      You'll also have to add the following line to your \Cmd{.emacs}
      file:
\begin{verbatim}
(require 'chktex)
\end{verbatim}
      You can now access \chktex\ from the \Cmd{Command} menu in
      AUC-\TeX. To cycle through the messages, type \verb#C-x `#.

    \item[\Cmd{--enable-lacheck-replace}] This enables a quick
      hack for making the AUC-\TeX\ Emacs mode use \chktex\ instead of
      lacheck. This is done by installing a stub script which
      ``overrides'' the original lacheck executable.

      While more stable than the previous solution, this is also
      significantly less elegant --- in computing terms, this is the
      ``brute force'' approach.

    \item[\Cmd{--enable-debug-info}] \chktex\ has an ability to spit
      out various diagnostic messages using the \Cmd{-d} flag. This
      behaviour is on by default. By adding the flag
      \Cmd{--disable-debug-info} to the commandline, this will not be
      compiled in.

      This may be useful if you're running short of disk space (the
      time savings are neglible).
    \end{description}

    If you are installing the program on your local account, use the
    following command:

\begin{verbatim}
> configure --prefix ~/
\end{verbatim}

    Add eventual extra flags as specified above. This command will
    generate a significant amount of output, this can usually be ignored.

  \item Finally, we can just build the program and install it.

\begin{verbatim}
> make
> make install
\end{verbatim}

  \item Finished! The program is now installed and ready to use. You
    may now tell other people to put your bindir in their path in
    order to benefit from your work. All that remains is to make the
    shell aware of your installation.

\begin{verbatim}
> rehash
\end{verbatim}

    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.

  \item If you wish to make sure that everything is OK (you ought to),
    you may now ask \chktex\ to do a self-test:

\begin{verbatim}
> make check
\end{verbatim}

  \end{enumerate}

\item[Other platforms:] First of all, you have to copy the
  \Cmd{config.h.in} file to a file named \Cmd{config.h}.  Then, edit
  it to reflect your system.  Do the same with \Cmd{OpSys.h} (this
  file has been reduced significantly).  If you wish, you may define
  \Cmd{DATADIR} to the path you want the global resource file to be
  put.

  Now, I would suggest that you take a peak at the \Cmd{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  \verb@.c@ files.  Define
  \Cmd{HAVE\_CONFIG\_H} to 1 (on the command-line, for instance).  If
  the \Cmd{config.h} you wish to use has another name, define
  \Cmd{CONFIG\_H\_NAME} to that (in that case, don't define
  \Cmd{HAVE\_CONFIG\_H}).

  Put the directory path of the \rsrc\ file in a environment variable
  named \Cmd{CHKTEXRC}.  The files \Cmd{deweb.in} and \Cmd{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.

  \begin{enumerate}
  \item Increase the preprocessor buffers and line buffers. The
    \chktex{} sources define macros sized 3--4k (expanding to about
    the same), and passes arguments sized about 1k.
  \item Use the magic switch which lets us use large
    \Cmd{switch(\dots)\{\dots\}} statements; some of these statements
    have about 120 \Cmd{case} entries.
  \item The sources require that at least the first 12 of each
    identifier is significant.
  \end{enumerate}
\end{description}
{\bf Note:\/} You {\em must\/} install the new \rsrc\ file; \chktex\ will
fail to function unless!

    After   doing   this,   you   may  enhance  \chktex'  behaviour  by
reading/editing the \rsrc\ file.

%latex
\section{Usage}

\subsubsection{Synopsis}

A UNIX-compliant template format follows:

\newcommand{\Group}[1]{\mbox{[#1]}}
\begin{tabularx}\textwidth{lY}
  \tt chktex & \tt \Group{-hiqrW} \Group{-v[0-\dots]} \Group{-l
    <rcfile>} \Group{-[wemn] <[1-42]|all>} \Group{-d[0-\ldots]} \Group{-p
    <pseudoname>} \Group{-o <outputfile>} \Group{-[btxgI][0|1]}
  file1 file2 \dots
\end{tabularx}


\subsubsection{Options}

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 \Cmd{-v0qb0w2} is the
same as saying \Cmd{-v0~-q~-b0~-w2}, except for being less to
type.

Enough general talk; here's a rather detailed description of all
options:
\begin{description}
\item[Misc.\ options:] General options which aren't related to some
  specific subpart of \chktex.
  \begin{description}
  \item[{\tt -h [--help]}] Gives you a command summary.
  \item[{\tt -i [--license]}] Shows distribution information.
  \item[{\tt -l [--localrc]}] Reads a resource-file formatted
    as the global resource-file \rsrc, in addition to the global
    resource-file. This option needs the name of the resource-file
    as a parameter. See also {\tt -g}.
  \item[{\tt -r [--reset]}] This will reset all settings to their
    defaults. This may be useful if you use the {\tt CMDLINE}
    directive in your \rsrc\ file, and wish to do something
    unusual.
  \item[{\tt -d [--debug]}] Needs a numeric argument; a bitmask
    telling what to output.  The values below may be added in order
    to output multiple debugging info.

    \begin{tabularx}\linewidth{cX}
      \bf Value & \bf Dumps\ldots\\
      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). \\
    \end{tabularx}
    The info is produced after all switches and resource files have
    been processed.

    It is possible to install versions of \chktex\ that ignore this
    flag; this means that it is not certain that this flag works.
  \item[{\tt -W [--version]}] Displays version information, and exits.
  \end{description}
\item[Muting warning messages:] Controls whether and in what form
  error messages will appear. Usually they accept a specific warning
  number (e.g.\ \Cmd{-w2}), but you may also say \Cmd{all} (e.g.\
  \Cmd{-wall}) which does the operation on {\em all\/} warnings.
  \begin{description}
  \item[{\tt -w [--warnon]}] Makes the message number passed as
    parameter a warning and turns it on.
  \item[{\tt -e [--erroron]}] Makes the message number passed as
    parameter an error and turns it on.
  \item[{\tt -m [--msgon]}] Makes the message number passed as
    parameter a message and turns it on. Messages are not counted.
  \item[{\tt -n [--nowarn]}] Turns the warning/error number passed
    as a parameter off.
  \end{description}
\item[Output control flags:] Determines the appearance and
  destination of the error reports.
  \begin{description}
  \item[{\tt -q [--quiet]}] Shuts up about copyright information.
  \item[{\tt -o [--output]}] Normally, all errors are piped to {\tt stdout}.
    Using this option with a parameter, errors will be sent to the
    named file instead. Only information relative to the \LaTeX\ file
    will be sent to that file. Memory problems and similar will as as
    always be sent to {\tt stderr}. If a file with the name given
    already exists, it will be renamed to \Cmd{foobar.bak}
    (\Cmd{foobar.\$cl} under MS-DOS), \Cmd{foobar} being the name of
    the file.  See also \Cmd{-b}.

  \item[{\tt -v [--verbosity]}] Specifies how much and how you
    wish the error reports to be displayed. This is specified in the
    \rsrc\ file; we'll list the default values below. If you wish,
    you may thus edit the \rsrc\ file to add or modify new formats.

    The default is mode 1 (that is, the {\em second\/} entry in the
    \rsrc\ file), using {\tt -v} without any parameter will give you
    mode 2.

    \begin{description}
    \item[0] Will show the information in a way that should be
      suitable for further parsing by {\tt awk}, {\tt sed} or
      similar.  The format is as follows:
\begin{verbatim}
File:Line:Column:Warning number:Warning message
\end{verbatim}
      The colons may be replaced with another string; use the
      \verb@-s@ switch for this.

      As the program does not output all errors in quite order, this
      output format is also suitable for piping through \Cmd{sort}.
    \item[1] Shows the information in a way which is more
      comprehensible for humans, but which still doesn't need
      anything but a glass tty.
    \item[2] Shows the information in a fancy way, using escape
      codes and stuff. It is the indeed most readable of all
      modes; however, it needs proper set up of the \Cmd{ChkTeX.h}
      at compilation time. UNIX boxes, however, will find the
      information automatically.
    \item[3] Shows the information suitable for parsing by Emacs;
      this is the same format as {\tt lacheck} uses. More formally,
      it is the following:
\begin{verbatim}
"File", line Line: Warning message
\end{verbatim}

      To utilize this, type \verb@M-x compile RET@. Delete whatever
      is written in the minibuffer, and type
      \verb@chktex -v3 texfile.tex@, and you should be able to
      browse through the
      error messages.  Use \verb@C-x `@ to parse the messages.
    \item[4] More or less the same as \verb@-v3@, but also includes
      information on where the error actually was found. Takes somewhat
      longer time to parse, but much more informative in use.
    \end{description}

  \item[{\tt -f [--format]}] Specifies the format of the output.
    This is done using a format similar to \Cmd{printf()}, where we
    support the specifiers listed below.

    \smallskip
    \newcommand{\Pf}[1]{\tt \%#1 &}
    \begin{tabularx}{\linewidth}{cX}
      \bf Code & \bf Description \\
      \Pf{b} String to print {\bf b\/}etween fields (from {\tt
        -s} option). \\
      \Pf{c} {\bf C\/}olumn position of error. \\
      \Pf{d} Length of error ({\bf d\/}igit). \\
      \Pf{f} Current {\bf f\/}ilename.\\
      \Pf{i} Turn on {\bf i\/}nverse printing mode.\\
      \Pf{I} Turn off {\bf i\/}nverse printing mode.\\
      \Pf{k} {\bf k\/}ind of error (warning, error, message).\\
      \Pf{l} {\bf l\/}ine number of error.\\
      \Pf{m} Warning {\bf m\/}essage.\\
      \Pf{n} Warning {\bf n\/}umber.\\
      \Pf{u} An {\bf u\/}nderlining line (like the one which
      appears when using \Cmd{-v1}).\\
      \Pf{r} Part of line in front of error ($\mbox{`S'} -
      1$).\\
      \Pf{s} Part of line which contains error ({\bf
        s\/}tring).\\
      \Pf{t} Part of line after error ($\mbox{`S'} + 1$).
    \end{tabularx}
    \smallskip

    Other characters will be passed literally; thus you can say
    \Cmd{\%\%} 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 {\em not\/} support field lengths (yet).
    This may come in the future, if I get the time\dots

    The {\tt -v} command is implemented by indexing into the \rsrc\
    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 \rsrc\ file instead.
  \item[{\tt -V [--pipeverb]}] Which entry we'll use in the \rsrc\
    file whenever {\tt stdout} isn't a terminal.

    The default is to use the same mode as specified with the
    {\tt -v} switch; using {\tt -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 \Cmd{.envir} file:
\begin{verbatim}
setenv LESS -r
\end{verbatim}

  \item[{\tt -p [--pseudoname]}] With this switch, you can provide
    the filename which will be used when we report the errors. This
    may be useful in scripts, especially when doing pipes. It is in
    other words similar to C's \verb@#line@ directive.

    We will only assume this name for the uppermost file; files that
    this one in turn \verb@\@\verb@input@ are presented under their original
    names. This seems most logical to me.

  \item[{\tt -s [--splitchar]}] String to use instead of the
    colons when doing {\tt -v0}; e.g.\ this string will be output
    between the fields.

  \end{description}
\item[Boolean switches:] Common for all of these are that they
  take an optional parameter.  If it is {\tt 0}, the feature will
  be disabled, if it is {\tt 1}, it will be enabled. All these
  features are on by default; and are toggled if you don't give
  any parameter.

  \begin{description}
  \item[{\tt -b [--backup]}] If you use the {\tt -o} switch, and the
    named outputfile exists, it will be renamed to {\tt filename.bak}.
  \item[{\tt -I [--inputfiles]}] Execute \verb@\@\verb@input@
    statements; e.g.\ include the file in the input. Our input parsing
    does of course nest; we use an input-stack to keep track of this.
  \item[{\tt -H [--headererr]}] Show errors found in front of the
    \verb@\begin{document}@ line. Some people keep {\em lots\/} of
    pure \TeX\ code there, which errors can't be detected reliably
    (in other words, we will in most cases just produce a lot of
    garbage).
  \item[{\tt -g [--globalrc]}] Read in the global resource file.  This
    switch may be useful together with the {\tt -l} option.
  \item[{\tt -t [--tictoc]}] Display a twirling baton, to show that
    we're working. {\tt -v0} does an {\tt -t0}, too, as it assumes
    that the user then uses the program non-interactively.  This is
    now a no-op.
  \item[{\tt -x [--wipeverb]}] Ignore the ``\verb@\verb@'' command
    found within the \LaTeX\ file and its argument is completely by
    the checking routines.  This is done by simply overwriting them.
    If you somehow don't like that (for instance, you would like to
    count brackets inside those commands, too), use this switch.
  \end{description}
\end{description}


If you don't specify any input \LaTeX-files on the commandline, we'll
read from {\tt stdin}.  To abort {\tt stdin} input, press the
following keycombinations:

\smallskip
\begin{tabular}{ll}
  \bf Machine & \bf Key-combination \\
  UNIX & $\fbox{\tt Ctrl} + \fbox{\tt D}$ \\
  MS-DOS & $\fbox{\tt Ctrl} + \fbox{Z}$, followed by return.
\end{tabular}
\smallskip

By default, we're using the 1994 version of GNU's \Cmd{getopt()}
routine.

\begin{itemize}
\item Options may be given in any order; the names of the \LaTeX-files
  do not have to be the last arguments. This behaviour may be turned
  off by creating an environment variable named \Cmd{POSIXLY\_CORRECT}.
\item The special argument \Cmd{--} forces an end of
  option-scanning.
\item Long-named options begin with \Cmd{--} instead of \Cmd{-}.
  Their names may be abbreviated as long as the abbreviation is unique
  or is an exact match for some defined option. If they have an
  argument, it follows the option name in the argument, separated from
  the option name by a \Cmd{=}, or else the in next argument.
\end{itemize}

\subsubsection{The \rsrc\ file}

You should also take a look at the \rsrc\ 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 {\em 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 \Cmd{Keyword =\{ item
  item \dots \}} may thus be necessary to reset previously defined
lists.

In this list, \Cmd{\$foo} is assumed to be the environment variable
\Cmd{foo}:

\begin{enumerate}
\item First, we'll take a look at the directory which was specified as
  \Cmd{DATADIR} during compilation. On UNIX boxes, this usually evaluates to
  \Cmd{/usr/local/share/chktexrc} or similar, under MS-DOS it is set
  to \Cmd{\BS{}emtex\BS{}data\BS{}chktexrc}.

\item Look in the following system directories:

  \begin{tabular}{ll}
    \bf Machine & \bf Directory \\
    UNIX        & \Cmd{\$HOME/.chktexrc} or \Cmd{\$LOGDIR/.chktexrc} \\
    MSDOS       & Program installation path
  \end{tabular}

\item Look for it in the directory pointed to by an environment
  variable, as specified in the table below:

  \begin{tabularx}\linewidth{lY}
    \bf Machine & \bf Directory \\
    UNIX & \Cmd{\$CHKTEXRC/.chktexrc} \\
    MSDOS &  \Cmd{\$CHKTEXRC\BS{}chktexrc}, \Cmd{\$CHKTEX\_HOME\BS
      chktexrc} or \Cmd{\$EMTEXDIR\BS{}data\BS{}chktexrc}
  \end{tabularx}

\item Look for it in the current directory. On UNIX boxes,
  we expect the filename to be \Cmd{.chktexrc}; on other machines
  \Cmd{chktexrc}.

\end{enumerate}

If you for some reason wish to undo what the previous files may have
done, you may say \Cmd{CmdLine \{ -g0 -r \}} somewhere in the \rsrc\
file; this will reset all previous settings.


\subsubsection{Hints}
I've tried to collect some advice that may be useful --- if you have a
favourite hint, feel free to send it to me!

\begin{itemize}
\item If you use \Cmd{german.sty}; it may be wise to put \Cmd{-n18} in
  the \Cmd{CmdLine} entry in the \rsrc\ file. This will probably reduce
  the amount of false warnings significantly.
\item Put \Cmd{-v} in the \Cmd{CmdLine} entry of the \rsrc\ file; this
  makes the fancy printing the default.
\item If you're working on a large project, it may pay off to make a
  local resource file which is included in addition to the global
  one. In this one, add the necessary info to reduce the amount of
  false warnings --- these usually don't do anything but hide the
  real warnings.
\item Create a total ignore environment, which \chktex\ will ignore
  completely. In here, you can place all that code which outsmarts
  \chktex\ completely. For instance, add the following lines at the top
  of your \LaTeX\ file:
\begin{verbatim}
% ChkTeX will ignore material within this environment
\newenvironment{ignore}{}{} 
\end{verbatim}
  In addition, you should add the item \Cmd{ignore} to the \Cmd{VerbEnvir}
  entry in the \rsrc\ file.
\end{itemize}
\subsubsection{Bugs}

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 \Cmd{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 \Cmd{WIPEARG} entries in the \rsrc\ 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 \rsrc\ file appropiately.



\subsection{ChkWEB}

This  shell  script is provided for checking CWEB files.  The template is
as follows:
\begin{verbatim}
chkweb [options] file1 file2 ...
\end{verbatim}
As you may see from the script, it is only a trivial interface towards
{\tt deweb} and \chktex.  It does not support any individual options
on the command line --- all options found will be passed onto \chktex.
If \Cmd{--} or a filename is found, the remaining parameters will be
ignored.
The  only  real  intelligence  it  features  is  that it will try to append
\verb@.w@ to filenames it can't find.

If no filenames are given, we will read from {\tt stdin}.

\subsection{DeWEB}

This program strips away C code and CWEB commands from CWEB sources.
It is called with the following synopsis:

\begin{verbatim}
deweb file1 file2 ...
\end{verbatim}

{\tt 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 {\tt
  lacheck}, or spell-checkers like {\tt ispell}.

When {\tt deweb} strips away the C code from your CWEB source, it tries to
preserve line breaks.  This means that the error reports from {\it 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 {\tt cweave}, which output is truly difficult to figure
anything out from).

{\tt deweb} accepts a list of filenames on the argument line, and will send
its output to {\tt 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 {\tt 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.

{\tt deweb} should now understand all correct {\tt CWEB} opcodes.  If it
complains about not understanding a correct opcode, please inform the
author.

\subsubsection{Bugs}

{\tt deweb} will not even {\em 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.

\section{Explanation of error messages}
Below is a description of all error-messages \chktex\ outputs.
Error messages set in {\it italic type\/} are turned off by default.
Where margin paragraphs are listed in the text, they refer to the
keyword in the \rsrc\ file which controls the discussed warning.

\newcommand\Keyword[1]{\marginpar{\large\tt\hfill\\ #1}}

\smallskip\pagebreak[2]
\Keyword{Silent}
\begin{errdesc}{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.

  \begin{errexam}
    \verb@\LaTeX@\underline{\tt }\verb@is a typesetter.@ \\*
    \LaTeX is a typesetter. \\*
    \smallskip
    \verb@\LaTeX\ is a typesetter.@ \\*
    \LaTeX\ is a typesetter.  \\*
  \end{errexam}
\end{errdesc}

\Keyword{Linker}
\begin{errdesc}{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 \verb@~@ 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.

  \begin{errexam}
    \verb@Please refer to figure@\underline{\tt\ }\verb@\ref{foo}.@ \\*
    Please refer to figure 11.                \\* % Gotta cheat here! :)
    \smallskip
    \verb@Please refer to figure~\ref{foo}.@ \\*
    Please refer to figure~11.  \\*
  \end{errexam}
\end{errdesc}

\begin{errdesc}{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.

  \begin{errexam}
    \verb@$@\underline{\tt\ }\verb@[(ab)^{-1}]@\underline{\tt\ }\verb@\^{-2}$@ \\*
    $[(ab)^{-1}]^{-2}$ \\*
    \smallskip
    \verb@${[{(ab)}^{-1}]}^{-2}$@ \\*
    ${[(ab)^{-1}]}^{-2}$ \\*
  \end{errexam}
\end{errdesc}

\Keyword{Italic\\ItalCmd\\NonItalic}
\begin{errdesc}{Italic correction (`\BS/') found in non-italic
    buffer.}
  If you try to use the \verb@\/@ command when \chktex\ believes that
  the buffer is not outputted as italic, you'll get this warning.

  \begin{errexam}
    \verb@This is an@\underline{\tt\BS/}\verb@ example@ \\*
    This is an\/ example. \\*
    \smallskip
    \verb@This is an example.@ \\*
    This is an example. \\*
  \end{errexam}
\end{errdesc}

\Keyword{Italic\\ItalCmd\\NonItalic}
\begin{errdesc}{Italic correction (`\BS/') found more than once.}
  If the buffer is italic, and you try to use the \verb@\/@ command
  more than once, you'll get this warning.

  \begin{errexam}
    \verb@This {\it example\/@\underline{\tt\BS/}\verb@} is not amusing.@ \\*
    This {\it example\/\/} is not amusing. \\*
    \smallskip
    \verb@This {\it example\/} is not amusing.@  \\*
    This {\it example\/} is not amusing. \\*
  \end{errexam}
\end{errdesc}

\Keyword{Italic\\ItalCmd\\NonItalic}
\begin{errdesc}{No italic correction (`\BS/') found.}
  You get this error if \chktex\ believes that you are switching from
  italic to non-italic, and you've forgot to use the \verb@\/@ command
  to insert that extra little spacing. If you use the \Cmd{em} option,
  you may ignore this warning.

  \begin{errexam}
    \verb@This {\it example@\underline{\tt\ }\verb@} is not amusing, either.@ \\*
    This {\it example} is not amusing, either. \\*
    \smallskip
    \verb@This {\it example\/} is not amusing, either.@ \\*
    This {\it example\/} is not amusing, either. \\*
  \end{errexam}
\end{errdesc}

\Keyword{IJAccent}
\begin{errdesc}{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
  \verb@\i@, \verb@\j@, \verb@\imath@ and \verb@\jmath@ command.

  \begin{errexam}
    \verb@This is an example of use of accents: \'{@\underline{\tt i}\verb@}.@ \\*
    This is an example of use of accents: \'{i}. \\*
    \smallskip
    \verb@This is an example of use of accents: \'{\i}.@ \\*
    This is an example of use of accents: \'{\i}. \\*
  \end{errexam}
\end{errdesc}

\Keyword{HyphDash\\NumDash\\WordDash}
\begin{errdesc}{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 \rsrc\ file. If not, it will shut up and accept that
  it doesn't know.

  \begin{tabular}{ll}
    \bf Character type & \bf Keyword in \rsrc\ file \\*
    Space & \tt WordDash \\*
    Number & \tt NumDash \\*
    Alphabetic character & \tt HyphDash \\*
  \end{tabular}

  This is more or less correct, according to my references.  Hopefully
  this check can be even more improved (suggestions?).

  \begin{errexam}
    \verb@It wasn't anything @\underline{\tt-}\verb@ just a 2@\underline
    {\tt---}\verb@3 star@\underline{\tt--}\verb@shots.@ \\*
    It wasn't anything - just a 2---3 star--shots. \\*
    \smallskip
    \verb@It wasn't anything --- just a 2--3 star-shots@ \\*
    It wasn't anything --- just a 2--3 star-shots. \\*
  \end{errexam}
\end{errdesc}


\fmted{`\%s' expected, found  `\%s'.}
\begin{errdesc}{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.

\end{errdesc}

\Keyword{CenterDots\\LowDots}
\begin{errdesc}{You should use `\%s' to achieve  an ellipsis.}
  Simply typing three \Cmd{.} in a row will not give a perfect spacing
  withing the between the dots. The \verb@\ldots@ is much more
  suitable for this.

  In math mode, you should also distinguish between \verb@\cdots@ and
  \verb@\ldots@; take a look at the example below.

  \begin{errexam}
    \newcommand{\td}{\underline{\tt...}}
    \verb@Foo@\td\verb@bar. $1,@\td\verb@,3$. $1+@\td\verb@+3$. $1,@%
    \underline{\tt\BS{}cdots}\verb@,3$.@ \\*
    Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$.  \\*
    \smallskip
    \verb@Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$.@ \\*
    Foo\dots bar. $1,\ldots,3$. $1+\cdots+3$. $1,\ldots,3$. \\
  \end{errexam}
\end{errdesc}

\Keyword{Abbrev}
\begin{errdesc}{Interword spacing (`\BS\ ') should perhaps be used.}

  One of the specified abbreviations were found. Unless you have
  previously said \verb@\frenchspacing@, you'll have incorrect
  spacing, which one should avoid if possible.

  \begin{errexam}
    \verb@This is an example, i.e.@\underline{\tt\ }\verb@an demonstration.@ \\*
    This is an example, i.e. an demonstration.        \\*
    \smallskip
    \verb@This is an example, i.e.\ an demonstration.@   \\*
    This is an example, i.e.\ an demonstration.        \\*
  \end{errexam}
\end{errdesc}

\begin{errdesc}{Intersentence spacing (`\BS{}@') 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.

  \begin{errexam}
    \verb@I've seen an UFO!@\underline{\tt\ }\verb@Right over there!@ \\*
    I've seen an UFO! Right over there!        \\*
    \smallskip
    \verb+I've seen an UFO\@! Right over there!+ \\*
    I've seen an UFO\@! Right over there!        \\*
  \end{errexam}
\end{errdesc}

\begin{errdesc}{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
  {\em may\/} also be an error; you ought to check it to be safe.

  \begin{errexam}
    \verb@$\hat$@ \\*
    This will give a \LaTeX\ error\dots  \\*
    \smallskip
    \verb@$\hat{a}$@ \\*
    $\hat{a}$        \\*
  \end{errexam}
\end{errdesc}

\begin{errdesc}{No match found for `\%s'.}

  This warning is triggered if we find a single, {\em opening\/}
  bracket or environment.  While bracket matching is not an explicit
  error, it is usually a sign that something is wrong.

\end{errdesc}

\Keyword{MathEnvir}
\begin{errdesc}{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.

\end{errdesc}

\begin{errdesc}{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.

\end{errdesc}

\begin{errdesc}{You should use either `` or '' as  an alternative to `\,"\,'.}
  Self-explanatory. Look in the example, and you'll understand why.

  \begin{errexam}
    \verb@This is an @\underline{\tt"}\verb@example@\underline{\tt"} \\*
    This is an "example" \\*
    \smallskip
    \verb@This is an ``example''@ \\*
    This is an ``example'' \\*
  \end{errexam}
\end{errdesc}

\begin{errdesc}{You should use "'" (ASCII 39)  instead  of
    "'" (ASCII 180).} On some keyboards you might get the wrong quote.
  This quote looks, IMHO, {\em ugly\/} compared to the standard
  quotes, it doesn't even come out as a quote!  Just see in the
  example.


  \begin{errexam}
    \verb@``There@\underline{\tt '}\verb@s quotes and there@\underline{\tt  '}\verb@s quotes@
    \underline{\tt ''} \\* % ''
    ``Theres quotes and theres quotes \\* % ''
    \smallskip
    \verb@``There's quotes and there's quotes''@ \\*
    ``There's quotes and there's quotes'' \\*
  \end{errexam}
\end{errdesc}

\Keyword{Userwarn}
\begin{errdesc}{User-specified pattern found.}
  A substring  you've specified using {\tt USERWARN} in the \rsrc\ file,
  has been found.
\end{errdesc}

\begin{errdesc*}{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.

  \begin{errexam}
    \verb@\LaTeX\ is an extension of \TeX@\underline{\tt\BS.}\verb@ Right?@ \\*
    \LaTeX\ is an extension of \TeX\. Right? \\*
    \smallskip
    \verb@\LaTeX\ is an extension of \TeX. Right?@ \\*
    \LaTeX\ is an extension of \TeX. Right? \\*
  \end{errexam}
\end{errdesc*}

\begin{errdesc*}{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 \Cmd{comment} environment is better suited.

\end{errdesc*}


\begin{errdesc}{Either ''\BS,' or '\BS,'' 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.

  \begin{errexam}
    \underline{\tt```}\verb@Hello', I heard him said'', she remembered.@ \\*
    ```Hello', I heard him said'', she remembered. \\*
    \smallskip
    \verb@``\,`Hello', I heard him said'', she remembered.@ \\*
    ``\,`Hello', I heard him said'', she remembered.
  \end{errexam}
\end{errdesc}

\Keyword{PostLink}
\begin{errdesc}{Delete this space to maintain correct  pagereferences.}
  This message, issued when a space is found in front of a
  \verb@\index@, \verb@\label@ or similar command (can be set in the
  \rsrc\ 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.

  \begin{errexam}
    \verb@Indexing text@\underline{\tt\ }\verb@\index{text} is fun!@ \\*
    \smallskip
    \verb@Indexing text\index{text} is fun!@ \\*
  \end{errexam}
\end{errdesc}

\begin{errdesc}{You might wish to put this between a pair of `\{\}'}

  This warning is given whenever \chktex\ finds a \Cmd{\^{ }}' or a
  \Cmd{\_} 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.

  \begin{errexam}
    \verb@$5\cdot10^@\underline{\tt10}\verb@$@ \\*
    $5\cdot10^10$ \\*
    \smallskip
    \verb@$5\cdot10^{10}$@ \\*
    $5\cdot10^{10}$
  \end{errexam}
\end{errdesc}

\begin{errdesc}{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.

  \begin{errexam}
    \verb@Do you understand@\underline{\tt\ }\verb@?@ \\*
    Do you understand ? \\*
    \smallskip
    \verb@Do you understand?@ \\*
    Do you understand? \\*
  \end{errexam}
\end{errdesc}

\begin{errdesc}{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 \verb@\@\verb@input@ command relies on that the input file exists\dots

\end{errdesc}

\Keyword{Italic\\ItalCmd\\NonItalic}
\begin{errdesc}{Don't use \BS/ in front of small punctuation.}
  Italic correction should generally {\em 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.

  \begin{errexam}
    \verb@It is just a {\it test@\underline{\tt\BS/}\verb@}, don't think anything else.@ \\*
    It is just a {\it test\/}, don't think anything else. \\*
    \smallskip
    \verb@It is just a {\it test}, don't think anything else.@ \\*
    It is just a {\it test}, don't think anything else.
  \end{errexam}
\end{errdesc}

\begin{errdesc}{\$\BS{}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
  $\times$ provided by the \verb@$\times$@ command is better suited for
  this.

  \begin{errexam}
    \verb@The program opens a screen sized 640@\underline{\tt x}\verb@200 pixels.@ \\*
    The program opens a screen sized 640x200 pixels. \\*
    \smallskip
    \verb@The program opens a screen sized $640\times200$ pixels.@ \\*
    The program opens a screen sized $640\times200$ pixels.
  \end{errexam}
\end{errdesc}

\begin{errdesc*}{Multiple spaces detected in output.}

  This warning, intended for the novice, will remind you that even if
  you {\em type\/} multiple spaces in your input, only a single space
  will come out. Some ways to come around this is listed below.

  \begin{errexam}
    \verb@White           is a beautiful colour.@ \\*
    White           is a beautiful colour. \\*
    \smallskip
    \verb@White~~~~~{ }{ }{ }\ \ \ is a beautiful colour.@ \\*
    White~~~~~{ }{ }{ }\ \ \ is a beautiful colour. \\
  \end{errexam}
\end{errdesc*}

\Keyword{VerbEnvir}
\begin{errdesc}{This text may be ignored.}
  Certain implementations of the \verb@verbatim@ environment and
  derivations of that, ignore all text on the same line as
  \verb@\end{verbatim}@.  This will warn you about this.


\end{errdesc}

\fmted{Use ` to begin quotation, not '.}\hfill\\
\fmted{Use ' to end quotation, not `.}\hfill\\
\begin{errdesc}{Don't mix quotes.}

  Proper quotations should start with a \verb@`@ and end with a
  \verb@'@; anything else isn't very pretty. Both these warnings are
  relative to this; look in the example below.

  \begin{errexam}
    \verb@There are @\underline{\tt`'}%
    \verb@examples'' and there are ``examples@\underline{\tt``}\verb@.@ \\*
    There are `'examples'' and there are ``examples``. \\*
    \smallskip
    \verb@There are ``examples'' and there are ``examples''.@ \\*
    There are ``examples'' and there are ``examples''.
  \end{errexam}
\end{errdesc}

\Keyword{MathRoman}
\begin{errdesc}{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.

  \begin{errexam}
    \verb@$@\underline{\tt sin}\verb@^2 x + @\underline{\tt cos}\verb@^2 x = 1$@ \\*
    $sin^2 x + cos^2 x= 1$ \\*
    \smallskip
    \verb@$\sin^2 x + \cos^2 x = 1$@ \\*
    $\sin^2 x + \cos^2 x = 1$
  \end{errexam}
\end{errdesc}

\fmted{You should put a space in front of/after parenthesis.}\hfill\\
\begin{errdesc}{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.



  \begin{errexam}
    \verb@This@\underline{\tt( }\verb@an example@\underline{\tt( }%
    \verb@Nuff said@\underline{\tt\ }\verb@)), illustrates@\underline{\tt( }%
    \verb@``my''@\underline{\tt\ )}\verb@point.@\\
    This( an example( Nuff said )), illustrates( ``my'' )point. \\
    \smallskip
    \verb@This (an example (Nuff said)), illustrates (``my'') point.@\\
    This (an example (Nuff said)), illustrates (``my'') point.\\
  \end{errexam}
\end{errdesc}

\Keyword{QuoteStyle}
\begin{errdesc}{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 \rsrc\ file. A
  description on each style follows:
  \begin{description}
  \item[Traditional:] This style is the most visually pleasing. It
    always puts the punctuation {\em in front of\/} the quotes, which
    gives a continuous bottom line.

    However, it may in certain cases be ambigious. Consider the
    following example from a fictious \Cmd{vi(1)}
    tutorial (quote taken from the Jargon file):
    \begin{center}
      \verb@Then delete a line from the file by typing ``dd.''@ \\*
      Then delete a line from the file by typing ``dd.''
    \end{center}
    That would be very bad --- because the reader would be prone to
    type the string d-d-dot, and it happens that in \Cmd{vi(1)} dot
    repeats the last command accepted. The net result would be to
    delete {\em two\/} lines! This problem is avoided using logical
    style, described below.
    \pagebreak[3]
  \item[Logical:] This style uses quotes as balanced delimiters like
    parentheses. While this is not the most visual pleasing, it is
    can't be misunderstood. The above sentence would then become:
    \nopagebreak
    \begin{center}
      \verb@Then delete a line from the file by typing ``dd''.@ \\*
      Then delete a line from the file by typing ``dd''.
    \end{center}
    \nopagebreak
  \end{description}

\end{errdesc}

\begin{errdesc}{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).

  \begin{errexam}
    \verb@For output codes, see table@\underline{\tt\ }%
    \verb@~@\underline{\tt\ }\verb@\ref{foo}.@ \\*
    For output codes, see table ~ 1.1.\\*
    \smallskip
    \verb@For output codes, see table~\ref{foo}.@ \\*
    For output codes, see table~1.1.
  \end{errexam}
\end{errdesc}

\Keyword{MathEnvir}
\begin{errdesc}{You should put punctuation outside inner/inside
    display math mode.}
  As recommended in the \TeX{}book, 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 \TeX{}book:
  \begin{errexam}
    \verb@for $x = a@\underline{\tt,}\verb@b$, or $c$.@\\*
    for $x = a,b$, or $c$. \\*
    \smallskip
    \verb@for $x = a$, $b$, or $c$.@\\*
    for $x = a$, $b$, or $c$.\\*
  \end{errexam}

\end{errdesc}

\Keyword{Primitives}
\begin{errdesc*}{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.
\end{errdesc*}

\Keyword{NotPreSpaced}
\begin{errdesc}{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.

  \begin{errexam}
    \verb@This is a footnote@\underline{\tt\ }\verb@\footnotemark[1] mark.@\\*
    This is a footnote ${}^1$ mark. \\*
    \smallskip
    \verb@This is a footnote\footnotemark[1] mark.@\\*
    This is a footnote${}^1$ mark. \\*
  \end{errexam}
\end{errdesc}

\Keyword{NoCharNext}
\begin{errdesc}{`\%s' is normally not followed by `\%c'.}
  \LaTeX' error message when calling \verb@\left \{@ instead of
  \verb@left \{@ is unfortunately rather poor. This warning detects
  this and similar errors.
\end{errdesc}

\section{Future plans}

In a somewhat prioritized sequence, this is what I'd like to put into the
program --- if I have the time.

\begin{itemize}
\item Do a final fix for maths mode. Currently, \chktex\ doesn't
  recognize embedded math mode (i.e.\ constructions like
  \verb@$$a+b\text{for $a \leq 0$}$$@).

\item Support for regular expressions as user patterns. I'll do it at
  once I get the GNU \Cmd{rx} package up and running (it doesn't
  produce correct include files).

\item De-linearize the checker. Currently, it works on a line-by-line
  basis, in most respects, at least. I hope to be able to remove this
  barrier; as this will reduce the amount of false warnings
  somewhat.

\item Probably some more warnings/errors; just have to think them out
  first.  Suggestions are appreciated --- I've ``stolen'' most that
  similar programs provides, and am running out of ideas, really.

  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.

\item Fix a few more bugs.
\end{itemize}

\section{Notes}

\subsection{Wish to help?}

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:

\begin{itemize}
\item Does anyone have a $\mbox{\LaTeX}\rightarrow \mbox{{\tt troff}}$
  conversion program? It would be really nice if I could extract the
  relevant sections from this manual, and present them as a man page.
  I will not, however, convert this manual to \TeX{}info in order to
  be able to do this; IMHO \TeX{}info documents have far too limited
  typographic possibilities.

  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 \LaTeX2{\tt html}, I'm willing to do the
  same in order to produce {\tt troff} output.

\item Help me port the program! This is a prioritized one. It's no fun
  writing ANSI C when people haven't got a C compiler.

  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, {\em please\/} enclose your
  changes in something like \Cmd{\#ifdef \_\_PLATFORM\_\_\dots code\dots\#endif}!
  It makes life so much easier later, when we try to merge the two
  source trees.

\item Reports on problems configuring and compiling \chktex\ on supported
  (and unsupported) systems are welcomed.

\item Filters for other file formats. I do believe that there are
  several formats using \LaTeX\ for its formatting purposes, combining
  that with something else. If you can write a program or script which
  filters everything away but the \LaTeX\ code, it will surely be
  appreciated (and included). Look at the \verb@deweb@ script to see
  what I mean.

\item Arexx interfaces for other editors are also welcomed; these
  should be rather fast to write.  They should to the following:
  \begin{enumerate}
  \item Get the filename of the active file.
  \item If possible, save the file to disk if there has been any
    changes.
  \item Call the program \Cmd{ChkTeX.rexx} with the filename as the
    only parameter.
  \end{enumerate}

\item If somebody out there actually possesses (and uses) GoldED, it
  would be nice if they checked whether the ARexx script included
  actually work.  If not, please send me a fixed copy; perhaps also
  one which supports point 2 above, too. If it does work, then please
  tell me so, so I can remove this item.

  I don't have GoldEd in my possession; the script was just modelled
  after Juergen Zeschky's, ({\tt <juergen@sokrates.nbg.de>})
  $\mbox{PGP}\leftrightarrow\mbox{GoldED}$ interface.

\item If you update the \rsrc\ file in anyway that is not strictly
  local, I would appreciate to receive your updated version.

\item Suggestions for new warnings are always welcomed. Both formal
  (i.e.\ regexps or similar) and non-formal (plain English) descriptions
  are welcomed.
\end{itemize}

Of course, people doing any of this will be mentioned in this document, and
thus receive eternal glory and appreciation.

\subsection{Caps and stuff}

This program uses the \Cmd{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
\verb@#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.

\section{About the author}

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 {\tt
  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.

                                % I am also involved in writing the document
                                % for {\sc Isaac} --- Interactive Simulation as an Alternative to
                                % Advanced Calculations.  This is planned to help newcomers to physics,
                                % by providing a computer program which enables one to simulate most
                                % experiments relating to classical mechanics.
                                %

C and shell programming are not my only knowledge areas regarding
computers, however.  I write the following languages more or less:
Perl, Motorola {\tt 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{\aa}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\dots


\section{Thanks}

The author wishes to thank the following people (in alphabetical order):

\def\Name#1#2{%
\item[]
  \setbox0=\hbox{
    \begin{tabular}{l}
      \bf #1 \\
      \tt #2 \\
    \end{tabular}
    } \usebox0\\ }

\begin{description}

  \Name{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.

  In addition, he sent me a huge list of 238 common English
  abbreviations, for inclusion in the \rsrc\ file! Together with the
  enhanced abbreviation recognizer, I do now believe most
  abbreviations should be catched\dots

  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.

  \Name{Gerd B\"ohm}{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.

  \Name{Lars Frellesen}{frelle@math-tech.dk} Sent a few bug reports
  regarding the filtering of messages. He has also helped me to
  expand the \Cmd{SILENT} keyword in the \rsrc\ file.

  \Name{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).

  \Name{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.

  He has also kept on beta-testing later versions of \chktex, giving
  me bug-reports and enhancements requests.

  \Name{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.

  Has also provided some OS-oriented code.

  \Name{Frank Luithle}{f\_luithle@outside.sb.sub.de}
  Wrote a translation for v1.0.  Unfortunately, he remained unreachable
  after that\dots:-/

  \Name{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 \verb@getenv()@ call
  seem to be open for interpretations.  Many possible
  incompatibilities have been removed due to these lessons.

  \Name{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.

  \Name{Bj\o 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).

  \Name{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 \verb@lacheck@; which also inspired some
  of the warnings.
\end{description}

%endlatex
\section{Contacting the author}

If you wish to contact me for any reason or would like to participate in
the development of \chktex, please write to:
%latex
\begin{samepage}
%endlatex
  \begin{quote}
    Jens Berger           \\
    Spektrumvn. 4         \\
    N-0666 Oslo           \\
    Norway                \\
    E-mail: {\tt <jensthi@ifi.uio.no>}
  \end{quote}
%latex
\end{samepage}
%endlatex
Any signs of intelligent life are welcomed; that should exclude piracy.

Since the original author is unreachable, the maintainer these days is:
%latex
\begin{samepage}
%endlatex
  \begin{quote}
    Baruch Even     \\
	E-mail: {\tt <chktex@ev-en.org>}
  \end{quote}
%latex
\end{samepage}
%endlatex

\medskip\noindent
Have fun.

\end{document}