texlive[65275] Build/source/texk/chktex: chktex-1.7.8

commits+hironobu at tug.org commits+hironobu at tug.org
Thu Dec 15 12:48:57 CET 2022


Revision: 65275
          http://tug.org/svn/texlive?view=revision&revision=65275
Author:   hironobu
Date:     2022-12-15 12:48:56 +0100 (Thu, 15 Dec 2022)
Log Message:
-----------
chktex-1.7.8

Modified Paths:
--------------
    trunk/Build/source/texk/chktex/ChangeLog
    trunk/Build/source/texk/chktex/ChkTeX.pdf
    trunk/Build/source/texk/chktex/Makefile.am
    trunk/Build/source/texk/chktex/Makefile.in
    trunk/Build/source/texk/chktex/TLpatches/ChangeLog
    trunk/Build/source/texk/chktex/TLpatches/TL-Changes
    trunk/Build/source/texk/chktex/chktex-src/ChkTeX.c
    trunk/Build/source/texk/chktex/chktex-src/ChkTeX.h
    trunk/Build/source/texk/chktex/chktex-src/ChkTeX.tex.in
    trunk/Build/source/texk/chktex/chktex-src/FindErrs.c
    trunk/Build/source/texk/chktex/chktex-src/FindErrs.h
    trunk/Build/source/texk/chktex/chktex-src/Makefile.in
    trunk/Build/source/texk/chktex/chktex-src/NEWS
    trunk/Build/source/texk/chktex/chktex-src/OpSys.c
    trunk/Build/source/texk/chktex/chktex-src/OpSys.h
    trunk/Build/source/texk/chktex/chktex-src/Resource.c
    trunk/Build/source/texk/chktex/chktex-src/Resource.h
    trunk/Build/source/texk/chktex/chktex-src/Test.nore.out
    trunk/Build/source/texk/chktex/chktex-src/Test.pcre.out
    trunk/Build/source/texk/chktex/chktex-src/Test.posix-ere.out
    trunk/Build/source/texk/chktex/chktex-src/Test.tex
    trunk/Build/source/texk/chktex/chktex-src/Utility.c
    trunk/Build/source/texk/chktex/chktex-src/Utility.h
    trunk/Build/source/texk/chktex/chktex.test
    trunk/Build/source/texk/chktex/configure
    trunk/Build/source/texk/chktex/version.ac

Added Paths:
-----------
    trunk/Build/source/texk/chktex/chktex-src/MakeChkTeXRC.pl
    trunk/Build/source/texk/chktex/chktex-src/chktexrc.in
    trunk/Build/source/texk/chktex/chktex-src/configure.ac
    trunk/Build/source/texk/chktex/chktex-src/input/
    trunk/Build/source/texk/chktex/chktex-src/input/file
    trunk/Build/source/texk/chktex/chktex-src/tests/
    trunk/Build/source/texk/chktex/chktex-src/tests/main.expected
    trunk/Build/source/texk/chktex/chktex-src/tests/main.tex
    trunk/Build/source/texk/chktex/chktex-src/tests/run-tests.sh
    trunk/Build/source/texk/chktex/chktex-src/tests/sub1/
    trunk/Build/source/texk/chktex/chktex-src/tests/sub1/file.tex
    trunk/Build/source/texk/chktex/chktex-src/tests/sub1/subsub/
    trunk/Build/source/texk/chktex/chktex-src/tests/sub1/subsub/subsubfile.tex
    trunk/Build/source/texk/chktex/chktex-src/tests/sub2/
    trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file1.tex
    trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file2.tex
    trunk/Build/source/texk/chktex/chktexrc

Removed Paths:
-------------
    trunk/Build/source/texk/chktex/ChkTeX.tex
    trunk/Build/source/texk/chktex/TLpatches/patch-04-finderrs
    trunk/Build/source/texk/chktex/chktex-src/chktexrc
    trunk/Build/source/texk/chktex/chktex-src/configure.in
    trunk/Build/source/texk/chktex/chktex-src/m4/

Modified: trunk/Build/source/texk/chktex/ChangeLog
===================================================================
--- trunk/Build/source/texk/chktex/ChangeLog	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/ChangeLog	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,3 +1,8 @@
+2022-12-15  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
+	* Import ChkTeX 1.7.8.
+	* Makefile.am, chktex.test, version.ac: adapted.
+
 2021-07-13  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
 
 	* regex/regexec.c: Avoid MSVC compiler error.

Modified: trunk/Build/source/texk/chktex/ChkTeX.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Build/source/texk/chktex/ChkTeX.tex
===================================================================
--- trunk/Build/source/texk/chktex/ChkTeX.tex	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/ChkTeX.tex	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,1842 +0,0 @@
-%%
-%%  ChkTeX v1.7.6, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-%%
-%%  Contact the author at:
-%%              Jens Berger
-%%              Spektrumvn. 4
-%%              N-0666 Oslo
-%%              Norway
-%%              E-mail: <jensthi at 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.
-%%
-
-
-
-\documentclass[a4paper]{article}
-%latex
-\usepackage{array, tabularx, verbatim, multicol}
-\usepackage[T1]{fontenc}
-\nonfrenchspacing
-\newcounter{errornum}
-\setcounter{errornum}{1}
-%endlatex
-\newcommand{\jtbt}{Jens~T. Berger~Thielemann}
-\newcommand{\Cmd}[1]{``\texttt{#1}''}
-\newcommand{\rsrc}{``\texttt{chktexrc}''}
-\newcommand{\chktex}{Chk\TeX}
-
-%latex
-\newcolumntype{Y}{>{\raggedright\arraybackslash}X}
-\newcommand{\fmted}[1]{%
-  {\noindent\large%
-    \begin{tabularx}{\linewidth}{lY}%
-      \bf Warning \theerrornum:  & \texttt{#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}}
-\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\ v1.7.6}
-\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
-\emph{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.
-For example, recent versions of AUC\TeX\ (the Emacs mode) interface
-beautifully with \chktex.
-
-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.
-
-\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.
-      \item Ability to suppress warnings on a single line.
-      \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
-  systems which only support lacheck.
-\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 \emph{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. \\
-    51 Franklin Street \\
-    Fifth Floor \\
-    Boston \\
-    MA 02110-1301 \\
-    USA
-\end{quote}
-
-
-\section{Availability}
-
-This program is on CTAN\@; thus it can be found at any mirrors of those.
-It is also part of TeX Live 2011.
-
-\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-pcre}:] Allows using PCRE (perl compatible
-      regular expressions) for use defined warnings.  The default is
-      to use PCRE if it is installed on your system as determined by
-      \Cmd{pcre-config}.  You can use \Cmd{-{}-disable-pcre} if you
-      plan to distribute this for systems in which you cannot ensure
-      PCRE will be installed.
-
-      User defined regular expressions are defined using
-      \texttt{UserWarnRegex} in the \rsrc\ file.  See warning~44 for
-      more information.
-
-    \item[\Cmd{-{}-enable-lacheck-replace}] This enables a quick
-      hack for using \chktex\ instead of lacheck. This is done by
-      installing a stub script which ``overrides'' the original
-      lacheck executable. In this way, tools which support lacheck
-      can be easily made to support chktex instead.
-
-    \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 at .c@ files.  Do not
-  forget to 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}
-\paragraph{Note:} You \emph{must} install the new \rsrc\ file; \chktex\ will
-fail to function otherwise!
-
-    After   doing   this,   you   may  enhance  \chktex'  behaviour  by
-reading/editing the \rsrc\ file.
-
-%latex
-\section{Usage}
-
-\subsection{\chktex}
-
-\subsubsection{Synopsis}
-
-A UNIX-compliant template format follows:
-
-\newcommand{\Group}[1]{\mbox{[#1]}}
-\begin{tabularx}{.95\linewidth}{lY}
-  \texttt{chktex} & \ttfamily \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[\texttt{-h [-{}-help]}] Gives you a command summary.
-  \item[\texttt{-i [-{}-license]}] Shows distribution information.
-  \item[\texttt{-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 \texttt{-g}.
-  \item[\texttt{-r [-{}-reset]}] This will reset all settings to their
-    defaults. This may be useful if you use the \texttt{CMDLINE}
-    directive in your \rsrc\ file, and wish to do something
-    unusual.
-  \item[\texttt{-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[\texttt{-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 \emph{all} warnings.
-  \begin{description}
-  \item[\texttt{-w [-{}-warnon]}] Makes the message number passed as
-    parameter a warning and turns it on.
-  \item[\texttt{-e [-{}-erroron]}] Makes the message number passed as
-    parameter an error and turns it on.
-  \item[\texttt{-m [-{}-msgon]}] Makes the message number passed as
-    parameter a message and turns it on. Messages are not counted.
-  \item[\texttt{-n [-{}-nowarn]}] Turns the warning/error number passed
-    as a parameter off.
-  \item[\texttt{-L [-{}-nolinesupp]}] Turns off suppression of messages
-    on a per line basis.  This is meant to be used to ensure that no new
-    errors have crept into a document while editing.
-  \end{description}
-\item[Output control flags:] Determines the appearance and
-  destination of the error reports.
-  \begin{description}
-  \item[\texttt{-q [-{}-quiet]}] Shuts up about copyright information.
-  \item[\texttt{-o [-{}-output]}] Normally, all errors are piped to \texttt{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 \texttt{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[\texttt{-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 \emph{second} entry in the
-    \rsrc\ file), using \texttt{-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 \texttt{awk}, \texttt{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 at -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 \texttt{lacheck} uses. More formally,
-      it is the following:
-\begin{verbatim}
-"File", line Line: Warning message
-\end{verbatim}
-
-      To utilize this, type \verb at M-x compile RET at . Delete whatever
-      is written in the minibuffer, and type
-      \verb at chktex -v3 texfile.tex@, and you should be able to
-      browse through the
-      error messages.  Use \verb at C-x `@ to parse the messages.
-    \item[4] More or less the same as \verb at -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[\texttt{-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]{\texttt{\%#1} &}
-    \begin{tabularx}{\linewidth}{cX}
-      \bf Code & \bf Description \\
-      \Pf{b} String to print \textbf{b}etween fields (from \texttt{-s}
-      option).\\
-      \Pf{c} \textbf{C}olumn position of error. \\
-      \Pf{d} Length of error (\textbf{d}igit). \\
-      \Pf{f} Current \textbf{f}ilename.\\
-      \Pf{i} Turn on \textbf{i}nverse printing mode.\\
-      \Pf{I} Turn off \textbf{i}nverse printing mode.\\
-      \Pf{k} \textbf{k}ind of error (warning, error, message).\\
-      \Pf{l} \textbf{l}ine number of error.\\
-      \Pf{m} Warning \textbf{m}essage.\\
-      \Pf{n} Warning \textbf{n}umber.\\
-      \Pf{u} An \textbf{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 (\textbf{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 \emph{not} support field lengths (yet).
-    This may come in the future, if I get the time\dots
-
-    The \texttt{-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[\texttt{-V [-{}-pipeverb]}] Which entry we'll use in the \rsrc\
-    file whenever \texttt{stdout} isn't a terminal.
-
-    The default is to use the same mode as specified with the
-    \texttt{-v} switch; using \texttt{-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[\texttt{-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 at input@ are presented under their original
-    names. This seems most logical to me.
-
-  \item[\texttt{-s [-{}-splitchar]}] String to use instead of the
-    colons when doing \texttt{-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 \texttt{0}, the feature will
-  be disabled, if it is \texttt{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[\texttt{-b [-{}-backup]}] If you use the \texttt{-o} switch, and the
-    named outputfile exists, it will be renamed to \texttt{filename.bak}.
-  \item[\texttt{-I [-{}-inputfiles]}] Execute \verb@\@\verb at 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[\texttt{-H [-{}-headererr]}] Show errors found in front of the
-    \verb@\begin{document}@ line. Some people keep \emph{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[\texttt{-g [-{}-globalrc]}] Read in the global resource file.  This
-    switch may be useful together with the \texttt{-l} option.
-  \item[\texttt{-t [-{}-tictoc]}] Display a twirling baton, to show that
-    we're working. \texttt{-v0} does an \texttt{-t0}, too, as it assumes
-    that the user then uses the program non-interactively.  This is
-    now a no-op.
-  \item[\texttt{-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 \texttt{stdin}.  To abort \texttt{stdin} input, press the
-following keycombinations:
-
-\smallskip
-\begin{tabular}{ll}
-  \bf Machine & \bf Key-combination \\
-  UNIX & $\fbox{\texttt{Ctrl}} + \fbox{\texttt{D}}$ \\
-  MS-DOS & $\fbox{\texttt{Ctrl}} + \fbox{Z}$, followed by return.
-\end{tabular}
-\smallskip
-
-By default, we use 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 it is
-self-documenting, you should be able to get the meaning of each
-keyword by simply reading the file. In fact, since not all options
-are described in this documentation it is necessary that you read
-the \rsrc\ file in order to understand them all. The method for
-\emph{finding it} has grown rather complex. An outline is given below.
-
-If \chktex\ finds multiple files when searching, each and every one
-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 something similar to
-  \Cmd{/usr/local/share/chktexrc}, 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{Per Line and File Suppressions}
-
-There are many cases in which \chktex{} will give a warning about a
-construct which, although it usually indicates a mistake, is
-intentional.  In these cases it can be extremely annoying to have
-this message appear everytime \chktex{} is run.  For this reason you
-can use \LaTeX{} comments to suppress a certain message on a single
-line.  This can be done by adding a (case-insensitive) comment at the
-end of the line of the form
-\begin{center}
-  \verb+% chktex ##+
-\end{center}
-where \verb+##+ is the number of the message to be suppressed.
-For example the line
-\begin{center}
-  \verb+$[0,\infty)$+\\*
-\end{center}
-will produce a warning (number 9) about mismatched \verb+]+ and \verb+)+.
-However the lines
-\begin{center}
-  \verb+$[0,\infty)$ % chktex 9+\\*
-  \verb+$[0,\infty)$ % ChkTeX 9+\\*
-\end{center}
-will not produce such a message.  In this case, message number 17 will
-still appear at the end, stating that the numbers of \verb+]+ and
-\verb+)+ don't match for the entire file.
-
-To suppress two different errors on the same line you will need two
-instances of \verb+chktex+ in the comment.  This format is a little
-cumbersome, but it shouldn't be needed often, and hopefully will help
-avoid accidental suppressions.
-\begin{center}
-  \verb+Jordan--H\"older on $[0,\infty)$ % chktex 8 chktex 9+\\*
-\end{center}
-
-One problem inherent in line-by-line suppressions is that during editing
-another error of the same type may creep into the same line.  Therefore,
-I suggest using the \texttt{-L} or \texttt{-{}-nolinesupp} option to
-disallow line based suppressions once just before the document is finished.
-At that point you should go back over all the warnings and decide if they
-should be fixed.
-
-In addition to line-specific suppressions, you can create a suppression which will be in effect for the remainder of the file.
-This can be used, for example, to turn off warning 18 (about \verb+"+) in a file which uses a package (like \Cmd{babel}) where \verb+"+ is an active character.
-The syntax is nearly the same, namely
-\begin{center}
-  \verb+% chktex-file ##+
-\end{center}
-
-\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} or several of \Cmd{babel} languages
-  which use \verb+"+ as an active character; 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. Alternately, you can put
-  \verb+% chktex-file 18+ in your files which use one of these packages so
-  that other files will still have these checks performed.
-\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.
-
-Long lines are broken up into chunks and handled separately.  The exact
-length is platform dependent, though is guaranteed to be at least 256 bytes.
-The first portions of the line will have line numbers that are 1 less than
-they should be.  Some errors can be missed and some can be added erroneously.
-A warning will be issued if lines are too long.
-
-Before submitting a bug report, please first see whether the problem can be
-solved by editing the \rsrc\ file appropriately.
-
-
-
-\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
-\texttt{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 at .w@ to filenames it can't find.
-
-If no filenames are given, we will read from \texttt{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}
-
-\texttt{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 \texttt{lacheck}, or spell-checkers like \texttt{ispell}.
-
-When \texttt{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 \texttt{cweave}, which output is truly difficult to figure
-anything out from).
-
-\texttt{deweb} accepts a list of filenames on the argument line, and will send
-its output to \texttt{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 \texttt{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.
-
-\texttt{deweb} should now understand all correct \texttt{CWEB} opcodes.  If it
-complains about not understanding a correct opcode, please inform the
-author.
-
-\subsubsection{Bugs}
-
-\texttt{deweb} will not even \emph{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{\texttt{\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.
-
-  You can also specify regular expressions to match commands which can
-  safely be terminated with a space.  They are specified in the
-  \rsrc\ file in \texttt{[]}, which in some other cases is used to
-  indicate case-insensitive matching.  This is used for example to
-  support the \verb+\startXXX+ macros of Con\TeX t.
-
-  \begin{errexam}
-    \verb@\LaTeX@\underline{\tt\ }\verb at 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 at Please refer to figure@\underline{\tt\ }\verb@\ref{foo}.@ \\*
-    Please refer to figure 11.                \\* % Gotta cheat here! :)
-    \smallskip
-    \verb at 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 at This is an@\underline{\tt\BS/}\verb@ example@ \\*
-    This is an\/ example. \\*
-    \smallskip
-    \verb at 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 at This {\it example\/@\underline{\tt\BS/}\verb@} is not amusing.@ \\*
-    This {\it example\/\/} is not amusing. \\*
-    \smallskip
-    \verb at 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 at This {\it example@\underline{\tt\ }\verb@} is not amusing, either.@ \\*
-    This {\it example} is not amusing, either. \\*
-    \smallskip
-    \verb at 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 at This is an example of use of accents: \'{@\underline{\tt i}\verb@}.@ \\*
-    This is an example of use of accents: \'{i}. \\*
-    \smallskip
-    \verb at 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\\DashExcpt}
-\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 & \texttt{WordDash} \\*
-    Number & \texttt{NumDash} \\*
-    Alphabetic character & \texttt{HyphDash} \\*
-  \end{tabular}
-
-  This is more or less correct, according to my references.  One
-  complication is that most often a hyphen (single dash) is desired
-  between letters, but occasionally an n-dash (double dash) is
-  required.  This is the case for theorems named after two people
-  e.g.\ Jordan--H\"older.  A hyphen would indicate that it was one
-  person with a hyphenated name e.g.\ Gregorio Ricci-Curbastro.
-  If this is rare enough, it can be dealt with via line based suppressions.
-  However, exceptions can also be handled by adding them to the
-  \texttt{DashExcpt} list.  The ``words'' in this list are
-  considered to be correct regardless of any other settings.
-  Adding \verb+Jordan--H\"older+ to this list will cause no warning
-  to be issued.  There is still the problem that no warning will be
-  raised for Jordan-H\"older (unless added explicitly via regular
-  expression), so care must still be taken.
-
-  Some manuals---particularly American manuals---also suggest
-  \emph{not} adding space around an m-dash (triple dash).
-  Hopefully this check can be improved even more (suggestions?).
-
-  \begin{errexam}
-    \verb at It wasn't anything @\underline{\tt-}\verb@ just a 2@\underline
-    {\tt-{}-{}-}\verb at 3 star@\underline{\tt-{}-}\verb at shots.@ \\*
-    It wasn't anything - just a 2---3 star--shots. \\*
-    \smallskip
-    \verb at 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.}
-  Either brackets or environments don't match.
-  \chktex\ expects 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
-  between the dots.  The \verb@\ldots@ is much more suitable for this.
-  Similar problems are noted for two periods in a row (instead of three)
-  since lacheck does.
-
-  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 at Foo@\td\verb at bar. $1,@\td\verb@,3$. $1+@\td\verb at +3$. $1,@%
-    \underline{\tt\BS{}cdots}\verb@,3$.@ \\*
-    Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$.  \\*
-    \smallskip
-    \verb at 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.
-
-  You can also specify case-insensitive abbreviations in \texttt{[]}, though
-  only the first letter is actually case-insensitive.
-
-  \begin{errexam}
-    \verb at This is an example, i.e.@\underline{\tt\ }\verb at an demonstration.@ \\*
-    This is an example, i.e. an demonstration.        \\*
-    \smallskip
-    \verb at 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 at I've seen an UFO!@\underline{\tt\ }\verb at 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
-  \emph{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, \emph{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 at This is an @\underline{\tt"}\verb at example@\underline{\tt"} \\*
-    This is an "example" \\*
-    \smallskip
-    \verb at 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, \emph{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 at s quotes and there@\underline{\tt  '}\verb at s quotes@
-    \underline{\tt ''} \\* % ''
-    ``There\xB4s quotes and there\xB4s quotes\xB4\xB4 \\* % ''
-    \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: \%s.}
-  A substring you've specified using \texttt{UserWarn} in the \rsrc\ file,
-  has been found.  See also warning~44 which allows using regular
-  expressions.  You can also specify case-insensitive versions in
-  \texttt{[]}.
-  % Normally I would use a ref here, but if the numbers change that would be
-  % hugely backwards incompatible.  Also it would require adding special label code.
-\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. Setting
-  this warning allows you to see notes you have left in comments.
-\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 at 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.
-
-  Warning~42 is similar in that it warns about spaces in front of footnotes.
-  The difference is that the warning text makes more sense for that case.
-
-  \begin{errexam}
-    \verb at Indexing text@\underline{\tt\ }\verb@\index{text} is fun!@ \\*
-    \smallskip
-    \verb at 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 numeric 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 at Do you understand@\underline{\tt\ }\verb@?@ \\*
-    Do you understand ? \\*
-    \smallskip
-    \verb at 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 at input@ command requires that the input file exist\dots
-
-\end{errdesc}
-
-\Keyword{Italic\\ItalCmd\\NonItalic}
-\begin{errdesc}{Don't use \BS/ in front of small punctuation.}
-  Italic correction should generally \emph{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 at 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 at 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 at The program opens a screen sized 640@\underline{\tt x}\verb at 200 pixels.@ \\*
-    The program opens a screen sized 640x200 pixels. \\*
-    \smallskip
-    \verb at 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 \emph{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 at White           is a beautiful colour.@ \\*
-    White           is a beautiful colour. \\*
-    \smallskip
-    \verb at 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 at 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 at There are @\underline{\tt`'}%
-    \verb at examples'' and there are ``examples@\underline{\tt``}\verb at .@ \\*
-    There are `'examples'' and there are ``examples``. \\*
-    \smallskip
-    \verb at 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 at This@\underline{\tt( }\verb at an example@\underline{\tt( }%
-    \verb at Nuff said@\underline{\tt\ }\verb@)), illustrates@\underline{\tt( }%
-    \verb@``my''@\underline{\tt\ )}\verb at point.@\\
-    This( an example( Nuff said )), illustrates( ``my'' )point. \\
-    \smallskip
-    \verb at 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 \emph{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 at 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 \emph{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 at 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 at For output codes, see table@\underline{\tt\ }%
-    \verb@~@\underline{\tt\ }\verb@\ref{foo}.@ \\*
-    For output codes, see table ~ 1.1.\\*
-    \smallskip
-    \verb at 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 at for $x = a@\underline{\tt,}\verb at b$, or $c$.@\\*
-    for $x = a,b$, or $c$. \\*
-    \smallskip
-    \verb at 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 at This is a footnote@\underline{\tt\ }\verb@\footnotemark[1] mark.@\\*
-    This is a footnote ${}^1$ mark. \\*
-    \smallskip
-    \verb at 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 at left \{@ is unfortunately rather poor. This warning detects
-  this and similar errors.
-\end{errdesc}
-
-\Keyword{UserWarnRegex}
-\begin{errdesc}{User Regex:\ \%s.}
-  A pattern you've specified using \texttt{UserWarnRegex} in the \rsrc\ file,
-  has been found.  See also warning~20 which allows specification of simple
-  string matching.
-
-  Depending on how \chktex\ was configured, you can use either PCRE regular
-  expressions, POSIX extended regular expressions, or none at all.
-  A warning will be issued if \chktex\ was built without regular expression
-  support, but you try to use one.
-
-  By default the matching portion of the line is printed to help distinguish
-  between user specified regular expressions.  However, if the regular
-  expression begins with a PCRE comment (which has a syntax of
-  \verb+(?#+~\dots~\verb+)+), then that comment will be printed instead.
-  This can be used to remind yourself why you were searching for the problem
-  or how to fix it.  This applies even if POSIX regular expressions are used
-  since \chktex\ itself parses a single initial PCRE-style comment.
-
-  \emph{Note:} If a regular expression (not a comment) starts with
-  \texttt{PCRE:} or \texttt{POSIX:} it will be used only if support for that
-  regular expression engine has been compiled in.  It is primarily meant to
-  make testing easier but, can be used to allow better regular expressions
-  if PCRE is available.  If you want a regular expression that starts with
-  \texttt{PCRE:} or \texttt{POSIX:} then you can enclose one of the
-  characters in brackets like \texttt{[P]CRE:}.
-
-  An example, included in the \rsrc\ file, is given below.  Remember that you
-  have to escape (with~\verb+!+) spaces and \verb+#+ as well as a few other
-  characters.  One should always use \verb+\nmid+ instead of \verb+\not\mid+
-  because the results are much better.
-  \begin{errexam}
-    \verb+\\not! *(\||\\mid)+\\*
-    \verb+User Regex: \not\mid.+\\*
-  \end{errexam}
-  or with an initial comment
-  \begin{errexam}
-    \verb+(?!#Always! use! \nmid)\\not! *(\||\\mid)+\\*
-    \verb+User Regex: Always use \nmid.+
-  \end{errexam}
-
-  You can use \verb+% chktex 44+ to suppress user regular expression
-  warnings on a given line, but this is often undesirable since all such
-  warnings are suppressed this way.  For this reason you can ``name'' user
-  regular expression warnings with negative numbers.  For example
-  \verb+% chktex 4+ will suppress the system warning number 4, but
-  \verb+% chktex -4+ will suppress the user regular expression warning
-  number 4.  Since one might wish to add, remove, or rearrange user warnings
-  in the \rsrc\ file, you must explicitly name particular warnings rather
-  than relying on position in that file.
-
-  In order to name one, include an initial PCRE-style comment with the first
-  characters being a number (positive or negative---the absolute value will
-  be used).  The numbers are limited by the number of bits in a \texttt{long},
-  usually giving 1--63 as possible names.  You can give more than one regular
-  expression the same name, and suppressing that name will suppress all
-  regular expressions with that name.
-
-  Using the example from before, all of the following will be suppressed with
-  \verb+% chktex -4+.  Note that the name \emph{will} be printed as written
-  so that you know which number to suppress.
-  \begin{errexam}
-    \verb+(?!#4:Always! use! \nmid)\\not! *(\||\\mid)+\\*
-    \verb+(?!#-4Always! use! \nmid)\\not! *(\||\\mid)+\\*
-    \verb+(?!#-4! Always! use! \nmid)\\not! *(\||\\mid)+\\*
-  \end{errexam}
-\end{errdesc}
-
-\begin{errdesc}{Use \textbackslash[ ... \textbackslash] instead of \$\$ ... \$\$.}
-
-  In \LaTeX\ documents, using \verb+\[...\]+ is strongly preferred over \verb+$$...$$+.
-  This is because using \verb+$$+ will change the vertical spacing in the
-  equations making them inconsistent.
-
-\end{errdesc}
-
-\begin{errdesc*}{Use \textbackslash( ... \textbackslash) instead of \$ ... \$.}
-
-  In \LaTeX\ documents using \verb+\(...\)+ is slightly preferred over \verb+$...$+.
-  Some error messages might be clearer with \verb+\(...\)+.
-
-\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 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{\texttt{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\texttt{html}, I'm willing to do the
-  same in order to produce \texttt{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, \emph{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 at deweb@ script to see
-  what I mean.
-
-\item Interfaces for other editors are also welcomed.
-
-\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}
-
-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
-\texttt{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 \texttt{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}
-      \textbf{#1} \\
-      \texttt{#2} \\
-    \end{tabular}
-    } \usebox0\\ }
-
-\begin{description}
-
-  \Name{Russ Bubley}{russ at 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 caught\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 at 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{Antonio DiCesare}{dicesare at vodafone.it}
-  He provided many feature requests and bug reports for the 1.7.1
-  version making it a much better release than it would have otherwise
-  been.  He also helped expand several keywords in the \rsrc\ file.
-
-  \Name{Mojca Miklavec}{mojca.miklavec.lists at gmail.com}
-  Found and helped debug a problem (fixed in 1.7.2) occurring only on
-  some platforms, 32 bit Macs for one.
-
-  \Name{Baruch Even}{chktex at ev-en.org}
-  Maintainer of \chktex\ for about a decade.
-
-  \Name{Lars Frellesen}{frelle at 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 at 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 at 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 at 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 at outside.sb.sub.de}
-  Wrote a translation for v1.0.  Unfortunately, he remained unreachable
-  after that\dots:-/
-
-  \Name{Nat}{nat at 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 at getenv()@ call
-  seem to be open for interpretations.  Many possible
-  incompatibilities have been removed due to these lessons.
-
-  \Name{Michael Sanders}{sanders at 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 at 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 at 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 at 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: \texttt{<jensthi at 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}
-    Ivan Andrus     \\
-    E-mail: \texttt{<darthandrus at gmail.com>}
-  \end{quote}
-%latex
-\end{samepage}
-%endlatex
-
-\medskip\noindent
-Have fun.
-
-\end{document}
-
-% The "Make" target is my own.
-% Local Variables:
-% TeX-command-default: "Make"
-% TeX-master: "ChkTeX.tex"
-% End:

Modified: trunk/Build/source/texk/chktex/Makefile.am
===================================================================
--- trunk/Build/source/texk/chktex/Makefile.am	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/Makefile.am	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,7 +1,7 @@
 ## $Id$
 ## Makefile.am for the TeX Live subdirectory texk/chktex/
 ##
-## Copyright 2017 Karl Berry <tex-live at tug.org>
+## Copyright 2017-2022 Karl Berry <tex-live at tug.org>
 ## Copyright 2010-2015 Peter Breitenlohner <tex-live at tug.org>
 ## You may freely use, modify and/or distribute this file.
 ##
@@ -88,7 +88,7 @@
 # resource file
 configdir = $(datarootdir)/texmf-dist/chktex
 
-config_DATA = $(CHKTEX_TREE)/chktexrc
+config_DATA = $(CHKTEX_TREE)/../chktexrc
 
 # documentation
 pdfdocdir = $(datarootdir)/texmf-dist/doc/chktex

Modified: trunk/Build/source/texk/chktex/Makefile.in
===================================================================
--- trunk/Build/source/texk/chktex/Makefile.in	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/Makefile.in	2022-12-15 11:48:56 UTC (rev 65275)
@@ -638,7 +638,7 @@
 
 # resource file
 configdir = $(datarootdir)/texmf-dist/chktex
-config_DATA = $(CHKTEX_TREE)/chktexrc
+config_DATA = $(CHKTEX_TREE)/../chktexrc
 
 # documentation
 pdfdocdir = $(datarootdir)/texmf-dist/doc/chktex

Modified: trunk/Build/source/texk/chktex/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/texk/chktex/TLpatches/ChangeLog	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/TLpatches/ChangeLog	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,3 +1,8 @@
+2022-12-15  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
+	* Import chktex-1.7.8.
+	* patch-04-finderrs: removed.
+
 2016-09-15  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	* Import chktex-1.7.6.

Modified: trunk/Build/source/texk/chktex/TLpatches/TL-Changes
===================================================================
--- trunk/Build/source/texk/chktex/TLpatches/TL-Changes	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/TLpatches/TL-Changes	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,6 +1,6 @@
-Changes applied to the chktex-1.7.6 tree as obtained from:
+Changes applied to the chktex-1.7.8 tree as obtained from:
 	http://mirror.ctan.org/support/chktex/
-	http://download.savannah.gnu.org/releases/chktex/chktex-1.7.6.tar.gz
+	http://download.savannah.gnu.org/releases/chktex/chktex-1.7.8.tar.gz
 
 Remove:
 	aclocal.m4
@@ -8,6 +8,13 @@
 	configure
 	install-sh
 	stamp-h.in
+	m4/
 
 Rename:
 	chkweb -> chkweb.sh
+
+Moved to top directory:
+	ChkTeX.pdf
+
+Generate chktexrc in the top directory:
+	perl MakeChkTeXRC.pl --chktexrc chktexrc.in >chktexrc

Deleted: trunk/Build/source/texk/chktex/TLpatches/patch-04-finderrs
===================================================================
--- trunk/Build/source/texk/chktex/TLpatches/patch-04-finderrs	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/TLpatches/patch-04-finderrs	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,19 +0,0 @@
-diff -ur chktex.orig/FindErrs.c chktex/FindErrs.c
---- chktex.orig/FindErrs.c	Sat Sep 10 06:22:18 2016
-+++ chktex/FindErrs.c	Fri Sep 16 14:09:38 2016
-@@ -1872,7 +1872,6 @@
-             }
-             else
-             {
--                FoundErr = EXIT_FAILURE;
-                 Context = LaTeXMsgs[Error].Context;
- 
-                 if (!HeadErrOut)
-@@ -1892,6 +1891,7 @@
-                     break;
-                 case etErr:
-                     ErrPrint++;
-+                    FoundErr = EXIT_FAILURE;
-                     break;
-                 case etMsg:
-                     break;

Modified: trunk/Build/source/texk/chktex/chktex-src/ChkTeX.c
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/ChkTeX.c	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/ChkTeX.c	2022-12-15 11:48:56 UTC (rev 65275)
@@ -46,16 +46,14 @@
     PRGMSGS {(enum ErrNum)pmMaxFault, etErr, TRUE, 0, INTERNFAULT}
 };
 
-struct Stack CharStack = {
-    0L
-}, InputStack =
+struct Stack CharStack = {0L};
+struct Stack InputStack = {0L};
+struct Stack EnvStack = {0L};
+struct Stack ConTeXtStack = {0L};
+struct Stack FileSuppStack = {0L};
+struct Stack UserFileSuppStack = {0L};
+struct Stack MathModeStack = {0L};
 
-{
-0L}, EnvStack =
-
-{
-0L};
-
 /************************************************************************/
 
 const char BrOrder[NUMBRACKETS + 1] = "()[]{}";
@@ -71,8 +69,8 @@
  */
 
 
-NEWBUF(TmpBuffer, BUFSIZ);
-NEWBUF(ReadBuffer, BUFSIZ);
+NEWBUF(TmpBuffer, BUFFER_SIZE);
+NEWBUF(ReadBuffer, BUFFER_SIZE);
 
 static const char *Banner =
     "ChkTeX v" PACKAGE_VERSION " - Copyright 1995-96 Jens T. Berger Thielemann.\n"
@@ -144,8 +142,11 @@
     "    -h  --help      : This text.\n"
     "    -i  --license   : Show distribution information\n"
     "    -l  --localrc   : Read local .chktexrc formatted file.\n"
-    "    -d  --debug     : Debug information. Give it a number.\n"
+    "    -d  --debug     : Debug information. A bit field with 5 bits.\n"
+    "                      Each bit shows a different type of information.\n"
     "    -r  --reset     : Reset settings to default.\n"
+    "    -S  --set       : Read it's argument as if from chktexrc.\n"
+    "                      e.g., -S TabSize=8 will override the TabSize.\n"
     "\n"
     "Muting warning messages:\n"
     "~~~~~~~~~~~~~~~~~~~~~~~~\n"
@@ -153,7 +154,7 @@
     "    -e  --erroron   : Makes msg # given an error and turns it on.\n"
     "    -m  --msgon     : Makes msg # given a message and turns it on.\n"
     "    -n  --nowarn    : Mutes msg # given.\n"
-    "    -L  --nolinesupp: Disables per-line suppressions.\n"
+    "    -L  --nolinesupp: Disables per-line and per-file suppressions.\n"
     "\n"
     "Output control flags:\n"
     "~~~~~~~~~~~~~~~~~~~~~\n"
@@ -173,7 +174,7 @@
     "    -x  --wipeverb  : Ignore contents of `\\verb' commands.\n"
     "    -g  --globalrc  : Read global .chktexrc file.\n"
     "    -I  --inputfiles: Execute \\input statements.\n"
-    "    -H  --headererr : Show errors found in front of \\begin{document}\n"
+    "    -H  --headererr : Show errors found before \\begin{document}\n"
     "\n"
     "Miscellaneous switches:\n"
     "~~~~~~~~~~~~~~~~~~~~~~~\n"
@@ -182,7 +183,17 @@
     "----------------------------------------------------------------------\n"
     "If no LaTeX files are specified on the command line, we will read from\n"
     "stdin.   For explanation of warning/error messages, please consult the\n"
-    "main documentation ChkTeX.dvi, ChkTeX.ps or ChkTeX.pdf.\n";
+    "main documentation ChkTeX.dvi, ChkTeX.ps or ChkTeX.pdf:\n"
+    "  http://www.nongnu.org/chktex/ChkTeX.pdf\n"
+    "\n"
+    "Any of the above arguments can be made permanent by setting them in the\n"
+    "chktexrc file "
+#if defined(__unix__)
+    "(~/.chktexrc).\n"
+#else
+    "(see documentation for location).\n"
+#endif
+    ;
 
 
 
@@ -194,6 +205,8 @@
 
 enum Quote Quote;
 
+enum CmdSpace CmdSpace;
+
 char VerbNormal[] = "%k %n in %f line %l: %m\n" "%r%s%t\n" "%u\n";
 
 #define DEF(type, name, value)  type name = value
@@ -321,7 +334,7 @@
             Diff = MaxDiff+1;
             if ( !HasExpandedTooLong )
             {
-                PrintPrgErr(pmTabExpands, BUFSIZ);
+                PrintPrgErr(pmTabExpands, BUFFER_SIZE);
             }
             HasExpandedTooLong = 1;
         }
@@ -335,7 +348,20 @@
     strcpy(To, From);
 }
 
+void ReadRcFiles(void)
+{
+    unsigned long i;
+    while (SetupVars())
+    {
+        InsertWord(ConfigFile, &ConfigFiles);
+    }
+    FORWL(i, ConfigFiles)
+    {
+        ReadRC(ConfigFiles.Stack.Data[i]);
+    }
+}
 
+
 int main(int argc, char **argv)
 {
     int retval = EXIT_FAILURE, ret, CurArg;
@@ -370,8 +396,7 @@
 
     RESOURCE_INFO
 
-    while (SetupVars())
-        ReadRC(ConfigFile);
+    ReadRcFiles();
 
     if (CmdLine.Stack.Used)
     {
@@ -432,6 +457,22 @@
                     Quote = quTrad;
                 }
             }
+            if (CmdSpaceStyle)
+            {
+                if (!strcasecmp(CmdSpaceStyle, "IGNORE"))
+                    CmdSpace = csIgnore;
+                else if (!strcasecmp(CmdSpaceStyle, "INTERWORD"))
+                    CmdSpace = csInterWord;
+                else if (!strcasecmp(CmdSpaceStyle, "INTERSENTENCE"))
+                    CmdSpace = csInterSentence;
+                else if (!strcasecmp(CmdSpaceStyle, "BOTH"))
+                    CmdSpace = csBoth;
+                else
+                {
+                    PrintPrgErr(pmCmdSpaceStyle, CmdSpaceStyle);
+                    CmdSpace = csIgnore;
+                }
+            }
 
             if (DebugLevel)
                 ShowIntStatus();
@@ -471,6 +512,7 @@
                             if (CurArg < argc)
                                 filename = argv[CurArg++];
 
+                            AddDirectoryFromRelativeFile(filename,&TeXInputs);
                             if (!PushFileName(filename, &InputStack))
                                 break;
                         }
@@ -481,7 +523,7 @@
                         while (!ferror(OutputFile)
                                && StkTop(&InputStack)
                                && !ferror(CurStkFile(&InputStack))
-                               && FGetsStk(ReadBuffer, BUFSIZ - 1,
+                               && FGetsStk(ReadBuffer, BUFFER_SIZE - 1,
                                            &InputStack))
                         {
 
@@ -489,7 +531,8 @@
 
                             strrep(ReadBuffer, '\n', ' ');
                             strrep(ReadBuffer, '\r', ' ');
-                            ExpandTabs(ReadBuffer, TmpBuffer, Tab, BUFSIZ - 1 - strlen(ReadBuffer) );
+                            ExpandTabs(ReadBuffer, TmpBuffer, Tab,
+                                       BUFFER_SIZE - 1 - strlen(ReadBuffer));
                             strcpy(ReadBuffer, TmpBuffer);
 
                             strcat(ReadBuffer, " ");
@@ -665,6 +708,7 @@
 
     if (DebugLevel & (FLG_DbgListInfo | FLG_DbgListCont))
     {
+        ShowWL("ConfigFilesRead", &ConfigFiles);
         RESOURCE_INFO
     }
 
@@ -797,6 +841,7 @@
         {"pipeverb", optional_argument, 0L, 'V'},
         {"debug", required_argument, 0L, 'd'},
         {"reset", no_argument, 0L, 'r'},
+        {"set", required_argument, 0L, 'S'},
         {"quiet", no_argument, 0L, 'q'},
         {"license", no_argument, 0L, 'i'},
         {"splitchar", required_argument, 0L, 's'},
@@ -833,7 +878,7 @@
 
     while (!ArgErr &&
            ((c = getopt_long((int) argc, argv,
-                             "b::d:e:f:g::hH::I::il:m:n:Lo:p:qrs:t::v::V::w:Wx::",
+                             "b::d:e:f:g::hH::I::il:m:n:Lo:p:qrs:S:t::v::V::w:Wx::",
                              long_options, &option_index)) != EOF))
     {
         while (c)
@@ -841,6 +886,10 @@
             nextc = 0;
             switch (c)
             {
+            case 'S':
+                ReadRCFromCmdLine(optarg);
+                break;
+
             case 's':
                 if (!(Delimit = strdup(optarg)))
                 {

Modified: trunk/Build/source/texk/chktex/chktex-src/ChkTeX.h
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/ChkTeX.h	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/ChkTeX.h	2022-12-15 11:48:56 UTC (rev 65275)
@@ -233,7 +233,7 @@
  MSG(pmNoRsrc,      etWarn, TRUE, 0,\
      "Could not find global resource file.")\
  MSG(pmQuoteStyle,    etWarn, TRUE, 0,\
-     "Illegal quotestyle `%s'.")\
+     "Illegal quotestyle `%s' using `Traditional'.")\
  MSG(pmWrongWipeTemp, etWarn, TRUE, 0,\
      "Wrong template for wiping arguments, \"%s\"")\
  MSG(pmSpecifyTerm, etErr, TRUE, 0,\
@@ -261,7 +261,9 @@
 MSG(pmLongLines,  etWarn,  TRUE, 0,\
      "ChkTeX does not handle lines over %d bytes correctly.  Some errors and line numbers may be wrong in this file.") \
 MSG(pmTabExpands,  etWarn,  TRUE, 0,\
-     "ChkTeX could not fully expand tabs because the resulting line would be more than %d bytes.  Some errors and line numbers may be wrong in this file.")
+     "ChkTeX could not fully expand tabs because the resulting line would be more than %d bytes.  Some errors and line numbers may be wrong in this file.") \
+MSG(pmCmdSpaceStyle, etWarn, TRUE, 0,\
+     "Illegal CmdSpaceStyle `%s' using `Ignore'.")
 
 #undef MSG
 #define MSG(num, type, inuse, ctxt, text) num,
@@ -330,20 +332,19 @@
   DEF(int, AtLetter, FALSE); /* Whether `@' is a letter or not. */      \
   DEF(int, InHeader, TRUE);  /* Whether we're in the header */          \
   DEF(int, VerbMode, FALSE); /* Whether we're in complete ignore-mode */ \
-  DEF(long, MathMode, 0);    /* Whether we're in math mode or not */    \
   DEF(const char *, VerbStr, "");     /* String we'll terminate verbmode upon */ \
   DEF(unsigned long, ErrPrint, 0);    /* # errors printed */            \
   DEF(unsigned long, WarnPrint, 0);   /* # warnings printed */          \
   DEF(unsigned long, UserSupp, 0);    /* # user suppressed warnings */  \
-  DEF(unsigned long, LineSupp, 0);    /* # warnings suppressed on a single line */ \
-  DEF(uint64_t, FileSuppressions, 0);     /* # warnings suppressed in a file */ \
-  DEF(uint64_t, UserFileSuppressions, 0) /* # User warnings suppressed in a file */
+  DEF(unsigned long, LineSupp, 0);    /* # warnings suppressed on a single line */
 
 #define DEF(type, name, value) extern type name
 OPTION_DEFAULTS;
 STATE_VARS;
 #undef DEF
-extern struct Stack CharStack, InputStack, EnvStack;
+extern struct Stack CharStack, InputStack, EnvStack, ConTeXtStack;
+extern struct Stack FileSuppStack, UserFileSuppStack;
+extern struct Stack MathModeStack;
 
 enum Quote
 {
@@ -354,6 +355,15 @@
 extern enum Quote Quote;
 extern int StdInTTY, StdOutTTY, UsingStdIn;
 
+enum CmdSpace
+{
+    csIgnore = 0,
+    csInterWord = 0x1,
+    csInterSentence = 0x2,
+    csBoth = 0x3, /* both bits set */
+};
+extern enum CmdSpace CmdSpace;
+
 int main(int argc, char **argv);
 void PrintPrgErr(enum PrgErrNum, ...);
 void ErrPrintf(const char *fmt, ...);

Modified: trunk/Build/source/texk/chktex/chktex-src/ChkTeX.tex.in
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/ChkTeX.tex.in	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/ChkTeX.tex.in	2022-12-15 11:48:56 UTC (rev 65275)
@@ -54,11 +54,35 @@
   {\noindent\large%
     \begin{tabularx}{\linewidth}{lY}%
       \bf Warning \theerrornum:  & \texttt{#1}%
-    \end{tabularx}}\stepcounter{errornum}\nopagebreak[4]}
+  \end{tabularx}}\stepcounter{errornum}\nopagebreak[4]}
 
+\newcommand{\fmtrc}[1]{%
+  {\noindent\large%
+    %% \begin{tabularx}{\linewidth}{lY}%
+    \phantomsection%
+    \bf\texttt{#1}%
+    \label{rc:#1}
+    %% \end{tabularx}
+  }\nopagebreak[4]}
+
 \newenvironment{errdesc}[1]{\noindent\fmted{#1}\begin{quote}}{\end{quote}%
 \pagebreak[3]}
 
+\newcommand\Keyword[1]{\marginpar{\texttt{\hfill\hyperref[rc:#1]{#1}}}}
+\newcommand{\chktexrcdefault}{\noindent The default value is}
+\newenvironment{chktexrcvar}[2]{%
+  \smallskip\pagebreak[2]%
+  %% \Keyword{#1}
+  \fmtrc{#1} #2 Variable%
+  \begin{quote}}{%
+  \end{quote}\pagebreak[3]}
+\newenvironment{chktexrcsimplevar}[1]{\begin{chktexrcvar}{#1}{Simple}}{\end{chktexrcvar}}
+\newenvironment{chktexrclistvar}[1]{\begin{chktexrcvar}{#1}{List}}{\end{chktexrcvar}}
+\newenvironment{chktexrclistvar*}[1]{\begin{chktexrcvar}{#1}{Lowercase-able List}}{\end{chktexrcvar}}
+
+%% \newenvironment{chktexrclistvar}[1]{\fmtrc{#1}List Variable}{}
+%% \newenvironment{chktexrclistvar*}[1]{\fmtrc{#1}List Variable with Lowercase}{}
+
 \newenvironment{html}{\comment}{\endcomment}
 \newenvironment{rawhtml}{\comment}{\endcomment}
 
@@ -81,7 +105,16 @@
 %!\newcommand{\slash}{/}
 %endlatex
 
+% PDF table of contents
+\usepackage{hyperref}
+\hypersetup{
+  colorlinks=true,
+  allcolors=blue,
+  pdfpagemode=UseOutlines
+}
+\usepackage{hypcap}
 
+
 \title{\chktex\ v at PACKAGE_VERSION@}
 \author{Jens~T. Berger~Thielemann}
 \date{\today}
@@ -370,7 +403,7 @@
 \paragraph{Note:} You \emph{must} install the new \rsrc\ file; \chktex\ will
 fail to function otherwise!
 
-    After   doing   this,   you   may  enhance  \chktex'  behaviour  by
+    After   doing   this,   you   may  enhance  \chktex's  behaviour  by
 reading/editing the \rsrc\ file.
 
 %latex
@@ -391,7 +424,7 @@
 \end{tabularx}
 
 
-\subsubsection{Options}
+\subsubsection{Comamndline Options}
 
 These are the options \chktex\ currently accepts.
 Please note that single-lettered options requiring a numerical or no
@@ -510,6 +543,7 @@
       longer time to parse, but much more informative in use.
     \end{description}
 
+  \phantomsection\label{clarg:format}%
   \item[\texttt{-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.
@@ -739,6 +773,10 @@
   \verb+% chktex-file ##+
 \end{center}
 
+
+\input{ChkTeXRC.tex}
+
+
 \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!
@@ -863,10 +901,9 @@
 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{\texttt{\hfill\\ #1}}}
-
 \smallskip\pagebreak[2]
-\Keyword{Silent}
+\phantomsection
+\Keyword{Silent}\label{warn: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
@@ -917,7 +954,9 @@
   \end{errexam}
 \end{errdesc}
 
-\Keyword{Italic\\ItalCmd\\NonItalic}
+\Keyword{Italic}
+\Keyword{ItalCmd}
+\Keyword{NonItalic}
 \begin{errdesc}{Italic correction (`\BS/') found in non-italic
     buffer.}
   If you try to use the \verb@\/@ command when \chktex\ believes that
@@ -932,7 +971,9 @@
   \end{errexam}
 \end{errdesc}
 
-\Keyword{Italic\\ItalCmd\\NonItalic}
+\Keyword{Italic}
+\Keyword{ItalCmd}
+\Keyword{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.
@@ -946,7 +987,9 @@
   \end{errexam}
 \end{errdesc}
 
-\Keyword{Italic\\ItalCmd\\NonItalic}
+\Keyword{Italic}
+\Keyword{ItalCmd}
+\Keyword{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
@@ -977,7 +1020,10 @@
   \end{errexam}
 \end{errdesc}
 
-\Keyword{HyphDash\\NumDash\\WordDash\\DashExcpt}
+\Keyword{HyphDash}
+\Keyword{NumDash}
+\Keyword{WordDash}
+\Keyword{DashExcpt}
 \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
@@ -1036,7 +1082,8 @@
 
 \end{errdesc}
 
-\Keyword{CenterDots\\LowDots}
+\Keyword{CenterDots}
+\Keyword{LowDots}
 \begin{errdesc}{You should use `\%s' to achieve  an ellipsis.}
   Simply typing three \Cmd{.} in a row will not give a perfect spacing
   between the dots.  The \verb@\ldots@ is much more suitable for this.
@@ -1057,33 +1104,42 @@
   \end{errexam}
 \end{errdesc}
 
+\phantomsection
+\label{warn:interword}
 \Keyword{Abbrev}
+\Keyword{CmdSpaceStyle}
 \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.
+  spacing, which one should avoid if possible. The error will be suppressed
+  if you have used  \verb@\frenchspacing at .
 
   You can also specify case-insensitive abbreviations in \texttt{[]}, though
   only the first letter is actually case-insensitive.
 
   \begin{errexam}
-    \verb at This is an example, i.e.@\underline{\tt\ }\verb at an demonstration.@ \\*
-    This is an example, i.e. an demonstration.        \\*
+    \verb at This is an example, i.e.@\underline{\tt\ }\verb at a demonstration.@ \\*
+    This is an example, i.e. a demonstration.        \\*
     \smallskip
-    \verb at This is an example, i.e.\ an demonstration.@   \\*
-    This is an example, i.e.\ an demonstration.        \\*
+    \verb at This is an example, i.e.\ a demonstration.@   \\*
+    This is an example, i.e.\ a demonstration.        \\*
   \end{errexam}
 \end{errdesc}
 
+\phantomsection
+\label{warn:intersentence}
+\Keyword{CmdSpaceStyle}
 \begin{errdesc}{Intersentence spacing (`\BS{}@') should perhaps be used.}
 
-  \LaTeX' detection of whether a period ends a sentence or not, is
+  \LaTeX's 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.
 
+  The error will be suppressed if you have used \verb@\frenchspacing at .
+
   \begin{errexam}
     \verb at I've seen an UFO!@\underline{\tt\ }\verb at Right over there!@ \\*
     I've seen an UFO! Right over there!        \\*
@@ -1119,7 +1175,7 @@
 \end{errdesc}
 
 \Keyword{MathEnvir}
-\begin{errdesc}{Mathmode still on at end of LaTeX  file.}
+\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.
@@ -1149,13 +1205,13 @@
     "'" (ASCII 180).} On some keyboards you might get the wrong quote.
   This quote looks, IMHO, \emph{ugly} compared to the standard
   quotes, it doesn't even come out as a quote!  Just see in the
-  example.
+  example.  In fact, this doesn't even compile anymore, so the warning is
+  probably obsolete.
 
-
   \begin{errexam}
     \verb@``There@\underline{\tt '}\verb at s quotes and there@\underline{\tt  '}\verb at s quotes@
     \underline{\tt ''} \\* % ''
-    ``There\xB4s quotes and there\xB4s quotes\xB4\xB4 \\* % ''
+    % ``There\xB4s quotes and there\xB4s quotes\xB4\xB4 \\* % ''
     \smallskip
     \verb@``There's quotes and there's quotes''@ \\*
     ``There's quotes and there's quotes'' \\*
@@ -1265,7 +1321,9 @@
 
 \end{errdesc}
 
-\Keyword{Italic\\ItalCmd\\NonItalic}
+\Keyword{Italic}
+\Keyword{ItalCmd}
+\Keyword{NonItalic}
 \begin{errdesc}{Don't use \BS/ in front of small punctuation.}
   Italic correction should generally \emph{not} be used in front of
   small punctuation characters like `.' and `,'; as it looks better
@@ -1317,7 +1375,6 @@
   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\\
@@ -1434,7 +1491,7 @@
 \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.
+  outside inner math mode, as it is formatted better.
 
   Similarily, you should let any final punctuation in display math
   mode end up within it. Look at the following example, which was
@@ -1562,6 +1619,28 @@
 
 \end{errdesc*}
 
+\fmted{`\%s' expected, found  `\%s' (ConTeXt).}
+\begin{errdesc}{Solo `\%s' found (ConTeXt).}
+
+% \begin{errdesc}{`\%s' expected, found `\%s' (ConTeXt).}
+
+  Similar to warnings~9 and 10, these tracks environments, but Con\TeX{}t{} environments rather than \LaTeX.
+  They are tracked as separate messages to allow being turned on and off independently thereby allowing people to use macros that start with \verb+\start+.
+
+\end{errdesc}
+
+\begin{errdesc}{Expected math mode to be \%s here.}
+
+  Similar to warning~16, this warns when \chktex{} got confused about math mode.
+  In theory, for a well formed \LaTeX{} document this should never happen, but the following (invalid) documents will cause the warning.
+  This is because the \verb+$+ will exit math mode (which \verb+\ensuremath+ entered), and then exiting \verb+\ensuremath+ finds that we are in text mode which shouldn't happen.
+
+  \begin{errexam}
+    \verb+\ensuremath{ \frac{x}{3} $ y\times 7}+\\*
+  \end{errexam}
+
+\end{errdesc}
+
 \section{Future plans}
 
 In a somewhat prioritized sequence, this is what I'd like to put into the

Modified: trunk/Build/source/texk/chktex/chktex-src/FindErrs.c
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/FindErrs.c	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/FindErrs.c	2022-12-15 11:48:56 UTC (rev 65275)
@@ -54,6 +54,7 @@
 int FoundErr = EXIT_SUCCESS;
 int LastWasComment = FALSE;
 int SeenSpace = FALSE;
+int FrenchSpacing = FALSE;
 
 /***************************** ERROR MESSAGES ***************************/
 
@@ -77,10 +78,10 @@
     ((LaTeXMsgs[(enum ErrNum) c].InUse == iuOK) && !SUPPRESSED_ON_LINE(c))
 
 #define PSERR2(pos,len,err,a,b) \
-    PrintError(CurStkName(&InputStack), RealBuf, pos, len, Line, err, a, b)
+    PrintError(err, CurStkName(&InputStack), RealBuf, pos, len, Line, a, b)
 
 #define PSERRA(pos,len,err,a) \
-    PrintError(CurStkName(&InputStack), RealBuf, pos, len, Line, err, a)
+    PrintError(err, CurStkName(&InputStack), RealBuf, pos, len, Line, a)
 
 #define HEREA(len, err, a)     PSERRA(BufPtr - Buf - 1, len, err, a)
 #define PSERR(pos,len,err)     PSERRA(pos,len,err,"")
@@ -124,6 +125,15 @@
 static const char LTX_SmallPunc[] = { '.', ',', 0 };
 
 /*
+ * A list of characters that could be considered to start a new
+ * sentence, or not.
+ *
+ * This allows "Mr. ``X'' " to warn about the same as "Mr. X".
+ *
+ */
+static const char LTX_BosPunc[] = {'`', '(', '[', 0};
+
+/*
  * String used to delimit a line suppression.  This string must be
  * followed immediately by the number of the warning to be suppressed.
  * If more than one warning is to be suppressed, then multiple copies
@@ -157,9 +167,9 @@
 static int ItFlag = efNone;
 static int MathFlag = efNone;
 
-NEWBUF(Buf, BUFSIZ);
-NEWBUF(CmdBuffer, BUFSIZ);
-NEWBUF(ArgBuffer, BUFSIZ);
+NEWBUF(Buf, BUFFER_SIZE);
+NEWBUF(CmdBuffer, BUFFER_SIZE);
+NEWBUF(ArgBuffer, BUFFER_SIZE);
 
 static enum ErrNum PerformCommand(const char *Cmd, char *Arg);
 
@@ -300,10 +310,9 @@
     char *TmpPtr;
 
     /* Reset any line suppressions  */
+    LineSuppressions = *(uint64_t *)StkTop(&FileSuppStack);
+    UserLineSuppressions = *(uint64_t *)StkTop(&UserFileSuppStack);
 
-    LineSuppressions = FileSuppressions;
-    UserLineSuppressions = UserFileSuppressions;
-
     /* Kill comments. */
     strcpy(Buf, RealBuf);
 
@@ -349,15 +358,16 @@
                     {
                         PrintPrgErr(pmSuppTooHigh, error, MaxSuppressionBits);
                     }
+                    uint64_t errbit = ((uint64_t)1 << abs(error));
                     if (error > 0)
                     {
-                        FileSuppressions |= ((uint64_t)1 << error);
-                        LineSuppressions |= ((uint64_t)1 << error);
+                        *(uint64_t *)StkTop(&FileSuppStack) |= errbit;
+                        LineSuppressions |= errbit;
                     }
                     else
                     {
-                        UserFileSuppressions |= ((uint64_t)1 << (-error));
-                        UserLineSuppressions |= ((uint64_t)1 << (-error));
+                        *(uint64_t *)StkTop(&UserFileSuppStack) |= errbit;
+                        UserLineSuppressions |= errbit;
                     }
                 }
                 TmpPtr = EscapePtr;
@@ -395,14 +405,32 @@
 
 static void PerformEnv(char *Env, int Begin)
 {
-    static char VBStr[BUFSIZ] = "";
+    static char VBStr[BUFFER_SIZE] = "";
 
     if (HasWord(Env, &MathEnvir))
     {
-        MathMode += Begin ? 1 : -1;
-        MathMode = max(MathMode, 0);
+        if (Begin)
+            PushMode(TRUE, &MathModeStack);
+        else
+        {
+            if (!CurStkMode(&MathModeStack))
+                PSERRA(BufPtr - Buf - 4, 1, emMathModeConfusion, "on");
+            StkPop(&MathModeStack);
+        }
     }
 
+    if (HasWord(Env, &TextEnvir))
+    {
+        if (Begin)
+            PushMode(FALSE, &MathModeStack);
+        else
+        {
+            if (CurStkMode(&MathModeStack))
+                PSERRA(BufPtr - Buf - 4, 1, emMathModeConfusion, "off");
+            StkPop(&MathModeStack);
+        }
+    }
+
     if (Begin && HasWord(Env, &VerbEnvir))
     {
         VerbMode = TRUE;
@@ -453,7 +481,7 @@
     int TmpC;
     enum DotLevel Front = dtUnknown, Back = dtUnknown;
 
-    if (MathMode)
+    if (CurStkMode(&MathModeStack))
     {
         PrePtr--;
 #define SKIP_EMPTIES(macro, ptr) macro(ptr, TmpC, \
@@ -625,11 +653,10 @@
             SKIP_AHEAD(TmpPtr, TmpC, TmpC == '{');      /* } */
 
             if ((*TmpPtr == 'i') || (*TmpPtr == 'j'))
-                PrintError(CurStkName(&InputStack), RealBuf,
-                           CmdPtr - Buf,
-                           (long) strlen(CmdBuffer), Line,
-                           emAccent, CmdBuffer, *TmpPtr,
-                           MathMode ? "math" : "");
+                PrintError(emAccent, CurStkName(&InputStack), RealBuf,
+                           CmdPtr - Buf, (long)strlen(CmdBuffer), Line,
+                           CmdBuffer, *TmpPtr,
+                           CurStkMode(&MathModeStack) ? "math" : "");
         }
         else
             PSERR(CmdPtr - Buf, CmdLen, emNoArgFound);
@@ -670,18 +697,18 @@
                 if ((ei = PopErr(&EnvStack)))
                 {
                     if (strcmp(ei->Data, ArgBuffer))
-                        PrintError(CurStkName(&InputStack), RealBuf,
+                        PrintError(emExpectC, CurStkName(&InputStack), RealBuf,
                                    CmdPtr - Buf,
                                    (long) strlen(CmdBuffer),
-                                   Line, emExpectC, ei->Data, ArgBuffer);
+                                   Line, ei->Data, ArgBuffer);
 
                     FreeErrInfo(ei);
                 }
                 else
-                    PrintError(CurStkName(&InputStack), RealBuf,
+                    PrintError(emSoloC, CurStkName(&InputStack), RealBuf,
                                CmdPtr - Buf,
                                (long) strlen(CmdBuffer),
-                               Line, emSoloC, ArgBuffer);
+                               Line, ArgBuffer);
             }
 
             PerformEnv(ArgBuffer, (int) CmdBuffer[1] == 'b');
@@ -697,28 +724,28 @@
         {
             TmpPtr = CmdBuffer + 6;
             if (!(PushErr(TmpPtr, Line, CmdPtr - Buf + 6,
-                          CmdLen - 6, RealBuf, &EnvStack)))
+                          CmdLen - 6, RealBuf, &ConTeXtStack)))
                 PrintPrgErr(pmNoStackMem);
         }
         else
         {
             TmpPtr = CmdBuffer + 5;
-            if ((ei = PopErr(&EnvStack)))
+            if ((ei = PopErr(&ConTeXtStack)))
             {
                 if (strcmp(ei->Data, TmpPtr))
-                    PrintError(CurStkName(&InputStack), RealBuf,
+                    PrintError(emExpectConTeXt, CurStkName(&InputStack), RealBuf,
                                CmdPtr - Buf + 5,
                                (long) strlen(TmpPtr),
-                               Line, emExpectC, ei->Data, TmpPtr);
+                               Line, ei->Data, TmpPtr);
 
                 FreeErrInfo(ei);
             }
             else
             {
-                PrintError(CurStkName(&InputStack), RealBuf,
+                PrintError(emSoloC, CurStkName(&InputStack), RealBuf,
                            CmdPtr - Buf,
                            (long) strlen(CmdBuffer),
-                           Line, emSoloC, TmpPtr);
+                           Line, TmpPtr);
             }
         }
         /* TODO: Do I need to call PerformEnv? */
@@ -776,8 +803,13 @@
         for (i = Abbrev.MaxLen; i >= 0; i--)
         {
             *--TmpPtr = *AbbPtr--;
-            if (!isalpha((unsigned char)*AbbPtr) && HasWord(TmpPtr, &Abbrev))
+            if (!isalpha((unsigned char)*AbbPtr) &&
+                /* Ignore spacing problems after commands if desired */
+                (*AbbPtr != '\\' || (CmdSpace & csInterWord)) &&
+                HasWord(TmpPtr, &Abbrev))
+            {
                 PSERR(Buffer - Buf + 1, 1, emInterWord);
+            }
             if (!*AbbPtr)
                 break;
         }
@@ -1026,7 +1058,7 @@
     SKIP_AHEAD(TmpPtr, TmpC, TmpC == '-');
     TmpCount = TmpPtr - BufPtr + 1;
 
-    if (MathMode)
+    if (CurStkMode(&MathModeStack))
     {
         if (TmpCount > 1)
             HERE(TmpCount, emWrongDash);
@@ -1088,6 +1120,73 @@
                 }
             }
 
+            /* Check DashExcpt looking for phrase with hyphenation that doesn't
+             * match what's in DashExcpt.  This really only makes sense for
+             * HyphDash, but it should be cheap in the other cases. */
+            if (!Errored)
+            {
+                TmpPtr = BufPtr-1;
+
+                SKIP_BACK(TmpPtr, TmpC, (TmpC == '-'));
+                SKIP_BACK(TmpPtr, TmpC, isalpha(TmpC));
+                /* If we found a dash going backwards, the we already checked
+                 * this on the first dash */
+                if (*TmpPtr != '-')
+                {
+                    /* PrePtr now points to the beginning of the hyphenated phrase */
+                    PrePtr = ++TmpPtr;
+
+                    struct WordList *el = &DashExcpt;
+
+                    FORWL(i, *el)
+                    {
+                        char *e = el->Stack.Data[i];
+                        TmpPtr = PrePtr;
+
+                        /* Walk through the strings until we find a
+                         * mismatch.  */
+                        int FoundHyphenDiff = FALSE;
+                        while (*e && *TmpPtr && *e == *TmpPtr)
+                        {
+                            /* Skip past characters that are the same */
+                            while (*e && *TmpPtr && *e == *TmpPtr)
+                            {
+                                ++e;
+                                ++TmpPtr;
+                            }
+                            /* Skip past differences in hyphens */
+                            while (*e == '-' && *TmpPtr != '-')
+                            {
+                                ++e;
+                                FoundHyphenDiff = TRUE;
+                            }
+                            while (*TmpPtr == '-' && *e != '-')
+                            {
+                                ++TmpPtr;
+                                FoundHyphenDiff = TRUE;
+                            }
+                        }
+
+                        /* If there was no mismatch all the way to the end of e,
+                         * and TmpPtr is not in the middle of a word, then they
+                         * matched ignoring hyphens, so we have found the one
+                         * DashExcpt element we care about and don't have to
+                         * check any others.  Moreover, if we found a difference
+                         * in hyphenation, then we must warn because it matches
+                         * something in DashExcpt but with improper hyphenation.
+                         * It's possible they could put the same phrase in twice
+                         * with different hyphenations, but that seems pretty
+                         * pathological. */
+                        if (*e == '\0' && !isalpha((unsigned char)*TmpPtr))
+                        {
+                            if (FoundHyphenDiff)
+                                Errored = TRUE;
+                            break;
+                        }
+                    }
+                }
+            }
+
             if (Errored)
                 HERE(TmpCount, emWrongDash);
         }
@@ -1140,14 +1239,8 @@
                     ItState = TRUE;
 
                 /* Same for math mode */
-                if (ei->Flags & efMath)
-                {
-                    MathMode = 1;
-                }
-                else if (ei->Flags & efNoMath)
-                {
-                    MathMode = 0;
-                }
+                if (ei->Flags & efMath || ei->Flags & efNoMath)
+                    StkPop(&MathModeStack);
 
                 FreeErrInfo(ei);
             }
@@ -1160,8 +1253,8 @@
                 BBuf[0] = Char;
                 ABuf[1] = BBuf[1] = 0;
                 if (Match)
-                    PrintError(CurStkName(&InputStack), RealBuf,
-                               BufPtr - Buf - 1, 1, Line, emExpectC,
+                    PrintError(emExpectC, CurStkName(&InputStack), RealBuf,
+                               BufPtr - Buf - 1, 1, Line,
                                ABuf, BBuf);
                 else
                     HEREA(1, emSoloC, BBuf);
@@ -1187,12 +1280,16 @@
 
                     switch (MathFlag)
                     {
-                    default:
+                    case efNone:
+                        break;
+                    case efMath:
+                    case efNoMath:
+                        PushMode((MathFlag == efMath), &MathModeStack);
+                        /* Save for when we exit this delimiter */
                         ei->Flags |= MathFlag;
+                        /* Reset flag just in case... */
                         MathFlag = efNone;
                         break;
-                    case efNone:
-                        ei->Flags |= MathMode ? efMath : efNoMath;
                     }
                 }
             }
@@ -1368,7 +1465,7 @@
                 TmpPtr = PrePtr;
 
                 SKIP_BACK(TmpPtr, TmpC,
-                          (LATEX_SPACE(TmpC) || strchr("{}$", TmpC)));
+                          (LATEX_SPACE(TmpC) || strchr("$", TmpC)));
 
                 if (isdigit((unsigned char)*TmpPtr))
                 {
@@ -1375,7 +1472,7 @@
                     TmpPtr = BufPtr;
 
                     SKIP_AHEAD(TmpPtr, TmpC,
-                               (LATEX_SPACE(TmpC) || strchr("{}$", TmpC)));
+                               (LATEX_SPACE(TmpC) || strchr("$", TmpC)));
 
                     if (isdigit((unsigned char)*TmpPtr))
                         HERE(1, emUseTimes);
@@ -1433,7 +1530,8 @@
             case 'W':          /* case 'X': */
             case 'Y':
             case 'Z':
-                if (!isalpha((unsigned char)*PrePtr) && (*PrePtr != '\\') && MathMode)
+                if (!isalpha((unsigned char)*PrePtr) && (*PrePtr != '\\') &&
+                    CurStkMode(&MathModeStack))
                 {
                     TmpPtr = BufPtr;
                     CmdPtr = CmdBuffer;
@@ -1474,7 +1572,7 @@
                     HEREA(3, emEllipsis, cTmpPtr);
                 }
 
-                /* Regexp: "([^A-Z at .])\.[.!?:]*\s+[a-z]" */
+                /* Regexp: "([^A-Z at .])\.[.!?:]*\s[ \`([]*[a-z]" */
 
                 TmpPtr = BufPtr;
                 SKIP_AHEAD(TmpPtr, TmpC, strchr(LTX_EosPunc, TmpC));
@@ -1483,9 +1581,17 @@
                     if (!isupper((unsigned char)*PrePtr) && (*PrePtr != '@') &&
                         (*PrePtr != '.'))
                     {
-                        SKIP_AHEAD(TmpPtr, TmpC, LATEX_SPACE(TmpC));
+                        SKIP_AHEAD(TmpPtr, TmpC,
+                                   (LATEX_SPACE(TmpC) || TmpC == '\\' ||
+                                    strchr(LTX_BosPunc, TmpC)));
                         if (islower((unsigned char)*TmpPtr))
-                            PSERR(BufPtr - Buf, 1, emInterWord);
+                        {
+                            /* Ignore spacing problems after commands if desired */
+                            TmpPtr = PrePtr;
+                            SKIP_BACK(TmpPtr, TmpC, istex(TmpC));
+                            if (*TmpPtr != '\\' || (CmdSpace & csInterWord))
+                                PSERR(BufPtr - Buf, 1, emInterWord);
+                        }
                         else
                             CheckAbbrevs(&BufPtr[-1]);
                     }
@@ -1498,9 +1604,17 @@
             case ';':
                 /* Regexp: "[A-Z][A-Z][.!?:;]\s+" */
 
-                if (isspace((unsigned char)*BufPtr) && isupper((unsigned char)*PrePtr) &&
-                    (isupper((unsigned char)PrePtr[-1]) || (Char != '.')))
-                    HERE(1, emInterSent);
+                if (isspace((unsigned char)*BufPtr) &&
+                    isupper((unsigned char)*PrePtr) &&
+                    (isupper((unsigned char)PrePtr[-1]) || (Char != '.')) &&
+                    !FrenchSpacing)
+                {
+                    /* Ignore spacing problems after commands if desired */
+                    TmpPtr = PrePtr;
+                    SKIP_BACK(TmpPtr, TmpC, istex(TmpC));
+                    if (*TmpPtr != '\\' || (CmdSpace & csInterSentence))
+                        HERE(1, emInterSent);
+                }
 
                 /* FALLTHRU */
             case ',':
@@ -1509,12 +1623,12 @@
                       ((BufPtr[-1] == '.') || (BufPtr[-1] == ','))))
                     PSERR(PrePtr - Buf, 1, emSpacePunct);
 
-                if (MathMode &&
+                if (CurStkMode(&MathModeStack) &&
                     (((*BufPtr == '$') && (BufPtr[1] != '$')) ||
                      (!strafter(BufPtr, "\\)"))))
                     HEREA(1, emPunctMath, "outside inner");
 
-                if (!MathMode &&
+                if (!CurStkMode(&MathModeStack) &&
                     (((*PrePtr == '$') && (PrePtr[-1] == '$')) ||
                      (!strinfront(PrePtr, "\\]"))))
                     HEREA(1, emPunctMath, "inside display");
@@ -1524,9 +1638,8 @@
             case '`':
                 if ((Char == *BufPtr) && (Char == BufPtr[1]))
                 {
-                    PrintError(CurStkName(&InputStack), RealBuf,
+                    PrintError(emThreeQuotes, CurStkName(&InputStack), RealBuf,
                                BufPtr - Buf - 1, 3, Line,
-                               emThreeQuotes,
                                Char, Char, Char, Char, Char, Char);
                 }
 
@@ -1557,7 +1670,7 @@
                         HERE(TmpPtr - BufPtr + 1, emBeginQ);
 
                     /* Now check quote style */
-#define ISPUNCT(ptr) (strchr(LTX_GenPunc, *ptr) && (ptr[-1] != '\\'))
+#define ISPUNCT(ptr) ((strchr(LTX_EosPunc, *ptr) || strchr(LTX_GenPunc, *ptr)) && (ptr[-1] != '\\'))
 
                     /* We ignore all single words/abbreviations in quotes */
 
@@ -1662,9 +1775,8 @@
                                1, emFalsePage);
                 }
 
-                if (LATEX_SPACE(*BufPtr) && !MathMode &&
-                    !CheckSilentRegex() &&
-                    (strlen(CmdBuffer) != 2))
+                if (LATEX_SPACE(*BufPtr) && !CurStkMode(&MathModeStack) &&
+                    !CheckSilentRegex() && (strlen(CmdBuffer) != 2))
                 {
                     PSERR(BufPtr - Buf, 1, emSpaceTerm);
                 }
@@ -1696,7 +1808,7 @@
                 break;
 
             case ')':
-                if (isspace((unsigned char)*PrePtr))
+                if (SeenSpace)
                     PSERRA(BufPtr - Buf - 1, 1, emNoSpaceParen,
                            "in front of");
                 if (isalpha((unsigned char)*BufPtr))
@@ -1726,7 +1838,14 @@
                         SKIP_AHEAD(TmpPtr, TmpC, (TmpC != '$' && TmpC != '\0'));
                         PSERR(BufPtr - Buf - 1, TmpPtr-BufPtr+2, emInlineMath);
                     }
-                    MathMode ^= TRUE;
+                    if (CurStkMode(&MathModeStack))
+                    {
+                        StkPop(&MathModeStack);
+                    }
+                    else
+                    {
+                        PushMode(TRUE, &MathModeStack);
+                    }
                 }
 
                 break;
@@ -1782,29 +1901,35 @@
 
     while ((ei = PopErr(&CharStack)))
     {
-        PrintError(ei->File, ei->LineBuf, ei->Column,
-                   ei->ErrLen, ei->Line, emNoMatchC, (char *) ei->Data);
+        PrintError(emNoMatchC, ei->File, ei->LineBuf, ei->Column,
+                   ei->ErrLen, ei->Line, (char *) ei->Data);
         FreeErrInfo(ei);
     }
 
     while ((ei = PopErr(&EnvStack)))
     {
-        PrintError(ei->File, ei->LineBuf, ei->Column,
-                   ei->ErrLen, ei->Line, emNoMatchC, (char *) ei->Data);
+        PrintError(emNoMatchC, ei->File, ei->LineBuf, ei->Column,
+                   ei->ErrLen, ei->Line, (char *) ei->Data);
         FreeErrInfo(ei);
     }
 
-    if (MathMode)
+    while ((ei = PopErr(&ConTeXtStack)))
     {
-        PrintError(CurStkName(&InputStack), "", 0L, 0L, Lines, emMathStillOn);
+        PrintError(emNoMatchConTeXt, ei->File, ei->LineBuf, ei->Column,
+                   ei->ErrLen, ei->Line, (char *) ei->Data);
+        FreeErrInfo(ei);
     }
 
+    if (CurStkMode(&MathModeStack))
+    {
+        PrintError(emMathStillOn, CurStkName(&InputStack), "", 0L, 0L, Lines);
+    }
+
     for (Cnt = 0L; Cnt < (NUMBRACKETS >> 1); Cnt++)
     {
         if (Brackets[Cnt << 1] != Brackets[(Cnt << 1) + 1])
         {
-            PrintError(CurStkName(&InputStack), "", 0L, 0L, Lines,
-                       emNoMatchCC,
+            PrintError(emNoMatchCC, CurStkName(&InputStack), "", 0L, 0L, Lines,
                        BrOrder[Cnt << 1], BrOrder[(Cnt << 1) + 1]);
         }
     }
@@ -1818,7 +1943,14 @@
 
         /* Print how to suppress warnings. */
         if ( ErrPrint + WarnPrint > 0 ) {
-            fprintf(stderr, "See the manual for how to suppress some or all of these warnings/errors.\n" );
+            fprintf(
+                stderr,
+                "See the manual for how to suppress some or all of these warnings/errors.\n"
+                "The manual is available "
+#ifdef TEX_LIVE
+                "by running `texdoc chktex` or "
+#endif
+                "at https://www.nongnu.org/chktex/ChkTeX.pdf\n");
         }
     }
 }
@@ -1847,12 +1979,11 @@
 
 
 void
-PrintError(const char *File, const char *String,
-           const long Position, const long Len,
-           const long LineNo, const enum ErrNum Error, ...)
+PrintError(const enum ErrNum Error, const char *File, const char *String,
+           const long Position, const long Len, const long LineNo,  ...)
 {
     static                      /* Just to reduce stack usage... */
-    char PrintBuffer[BUFSIZ];
+    char PrintBuffer[BUFFER_SIZE];
     va_list MsgArgs;
 
     char *LastNorm = OutputFormat;
@@ -1879,19 +2010,22 @@
 
 #define RGTCTXT(Ctxt, Var) if((Context & Ctxt) && !(Var)) break;
 
-                RGTCTXT(ctInMath, MathMode);
-                RGTCTXT(ctOutMath, !MathMode);
+                RGTCTXT(ctInMath, CurStkMode(&MathModeStack));
+                RGTCTXT(ctOutMath, !CurStkMode(&MathModeStack));
                 RGTCTXT(ctInHead, InHeader);
                 RGTCTXT(ctOutHead, !InHeader);
 
+                /* Count how warnings or errors we've found, and
+                 * update the return code with the worst. */
                 switch (LaTeXMsgs[Error].Type)
                 {
                 case etWarn:
                     WarnPrint++;
+                    FoundErr = max(FoundErr, EXIT_WARNINGS);
                     break;
                 case etErr:
                     ErrPrint++;
-                    FoundErr = EXIT_FAILURE;
+                    FoundErr = max(FoundErr, EXIT_ERRORS);
                     break;
                 case etMsg:
                     break;
@@ -1946,7 +2080,7 @@
                         fprintf(OutputFile, "%ld", LineNo);
                         break;
                     case 'm':
-                        va_start(MsgArgs, Error);
+                        va_start(MsgArgs, LineNo);
                         vfprintf(OutputFile,
                                  LaTeXMsgs[Error].Message, MsgArgs);
                         va_end(MsgArgs);
@@ -2008,6 +2142,10 @@
         AtLetter = TRUE;
     else if (!strcmp(Cmd, "\\makeatother"))
         AtLetter = FALSE;
+    else if (!strcmp(Cmd, "\\frenchspacing"))
+        FrenchSpacing = TRUE;
+    else if (!strcmp(Cmd, "\\nonfrenchspacing"))
+        FrenchSpacing = FALSE;
     else if (InputFiles && !(strcmp(Cmd, "\\input") && strcmp(Cmd, "\\include")))
     {
         SKIP_AHEAD(Arg, TmpC, LATEX_SPACE(TmpC));
@@ -2029,8 +2167,8 @@
         SKIP_AHEAD(Arg, TmpC, LATEX_SPACE(TmpC));
         if (*Arg == '{')
         {
-            MathFlag = MathMode ? efMath : efNoMath;
-            MathMode = 1;
+            /* We will actually turn on math mode when we enter the {} */
+            MathFlag = efMath;
         }
     }
     else if (HasWord(Cmd, &TextCmd))
@@ -2038,8 +2176,8 @@
         SKIP_AHEAD(Arg, TmpC, LATEX_SPACE(TmpC));
         if (*Arg == '{')
         {
-            MathFlag = MathMode ? efMath : efNoMath;
-            MathMode = 0;
+            /* We will actually turn on text mode when we enter the {} */
+            MathFlag = efNoMath;
         }
     }
     else if (*Cmd == '\\')
@@ -2049,11 +2187,14 @@
         {
         case '(':
         case '[':
-            MathMode = TRUE;
+            PushMode(TRUE, &MathModeStack);
             break;
         case ']':
         case ')':
-            MathMode = FALSE;
+            if (!CurStkMode(&MathModeStack))
+                PSERRA(BufPtr - Buf - 2, 1, emMathModeConfusion, "on");
+
+            StkPop(&MathModeStack);
             break;
         case '/':
             switch (ItState)

Modified: trunk/Build/source/texk/chktex/chktex-src/FindErrs.h
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/FindErrs.h	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/FindErrs.h	2022-12-15 11:48:56 UTC (rev 65275)
@@ -128,7 +128,13 @@
  MSG(emDisplayMath, etWarn, iuOK, ctOutMath,\
      "Use \\[ ... \\] instead of $$ ... $$.")\
  MSG(emInlineMath, etWarn, iuNotSys, ctOutMath,\
-     "Use \\( ... \\) instead of $ ... $.")
+     "Use \\( ... \\) instead of $ ... $.")\
+ MSG(emExpectConTeXt, etWarn, iuOK, ctNone,\
+     "`%s' expected, found `%s' (ConTeXt).")\
+ MSG(emNoMatchConTeXt, etWarn, iuOK, ctNone,\
+     "No match found for `%s' (ConTeXt).") \
+ MSG(emMathModeConfusion, etWarn, iuOK, ctNone,\
+     "Expected math mode to be %s here.")
 
 #undef MSG
 #define MSG(num, type, inuse, ctxt, text) num,
@@ -193,8 +199,8 @@
 
 int CheckSilentRegex(void);
 int FindErr(const char *, const unsigned long);
-void PrintError(const char *, const char *, const long, const long,
-                const long, const enum ErrNum, ...);
+void PrintError(const enum ErrNum, const char *, const char *, const long,
+                const long, const long,  ...);
 void PrintStatus(unsigned long Lines);
 
 #endif /* FINDERRS */

Added: trunk/Build/source/texk/chktex/chktex-src/MakeChkTeXRC.pl
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/MakeChkTeXRC.pl	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/MakeChkTeXRC.pl	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,71 @@
+# Used to convert chktexrc.in (which see) into chktexrc and ChkTeXRC.tex
+
+use strict;
+use warnings;
+
+my $chktexrc_output;
+if ( $ARGV[0] eq '--chktexrc' ) {
+    $chktexrc_output = 1;
+} elsif ( $ARGV[0] eq '--latex' ) {
+    $chktexrc_output = 0;
+} else {
+    exit 1;
+}
+
+
+# Filter the lines of the file
+open(my $fh, '<:encoding(UTF-8)', $ARGV[1])
+    or die "Could not open file '$ARGV[1]' $!";
+
+while ( <$fh> ) {
+    if (/^#### END$/) {
+        exit 0;
+    }
+
+    if ($chktexrc_output) {
+        # chktexrc output, so discard all lines over 2
+        next if /^#{3,}/;
+
+        s/\@verb\@/`/g;
+        s/\@endverb\@/'/g;
+        s/\@emph\@/*/g;
+        s/\@endemph\@/*/g;
+        s/\@ref\@/ /g;
+        s/\@endref\@//g;
+
+        s/\@TeX@/TeX/g;
+        s/\@LaTeX@/LaTeX/g;
+        s/\@ChkTeX@/ChkTeX/g;
+        s/\@\\{2}\@//g;         # \\ in LaTeX
+        s/\\\@ */ /g;           # \@ in LaTeX
+        s/\@bf //g;
+        s/\@\&\@//g;
+        print;
+
+    } else {
+
+        # LaTeX output, so discard lines except with 1,3
+        next if /^#{4,}/;
+        next if /^#{2} /;
+        # next unless /^#/;
+        s/^#+[ ]*//;
+
+        s/\@emph\@/\\emph{/g;
+        s/\@endemph\@/}/g;
+        s/\@ref\@(.*)\@endref\@/~\\hyperref[rc:$1]{$1}/g;
+
+
+        s/\@TeX@/\\TeX{}/g;
+        s/\@LaTeX@/\\LaTeX{}/g;
+        s/\@ChkTeX@/\\chktex{}/g;
+        s/\@verb\@/\\verb@/g;
+        s/\@endverb\@/@/g;
+        s/\@\\{2}\@/\\\\/g;
+        s/\@bf/\\bf/g;
+        s/\@\&\@/&/g;
+
+        print;
+    }
+}
+# TODO:
+# \ChkTeX


Property changes on: trunk/Build/source/texk/chktex/chktex-src/MakeChkTeXRC.pl
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Build/source/texk/chktex/chktex-src/Makefile.in
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Makefile.in	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/Makefile.in	2022-12-15 11:48:56 UTC (rev 65275)
@@ -47,6 +47,7 @@
 LDFLAGS=@LDFLAGS@
 LN_S=@LN_S@
 LATEX=@LATEX@
+PDFLATEX=@PDFLATEX@
 DVIPS=@DVIPS@
 PS2PDF=ps2pdf
 PERL5=@PERL5@
@@ -64,7 +65,7 @@
 
 #####################################################################
 
-EXTRA_DIST=configure.in Makefile.in stamp-h.in config.h.in rmeheader.in \
+EXTRA_DIST=configure.ac Makefile.in stamp-h.in config.h.in rmeheader.in \
 	MakeHTML.pl ChkTeX.tex.in aclocal.m4 NEWS \
 	chkweb deweb.in COPYING chktex.1 chkweb.1 deweb.1 \
 	input.tex Test.tex Test.pcre.out Test.posix-ere.out Test.nore.out configure \
@@ -72,7 +73,7 @@
 	$(wildcard m4/*.m4)
 
 # created by configure
-CONFIG_DIST=ChkTeX.tex
+CONFIG_DIST=ChkTeX.tex ChkTeXRC.tex chktexrc
 
 # created at make time
 BUILT_DIST=chktex.doc chkweb.doc deweb.doc README ChkTeX.dvi
@@ -85,7 +86,7 @@
 
 DISTFILES=$(EXTRA_DIST) $(SOURCEFILES)
 
-all: chktex
+all: chktex chktexrc
 
 DISTDIR:=chktex- at PACKAGE_VERSION@
 dist: $(DISTDIR).tar.gz
@@ -124,7 +125,7 @@
 
 OBJS= ChkTeX.o FindErrs.o OpSys.o Resource.o Utility.o
 
-MAKETEST= (builddir=`pwd` ; cd $(srcdir) ; $${builddir}/chktex -mall -r -g0 -lchktexrc -v5 Test.tex || :)
+MAKETEST= (builddir=`pwd` ; cd $(srcdir) ; $${builddir}/chktex -mall -r -g0 -lchktexrc -v5 -q Test.tex || :)
 
 # We can't grep the output of chtex because it might not be built yet
 TestOutFile := $(shell sed -n 's/.*HAVE_\(.*RE\) 1.*/\1/p' config.h | tr "A-Z_" "a-z-")
@@ -133,7 +134,7 @@
 else
 TestOutFile := Test.$(TestOutFile).out
 endif
-$(srcdir)/$(TestOutFile): $(srcdir)/Test.tex
+$(srcdir)/$(TestOutFile): $(srcdir)/Test.tex $(srcdir)/input/file
 	-rm -f $(srcdir)/$(TestOutFile)
 	@echo ""
 	@echo "***Warning: creating $(TestOutFile)***"
@@ -140,7 +141,7 @@
 	@echo ""
 	$(MAKETEST) 1> $(srcdir)/$(TestOutFile)
 
-check: chktex $(srcdir)/$(TestOutFile)
+check: chktex $(srcdir)/$(TestOutFile) chktexrc
 	@echo ">>> Testing that checking algorithms work correctly..."
 	@-rm -f chktest
 	$(MAKETEST) 1> chktest
@@ -154,6 +155,7 @@
 		echo "results were *supposed* to be..."; \
 		diff -u $(srcdir)/$(TestOutFile) chktest; \
 	fi
+	$(srcdir)/tests/run-tests.sh `pwd` "$(srcdir)"
 
 
 chktex: $(OBJS)
@@ -233,12 +235,12 @@
 
 ###################### AUTOCONF REMAKING ################################
 
-$(srcdir)/configure: configure.in aclocal.m4
+$(srcdir)/configure: configure.ac aclocal.m4
 	cd $(srcdir) && autoconf
 
 #autoheader might not change config.h.in, so touch a stamp file.
 $(srcdir)/config.h.in: stamp-h.in
-$(srcdir)/stamp-h.in: configure.in aclocal.m4
+$(srcdir)/stamp-h.in: configure.ac aclocal.m4
 	cd $(srcdir) && autoheader
 	echo timestamp > $(srcdir)/stamp-h.in
 
@@ -260,7 +262,14 @@
 %.doc: %.1
 	$(GROFF) $< > $@
 
-ChkTeX.dvi: ChkTeX.tex
+ChkTeXRC.tex: chktexrc.in MakeChkTeXRC.pl
+	 $(PERL5) $(srcdir)/MakeChkTeXRC.pl --latex $(srcdir)/chktexrc.in > ChkTeXRC.tex
+
+chktexrc: chktexrc.in  MakeChkTeXRC.pl
+	 $(PERL5) $(srcdir)/MakeChkTeXRC.pl --chktexrc $(srcdir)/chktexrc.in > chktexrc
+
+
+ChkTeX.dvi: ChkTeX.tex ChkTeXRC.tex
 ifdef LATEX
 	$(LATEX) ChkTeX.tex
 else
@@ -271,8 +280,13 @@
 ChkTeX.ps: ChkTeX.dvi
 	$(DVIPS) -o ChkTeX.ps ChkTeX.dvi
 
+ifdef PDFLATEX
+ChkTeX.pdf: ChkTeX.tex ChkTeXRC.tex
+	$(PDFLATEX) -interaction=nonstopmode ChkTeX.tex
+else
 ChkTeX.pdf: ChkTeX.ps
 	$(PS2PDF) $< $@
+endif
 
 cover:
 	-./chktex -h

Modified: trunk/Build/source/texk/chktex/chktex-src/NEWS
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/NEWS	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/NEWS	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,6 +1,48 @@
 Development of ChkTeX is now in a maintainance mode.  All versions
 1.6.x are essentially bug fixes.  Version 1.7 added some new features.
 
+1.7.8 (2022-10-17), released by Ivan Andrus <darthandrus at gmail.com>
+
+  * Fix some packaging issues for CTAN
+
+1.7.7 (2022-10-17), released by Ivan Andrus <darthandrus at gmail.com>
+
+  * Fix false positives
+    * Fix overzealous warning of x between numbers #60184
+    * Handle nested mathmode e.g. \ensuremath #60197
+    * Add many citation commands from biblatex #56608
+    * Add support for breqn package #62631
+    * WipeArg on \graphicspath #47593
+    * WipeArg on LuaTeX macros which contain lua code #53146
+    * Add \itshape to Silent section https://tex.stackexchange.com/questions/627808/why-does-chktex-complain-when-there-is-a-space-after-itshape-but-not-when-bfse
+    * Make QuoteStyle warnings work with end of sentence punctuation #53494
+    * When checking for inter-word spacing, ignore certain punctuation #54751, #53347
+    * Allow \frenchspacing to turn off warning 13 (intersentence spacing)
+    * Don't warn about space before a parenthesis at the beginning of the line if the previous line ended with a comment (and no space) #109479
+    * Make exit status 2 or 3 (not 1) when warnings or errors are found.  Some callers expected a return value of 1 to mean an internal error. #53129
+
+  * Fix many bugs
+    * Make ChkTeX process longer lines, especially on Windows.  This doesn't fix the problem entirely, but it should amerliorate it to a large extent.
+    * Make file suppressions only apply to the file they are in.  This allows putting all the "badness" into one file. #57809
+    * Add check to make sure input is a regular file and not a directory #56520
+    * Add support for relative paths in sub directories #53494
+    * Manage ConTeXt environments separately from LaTeX environments #51179
+    * Change argument order to avoid undefined behavior in va_start()
+
+  * New warnings and features
+    * Add regex for unescaped optional arguments inside optional arguments #56657
+    * Support RC settings on the command line #56486
+    * Warn about phrases that match DashExcpt _except_ for the hyphens #58886
+    * Add CmdSpaceStyle option to Ignore spacing problems after commands #60809, #60380
+    * Add support for finding chktexrc files in XDG locations #61405
+    * Add new warning when ChkTeX gets confused about mathmode
+
+  * Improved documentation
+    * Make chktexrc somewhat literate and creating ChkTeXRC.tex as well.
+    * Make "keywords" link to the appropriate chktexrc variable documentation
+    * Add note about chktexrc and link to documentation in the help message #50004 #61179
+    * Indicate that debug is a bit field instead of a level
+
 1.7.6 (2016-09-09), released by Ivan Andrus <darthandrus at gmail.com>
 
   * Properly copy and free strings.  This caused incorrect file

Modified: trunk/Build/source/texk/chktex/chktex-src/OpSys.c
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/OpSys.c	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/OpSys.c	2022-12-15 11:48:56 UTC (rev 65275)
@@ -115,7 +115,9 @@
 #  define LOCALRCFILE             "." RCBASENAME
 #endif
 
-char ConfigFile[BUFSIZ] = LOCALRCFILE;
+char ConfigFile[BUFFER_SIZE] = LOCALRCFILE;
+struct WordList ConfigFiles;
+
 const char *ReverseOn;
 const char *ReverseOff;
 
@@ -150,6 +152,7 @@
     liMin,
     liSysDir,
     liUsrDir,
+    liXdgDir,
     liEnvir,
     liCurDir,
     liNFound,
@@ -177,12 +180,10 @@
             break;
         case liEnvir:          /* Environment defined */
 #ifdef __MSDOS__
-
             if ((Env = getenv("CHKTEXRC")) || (Env = getenv("CHKTEX_HOME")))
 #elif defined(TEX_LIVE)
             if ((Env = kpse_var_value("CHKTEXRC")))
 #else
-
             if ((Env = getenv("CHKTEXRC")))
 #endif
 
@@ -206,6 +207,27 @@
 
                 *ConfigFile = 0;
             break;
+
+        case liXdgDir: /* Cross-desktop group dir for resource files */
+
+            /* XDG is really unix specific, but it shouldn't hurt to
+             * support it on Windows, should someone set the variables.  */
+            if ((Env = getenv("XDG_CONFIG_HOME")) && *Env)
+            {
+                strcpy(ConfigFile, Env);
+                tackon(ConfigFile, RCBASENAME);
+            }
+            else if ((Env = getenv("HOME")) && *Env)
+            {
+                strcpy(ConfigFile, Env);
+                tackon(ConfigFile, ".config");
+                tackon(ConfigFile, RCBASENAME);
+            }
+            else
+                *ConfigFile = 0;
+
+            break;
+
         case liUsrDir:         /* User dir for resource files */
 #if defined(__unix__)
 
@@ -446,6 +468,45 @@
 }
 
 
+/*
+ * If Filename is contains a directory component, then add a fully qualified
+ * directory to the TeXInputs WordList.
+ *
+ * I'm not sure how it will work with some Windows paths,
+ * e.g. C:path\to\file.tex since it doesn't really understand the leading C:
+ * But I'm not sure it would even work with a path like that, and I have no
+ * way to test it.
+ *
+ * Behaviour somewhat controlled by the macros SLASH and DIRCHARS in the
+ * OpSys.h file.
+ *
+ */
+
+void AddDirectoryFromRelativeFile(const char * Filename, struct WordList *TeXInputs)
+{
+    if ( ! Filename )
+        return;
+
+    /* There are no path delimiters, so it's just a file, return null */
+    if ( ! strstr( Filename, DIRCHARS ) )
+        return;
+
+
+    char buf[BUFFER_SIZE];
+    if ( strchr(DIRCHARS,Filename[0]) ) {
+        strcpy(buf,Filename);
+    } else {
+        getcwd(buf, BUFFER_SIZE);
+        tackon(buf,Filename);
+    }
+
+    /* Keep up to the final SLASH -- that will be the directory. */
+    char * end = strrchr(buf,SLASH);
+    *end = '\0';
+    InsertWord(buf,TeXInputs);
+}
+
+
 #if USE_RECURSE
 static int SearchFile(char *Dir, const char *Filename, const char *App)
 {
@@ -490,3 +551,24 @@
     return (Found);
 }
 #endif /* USE_RECURSE */
+
+#if defined(HAVE_STAT)
+int IsRegFile(const char *Filename)
+{
+    int Retval = FALSE;
+    struct stat *statbuf;
+    if ((statbuf = malloc(sizeof(struct stat))))
+    {
+        if (!stat(Filename, statbuf))
+        {
+            if ((statbuf->st_mode & S_IFMT) == S_IFREG)
+                Retval = TRUE;
+        }
+        free(statbuf);
+    }
+
+    return Retval;
+}
+#else
+int IsRegFile(const char *Filename) { printf("WTF\n");return TRUE; }
+#endif

Modified: trunk/Build/source/texk/chktex/chktex-src/OpSys.h
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/OpSys.h	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/OpSys.h	2022-12-15 11:48:56 UTC (rev 65275)
@@ -59,7 +59,7 @@
  * You may wish to modify the SetupVars() (OpSys.c) to better suit your
  * preferences. In any case, it should put the filename (and full path)
  * of the `.chktexrc' file into the ConfigFile array. The array is sized
- * BUFSIZ bytes.
+ * BUFFER_SIZE bytes.
  *
  * The program does also assume that __unix__ is defined if the source is
  * compiled on a UNIX machine.
@@ -83,6 +83,9 @@
 #  define  EXIT_SUCCESS    0
 #endif
 
+#define EXIT_WARNINGS 2
+#define EXIT_ERRORS 3
+
 /*  -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=-  */
 
 /*
@@ -182,6 +185,26 @@
 #  define BAKAPPENDIX ".bak"
 #endif
 
+
+/*  -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=- -=><=-  */
+
+/*
+ * This defines the buffer size used in many places.  The biggest
+ * limitation imposed by a small buffer is the size of a line which
+ * can be accurately processed by chktex.  On the other hand, a large
+ * buffer size will waste memory.  However, memory is quite cheap
+ * these days, especially considering the amount needed by ChkTeX.
+ *
+ * ChkTeX used to use BUFSIZ which was 1024 (fairly reasonable) on
+ * many UNIX-like systems, but was much smaller on Windows.  So,
+ * instead we create our own buffer size and hope that no-one has
+ * lines longer than 4k.
+ *
+ */
+
+#define BUFFER_SIZE 4096
+
+
 /***************** END OF USER SETTABLE PREFERENCES *****************/
 /********************************************************************/
 
@@ -189,14 +212,14 @@
 struct WordList;
 #endif
 /* Sorry; there are now cyclic dependencies in the
-* source tree. :-/ 
+* source tree. :-/
 */
 
 extern const char *ReverseOn;
 extern const char *ReverseOff;
-extern char ConfigFile[BUFSIZ];
+extern char ConfigFile[BUFFER_SIZE];
+extern struct WordList ConfigFiles;
 
-char *MatchFileName(char *String);
 int SetupVars(void);
 void SetupTerm(void);
 void AddAppendix(char *Name, const char *App);
@@ -204,4 +227,7 @@
 int LocateFile(const char *Filename, char *Dest, const char *App,
                struct WordList *wl);
 
+void AddDirectoryFromRelativeFile(const char * Filename, struct WordList *TeXInputs);
+int IsRegFile(const char *Filename);
+
 #endif /* OPSYS_H */

Modified: trunk/Build/source/texk/chktex/chktex-src/Resource.c
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Resource.c	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/Resource.c	2022-12-15 11:48:56 UTC (rev 65275)
@@ -90,7 +90,8 @@
 static enum Token Expect;
 static unsigned long RsrcLine;
 
-static enum Token ReadWord(char *, FILE *);
+static enum Token ReadWord(char *, FILE *,
+                           char *(fgetsfun)(char *, int, FILE *));
 static char MapChars(char **String);
 
 
@@ -108,11 +109,11 @@
  * Returns whether the attempt was a successful one.
  */
 
-int ReadRC(const char *Filename)
+int ProcessRC(FILE *fh, const char *Filename,
+              char *(fgetsfun)(char *, int, FILE *))
 {
     const char *String = NULL;
-    int Success = FALSE;
-    FILE *fh;
+    int Success = TRUE;
     enum Token Token;
     unsigned long Counter;
 
@@ -130,130 +131,138 @@
 
     RsrcLine = 0;
     Expect = FLG_Word | FLG_Eof;
-
-    if ((fh = fopen(Filename, "r")))
+    do
     {
-        Success = TRUE;
-        do
+        Token = ReadWord(ReadBuffer, fh, fgetsfun);
+        if (!(Expect & Token))
         {
-            Token = ReadWord(ReadBuffer, fh);
-            if (!(Expect & Token))
+            switch (Token)
             {
-                switch (Token)
+            case FLG_Item:
+                String = "item";
+                break;
+            case FLG_Word:
+                String = "word";
+                break;
+            case FLG_Equal:
+                String = "`='";
+                break;
+            case FLG_Open:
+                String = "`{'";
+                break;
+            case FLG_Close:
+                String = "`}'";
+                break;
+            case FLG_BrOpen:
+                String = "`['";
+                break;
+            case FLG_BrClose:
+                String = "`]'";
+                break;
+            case FLG_Eof:
+                String = "EOF";
+                break;
+            }
+            PrintPrgErr(pmFaultFmt, Filename, RsrcLine, String);
+            Success = FALSE;
+            Token = FLG_Eof;
+        }
+
+        switch (Token)
+        {
+        case FLG_Word:
+            for (Counter = 0; Keys[Counter].Name; Counter++)
+            {
+                if (!strcasecmp(ReadBuffer, Keys[Counter].Name))
                 {
-                case FLG_Item:
-                    String = "item";
+                    CurWord = &Keys[Counter];
+                    Expect = (CurWord->List ? FLG_Open : 0) |
+                        (CurWord->CaseList ? FLG_BrOpen : 0) | FLG_Equal;
                     break;
-                case FLG_Word:
-                    String = "word";
-                    break;
-                case FLG_Equal:
-                    String = "`='";
-                    break;
-                case FLG_Open:
-                    String = "`{'";
-                    break;
-                case FLG_Close:
-                    String = "`}'";
-                    break;
-                case FLG_BrOpen:
-                    String = "`['";
-                    break;
-                case FLG_BrClose:
-                    String = "`]'";
-                    break;
-                case FLG_Eof:
-                    String = "EOF";
-                    break;
                 }
-                PrintPrgErr(pmFaultFmt, Filename, RsrcLine, String);
+            }
+            if (!Keys[Counter].Name)
+            {
+                PrintPrgErr(pmKeyWord, ReadBuffer, Filename);
                 Success = FALSE;
                 Token = FLG_Eof;
             }
-
-            switch (Token)
+            break;
+        case FLG_Item:
+            switch (What)
             {
-            case FLG_Word:
-                for (Counter = 0; Keys[Counter].Name; Counter++)
+            case whEqual:
+                if (!(*(CurWord->String) = strdup(ReadBuffer)))
                 {
-                    if (!strcasecmp(ReadBuffer, Keys[Counter].Name))
-                    {
-                        CurWord = &Keys[Counter];
-                        Expect = (CurWord->List ? FLG_Open : 0) |
-                            (CurWord->CaseList ? FLG_BrOpen : 0) | FLG_Equal;
-                        break;
-                    }
+                    PrintPrgErr(pmStrDupErr);
+                    Token = FLG_Eof;
+                    Success = FALSE;
                 }
-                if (!Keys[Counter].Name)
+
+                What = whNone;
+                Expect = FLG_Word | FLG_Eof;
+                break;
+            case whCaseList:
+                if (!InsertWord(ReadBuffer, CurWord->CaseList))
                 {
-                    PrintPrgErr(pmKeyWord, ReadBuffer, Filename);
+                    Token = FLG_Eof;
                     Success = FALSE;
-                    Token = FLG_Eof;
                 }
                 break;
-            case FLG_Item:
-                switch (What)
+            case whList:
+                if (!InsertWord(ReadBuffer, CurWord->List))
                 {
-                case whEqual:
-                    if (!(*(CurWord->String) = strdup(ReadBuffer)))
-                    {
-                        PrintPrgErr(pmStrDupErr);
-                        Token = FLG_Eof;
-                        Success = FALSE;
-                    }
-
-                    What = whNone;
-                    Expect = FLG_Word | FLG_Eof;
-                    break;
-                case whCaseList:
-                    if (!InsertWord(ReadBuffer, CurWord->CaseList))
-                    {
-                        Token = FLG_Eof;
-                        Success = FALSE;
-                    }
-                    break;
-                case whList:
-                    if (!InsertWord(ReadBuffer, CurWord->List))
-                    {
-                        Token = FLG_Eof;
-                        Success = FALSE;
-                    }
-                    break;
-                case whNone:
-                    PrintPrgErr(pmAssert);
+                    Token = FLG_Eof;
+                    Success = FALSE;
                 }
                 break;
-            case FLG_Equal:
-                What = whEqual;
-                Expect = (CurWord->List ? FLG_Open : 0) |
-                    (CurWord->CaseList ? FLG_BrOpen : 0) |
-                    (CurWord->String ? FLG_Item : 0);
-                break;
-            case FLG_BrOpen:
-                if (What == whEqual)
-                    ClearWord(CurWord->CaseList);
-                What = whCaseList;
-                Expect = FLG_Item | FLG_BrClose;
-                break;
-            case FLG_Open:
-                if (What == whEqual)
-                    ClearWord(CurWord->List);
-                What = whList;
-                Expect = FLG_Item | FLG_Close;
-                break;
-            case FLG_BrClose:
-            case FLG_Close:
-                Expect = (CurWord->List ? FLG_Open : 0) |
-                    (CurWord->CaseList ? FLG_BrOpen : 0) |
-                    FLG_Equal | FLG_Word | FLG_Eof;
-                What = whNone;
-                break;
-            case FLG_Eof:
-                break;
+            case whNone:
+                PrintPrgErr(pmAssert);
             }
+            break;
+        case FLG_Equal:
+            What = whEqual;
+            Expect = (CurWord->List ? FLG_Open : 0) |
+                (CurWord->CaseList ? FLG_BrOpen : 0) |
+                (CurWord->String ? FLG_Item : 0);
+            break;
+        case FLG_BrOpen:
+            if (What == whEqual)
+                ClearWord(CurWord->CaseList);
+            What = whCaseList;
+            Expect = FLG_Item | FLG_BrClose;
+            break;
+        case FLG_Open:
+            if (What == whEqual)
+                ClearWord(CurWord->List);
+            What = whList;
+            Expect = FLG_Item | FLG_Close;
+            break;
+        case FLG_BrClose:
+        case FLG_Close:
+            Expect = (CurWord->List ? FLG_Open : 0) |
+                (CurWord->CaseList ? FLG_BrOpen : 0) | FLG_Equal | FLG_Word |
+                FLG_Eof;
+            What = whNone;
+            break;
+        case FLG_Eof:
+            break;
         }
-        while (Token != FLG_Eof);
+    } while (Token != FLG_Eof);
+    return (Success);
+}
 
+/*
+ * Opens a file and passes to ProcessRC().
+ */
+int ReadRC(const char *Filename)
+{
+    int Success = FALSE;
+    FILE *fh;
+
+    if ((fh = fopen(Filename, "r")))
+    {
+        Success = ProcessRC(fh, Filename, &fgets);
         fclose(fh);
     }
     else
@@ -262,16 +271,52 @@
     return (Success);
 }
 
+const char *FGETS_TMP = NULL;
+char *fgets_from_string(char *out, int size, FILE *fh)
+{
+    char *res;
+    if (FGETS_TMP == NULL)
+        return NULL;
+    res = strncpy(out, FGETS_TMP, size - 1);
+
+    if (size - 1 < strlen(FGETS_TMP))
+    {
+        /* It wasn't all read, so null terminate it, and get ready for
+         * next time. */
+        res[size] = '\0';
+        FGETS_TMP = FGETS_TMP + (size - 1);
+    }
+    else
+    {
+        /* We're done, so signal that */
+        FGETS_TMP = NULL;
+    }
+    return res;
+}
+
 /*
+ * Opens a file and passes to ProcessRC().
+ */
+int ReadRCFromCmdLine(const char *CmdLineArg)
+{
+    if (!CmdLineArg)
+        return FALSE;
+
+    FGETS_TMP = CmdLineArg;
+    return ProcessRC(NULL, "CommandLineArg", &fgets_from_string);
+}
+
+/*
  * Reads a token from the `.chktexrc' file; if the token is
  * FLG_Item or FLG_Word, Buffer will contain the plaintext of the
  * token. If not, the contents are undefined.
  */
 
-static enum Token ReadWord(char *Buffer, FILE * fh)
+static enum Token ReadWord(char *Buffer, FILE *fh,
+                           char *(fgetsfun)(char *, int, FILE *))
 {
     static char *String = NULL;
-    static char StatBuf[BUFSIZ];
+    static char StatBuf[BUFFER_SIZE];
     enum Token Retval = FLG_Eof;
 
     unsigned short Chr;
@@ -285,7 +330,7 @@
         {
             if (!(String && *String))
             {
-                if (fgets(StatBuf, BUFSIZ - 1, fh))
+                if ((fgetsfun)(StatBuf, BUFFER_SIZE - 1, fh))
                     String = strip(StatBuf, STRP_RGT);
                 RsrcLine++;
             }

Modified: trunk/Build/source/texk/chktex/chktex-src/Resource.h
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Resource.h	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/Resource.h	2022-12-15 11:48:56 UTC (rev 65275)
@@ -48,8 +48,9 @@
   LIST(CenterDots) LIST(LowDots)    LIST(OutFormat)\
   LIST(Primitives) LIST(NotPreSpaced) LIST(NonItalic) LIST(NoCharNext)\
   LNEMPTY(CmdLine) LNEMPTY(TeXInputs)\
-  LCASE(Abbrev)    LCASE(UserWarn)  LIST(UserWarnRegex)\
-  KEY(VerbClear, "|") KEY(QuoteStyle, "Traditional")  KEY(TabSize, "8")
+  LCASE(Abbrev)    LCASE(UserWarn)  LIST(UserWarnRegex) LIST(TextEnvir)\
+  KEY(VerbClear, "|") KEY(QuoteStyle, "Traditional")  KEY(TabSize, "8")\
+  KEY(CmdSpaceStyle, "Ignore")
 
 #define LIST(a) extern struct WordList a;
 #define LNEMPTY LIST
@@ -62,6 +63,7 @@
 #undef LNEMPTY
 #undef LIST
 int ReadRC(const char *);
+int ReadRCFromCmdLine(const char *CmdLineArg);
 
 
 #endif /* RESOURCE */

Modified: trunk/Build/source/texk/chktex/chktex-src/Test.nore.out
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Test.nore.out	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/Test.nore.out	2022-12-15 11:48:56 UTC (rev 65275)
@@ -19,12 +19,6 @@
 Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
 \smallskip This is a not. $\foo Neither$ is this.  
                           ^^^^^^^^^^^^^^
-Message 1 in Test.tex: Command terminated with space.
-\stoptext  
-         ^
-Message 9 in Test.tex: `section' expected, found `text'.
-\stoptext  
-     ^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 2  
 ^
@@ -136,6 +130,9 @@
 Message 8 in Test.tex: Wrong length of dash may have been used.
 The Birch--Swinnerton--Dyer conjecture is not correct.  
                      ^^
+Message 8 in Test.tex: Wrong length of dash may have been used.
+The Birch-Swinnerton-Dyer conjecture is not correct (is now caught).  
+         ^
 Message 22 in Test.tex: Comment displayed.
 % Warning 9-10  
 ^
@@ -142,6 +139,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Brackets:  
 ^
+Message 37 in Test.tex: You should avoid spaces in front of parenthesis.
+)}{[])} }}}]]])))  
+^
 Message 10 in Test.tex: Solo `)' found.
 )}{[])} }}}]]])))  
 ^
@@ -194,6 +194,27 @@
 \begin{quux} \begin{baz} \end{quux} \end{baz} \end{asoi} \begin{dobedo}  
                                               ^^^^
 Message 22 in Test.tex: Comment displayed.
+% Warning 47 -- ConTeXt environment mismatch -- split from 9  
+^
+Message 1 in Test.tex: Command terminated with space.
+\stoptext  
+         ^
+Message 47 in Test.tex: `section' expected, found `text' (ConTeXt).
+\stoptext  
+     ^^^^
+Message 1 in Test.tex: Command terminated with space.
+\starttext  
+          ^
+Message 22 in Test.tex: Comment displayed.
+% (Un)fortunately, this is not an error  
+^
+Message 1 in Test.tex: Command terminated with space.
+\startbar  
+         ^
+Message 1 in Test.tex: Command terminated with space.
+\stopbar  
+        ^
+Message 22 in Test.tex: Comment displayed.
 % Warning 11  
 ^
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
@@ -260,6 +281,18 @@
 1st. Foo Inc. Ab.cd. foo ab.cd. Foo. bar baz., billy.; bob.: joe.! frank.? james.. george  
                                                                                  ^
 Message 22 in Test.tex: Comment displayed.
+% Bug 54751  
+^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)  
+   ^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)  
+                  ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default  
+^
+Message 22 in Test.tex: Comment displayed.
 % Warning 13  
 ^
 Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
@@ -266,6 +299,21 @@
 Look at THIS! It's an error.  
             ^
 Message 22 in Test.tex: Comment displayed.
+% after frenchspacing it's not an error  
+^
+Message 22 in Test.tex: Comment displayed.
+% warning again  
+^
+Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
+Look at THIS! It's an error.  
+            ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default  
+^
+Message 21 in Test.tex: This command might not be intended.
+Look at \THIS\@! It's not an error. D. E. Knuth.  
+             ^^
+Message 22 in Test.tex: Comment displayed.
 % Warning 14  
 ^
 Message 1 in Test.tex: Command terminated with space.
@@ -358,6 +406,12 @@
 Message 11 in input.tex: You should use \ldots to achieve an ellipsis.
 \this is a test of whether the file is actually inputted...  
                                                         ^^^
+Message 22 in input/file: Comment displayed.
+% -*- TeX -*-  
+^
+Message 22 in input/file: Comment displayed.
+% chktex-file 22  
+^
 Message 22 in Test.tex: Comment displayed.
 % Warning 29  
 ^
@@ -367,6 +421,12 @@
 Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
 The program opens a screen sized $640\times200$ pixels  
                                  ^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.  
+              ^^^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.  
+                               ^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 30  
 ^
@@ -451,6 +511,9 @@
 Message 38 in Test.tex: You should not use punctuation in front of quotes.
 ``An example,'' he said, ``would be great.''  
             ^
+Message 38 in Test.tex: You should not use punctuation in front of quotes.
+``An example,'' he said, ``would be great.''  
+                                         ^
 Message 22 in Test.tex: Comment displayed.
 % Warning 39  
 ^
@@ -536,6 +599,12 @@
 For every $p\nmid n$ you have a cute prime which doesn't divide $n$.  
                                                                 ^^^
 Message 22 in Test.tex: Comment displayed.
+% Warning about optional arguments inside optional arguments  
+^
+Message 22 in Test.tex: Comment displayed.
+% Shouldn't warn  
+^
+Message 22 in Test.tex: Comment displayed.
 % Math mode check  
 ^
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
@@ -557,6 +626,18 @@
 Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
                                         ^^^^^^
 Message 22 in Test.tex: Comment displayed.
+% breqn mode check  
+^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+sin x  
+^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+is not the same as sin x, but is the same as $sin x$  
+                                             ^^^^^^^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+is not the same as sin x, but is the same as $sin x$  
+                                              ^^^
+Message 22 in Test.tex: Comment displayed.
 This is\\% a comment. Nothing here should be checked(right)?  
          ^
 Message 36 in Test.tex: You should put a space in front of parenthesis.
@@ -596,6 +677,18 @@
 \end{verbatim} FOO  
                ^^^
 Message 22 in Test.tex: Comment displayed.
+% WipeArg  
+^
+Message 22 in Test.tex: Comment displayed.
+% Bug 60197 -- "double math mode" should be handled okay  
+^
+Message 22 in Test.tex: Comment displayed.
+% Warning 49  
+^
+Message 49 in Test.tex: Expected math mode to be on here.
+\]  
+^
+Message 22 in Test.tex: Comment displayed.
 % Warning 16,15  
 ^
 Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
@@ -613,6 +706,9 @@
 Message 22 in Test.tex: Comment displayed.
 % There should be no newline at the end of this file to test bug #46539 
 ^
+Message 48 in Test.tex: No match found for `text' (ConTeXt).
+\starttext  
+      ^^^^
 Message 16 in Test.tex: Mathmode still on at end of LaTeX file.
 
 

Modified: trunk/Build/source/texk/chktex/chktex-src/Test.pcre.out
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Test.pcre.out	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/Test.pcre.out	2022-12-15 11:48:56 UTC (rev 65275)
@@ -19,9 +19,6 @@
 Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
 \smallskip This is a not. $\foo Neither$ is this.  
                           ^^^^^^^^^^^^^^
-Message 9 in Test.tex: `section' expected, found `text'.
-\stoptext  
-     ^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 2  
 ^
@@ -133,6 +130,9 @@
 Message 8 in Test.tex: Wrong length of dash may have been used.
 The Birch--Swinnerton--Dyer conjecture is not correct.  
                      ^^
+Message 8 in Test.tex: Wrong length of dash may have been used.
+The Birch-Swinnerton-Dyer conjecture is not correct (is now caught).  
+         ^
 Message 22 in Test.tex: Comment displayed.
 % Warning 9-10  
 ^
@@ -139,6 +139,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Brackets:  
 ^
+Message 37 in Test.tex: You should avoid spaces in front of parenthesis.
+)}{[])} }}}]]])))  
+^
 Message 10 in Test.tex: Solo `)' found.
 )}{[])} }}}]]])))  
 ^
@@ -178,6 +181,9 @@
 Message 10 in Test.tex: Solo `)' found.
 )}{[])} }}}]]])))  
                 ^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+{[]} ((([[[{{{}}}]]])))  
+        ^^^
 Message 22 in Test.tex: Comment displayed.
 % Envs:  
 ^
@@ -191,6 +197,15 @@
 \begin{quux} \begin{baz} \end{quux} \end{baz} \end{asoi} \begin{dobedo}  
                                               ^^^^
 Message 22 in Test.tex: Comment displayed.
+% Warning 47 -- ConTeXt environment mismatch -- split from 9  
+^
+Message 47 in Test.tex: `section' expected, found `text' (ConTeXt).
+\stoptext  
+     ^^^^
+Message 22 in Test.tex: Comment displayed.
+% (Un)fortunately, this is not an error  
+^
+Message 22 in Test.tex: Comment displayed.
 % Warning 11  
 ^
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
@@ -257,6 +272,18 @@
 1st. Foo Inc. Ab.cd. foo ab.cd. Foo. bar baz., billy.; bob.: joe.! frank.? james.. george  
                                                                                  ^
 Message 22 in Test.tex: Comment displayed.
+% Bug 54751  
+^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)  
+   ^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)  
+                  ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default  
+^
+Message 22 in Test.tex: Comment displayed.
 % Warning 13  
 ^
 Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
@@ -263,6 +290,21 @@
 Look at THIS! It's an error.  
             ^
 Message 22 in Test.tex: Comment displayed.
+% after frenchspacing it's not an error  
+^
+Message 22 in Test.tex: Comment displayed.
+% warning again  
+^
+Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
+Look at THIS! It's an error.  
+            ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default  
+^
+Message 21 in Test.tex: This command might not be intended.
+Look at \THIS\@! It's not an error. D. E. Knuth.  
+             ^^
+Message 22 in Test.tex: Comment displayed.
 % Warning 14  
 ^
 Message 1 in Test.tex: Command terminated with space.
@@ -355,6 +397,12 @@
 Message 11 in input.tex: You should use \ldots to achieve an ellipsis.
 \this is a test of whether the file is actually inputted...  
                                                         ^^^
+Message 22 in input/file: Comment displayed.
+% -*- TeX -*-  
+^
+Message 22 in input/file: Comment displayed.
+% chktex-file 22  
+^
 Message 22 in Test.tex: Comment displayed.
 % Warning 29  
 ^
@@ -364,6 +412,12 @@
 Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
 The program opens a screen sized $640\times200$ pixels  
                                  ^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.  
+              ^^^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.  
+                               ^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 30  
 ^
@@ -448,6 +502,9 @@
 Message 38 in Test.tex: You should not use punctuation in front of quotes.
 ``An example,'' he said, ``would be great.''  
             ^
+Message 38 in Test.tex: You should not use punctuation in front of quotes.
+``An example,'' he said, ``would be great.''  
+                                         ^
 Message 22 in Test.tex: Comment displayed.
 % Warning 39  
 ^
@@ -536,6 +593,27 @@
 For every $p\nmid n$ you have a cute prime which doesn't divide $n$.  
                                                                 ^^^
 Message 22 in Test.tex: Comment displayed.
+% Warning about optional arguments inside optional arguments  
+^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+\begin{something}[\cite2[1231]{adadsd}]\end{something}  
+                 ^^^^^^^^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+[dasd{dasda[ ads[ dasd ]]}]  
+           ^^^^^^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+adssd[ {}[]]  
+     ^^^^^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+\begin{something}[\cite{adadsd}[1231]]\end{something}  
+                 ^^^^^^^^^^^^^^^
+Message 44 in Test.tex: User Regex: -3:Optional arguments [] inside optional arguments [] must be enclosed in {}.
+\begin{something}[ ][\cite{adadsd}[1231]]\end{something}  
+                    ^^^^^^^^^^^^^^^
+Message 22 in Test.tex: Comment displayed.
+% Shouldn't warn  
+^
+Message 22 in Test.tex: Comment displayed.
 % Math mode check  
 ^
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
@@ -557,6 +635,18 @@
 Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
                                         ^^^^^^
 Message 22 in Test.tex: Comment displayed.
+% breqn mode check  
+^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+sin x  
+^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+is not the same as sin x, but is the same as $sin x$  
+                                             ^^^^^^^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+is not the same as sin x, but is the same as $sin x$  
+                                              ^^^
+Message 22 in Test.tex: Comment displayed.
 This is\\% a comment. Nothing here should be checked(right)?  
          ^
 Message 36 in Test.tex: You should put a space in front of parenthesis.
@@ -605,6 +695,18 @@
 \end{verbatim} FOO  
                ^^^
 Message 22 in Test.tex: Comment displayed.
+% WipeArg  
+^
+Message 22 in Test.tex: Comment displayed.
+% Bug 60197 -- "double math mode" should be handled okay  
+^
+Message 22 in Test.tex: Comment displayed.
+% Warning 49  
+^
+Message 49 in Test.tex: Expected math mode to be on here.
+\]  
+^
+Message 22 in Test.tex: Comment displayed.
 % Warning 16,15  
 ^
 Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
@@ -622,6 +724,9 @@
 Message 22 in Test.tex: Comment displayed.
 % There should be no newline at the end of this file to test bug #46539 
 ^
+Message 48 in Test.tex: No match found for `text' (ConTeXt).
+\starttext  
+      ^^^^
 Message 16 in Test.tex: Mathmode still on at end of LaTeX file.
 
 

Modified: trunk/Build/source/texk/chktex/chktex-src/Test.posix-ere.out
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Test.posix-ere.out	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/Test.posix-ere.out	2022-12-15 11:48:56 UTC (rev 65275)
@@ -19,9 +19,6 @@
 Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
 \smallskip This is a not. $\foo Neither$ is this.  
                           ^^^^^^^^^^^^^^
-Message 9 in Test.tex: `section' expected, found `text'.
-\stoptext  
-     ^^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 2  
 ^
@@ -133,6 +130,9 @@
 Message 8 in Test.tex: Wrong length of dash may have been used.
 The Birch--Swinnerton--Dyer conjecture is not correct.  
                      ^^
+Message 8 in Test.tex: Wrong length of dash may have been used.
+The Birch-Swinnerton-Dyer conjecture is not correct (is now caught).  
+         ^
 Message 22 in Test.tex: Comment displayed.
 % Warning 9-10  
 ^
@@ -139,6 +139,9 @@
 Message 22 in Test.tex: Comment displayed.
 % Brackets:  
 ^
+Message 37 in Test.tex: You should avoid spaces in front of parenthesis.
+)}{[])} }}}]]])))  
+^
 Message 10 in Test.tex: Solo `)' found.
 )}{[])} }}}]]])))  
 ^
@@ -191,6 +194,15 @@
 \begin{quux} \begin{baz} \end{quux} \end{baz} \end{asoi} \begin{dobedo}  
                                               ^^^^
 Message 22 in Test.tex: Comment displayed.
+% Warning 47 -- ConTeXt environment mismatch -- split from 9  
+^
+Message 47 in Test.tex: `section' expected, found `text' (ConTeXt).
+\stoptext  
+     ^^^^
+Message 22 in Test.tex: Comment displayed.
+% (Un)fortunately, this is not an error  
+^
+Message 22 in Test.tex: Comment displayed.
 % Warning 11  
 ^
 Message 11 in Test.tex: You should use \ldots to achieve an ellipsis.
@@ -257,6 +269,18 @@
 1st. Foo Inc. Ab.cd. foo ab.cd. Foo. bar baz., billy.; bob.: joe.! frank.? james.. george  
                                                                                  ^
 Message 22 in Test.tex: Comment displayed.
+% Bug 54751  
+^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)  
+   ^
+Message 12 in Test.tex: Interword spacing (`\ ') should perhaps be used.
+Mr. ``X'' and Mrs. \(Y\)  
+                  ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default  
+^
+Message 22 in Test.tex: Comment displayed.
 % Warning 13  
 ^
 Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
@@ -263,6 +287,21 @@
 Look at THIS! It's an error.  
             ^
 Message 22 in Test.tex: Comment displayed.
+% after frenchspacing it's not an error  
+^
+Message 22 in Test.tex: Comment displayed.
+% warning again  
+^
+Message 13 in Test.tex: Intersentence spacing (`\@') should perhaps be used.
+Look at THIS! It's an error.  
+            ^
+Message 22 in Test.tex: Comment displayed.
+% ignore commands by default  
+^
+Message 21 in Test.tex: This command might not be intended.
+Look at \THIS\@! It's not an error. D. E. Knuth.  
+             ^^
+Message 22 in Test.tex: Comment displayed.
 % Warning 14  
 ^
 Message 1 in Test.tex: Command terminated with space.
@@ -355,6 +394,12 @@
 Message 11 in input.tex: You should use \ldots to achieve an ellipsis.
 \this is a test of whether the file is actually inputted...  
                                                         ^^^
+Message 22 in input/file: Comment displayed.
+% -*- TeX -*-  
+^
+Message 22 in input/file: Comment displayed.
+% chktex-file 22  
+^
 Message 22 in Test.tex: Comment displayed.
 % Warning 29  
 ^
@@ -364,6 +409,12 @@
 Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
 The program opens a screen sized $640\times200$ pixels  
                                  ^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.  
+              ^^^^^^^^^^^^^^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.  
+                               ^^^
 Message 22 in Test.tex: Comment displayed.
 % Warning 30  
 ^
@@ -448,6 +499,9 @@
 Message 38 in Test.tex: You should not use punctuation in front of quotes.
 ``An example,'' he said, ``would be great.''  
             ^
+Message 38 in Test.tex: You should not use punctuation in front of quotes.
+``An example,'' he said, ``would be great.''  
+                                         ^
 Message 22 in Test.tex: Comment displayed.
 % Warning 39  
 ^
@@ -536,6 +590,12 @@
 For every $p\nmid n$ you have a cute prime which doesn't divide $n$.  
                                                                 ^^^
 Message 22 in Test.tex: Comment displayed.
+% Warning about optional arguments inside optional arguments  
+^
+Message 22 in Test.tex: Comment displayed.
+% Shouldn't warn  
+^
+Message 22 in Test.tex: Comment displayed.
 % Math mode check  
 ^
 Message 35 in Test.tex: You should perhaps use `\sin' instead.
@@ -557,6 +617,18 @@
 Also, $x(3)\text{ is not x(3) but it is $x(3)$}$  
                                         ^^^^^^
 Message 22 in Test.tex: Comment displayed.
+% breqn mode check  
+^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+sin x  
+^^^
+Message 46 in Test.tex: Use \( ... \) instead of $ ... $.
+is not the same as sin x, but is the same as $sin x$  
+                                             ^^^^^^^
+Message 35 in Test.tex: You should perhaps use `\sin' instead.
+is not the same as sin x, but is the same as $sin x$  
+                                              ^^^
+Message 22 in Test.tex: Comment displayed.
 This is\\% a comment. Nothing here should be checked(right)?  
          ^
 Message 36 in Test.tex: You should put a space in front of parenthesis.
@@ -605,6 +677,18 @@
 \end{verbatim} FOO  
                ^^^
 Message 22 in Test.tex: Comment displayed.
+% WipeArg  
+^
+Message 22 in Test.tex: Comment displayed.
+% Bug 60197 -- "double math mode" should be handled okay  
+^
+Message 22 in Test.tex: Comment displayed.
+% Warning 49  
+^
+Message 49 in Test.tex: Expected math mode to be on here.
+\]  
+^
+Message 22 in Test.tex: Comment displayed.
 % Warning 16,15  
 ^
 Message 45 in Test.tex: Use \[ ... \] instead of $$ ... $$.
@@ -622,6 +706,9 @@
 Message 22 in Test.tex: Comment displayed.
 % There should be no newline at the end of this file to test bug #46539 
 ^
+Message 48 in Test.tex: No match found for `text' (ConTeXt).
+\starttext  
+      ^^^^
 Message 16 in Test.tex: Mathmode still on at end of LaTeX file.
 
 

Modified: trunk/Build/source/texk/chktex/chktex-src/Test.tex
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Test.tex	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/Test.tex	2022-12-15 11:48:56 UTC (rev 65275)
@@ -13,10 +13,6 @@
 So is this \foo
 \smallskip This is a not. $\foo Neither$ is this.
 
-\startsection[title={Testing ConTeXt}]
-These should now be an error.
-\stoptext
-
 % Warning 2
 
 This is a faulty reference to \ref{foo}
@@ -55,7 +51,7 @@
 % Using DashExcpt
 The Birch--Swinnerton-Dyer conjecture is correct.
 The Birch--Swinnerton--Dyer conjecture is not correct.
-The Birch-Swinnerton-Dyer conjecture is not correct (but not caught).
+The Birch-Swinnerton-Dyer conjecture is not correct (is now caught).
 
 % Warning 9-10
 
@@ -70,6 +66,18 @@
 
 \begin{foo} \begin{bar} \end{bar}\end{foo}
 
+% Warning 47 -- ConTeXt environment mismatch -- split from 9
+\startsection[title={Testing ConTeXt}]
+These should now be an error.
+\stoptext
+\starttext
+
+% (Un)fortunately, this is not an error
+\begin{foo}
+\startbar
+\end{foo}
+\stopbar
+
 % Warning 11
 
 Foo...bar. $1,...,3$. $1+...+3$. $1,\cdots,3$. $1\cdot\ldots\cdot3$.
@@ -80,11 +88,31 @@
 1st. Foo Inc. Ab.cd. foo ab.cd. Foo. bar baz., billy.; bob.: joe.! frank.? james.. george
 1st.\ foo Inc.\ ab.cd.\ foo ab.cd.\ Foo.\ bar baz., billy.; bob.:\ joe.!\ frank.?\ james..\ george
 
+% Bug 54751
+
+Mr. ``X'' and Mrs. \(Y\)
+
+% ignore commands by default
+\Mr. ``X'' and \Mrs. \(Y\)
+
 % Warning 13
 
 Look at THIS! It's an error.
 Look at THIS\@! It's an error. D. E. Knuth.
 
+% after frenchspacing it's not an error
+\frenchspacing
+Look at THIS! It's not an error.
+Look at THIS\@! It's not an error. D. E. Knuth.
+
+% warning again
+\nonfrenchspacing
+Look at THIS! It's an error.
+Look at THIS\@! It's not an error. D. E. Knuth.
+
+% ignore commands by default
+Look at \THIS\@! It's not an error. D. E. Knuth.
+
 % Warning 14
 
 \hat
@@ -133,10 +161,12 @@
 
 \input input.tex
 \input input
+\input input/file
 
 % Warning 29
 The program opens a screen sized 640x200 pixels
 The program opens a screen sized $640\times200$ pixels
+Approximately $\frac{2x}{1+x}$ $x$s shouldn't be errors.
 
 % Warning 30
 
@@ -197,10 +227,34 @@
 For every $p\not|n$ you have an ugly prime which doesn't divide $n$.
 For every $p\nmid n$ you have a cute prime which doesn't divide $n$.
 
+% Warning about optional arguments inside optional arguments
+\begin{something}[\cite2[1231]{adadsd}]\end{something}
+[dasd{dasda[ ads[ dasd ]]}]
+adssd[ {}[]]
+\begin{something}[\cite{adadsd}[1231]]\end{something}
+\begin{something}[ ][\cite{adadsd}[1231]]\end{something}
+
+% Shouldn't warn
+\begin{something}[{\cite{adadsd}[1231]}]\end{something}
+\begin{something}[{\cite{{adadsd}}[1231]}]\end{something}
+\begin{something}[{\cite{adadsd}[1231]}]\end{something}
+\begin{something}[ ]{\cite{adadsd}[1231]}\end{something}
+\begin{something}[ ][{\cite{adadsd}[1231]}]\end{something}
+\begin{something}[{} ]{\cite{adadsd}[1231]}\end{something}
+
+
 % Math mode check
 \ensuremath{sin x\text{is not the same as sin x, but is the same as $sin x$}}
 Also, $x(3)\text{ is not x(3) but it is $x(3)$}$
 
+% breqn mode check
+\begin{darray*}
+sin x
+\begin{dsuspend}
+is not the same as sin x, but is the same as $sin x$
+\end{dsuspend}
+\end{darray*}
+
 This is\\% a comment. Nothing here should be checked(right)?
 a broken line.
 But this is not a \% comment, so we should find this error(right)?
@@ -227,6 +281,23 @@
 \this is
 \end{verbatim} FOO
 
+% WipeArg
+\autocite[34-35]{text--1---1}
+
+% Bug 60197 -- "double math mode" should be handled okay
+\begin{align}
+    \begin{array} {l}
+        abc
+    \end{array} \\
+    3 - 2 = 1
+    \pi
+\end{align}
+
+
+% Warning 49
+
+\]
+
 % Warning 16,15
 
 $$(

Modified: trunk/Build/source/texk/chktex/chktex-src/Utility.c
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Utility.c	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/Utility.c	2022-12-15 11:48:56 UTC (rev 65275)
@@ -87,8 +87,7 @@
 #else
 
     FILE *fh;
-
-    if (fh = fopen(Filename, "r"))
+    if ((fh = fopen(Filename, "r")))
     {
         Retval = TRUE;
         fclose(fh);
@@ -97,6 +96,12 @@
         Retval = FALSE;
 #endif
 
+    /* Ensure that it's not a directory */
+    if (Retval && !IsRegFile(Filename))
+    {
+        Retval = FALSE;
+    }
+
     return (Retval);
 }
 
@@ -115,7 +120,7 @@
 {
     if (to && (n > 0))
     {
-        n = min(n, BUFSIZ);
+        n = min(n, BUFFER_SIZE);
 
         return (memset(to, c, (size_t) n));
     }
@@ -325,7 +330,7 @@
     unsigned long i, j;
     unsigned long FromLen = strlen(From);
 
-    Len = min(Len, BUFSIZ);
+    Len = min(Len, BUFFER_SIZE);
 
     if (To && From)
     {
@@ -681,7 +686,7 @@
 int PushFileName(const char *Name, struct Stack *stack)
 {
     FILE *fh = NULL;
-    static char NameBuf[BUFSIZ];
+    static char NameBuf[BUFFER_SIZE];
 
     if (Name && stack)
     {
@@ -701,6 +706,7 @@
 int PushFile(const char *Name, FILE * fh, struct Stack *stack)
 {
     struct FileNode *fn;
+    uint64_t *filesupp;
 
     if (Name && fh && stack)
     {
@@ -710,6 +716,21 @@
             {
                 fn->fh = fh;
                 fn->Line = 0L;
+                if ((filesupp = malloc(sizeof(uint64_t))))
+                {
+                    *filesupp = 0;
+                    StkPush(filesupp, &FileSuppStack);
+                }
+                else
+                    PrintPrgErr(pmNoStackMem);
+                if ((filesupp = malloc(sizeof(uint64_t))))
+                {
+                    *filesupp = 0;
+                    StkPush(filesupp, &UserFileSuppStack);
+                }
+                else
+                    PrintPrgErr(pmNoStackMem);
+
                 if (StkPush(fn, stack))
                     return (TRUE);
                 free(fn->Name);
@@ -754,6 +775,9 @@
                 free(fn->Name);
             free(fn);
             HasSeenLong = 0;
+
+            StkPop(&FileSuppStack);
+            StkPop(&UserFileSuppStack);
         }
         while (!Retval && (fn = StkTop(stack)));
     }
@@ -805,8 +829,27 @@
         return (LastLine);
 }
 
+long CurStkMode(struct Stack *stack)
+{
+    long * Mode;
+    if ((Mode = StkTop(stack)))
+        return *Mode;
+    /* printf("Empty stack\n"); */
+    return FALSE;
+}
 
+long *PushMode(long mode, struct Stack *stack)
+{
+    long *m;
 
+    if ((m = malloc(sizeof(long))))
+    {
+        *m = mode;
+        StkPush(m, stack);
+        return m;
+    }
+    return NULL;
+}
 /************************** CHARACTER STACK ******************************/
 
 /*

Modified: trunk/Build/source/texk/chktex/chktex-src/Utility.h
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/Utility.h	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/Utility.h	2022-12-15 11:48:56 UTC (rev 65275)
@@ -89,12 +89,6 @@
     unsigned long Line;
 };
 
-/* Rotates x n bits left (should be an int, long, etc.) */
-#define ROTATEL(x,n) ((x<<n) | (x>>((CHAR_BIT*sizeof(x)) - n)))
-
-/* Rotates x n bits right (should be an int, long, etc.) */
-#define ROTATER(x,n) ((x>>n) | (x<<((CHAR_BIT*sizeof(x)) - n)))
-
 /* Subtract 1 because sizeof includes the null terminator.
  * WARNING: To use this on a variable, the type should be char[]
  * rather than char*, since for some versions of gcc these give
@@ -132,6 +126,8 @@
 FILE *CurStkFile(struct Stack *stack);
 const char *CurStkName(struct Stack *stack);
 unsigned long CurStkLine(struct Stack *stack);
+long CurStkMode(struct Stack *stack);
+long *PushMode(long mode, struct Stack *stack);
 char *FGetsStk(char *Dest, unsigned long len, struct Stack *stack);
 int PushFileName(const char *Name, struct Stack *stack);
 int PushFile(const char *, FILE *, struct Stack *);

Deleted: trunk/Build/source/texk/chktex/chktex-src/chktexrc
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/chktexrc	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/chktexrc	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,802 +0,0 @@
-##
-##  ChkTeX, example resource file for ChkTeX.
-##  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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-##
-##  Contact the author at:
-##      Jens Berger
-##      Spektrumvn. 4
-##      N-0666 Oslo
-##      Norway
-##      E-mail: <jensthi at ifi.uio.no>
-##
-
-#####################################################################
-#
-# Note:   The  format  has  changed  slightly  (again).  The { ...  }
-# syntax does now mean case-sensitive comparing, while [ ...  ] means
-# case-insensitive   comparing  of  the  keywords.   Case-insensitive
-# comparing  of  the  keywords  is  only  supported  on  a few of the
-# keywords  (it's not meaningful in all contexts, and it slows ChkTeX
-# down).  Keywords supporting this are marked throughout the file.
-#
-# You  may  also reset a list by saying "KEYWORD = { ...  }"; it will
-# then be set equal to the contents of the list you specify.
-#
-# Comments  begin  with  `#', and continues for the rest of the line.
-# Blank lines plus leading and trailing spaces are of course ignored.
-#
-# The general format of this file is the following:
-#
-# KEYWORD { item item ...} [ item item ... ] /* Adds items */
-#
-# KEYWORD [ item item ...] { item item ... } /* Adds items */
-#
-# KEYWORD = item
-#
-# KEYWORD = { item item ... } /* Clears list before adding */
-#
-# KEYWORD = [ item item ... ] /* Clears list before adding */
-#
-# This  does  _not_  mean  that  you may alternate the forms; certain
-# keywords  demands  a  list, other a single value.  You thus have to
-# look at the examples of their use.
-#
-# Please  also  note  that if you specify a list-keyword twice, we'll
-# concatenate the lists.   If you specify a item-keyword twice, we'll
-# kill the previous value.
-#
-# We  are  slightly  context-sensitive when detecting tokens like "}"
-# and "]"; they have to be preceded by a space.  This generally makes
-# life easier.
-#
-# Items  are separated by spaces.  Newlines are considered as spaces,
-# but  can't be escaped.  You may surround items with quotes (`"') to
-# easily put spaces into them.
-#
-# Escape sequences available:
-#
-#   Sequence        Resulting character
-#   !               A space (type `! ', not just a exclamation mark)
-#   !"              "
-#   !#              #
-#   !!              !
-#   !{              {
-#   !}              }
-#   ![              [
-#   !]              ]
-#   !=              =
-#   !b              Backspace
-#   !n              New line
-#   !r              Carriage return
-#   !t              Tab
-#   !f              Form feed
-#   !xNN            NN must be a hexadecimal number (00 - ff),
-#                   _both_ characters must be included.
-#   !dNNN           DDD must be a decimal number (000 - 255), all
-#                   three characters must be included. Unspecified
-#                   results if DDD > 255.
-#   !NNN            DDD must be a octal number (000 - 377), all
-#                   three characters must be included. Unspecified
-#                   results if DDD > 377.
-#
-# Minor  note:   As  you  can see, most of these escape sequences are
-# equal  to  those  in  C  (with  some extensions); however, we use !
-# instead of \ as escape character for obvious reasons.
-#
-#
-# Quick summary of keywords follows.  Keywords marked with a * accept
-# keywords accepting case-insensitive lists.
-#
-#   Abbrev*     - A list of abbreviations not automatically caught.
-#   CenterDots  - Commands/characters  which  should  have  \cdots in
-#                 between.
-#   CmdLine     - Default   commandline   options.    These  will  be
-#                 processed  before  the ones you give on the command
-#                 line.
-#   HyphDash   \
-#   NumDash     - Number of dashes allowed in different contexts.
-#   WordDash   /
-#   IJAccent    - Commands   which   puts   an  accent  _over_  their
-#                 argument.
-#   Italic      - Commands immediately turning on italic mode.
-#   ItalCmd     - Commands putting their argument into italic.
-#   Linker      - Commands  which should have a non-breaking space in
-#                 front.
-#   LowDots     - Commands/characters  which  should  have  \ldots in
-#                 between.
-#   MathEnvir   - Environments which turn on math mode.
-#   MathCmd     - Commands which turn on math mode.
-#   TextCmd     - Commands which turn off math mode.
-#   MathRoman   - Mathematical   operators   with  LaTeX  replacement
-#                 defined.
-#   NoCharNext  - Insists on that certain commands aren't followed by
-#                 certain characters.
-#   NonItalic   - Commands immediately turning off italic mode.
-#   NotPreSpaced- Commands  which should not have a space in front of
-#                 them.
-#   Primitives  - Primitive TeX commands.
-#   PostLink    - Commands which generates a page reference.
-#   OutFormat   - Formats  to use for output.  See the -f & -v switch
-#                 in the main doc.
-#   QuoteStyle  - Either  "Traditional"  or "Logical".  See main doc,
-#                 warning 38.
-#   Silent      - These  commands  do not produce any textual output;
-#                 and are thus allowed to have a space after them.
-#   TabSize     - Tab size you are using.
-#   TeXInputs   - Paths to search \input and \include files for.
-#   UserWarn*   - These  strings  will be searched for throughout the
-#                 text.
-#   VerbEnvir   - Environments which contents should be ignored.
-#   VerbClear   - String we will overwrite unwanted data with.
-#   WipeArg     - Commands  (with  arguments) which should be ignored
-#                 in the checking.
-#
-
-
-#####################################################################
-#
-# Enter which type of  quote-style you are using here.  Currently, we
-# support the following styles:
-#
-#  Style        Example of use
-#  Traditional  "An example," he said, "would be great."
-#  Logical      "An example", he said, "would be great".
-#
-
-QuoteStyle = Logical
-
-#####################################################################
-#
-# Enter  here what interval you have between your tabs.  Only regular
-# intervals are supported.
-#
-
-TabSize = 8
-
-#####################################################################
-#
-# Here, you can put default commandline options; most users would for
-# instance like to put -v2 here.
-#
-
-CmdLine
-{
-
-}
-
-#####################################################################
-#
-# These  patterns  will  be  searched for through the text; no matter
-# whether   they   appear  as  normal  text,  commands  or  whatever.
-# Currently case-sensitive.  They are not found in comments.
-#
-# I usually define a special command like this:
-#
-# \def\unknown{\large\bf??}
-#
-# which  I use whenever there is some information I don't have at the
-# moment of writing.  Thus, it makes sense to search for it.
-#
-# You should be able to develop your own uses for this.
-#
-
-UserWarn
-{
-
-    \unknown
-###
-#
-# Another example; one should write \chktex or Chk\TeX - never ChkTeX.
-#
-###
-
-    ChkTeX
-}
-[
-
-###
-#
-# You may put case-insensitive patterns here.
-#
-###
-
-]
-
-
-###
-#
-# These patterns will be searched for, no matter whether they appear
-# as normal text, commands or arguments.  However, they will _not_
-# match in verbatim environments.
-#
-# Remember that you have to escape (with a !) the following
-# characters: "#!= as well as spaces and {}[] if they are proceeded by
-# a space.
-#
-# Since these are PCRE regular expressions, you can use (?i) to make
-# the expression case insensitive.  See the man pages (man pcresyntax)
-# or the nicely formatted http://perldoc.perl.org/perlre.html for
-# documentation on the regular expression syntax.  Note however that
-# some the features of perl regular expression are not available such
-# as running code (callouts), and replacing.
-#
-# An initial PCRE comment (?# ... ) can be used change what is
-# displayed, thereby reminding yourself how to fix the problem.
-#
-###
-UserWarnRegex
-{
-
-  (?!#Always! use! \nmid)\\not! *(\||\\mid)
-
-  # capitalize section when saying Section 6.
-  (?!#-1:Capitalize! before! references)PCRE:\b(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
-  (?!#1:Capitalize! before! references)POSIX:([^[:alnum:]]|^)(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
-
-  # spell it out.
-  # PCRE:(?i)\bintro\b(?!#Spell! it! out.! This! comment! is! not! used.)
-  # POSIX:([^[:alnum:]]|^)intro([^[:alnum:]]|$)
-
-  # Pretty tables--see http://texdoc.net/texmf-dist/doc/latex/booktabs/booktabs.pdf
-  (?!#-2:Use! \toprule,! midrule,! or! \bottomrule! from! booktabs)\\hline
-  # This relies on it being on a single line, and not having anything
-  # else on that line.  With PCRE we could match balanced [] and {},
-  # but I wonder if it's worth the complexity...
-  (?!#-2:Vertical! rules! in! tables! are! ugly)\\begin\{(array|tabularx?\*?)\}(\[.*\])?\{.*\|.*\}
-
-}
-
-
-#####################################################################
-#
-# Here you can list the path of where ChkTeX should look for files it
-# \inputs.   The  // postfix is now supported; if you append a double
-# path-separator we'll recursively search that directory directories.
-# MS-DOS users must append \\ instead, e.g.  "C:\EMTEX\\".
-#
-# If you under either MS-DOS or UNIX wish to search an entire
-# partition or the complete directory tree, you must use *three*
-# slashes, e.g. "c:\\\" or "///". This may be considered to be a bug.
-#
-# By  default,  we'll  search the current directory (not recursively,
-# put  "//"  in the list for this); any paths specified below will be
-# searched in addition to this.
-#
-
-TeXInputs
-{
-
-}
-
-#####################################################################
-#
-# Here you may specify more output formats for use with the -v option,
-# it simply indexes  into this list.  Remember to use ! instead of \,
-# though.
-#
-# For explanation of how % fields expand; look at ChkTeX.{dvi,ps,pdf}.
-#
-# We will by default select entry number _two_ in this list (we count
-# from 0), and -v without any parameter selects entry number _three_.
-#
-
-OutFormat
-{
-
-# -v0; silent mode
-%f%b%l%b%c%b%n%b%m!n
-
-# -v1; normal mode
-"%k %n in %f line %l: %m!n%r%s%t!n%u!n"
-
-# -v2; fancy mode
-"%k %n in %f line %l: %m!n%r%i%s%I%t!n!n"
-
-# -v3; lacheck mode
-"!"%f!", line %l: %m!n"
-
-# -v4; verbose lacheck mode
-"!"%f!", line %l: %m!n%r%s%t!n%u!n"
-
-# -v5; no line number, ease auto-test
-"%k %n in %f: %m!n%r%s%t!n%u!n"
-
-# -v6; emacs compilation mode
-"!"%f!", line %l.%c:(#%n) %m!n"
-
-}
-
-
-
-#####################################################################
-#
-# These commands should  be ignored when detecting  whether a command
-# is ended by a space.  You can specify regular expressions in the []
-# section in  case you  have many  custom macros  that can  be safely
-# terminated with a space.
-#
-
-Silent
-{
-    \rm \em \bf \it \sl \sf \sc \tt \selectfont
-    \rmfamily \sffamily \ttfamily \mdseries \bfseries
-    \slshape \scshape \relax
-    \vskip \pagebreak \nopagebreak
-
-    \textrm \textem \textbf \textit \textsl \textsf \textsc \texttt
-
-    \clearpage \ddots \dotfill \flushbottom \fussy \indent \linebreak
-    \onecolumn \pagebreak \pushtabs \poptabs \scriptsize \sloppy
-    \twocolumn \vdots
-    \today \kill \newline \thicklines \thinlines
-
-    \columnsep \space \item \tiny \footnotesize \small \normalsize
-    \normal \large \Large \LARGE \huge \Huge \printindex
-
-    \newpage \listoffigures \listoftables \tableofcontents
-    \maketitle \makeindex
-
-    \hline \hrule \vrule
-
-    \centering
-
-    \bigskip \medskip \smallskip
-
-    \noindent \expandafter
-
-    \makeatletter \makeatother
-
-    \columnseprule
-
-    \textwidth \textheight \hsize \vsize
-
-    \if \fi \else
-
-    \csname \endcsname
-
-    \z@ \p@ \@warning \typeout
-
-    \dots \ldots \input \endinput \nextline \leavevmode \cdots
-    \appendix \listfiles \and \quad
-    \hskip \vfill \vfil \hfill \hfil \topmargin \oddsidemargin
-    \frenchspacing \nonfrenchspacing
-    \begingroup \endgroup \par
-
-    \vrefwarning \upshape \headheight \headsep \hoffset \voffset
-    \cdot \qquad
-    \left \right
-    \qedhere
-
-    \xspace
-
-    \addlinespace \cr \fill \frontmatter
-    \toprule \midrule \bottomrule
-
-}[
-# Here you can put regular expressions to match Silent macros.  It was
-# designed for  the case where you  have many custom macros  sharing a
-# common prefix, but can of course be used for other things.
-
-# Support ConTeXt to at least some extent
-\\start.* \\stop.*
-
-]
-
-#####################################################################
-#
-# Here,  you  can  specify the length of various dashes.  We sort the
-# dash according to which type of characters that are on the left and
-# right of it.  We are only conclusive if they are the same.
-#
-# We associate as follows:
-#
-#     Name        Type of character on each side
-#     HyphDash    Alphabetic (foo-bar)
-#     NumDash     Numeric (2--3)
-#     WordDash    Space (like this --- see?)
-#
-# Below you specify how many dashes which are legal in each case.  We
-# define 0 as  a magic constant which always generates an error.  You
-# may specify more than one legal dash-length.
-#
-# Let's look at an example.  You use the following dash-syntax:
-#
-#     foo-bar
-#     2--3
-#     like this---see?
-#
-#
-# HYPHDASH { 1 3 }        # Either a hyphen, or inter-word
-# NUMDASH { 2 }           # Between words
-# WORDDASH { 0 }          # We never use this
-#
-
-HyphDash
-{
-    1 3
-}
-
-NumDash
-{
-    2
-}
-
-WordDash
-{
-    3
-}
-
-#####################################################################
-#
-# Here are exceptions to the dash rules above.  For example, an
-# n-dash -- between words is usually wrong, but in some cases it is
-# correct, such as when naming a theorem.  The Birch--Swinnerton-Dyer
-# conjecture is one example where the difference matters.  You can
-# tell that Birch is one person and Swinnerton-Dyer is another.
-#
-# Adding line suppressions for these is possible, but can quickly
-# become tedious if a certain theorem is referenced often.  For this
-# reason exceptions can be specified here.  They are case-sensitive.
-#
-
-DashExcpt
-{
-    Birch--Swinnerton-Dyer
-}
-
-#####################################################################
-#
-# This  keyword  indicates commands  whose argument isn't LaTeX code,
-# and thus should be ignored.
-#
-# After  the command,  you may  place  arguments that  you wish  that
-# should be wiped  in the process; use [] for  optional arguments, {}
-# for  required ones  and *  if the  command supports  an alternative
-# variant.  These should be separated  from the command with a colon.
-# Some  commands (e.g.  \cmidrule)  use ()  to  delimit and  optional
-# argument and so this syntax is supported as well.
-#
-# For  instance,  if  you would like to wipe the \newcommand command,
-# you would declare it as \newcommand:*[][]{}
-#
-# These  commands may be "executed" before they're wiped, so you will
-# typically also wish to list filehandling commands and similar here.
-#
-
-WipeArg
-{
-    \label:{} \ref:{} \eqref:{} \vref:{} \pageref:{} \index:[]{}
-    \cite:[][]{} \nocite:{}
-    \input:{} \verbatiminput:[]{} \listinginput:[]{}{}
-    \verbatimtabinput:[]{} \include:{} \includeonly:{}
-    \bibitem:[]{}
-    \cline:{} \cmidrule:[](){}
-    \href:{}{}
-    # Cleveref -- there are many others that could be here as well...
-    \cref:*{} \cpageref:*{} \crefrange:*{}{} \cpagerefrange:*{}{}
-    \Cref:*{} \Cpageref:*{} \Crefrange:*{}{} \Cpagerefrange:*{}{}
-    # natbib
-    \citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{}
-    \Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{}
-    \citetext:{} \citeyear:*{} \citeyearpar:{}
-    # tipa which uses "
-    \textipa:{}
-}
-
-#####################################################################
-#
-# These environments contain material which will be typeset as
-# mathematics by LaTeX.  This turns on/off some warnings.
-#
-# We will automagically append a * to each keyword.
-#
-
-MathEnvir
-{
-    displaymath math eqnarray array equation
-    align alignat gather flalign multline
-}
-
-#####################################################################
-#
-# These commands contain material which will be typeset as mathematics
-# by LaTeX.  The commands are assumed to have one mandatory argument
-# which is in math mode.  This turns on/off some warnings.
-#
-
-MathCmd
-{
-    \ensuremath
-}
-
-#####################################################################
-#
-# These commands contain material which will _not_ be typeset as
-# mathematics by LaTeX even if it would otherwise be in mathmode.  The
-# commands are assumed to have one mandatory argument which is in text
-# mode.  This turns on/off some warnings.
-#
-
-TextCmd
-{
-    \text \intertext \shortintertext \mbox
-}
-
-#####################################################################
-#
-# These  environments  contains  material  which  contents  should be
-# ignored.
-#
-# We will automagically append a * to each keyword.
-#
-
-VerbEnvir
-{
-    verbatim comment listing verbatimtab rawhtml errexam picture texdraw
-    filecontents pgfpicture tikzpicture minted lstlisting IPA
-}
-
-#####################################################################
-#
-# ChkTeX  does  automagically  catch  most abbreviations; the ones we
-# need  to  list here, are those which are most likely to be followed
-# by a word with an upper-case letter (that is not the beginning of a
-# new sentence).
-#
-# The case-insensitive abbreviations are not really case-insensitive,
-# it seems to be more  practical to  only let  the first character be
-# case-insensitive, while the remaining are case-sensitive.
-#
-# To  speed  up the searching process somewhat, we require that these
-# end in a `.', this should not be a problem.
-#
-# Much  of  this  work (both the abbreviations below, and the regexps
-# necessary  to catch the remaining automatically) have been provided
-# by Russ Bubley, <russ at scs.leeds.ac.uk>.
-#
-
-Abbrev
-{
-# Ordinals
-1st. 2nd. 3rd. 4th.
-# Titles
-Mr. Mrs. Miss. Ms. Dr. Prof. St.
-
-#
-# Days
-# Mon. Tue. Wed. Thu. Fri. Sat. Sun.
-#
-# Months
-# Jan. Feb. Mar. Apr. May. Jun. Jul. Aug. Sep. Oct. Nov. Dec.
-#
-# Letters
-# Kt. Jr.
-#
-# Corporate
-# Co. Ltd.
-#
-# Addresses
-# Rd. Dr. St. Ave. Cres. Gdns. Sq. Circ. Terr. Pl. Arc. La. Clo. Ho. Est. Gn.
-#
-# Misc.
-# oe. pbab. ps. rsvp. Tx.
-}
-[
-###
-#
-# The first letter is case-insensitive in the abbrevs in this
-# list. Due to the nature of the checking algorithm used for
-# this, entries consisting of only one character will be
-# silently ignored.
-#
-##
-
-# Latin
-# cf. "et al." etc. qed. qv. viz.
-#
-# Corporate
-# inc. plc.
-#
-# Misc
-# fax. pcs. qty. tel. misc.
-]
-
-#####################################################################
-#
-# Commands which accent characters, meaning that \i or \j (\imath and
-# \jmath in mathmode) should be used instead of `i' and `j'
-#
-
-IJAccent
-{
-    \hat \check \breve \acute \grave \tilde \bar \vec \dot \ddot
-
-    \' \` \^ \" \~ \= \. \u \v \H \t
-
-###
-#
-# The  remaining  accent commands (\c,\d,\b) put their accent _under_
-# the  character,  not above, and should thus be used with normal i's
-# and j's.
-#
-###
-
-}
-
-#####################################################################
-#
-# Commands   which,  when  the  group  is  terminated,  needs  italic
-# correction.
-#
-
-Italic
-{
-    \it \em \sl
-    \itshape \slshape
-}
-
-#####################################################################
-#
-# Commands which makes the font non-italic.
-#
-
-NonItalic
-{
-    \bf \rm \sf \tt \sc
-    \upshape
-}
-
-#####################################################################
-#
-# Commands which  put their argument  into italic (and  thus possibly
-# needs italic correction in the end).
-#
-# This is currently  empty, since \textit, \textsl and  \emph do that
-# automatically.
-#
-
-ItalCmd
-{
-}
-
-#####################################################################
-#
-# These  commands  all have in common that a pagebreak right in front
-# of  them  is  highly  undesirable; thus there should be no space in
-# front of them.
-#
-
-PostLink
-{
-    \index \label
-}
-
-#####################################################################
-#
-# These commands should not have a space in front of them for various
-# reasons.   I.e.   much  the  same as POSTLINK, but produces another
-# warning.
-#
-
-NotPreSpaced
-{
-    \footnote \footnotemark \/
-}
-
-#####################################################################
-#
-# The  commands  listed  here,  should be prepended with a `~', as in
-# "look  in  table~\ref{foo}", to avoid the references being split
-# across lines.
-#
-
-Linker
-{
-    \ref \vref \pageref \eqref \cite
-}
-
-#####################################################################
-#
-# Commands/characters  which  should  have  \cdots  in  between, e.g.
-# $1+2+3+\cdots+n$.
-#
-
-CenterDots
-{
-    = + - \cdot \div & \times \geq \leq < >
-}
-
-#####################################################################
-#
-# Commands/characters  which  should  have  \ldots  in  between, e.g.
-# $1,2,3,\ldots,n$.
-#
-
-LowDots
-{
-    . , ;
-}
-
-#####################################################################
-#
-# In maths mode, there are certain aliases for mathematical operators
-# like  sin, cos, etc.  Ignore the leading backslash in the commands,
-# and so forth.  You should list these below.
-#
-
-MathRoman
-{
-    log lg ln lim limsup liminf sin arcsin sinh cos arccos cosh tan
-    arctan tanh cot coth sec csc max min sup inf arg ker dim hom det
-    exp Pr gcd deg bmod pmod mod
-}
-
-#####################################################################
-#
-# These  TeX commands  have become  unnecessary, as  there are  LaTeX
-# commands that  does the same.   Purists should thus avoid  these in
-# their code.
-#
-# (These are a spell-corrected version of those lacheck uses).
-#
-
-Primitives
-{
-   \above \advance \catcode \chardef \closein \closeout \copy \count
-   \countdef \cr \crcr \csname \delcode \dimendef \dimen \divide
-   \expandafter \font \hskip \vskip \openout
-}
-
-#####################################################################
-#
-# Format: \command:characters
-#
-# We'll emit a warning if any of characters are found after the
-# command.
-#
-
-NoCharNext
-{
-   \left:{}$ \right:{}$
-}
-
-#####################################################################
-#
-# We're killing \verb at ...@ commands and the arguments of the commands
-# listed above in WipeArg by overwriting them with a string or a
-# single character.
-#
-# This should not  contain an alphabetic character (in  case the user
-# writes  (\foo\verb at bar@),  neither  should  it contain  be  one  of
-# LaTeX's  reserved  characters  (`#$%&~_^\{}'), or  any  parenthesis
-# character  ('()[]{}').   If  possible,   don't  use  a  punctuation
-# character, either, or any spacing character.
-#
-# The asterisk is also unsuitable, as some commands behave in another
-# way if  they are  appended with  an asterisk.   Which more  or less
-# leaves us with the pipe.
-#
-# Please  note  that  this  may  also  be  a  _string_, which will be
-# repeated until the proper length is reached.
-#
-
-VerbClear = "|"
-
-#
-# All for now - have fun.
-#
-#####################################################################

Added: trunk/Build/source/texk/chktex/chktex-src/chktexrc.in
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/chktexrc.in	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/chktexrc.in	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,989 @@
+#### -*- conf -*- ####
+##### TODO: Do I want a TOC? Index?...
+##### TODO: Use something besides errexam?
+##### TODO: Color/frame for default value
+###############################################################################
+#### This fiie is input to a simple "tangle" process.  The extions of .in is
+#### a little misleading in that it's not managed by autotools or m4.  Sorry.
+####
+#### Two different files are created from this file by calling MakeChkTeXRC.pl
+#### 1. chktexrc, a self-documenting chktecrc example
+####   a. Lines with 3 (or more) leading #'s are discarded
+####   b. Other lines are kept as is
+#### 2. ChkTeXRC.tex, LaTeX documentation for chktecrc.
+####   a. Lines with 4 (or more) leading #'s are discarded
+####   b. Lines with 0 or 2 (exactly) leading #'s are discarded
+####   c. Lines with 1 or 3 (exactly) leading #'s are turned in (LaTeX-only) lines
+####
+#### In other words
+####   1. Lines with 1 or 3 leading #'s are included in the LaTeX
+####      documentation with the  #'s stripped off
+####   2. Lines with 0, 1 or 2 are included as is in the example
+####      chktexrc file
+####  #
+###############################################################################
+##  Example resource file for ChkTeX.
+##
+##  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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+##
+## For more information visit https://www.nongnu.org/chktex/
+##
+
+### \subsubsection{The \rsrc\ file format}
+## chktexrc file format
+#
+# The chktecrc file is essentially a bunch of variable assignments.
+# There are two types of variables, those that take single items and
+# those that take lists.
+#
+# In turn, there are two types of lists, case-sensitive and case-insentive.
+# Case-sensitive lists are delimited by @verb@{@endverb@ and @verb@}@endverb@
+# while case-insensitive are delimited by @verb@[@endverb@ and @verb@]@endverb at .
+# Only some variables support case insensitive lists, since in many
+# cases it doesn't make sense and would be unnecessarily slow.  Those
+# variables that @emph at do@endemph@ support case-insensitive lists will be marked as
+# such throughout the file.
+#
+# Variables can be set with or without an equals sign.  If included, the
+# @verb@=@endverb@ causes the variable to be overwritten.  This is the only thing
+# that makes sense for varibles taking a single item and so we always
+# include it in that case.  For list variables, omitting the equals
+# sign will cause the items in the list to be appended instead of
+# overwriting the entire list.
+#
+# Below are all the ways in which a variable can be set.  Note that lists
+# can span lines, though this is not shown here for brevity.
+#
+#
+### \begin{verbatim}
+# VariableName = item
+# # Overwrites
+# VariableName = { Item1 Item2 ... }
+# VariableName = [ item1 item2 ... ]
+# VariableName = { Item1 Item2 ... } [ item item ... ]
+# VariableName = [ item1 item2 ... ] { Item Item ... }
+# # Appends
+# VariableName { Item3 Item4 ... }
+# VariableName [ item3 item4 ... ]
+# VariableName { Item3 Item4 ... } [ item item ... ]
+# VariableName [ item3 item4 ... ] { Item Item ... }
+### \end{verbatim}
+#
+#
+# Comments begin with @verb@#@endverb@, and continue for the end of the line.
+# Blank lines plus leading and trailing spaces are ignored.
+# Items are separated by spaces.
+# Newlines are considered spaces, but can't be escaped.
+# You can use double quotes @verb@"@endverb@ to surround an item with spaces, or you can
+# escape spaces as described later.
+#
+# Detection of tokens like @verb@}@endverb@ are somewhat context sensitve---they
+# have to be preceded by a space (or newline).  This allows them to be
+# part of an item without escaping.  Since some variables require such
+# characters, this generally makes life easier.
+#
+# To include characters that might otherwise interfere, escape
+# sequences are provided.  They are similar to those in C, but use
+# @verb@!@endverb@ instead of @verb@\@endverb@ for obvious reasons.
+# The entire list is below.
+#
+### \vspace{0.5\baselineskip}
+### \begin{tabular}{p{0.2\textwidth}p{0.7\textwidth}}
+#   @bf Sequence   @&@ @bf Resulting character @\\@
+#   @verb@! @endverb@      @&@  Space @\\@
+#   @verb@!"@endverb@      @&@  @verb@"@endverb@ @\\@
+#   @verb@!#@endverb@      @&@  @verb@#@endverb@ @\\@
+#   @verb@!!@endverb@      @&@  @verb@!@endverb@ @\\@
+#   @verb@!{@endverb@      @&@  @verb@{@endverb@ @\\@
+#   @verb@!}@endverb@      @&@  @verb@}@endverb@ @\\@
+#   @verb@![@endverb@      @&@  @verb@[@endverb@ @\\@
+#   @verb@!]@endverb@      @&@  @verb@]@endverb@ @\\@
+#   @verb@!=@endverb@      @&@  @verb@=@endverb@ @\\@
+#   @verb@!b at endverb@      @&@  Backspace @\\@
+#   @verb@!n at endverb@      @&@  New line @\\@
+#   @verb@!r at endverb@      @&@  Carriage return @\\@
+#   @verb@!t at endverb@      @&@  Tab @\\@
+#   @verb@!f at endverb@      @&@  Form feed @\\@
+#   @verb@!xNN at endverb@    @&@  NN must be a hexadecimal number (00 - ff),
+#                  both characters must be included. @\\@
+#   @verb@!dNNN at endverb@   @&@  NNN must be a decimal number (000 - 255), all
+#                  three characters must be included.
+#                  Unspecified results if NNN > 377. @\\@
+#   @verb@!NNN at endverb@    @&@  NNN must be a octal number (000 - 377), all
+#                  three characters must be included.
+#                  Unspecified results if NNN > 377.
+### \end{tabular}
+
+### \subsubsection{Settings in the \rsrc\ file}
+## Available Settings
+#
+# All avaiable settings follow.
+#
+
+## QuoteStyle
+### \medskip
+### \begin{chktexrcsimplevar}{QuoteStyle}
+#
+# The type of quote-style you are using.  There are currently two
+# styles:
+#
+#  Traditional:
+###  \begin{errexam}
+#      "An example," he said, "would be great."
+###  \end{errexam}
+#
+#  Logical:
+###  \begin{errexam}
+#      "An example", he said, "would be great".
+###  \end{errexam}
+#
+### \chktexrcdefault\begin{verbatim}
+QuoteStyle = Logical
+### \end{verbatim}
+### \end{chktexrcsimplevar}
+
+
+## TabSize
+### \begin{chktexrcsimplevar}{TabSize}
+#
+# The width of a tab.  This is used for formatting the error message.
+# Only positive integers are allowed.
+#
+### \chktexrcdefault\begin{verbatim}
+TabSize = 8
+### \end{verbatim}
+### \end{chktexrcsimplevar}
+
+
+## CmdSpaceStyle
+### \medskip
+### \begin{chktexrcsimplevar}{CmdSpaceStyle}
+#
+# How to treat a command is followed by punction.  In all cases the
+# warnings are also governed by the main warning settings, namely
+# warnings 12 and 13 about interword and intersentence spacings.
+### These can be found on page~\pageref{warn:interword}.
+#
+# If set to Ignore, then it won't print any warnings when pucntuation
+# follows a command.
+#
+#
+# If CmdSpaceStyle is set to InterWord, then it will print warnings
+# when interword spacing should (potentially) be used.  For example,
+# without a command the following will trigger warning 12
+#
+###  \begin{errexam}
+#     @verb at I've seen a UFOs, etc. in my life. at endverb@
+###  \end{errexam}
+#
+# And if set to InterWord, so will
+#
+###  \begin{errexam}
+#     @verb at I've seen a UFOs, \etc. in my life. at endverb@
+###  \end{errexam}
+#
+#
+# If set to InterSentence, then it will print warnings when
+# intersentence spacing should (potentially) be used.  For example,
+# without a command the following will trigger warning 13
+#
+###  \begin{errexam}
+#     @verb at I've seen an UFO! Right over there!@endverb@
+###  \end{errexam}
+#
+# And if set to InterSentence, so will
+#
+###  \begin{errexam}
+#     @verb at I've seen an \UFO! Right over there!@endverb@
+###  \end{errexam}
+#
+#
+# Setting CmdSpaceStyle to Both will cause warnings to be printed in
+# both cases.
+#
+### \chktexrcdefault\begin{verbatim}
+CmdSpaceStyle = Ignore
+### \end{verbatim}
+### \end{chktexrcsimplevar}
+
+
+## CmdLine
+### \begin{chktexrclistvar}{CmdLine}
+#
+# Default command-line options.  For instance, you might like to put
+# @verb at -v2@endverb@ here.
+#
+### \chktexrcdefault\begin{verbatim}
+CmdLine
+{
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## UserWarn
+### \begin{chktexrclistvar*}{UserWarn}
+#
+# Arbitrary strings to warn about.  You can put here to help you find
+# your own little foibles.  See also at ref@UserWarnRegex at endref@.
+#
+# These patterns will be searched for throughout the text; regardless
+# of whether they appear as normal text, commands, in math mode, etc.
+# They are @emph at not@endemph@ found in comments.
+#
+# Suppose you define a special command like this:
+### \begin{verbatim}
+#    \def\unknown{\large\bf??}
+### \end{verbatim}
+# which you use whenever you don't have some information at the time
+# of writing.  Thus, it makes sense to warn on it, and this is a
+# convenient way to do so.
+#
+### \chktexrcdefault\begin{verbatim}
+UserWarn
+{
+    \unknown
+    # One should write \chktex or Chk\TeX - never ChkTeX.
+    ChkTeX
+}
+[ # You may put case-insensitive patterns here.
+]
+### \end{verbatim}
+### \end{chktexrclistvar*}
+
+
+## UserWarnRegex
+### \begin{chktexrclistvar}{UserWarnRegex}
+#
+# A more sophisticated version of at ref@UserWarn at endref@ using regular
+# expressions.  Use of these will be automatically disabled if @ChkTeX@
+# was built without regular expression support.  Because @ChkTeX@ can be
+# with support for either POSIX or PCRE flavors of regular expression,
+# some of the following will not apply in all cases.  An expression
+# can be defined only when PCRE is enabled by prepending the
+# expression with @verb at PCRE:@endverb@ and similarly with @verb at POSIX:@endverb at .
+#
+# These patterns will be searched for, no matter whether they appear
+# as normal text, commands, or arguments.  However, they will @emph at not@endemph@
+# match in verbatim environments (see at ref@VerbEnvir at endref@).
+#
+# Remember that you have to escape (with a @verb@!@endverb@) the characters
+# @verb@"#!=@endverb@, as well as spaces and @verb@{}[]@endverb@ if they are
+# proceeded by a space.
+#
+# When using PCRE regular expressions, you can use @verb@(?i)@endverb@ to make
+# the expression case insensitive.  See the man pages (man pcresyntax)
+# or the nicely formatted http://perldoc.perl.org/perlre.html for
+# documentation on the regular expression syntax.  Note, however, that
+# some the features of perl regular expression are not available such
+# as running code (callouts), and replacing.
+#
+# An initial PCRE-style comment @verb@(?# ... )@endverb@ can be used
+# to change what is displayed, thereby reminding yourself how to fix
+# the problem.  This works even for POSIX expressions.
+#
+### \chktexrcdefault\begin{verbatim}
+UserWarnRegex
+{
+    (?!#Always! use! \nmid)\\not! *(\||\\mid)
+
+    # Capitalize section when saying Section 6.
+    (?!#-1:Capitalize! before! references)PCRE:\b(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
+    (?!#1:Capitalize! before! references)POSIX:([^[:alnum:]]|^)(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
+
+    # Spell it introduction
+    # PCRE:(?i)\bintro\b(?!#Spell! it! out.! This! comment! is! not! used.)
+    # POSIX:([^[:alnum:]]|^)intro([^[:alnum:]]|$)
+
+    # Pretty tables--see http://texdoc.net/texmf-dist/doc/latex/booktabs/booktabs.pdf
+    (?!#-2:Use! \toprule,! midrule,! or! \bottomrule! from! booktabs)\\hline
+    # This relies on it being on a single line, and not having anything
+    # else on that line.  With PCRE we could match balanced [] and {},
+    # but I wonder if it's worth the complexity...
+    (?!#-2:Vertical! rules! in! tables! are! ugly)\\begin\{(array|tabularx?\*?)\}(\[.*\])?\{.*\|.*\}
+
+    (?!#-3:Optional! arguments! []! inside! optional! arguments! []! must! be! enclosed! in! {})\[(?!![^\]\[{}]*{(?!![^\]\[{}]*}))[^\]]*\[
+
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## TeXInputs
+### \begin{chktexrclistvar}{TeXInputs}
+#
+# A list of paths where @ChkTeX@ should look for files it @verb@\input at endverb@s.
+# By default, the current directory is searched (not recursively, use
+# @verb@//@endverb@ for that, see below).
+#
+# A @verb@//@endverb@ postfix is supported:
+# if you append a double path-separator we'll recursively search that
+# directory's directories.  MS-DOS users must append @verb@\\@endverb@
+# instead, e.g. @verb at C:\EMTEX\\@endverb at .  In order to search an
+# entire directory tree, you must use @emph at three@endemph@ slashes,
+# e.g. @verb at c:\\\@endverb@ or @verb@///@endverb at .
+#
+### \chktexrcdefault\begin{verbatim}
+TeXInputs
+{
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## OutFormat
+### \begin{chktexrclistvar}{OutFormat}
+#
+# Output formats which can be selected from the command-line.  The
+# @verb at -v@endverb@ option simply indexes into this list.  By default, entry number
+# @emph at two@endemph@ in this list is chosen (counting from 0), and @verb at -v@endverb@
+# without any parameter selects entry number @emph at three@endemph at .
+#
+# For explanation of the @verb@%@endverb@ format specifiers see the
+# documentation of the @verb at --format@endverb@ command-line argument
+### \begin{comment}
+# in the manual.
+### \end{comment}
+### on page~\pageref{clarg:format}.
+#
+# Recall that to use @verb@!@endverb@ is the escape character, not @verb@\@endverb at .
+#
+### \chktexrcdefault\begin{verbatim}
+OutFormat
+{
+    # -v0; silent mode
+    %f%b%l%b%c%b%n%b%m!n
+    # -v1; normal mode
+    "%k %n in %f line %l: %m!n%r%s%t!n%u!n"
+    # -v2; fancy mode
+    "%k %n in %f line %l: %m!n%r%i%s%I%t!n!n"
+    # -v3; lacheck mode
+    "!"%f!", line %l: %m!n"
+    # -v4; verbose lacheck mode
+    "!"%f!", line %l: %m!n%r%s%t!n%u!n"
+    # -v5; no line number, ease auto-test
+    "%k %n in %f: %m!n%r%s%t!n%u!n"
+    # -v6; emacs compilation mode
+    "!"%f!", line %l.%c:(#%n) %m!n"
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Silent
+### \begin{chktexrclistvar*}{Silent}
+#
+# Commands which should not trigger a warning if terminated by a space.
+# This warning will not trigger in math mode.
+#
+# You can also specify regular expressions in the @verb@[]@endverb@
+# section in case you have many custom macros that can be safely
+# terminated with a space.
+#
+### \chktexrcdefault\begin{verbatim}
+Silent
+{
+    \rm \em \bf \it \sl \sf \sc \tt \selectfont
+    \rmfamily \sffamily \ttfamily \mdseries \bfseries \itshape
+    \slshape \scshape \relax
+    \vskip \pagebreak \nopagebreak
+
+    \textrm \textem \textbf \textit \textsl \textsf \textsc \texttt
+
+    \clearpage \ddots \dotfill \flushbottom \fussy \indent \linebreak
+    \onecolumn \pagebreak \pushtabs \poptabs \scriptsize \sloppy
+    \twocolumn \vdots
+    \today \kill \newline \thicklines \thinlines
+
+    \columnsep \space \item \tiny \footnotesize \small \normalsize
+    \normal \large \Large \LARGE \huge \Huge \printindex
+
+    \newpage \listoffigures \listoftables \tableofcontents
+    \maketitle \makeindex
+
+    \hline \hrule \vrule
+
+    \centering
+
+    \noindent \expandafter
+
+    \makeatletter \makeatother
+
+    \columnseprule
+
+    \textwidth \textheight \hsize \vsize
+
+    \if \fi \else
+
+    \csname \endcsname
+
+    \z@ \p@ \@warning \typeout
+
+    \dots \ldots \input \endinput \nextline \leavevmode \cdots
+    \appendix \listfiles \and \quad \bigskip \medskip \smallskip
+    \hskip \vfill \vfil \hfill \hfil \topmargin \oddsidemargin
+    \frenchspacing \nonfrenchspacing
+    \begingroup \endgroup \par
+
+    \vrefwarning \upshape \headheight \headsep \hoffset \voffset
+    \cdot \qquad \left \right \qedhere \xspace
+
+    \addlinespace \cr \fill \frontmatter
+    \toprule \midrule \bottomrule
+}[
+    # Here you can put regular expressions to match Silent macros.  It
+    # was designed for use with many custom macros sharing a common
+    # prefix, but can of course be used for other things.
+
+    # Support ConTeXt to at least some extent
+    \\start.* \\stop.*
+]
+### \end{verbatim}
+### \end{chktexrclistvar*}
+
+
+## HyphDash
+### \begin{chktexrclistvar}{HyphDash}
+#
+# The number of dashes allowed between two alphabetic characters.
+# Use 0 to always return an error.  For example:
+###  \begin{errexam}
+#      foo-bar @\\@
+#      Use of two--dashes is not usually allowed in English. @\\@
+#      like this---see?
+###  \end{errexam}
+#
+# For English, this will often be a single dash (hyphen).  If you like
+# m-dashes with no spaces between them and the surrounding words, then
+# it should include 3 as well.  There @emph at are@endemph@ cases when an n-dash
+# is valid between two alphabetic characters.  See at ref@DashExcpt at endref@.
+#
+### \chktexrcdefault\begin{verbatim}
+HyphDash { 1 3 }
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## NumDash
+### \begin{chktexrclistvar}{NumDash}
+#
+# The number of dashes allowed between two numeric characters.
+# Use 0 to always return an error.  This does @emph at not@endemph@ apply in
+# math mode.  For example:
+###  \begin{errexam}
+#      123--456 is a range @\\@
+#      $12-4$ \% okay because it's in math mode
+###  \end{errexam}
+#
+# For English, this should be 2 because an n-dash is used to indicate
+# a range of numbers and subtraction should be in math mode where this
+# does not apply.
+#
+### \chktexrcdefault\begin{verbatim}
+NumDash  { 2 }
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## WordDash
+### \begin{chktexrclistvar}{WordDash}
+#
+# The number of dashes allowed between two space characters.
+# Use 0 to always return an error.  For example:
+###  \begin{errexam}
+#      not like - this,  @\\@
+#      or like -- this.  @\\@
+#      like this --- see?
+###  \end{errexam}
+#
+### \chktexrcdefault\begin{verbatim}
+WordDash { 3 }
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## DashExcpt
+### \begin{chktexrclistvar}{DashExcpt}
+#
+# Exceptions to the dash rules above.  For example, an n-dash
+# @verb at --@endverb@ between words is usually wrong, but in some cases it is correct,
+# such as when naming a theorem.  The Birch--Swinnerton-Dyer
+# conjecture is one example where the difference matters.  You can
+# tell that Birch is one person and Swinnerton-Dyer is another based
+# on the dashes used.
+#
+# Adding line suppressions for these is possible, but can quickly
+# become tedious if a certain theorem is referenced often.  For this
+# reason exceptions can be specified here.  They are case-sensitive.
+#
+# Unfortunately, there are no warnings if the dashes are surrounded by differing
+# types of characters.  For example:
+###  \begin{errexam}
+#      like this ---see? (space and alphabet)  @\\@
+#      a--123            (number and alphabet) @\\@
+#      a.--b.            (other character, namely @verb at .@endverb@)
+###  \end{errexam}
+# Similarly, no warnings are issued if the hyphenation is correct,
+# according to the other rules, for example:
+###  \begin{errexam}
+#      Birch-Swinnerton-Dyer
+###  \end{errexam}
+#
+### \chktexrcdefault\begin{verbatim}
+DashExcpt
+{
+    Birch--Swinnerton-Dyer
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## WipeArg
+### \begin{chktexrclistvar}{WipeArg}
+#
+# Commands whose arguments aren't @LaTeX@ code, and thus should be
+# ignored.
+#
+# After the command, you may place arguments (separated from the
+# command with a colon) that should be wiped.  Use @verb@[]@endverb@ for optional
+# arguments, @verb@{}@endverb@ for required ones, and @verb@*@endverb@ if the command supports a
+# star variant.  Some commands (e.g.\@ @verb@\cmidrule at endverb@) use @verb@()@endverb@ to
+# delimit an optional argument and so this syntax is supported as well.
+#
+# For instance, if you would like to wipe the @verb@\newcommand at endverb@ command,
+# you would declare it as @verb@\newcommand:*[][]{}@endverb@ since it has a
+# star variant, two optional arguments, and one required argument.
+#
+# These commands may be ``evaluated'' before they're wiped, so you will
+# typically list filehandling commands and similar here.
+#
+### \chktexrcdefault\begin{verbatim}
+WipeArg
+{
+    \label:{} \ref:{} \eqref:{} \vref:{} \pageref:{} \index:[]{}
+    \cite:[][]{} \nocite:{}
+    \input:{} \verbatiminput:[]{} \listinginput:[]{}{}
+    \graphicspath:{}
+    \verbatimtabinput:[]{} \include:{} \includeonly:{}
+    \bibitem:[]{}
+    \cline:{} \cmidrule:[](){}
+    \href:{}{}
+    # Cleveref -- there are many others that could be here as well...
+    \cref:*{} \cpageref:*{} \crefrange:*{}{} \cpagerefrange:*{}{}
+    \Cref:*{} \Cpageref:*{} \Crefrange:*{}{} \Cpagerefrange:*{}{}
+    # natbib
+    \citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{}
+    \Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{}
+    \citetext:{} \citeyear:*{} \citeyearpar:{}
+    # biblatex - not including special commands
+    \autocite:*[][]{} \autocites:*[][]{} \Autocite:*[][]{} \Autocites:*[][]{}
+    \parencite:*[][]{} \parencites:*[][]{} \Parencite:*[][]{} \Parencites:*[][]{}
+    \footcite:*{} \footcites:*[][]{} \Footcite:*[][]{} \Footcites:*[][]{}
+    \textcite:*{} \textcites:*[][]{} \Textcite:*[][]{} \Textcites:*[][]{}
+    \citeauthor:*{} \citeauthors:*[][]{} \Citeauthor:*[][]{} \Citeauthors:*[][]{}
+    \citeyear:*{} \citeyears:*[][]{} \Citeyear:*[][]{} \Citeyears:*[][]{}
+    \citetitle:*{} \citetitles:*[][]{} \Citetitle:*[][]{} \Citetitles:*[][]{}
+    # tipa which uses "
+    \textipa:{}
+    # LuaTeX
+    \directlua:{} \luaescapestring:{}
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## MathEnvir
+### \begin{chktexrclistvar}{MathEnvir}
+#
+# Environments which typeset their contents as mathematics.
+# This turns on/off some warnings.
+#
+# A @verb@*@endverb@ variant is automatically added for each keyword.
+#
+### \chktexrcdefault\begin{verbatim}
+MathEnvir
+{
+    displaymath math eqnarray array equation
+    align alignat gather flalign multline
+    dmath dgroup darray
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## TextEnvir
+### \begin{chktexrclistvar}{TextEnvir}
+#
+# Environments which typeset their contents as text, for use inside
+# mathematics.  This turns on/off some warnings.
+#
+### \chktexrcdefault\begin{verbatim}
+TextEnvir
+{
+    dsuspend
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## MathCmd
+### \begin{chktexrclistvar}{MathCmd}
+#
+# Commands whose argument will be typeset as mathematics.
+# The commands are assumed to have one mandatory argument which is in
+# math mode.  This turns on/off some warnings.
+#
+### \chktexrcdefault\begin{verbatim}
+MathCmd
+{
+    \ensuremath
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## TextCmd
+### \begin{chktexrclistvar}{TextCmd}
+#
+# Commands whose argument will @emph at not@endemph@ be typeset as
+# mathematics even if it would otherwise be in math mode.
+# The commands are assumed to have one mandatory argument which is in
+# text mode.  This turns on/off some warnings.
+#
+### \chktexrcdefault\begin{verbatim}
+TextCmd
+{
+    \text \intertext \shortintertext \mbox \condition
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## VerbEnvir
+### \begin{chktexrclistvar}{VerbEnvir}
+#
+# Environments containing non- at LaTeX@ content of some kind, and
+# therefore should not trigger any warnings.
+#
+# A @verb@*@endverb@ variant is automatically added for each keyword.
+#
+### \chktexrcdefault\begin{verbatim}
+VerbEnvir
+{
+    verbatim comment listing verbatimtab rawhtml errexam picture texdraw
+    filecontents pgfpicture tikzpicture minted lstlisting IPA
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Abbrev
+### \begin{chktexrclistvar*}{Abbrev}
+#
+# Abbreviations not automatically handled by @ChkTeX at .
+#
+# @ChkTeX@ automagically catches most abbreviations; the ones we need to
+# list here, are those which are most likely to be followed by a word
+# with an upper-case letter which is not the beginning of a new
+# sentence.
+#
+# The case-insensitive abbreviations are not fully case-insensitive.
+# Rather, only the first character is case-insensitive, while the
+# remaining characters are case-sensitive.
+#
+# To speed up the searching process somewhat, we require that these
+# end in a @verb at .@endverb@ which should not be a problem in practice.
+#
+# Much of this work (both the abbreviations below, and the regular
+# expressions necessary to catch the remaining automatically) have
+# been provided by Russ Bubley, <russ at scs.leeds.ac.uk>.
+#
+### \chktexrcdefault\begin{verbatim}
+Abbrev
+{
+    # Ordinals
+    1st. 2nd. 3rd. 4th.
+    # Titles
+    Mr. Mrs. Miss. Ms. Dr. Prof. St.
+    #
+    # Days
+    # Mon. Tue. Wed. Thu. Fri. Sat. Sun.
+    #
+    # Months
+    # Jan. Feb. Mar. Apr. May. Jun. Jul. Aug. Sep. Oct. Nov. Dec.
+    #
+    # Letters
+    # Kt. Jr.
+    #
+    # Corporate
+    # Co. Ltd.
+    #
+    # Addresses
+    # Rd. Dr. St. Ave. Cres. Gdns. Sq. Circ. Terr. Pl. Arc. La. Clo. Ho. Est. Gn.
+    #
+    # Misc.
+    # oe. pbab. ps. rsvp. Tx.
+}
+[
+    # The first letter is case-insensitive in the abbrevs in this
+    # list. Due to the nature of the checking algorithm used for
+    # this, entries consisting of only one character will be
+    # silently ignored.
+    #
+    # Latin
+    # cf. "et al." etc. qed. qv. viz.
+    #
+    # Corporate
+    # inc. plc.
+    #
+    # Misc
+    # fax. pcs. qty. tel. misc.
+]
+### \end{verbatim}
+### \end{chktexrclistvar*}
+
+
+## IJAccent
+### \begin{chktexrclistvar}{IJAccent}
+#
+# Commands which add accents above characters.  This means that @verb@\i at endverb@ or @verb@\j at endverb@
+# (@verb@\imath at endverb@ and @verb@\jmath at endverb@ in mathmode) should be used instead of @verb at i@endverb@ and @verb at j@endverb at .
+#
+# Other accent commands such as @verb@\c at endverb@, @verb@\d at endverb@, and @verb@\b at endverb@, put their accent under
+# the character, and thus should be used with normal @verb at i@endverb at s and @verb at j@endverb at s.
+#
+### \chktexrcdefault\begin{verbatim}
+IJAccent
+{
+    \hat \check \breve \acute \grave \tilde \bar \vec \dot \ddot
+    \' \` \^ \" \~ \= \. \u \v \H \t
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Italic
+### \begin{chktexrclistvar}{Italic}
+#
+# Commands which need italic correction when the group is terminated.
+#
+### \chktexrcdefault\begin{verbatim}
+Italic
+{
+    \it \em \sl \itshape \slshape
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## NonItalic
+### \begin{chktexrclistvar}{NonItalic}
+#
+# Commands which makes the font non-italic.
+#
+### \chktexrcdefault\begin{verbatim}
+NonItalic
+{
+    \bf \rm \sf \tt \sc
+    \upshape
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## ItalCmd
+### \begin{chktexrclistvar}{ItalCmd}
+#
+# Commands which put their argument into italic (and thus possibly
+# needs italic correction in the end).
+#
+# This is currently empty, since @verb@\textit at endverb@, @verb@\textsl at endverb@, and @verb@\emph at endverb@
+# automatically add italic corecction.
+#
+### \chktexrcdefault\begin{verbatim}
+ItalCmd
+{
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## PostLink
+### \begin{chktexrclistvar}{PostLink}
+#
+# Commands in front of which a page break is highly undesirable.
+# Thus there should be no space in front of them.
+#
+### \chktexrcdefault\begin{verbatim}
+PostLink
+{
+    \index \label
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## NotPreSpaced
+### \begin{chktexrclistvar}{NotPreSpaced}
+#
+# Commands that should not have a space in front of them for various
+# reasons.  Much the same as at ref@PostLink at endref@, but produces a different warning.
+#
+### \chktexrcdefault\begin{verbatim}
+NotPreSpaced
+{
+    \footnote \footnotemark \/
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Linker
+### \begin{chktexrclistvar}{Linker}
+#
+# Commands that should be prepended with a @verb@~@endverb at .  For example
+###  \begin{errexam}
+#     @verb at look in table~\ref{foo}@endverb@
+###  \end{errexam}
+# to avoid the references being split across lines.
+#
+### \chktexrcdefault\begin{verbatim}
+Linker
+{
+    \ref \vref \pageref \eqref \cite
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## CenterDots
+### \begin{chktexrclistvar}{CenterDots}
+#
+# Commands or characters which should have @verb@\cdots at endverb@ in between.
+# For example, $1+2+3+\cdots+n$.
+#
+### \chktexrcdefault\begin{verbatim}
+CenterDots
+{
+    = + - \cdot \div & \times \geq \leq < >
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## LowDots
+### \begin{chktexrclistvar}{LowDots}
+#
+# Commands or characters which should have @verb@\ldots at endverb@ in between.
+# For example, $1,2,3,\ldots,n$.
+#
+### \chktexrcdefault\begin{verbatim}
+LowDots
+{
+    . , ;
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## MathRoman
+### \begin{chktexrclistvar}{MathRoman}
+#
+# Words that should appear in roman (upright) in math mode.  There are
+# certain aliases for mathematical operators (like sin or cos) that
+# appear in roman rather than the usual italic (slanted) font.
+#
+# These entries do not need a leading slash since the mistake is often
+# to @emph at not@endemph@ include the leading slash.
+#
+### \chktexrcdefault\begin{verbatim}
+MathRoman
+{
+    log lg ln lim limsup liminf sin arcsin sinh cos arccos cosh tan
+    arctan tanh cot coth sec csc max min sup inf arg ker dim hom det
+    exp Pr gcd deg bmod pmod mod
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## Primitives
+### \begin{chktexrclistvar}{Primitives}
+#
+# Commands that are used in @TeX@ but have become unnecessary in
+# @LaTeX@, as there are @LaTeX@ commands which do the same.  Purists
+# should thus avoid these in their code.
+#
+### \chktexrcdefault\begin{verbatim}
+Primitives
+{
+   \above \advance \catcode \chardef \closein \closeout \copy \count
+   \countdef \cr \crcr \csname \delcode \dimendef \dimen \divide
+   \expandafter \font \hskip \vskip \openout
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## NoCharNext
+### \begin{chktexrclistvar}{NoCharNext}
+#
+# Commands and a set of characters that should @emph at not@endemph@ follow them.  For
+# example, in math mode, @verb@\left at endverb@ should be followed by a delimiter
+# which is to change size.  Therefore, it should not be followed by the
+# end of math mode @verb@$@endverb@ or a grouping character @verb@{@endverb@ or @verb@}@endverb at .
+#
+# The format is @verb@\command:characters at endverb@.
+#
+### \chktexrcdefault\begin{verbatim}
+NoCharNext
+{
+   \left:{}$ \right:{}$
+}
+### \end{verbatim}
+### \end{chktexrclistvar}
+
+
+## VerbClear
+### \begin{chktexrcsimplevar}{VerbClear}
+#
+# The character to replace verbatim text with.
+#
+# The arguments of commands listed in at ref@WipeArg at endref@, as well as
+# @verb@\verb+...+ at endverb@ commands, are replaced with an innocuous character
+# to prevent that data from inadvertantly producing a warning.
+#
+# This should not contain an alphabetic character (in case the user
+# writes (@verb@\foo\verb+bar+ at endverb@), neither should it contain be one of
+# @LaTeX@'s reserved characters (@verb@#$%&~_^\{}@endverb@), or any parenthesis
+# character (@verb@()[]{}@endverb@).  If possible, don't use a punctuation
+# character or any spacing characters either.  All of these characters
+# have warnings associated with them and thus could cause spurious
+# warnings to appear.
+#
+# The asterisk is also unsuitable, as some commands behave in another
+# way if they are appended with an asterisk.  Which more or less
+# leaves us with the pipe.
+#
+# Please note that this may also be a @verb at string@endverb@, which will be
+# repeated until the proper length is reached.
+#
+### \chktexrcdefault\begin{verbatim}
+VerbClear = "|"
+### \end{verbatim}
+### \end{chktexrcsimplevar}
+
+
+## That's all for now - Happy @LaTeX at ing!


Property changes on: trunk/Build/source/texk/chktex/chktex-src/chktexrc.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: trunk/Build/source/texk/chktex/chktex-src/configure.ac
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/configure.ac	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/configure.ac	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,193 @@
+dnl
+dnl ChkTeX, configuration file.
+dnl Copyright (C) 1995-96 Jens T. Berger Thielemann
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+dnl
+dnl Contact the author at:
+dnl             Jens Berger
+dnl             Spektrumvn. 4
+dnl             N-0666 Oslo
+dnl             Norway
+dnl             E-mail: <jensthi at ifi.uio.no>
+dnl
+dnl
+
+
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT([ChkTeX],[1.7.8])
+AC_SUBST(SCRIPTS)
+AC_SUBST(BUILT_SCRIPTS)
+AC_SUBST(CLEAN)
+CLEAN=
+
+AC_ARG_ENABLE(pcre,[
+    --enable-pcre:             Use PCRE to allow regular expressions in
+                               user warnings.  (Default:  yes, if available).],,
+enable_pcre=yes)
+
+AC_ARG_ENABLE(posixre,[
+    --enable-posixre:          Use POSIX extended regular expressions in
+                               user warnings.  (Default:  yes, unless using PCRE).],,
+enable_posixre=yes)
+
+AC_ARG_ENABLE(lacheck-replace,[
+    --enable-lacheck-replace:  Installs  a lacheck replacement.  (Default:  no).],,
+enable_lacheck_replace=no)
+
+AC_ARG_ENABLE(debug-info,[
+    --enable-debug-info:       Compile in miscellaneous runtime debugging
+			       information.  (Default: yes).],,
+enable_debug_info=yes)
+
+AC_ARG_ENABLE(coverage-testing,[
+    --enable-coverage-testing: Activate coverage testing with gcov. (Default: no)],,
+enable_coverage_testing=no)
+
+AC_MSG_CHECKING(whether lacheck replacement should be installed)
+if test "$enable_lacheck_replace" = "yes"; then
+  SCRIPTS="$SCRIPTS lacheck"
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING(whether runtime debug info should be used)
+if test "$enable_debug_info" = "yes"; then
+  AC_MSG_RESULT(yes)
+else
+  AC_DEFINE(STRIP_DEBUG, 1, Strip debug info)
+  AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING(whether coverage testing is enabled)
+if test "$enable_coverage_testing" = "yes"; then
+  AC_MSG_RESULT(yes)
+  CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage -O0"
+  CLEAN="${CLEAN} \$(wildcard *.bb *.bbg *.da *.gcov)"
+else
+  AC_MSG_RESULT(no)
+fi
+
+
+dnl Check compiler and flags
+AC_PROG_CC
+AX_CFLAGS_STRICT_PROTOTYPES
+VL_PROG_CC_WARNINGS
+
+dnl Checks for programs.
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MKDIR_P
+AC_PATH_PROGS(PERL5, perl5 perl, no, $PATH:/usr/bin:/usr/local/bin)
+if test "$PERL5" != no; then
+  AC_MSG_CHECKING(whether perl is v5 or higher)
+  if $PERL5 -e 'exit($] >= 5)'; then
+    PERL5=no
+    AC_MSG_RESULT(no)
+  else
+    AC_MSG_RESULT(yes)
+  fi
+fi
+
+if test "$PERL5" != no; then
+    BUILT_SCRIPTS="$BUILT_SCRIPTS deweb"
+    SCRIPTS="$SCRIPTS chkweb"
+else
+    AC_MSG_WARN(chkweb will not be installed since you do not have perl5.)
+fi
+
+AC_CHECK_PROGS(GROFF, 'groff -man -P-bu -Tlatin1' 'nroff -man', 'nroff -man')
+
+AC_PATH_PROG(PDFLATEX, pdflatex, no)
+AC_PATH_PROG(LATEX, latex, no)
+dnl if test "$LATEX" = no; then
+dnl	AC_MSG_ERROR([No LaTeX on the system, cannot find latex program.])
+dnl fi
+
+AC_PATH_PROG(DVIPS, dvips)
+
+AC_PATH_PROG(LYNX, lynx)
+AC_PATH_PROG(LATEX2HTML, latex2html)
+
+dnl Checks for libraries.
+AC_CHECK_LIB(termlib, tgetent)
+AC_CHECK_LIB(termcap, tgetent)
+
+AC_HEADER_DIRENT
+AC_CHECK_HEADERS(limits.h stat.h strings.h stdarg.h dnl
+sys/stat.h termcap.h termlib.h unistd.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+AC_TYPE_UINT64_T
+
+dnl Checks for library functions.
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS(access closedir fileno isatty opendir readdir stat dnl
+strcasecmp strdup strlwr strtol)
+
+dnl Checks for declarations.
+AC_CHECK_DECLS([stpcpy])
+
+dnl Check for PCRE regular expression support
+AC_MSG_CHECKING(whether PCRE regular expressions are enabled)
+AC_MSG_RESULT($enable_pcre)
+if test "$enable_pcre" = "yes"; then
+  AC_CHECK_PROG(WITH_PCRE, pcre-config, yes, no)
+  if test "$WITH_PCRE" = "yes"; then
+    AC_DEFINE(HAVE_PCRE, 1, Whether PCRE can be used for user warnings.)
+    CFLAGS="${CFLAGS} $(pcre-config --cflags-posix)"
+    LDFLAGS="${LDFLAGS} $(pcre-config --libs-posix)"
+  else
+    AC_DEFINE(HAVE_PCRE, 0)
+    AC_MSG_WARN(PCRE library not found.)
+  fi
+else
+    AC_DEFINE(HAVE_PCRE, 0)
+    AC_MSG_WARN(PCRE regular expressions not enabled.)
+fi
+
+dnl Check for POSIX extended regular expression support
+AC_MSG_CHECKING(for POSIX extended regular expressions)
+AC_EGREP_CPP([yes],
+  [#include <regex.h>
+  #ifdef REG_EXTENDED
+  yes
+  # endif
+  ], posix_ere=yes, posix_ere=no)
+AC_MSG_RESULT($posix_ere)
+if test "$WITH_PCRE" = "yes"; then
+    AC_DEFINE(HAVE_POSIX_ERE, 0, Whether POSIX ERE can be used for user warnings.)
+else
+  if test "$enable_posixre" = "yes"; then
+    if test "$posix_ere" = "yes"; then
+      AC_DEFINE(HAVE_POSIX_ERE, 1)
+    else
+      AC_DEFINE(HAVE_POSIX_ERE, 0)
+    fi
+  else
+    AC_DEFINE(HAVE_POSIX_ERE, 0)
+    AC_MSG_WARN(Regular expressions not enabled.)
+  fi
+fi
+
+
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
+AC_CONFIG_FILES([Makefile deweb rmeheader ChkTeX.tex])
+AC_OUTPUT


Property changes on: trunk/Build/source/texk/chktex/chktex-src/configure.ac
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Build/source/texk/chktex/chktex-src/configure.in
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/configure.in	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex-src/configure.in	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,193 +0,0 @@
-dnl
-dnl ChkTeX, configuration file.
-dnl Copyright (C) 1995-96 Jens T. Berger Thielemann
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-dnl
-dnl Contact the author at:
-dnl             Jens Berger
-dnl             Spektrumvn. 4
-dnl             N-0666 Oslo
-dnl             Norway
-dnl             E-mail: <jensthi at ifi.uio.no>
-dnl
-dnl
-
-
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ChkTeX, 1.7.6)
-AC_SUBST(SCRIPTS)
-AC_SUBST(BUILT_SCRIPTS)
-AC_SUBST(CLEAN)
-CLEAN=
-
-AC_ARG_ENABLE(pcre,[
-    --enable-pcre:             Use PCRE to allow regular expressions in
-                               user warnings.  (Default:  yes, if available).],,
-enable_pcre=yes)
-
-AC_ARG_ENABLE(posixre,[
-    --enable-posixre:          Use POSIX extended regular expressions in
-                               user warnings.  (Default:  yes, unless using PCRE).],,
-enable_posixre=yes)
-
-AC_ARG_ENABLE(lacheck-replace,[
-    --enable-lacheck-replace:  Installs  a lacheck replacement.  (Default:  no).],,
-enable_lacheck_replace=no)
-
-AC_ARG_ENABLE(debug-info,[
-    --enable-debug-info:       Compile in miscellaneous runtime debugging
-			       information.  (Default: yes).],,
-enable_debug_info=yes)
-
-AC_ARG_ENABLE(coverage-testing,[
-    --enable-coverage-testing: Activate coverage testing with gcov. (Default: no)],,
-enable_coverage_testing=no)
-
-AC_MSG_CHECKING(whether lacheck replacement should be installed)
-if test "$enable_lacheck_replace" = "yes"; then
-  SCRIPTS="$SCRIPTS lacheck"
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
-fi
-
-AC_MSG_CHECKING(whether runtime debug info should be used)
-if test "$enable_debug_info" = "yes"; then
-  AC_MSG_RESULT(yes)
-else
-  AC_DEFINE(STRIP_DEBUG, 1, Strip debug info)
-  AC_MSG_RESULT(no)
-fi
-
-AC_MSG_CHECKING(whether coverage testing is enabled)
-if test "$enable_coverage_testing" = "yes"; then
-  AC_MSG_RESULT(yes)
-  CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage -O0"
-  CLEAN="${CLEAN} \$(wildcard *.bb *.bbg *.da *.gcov)"
-else
-  AC_MSG_RESULT(no)
-fi
-
-
-dnl Check compiler and flags
-AC_PROG_CC
-AX_CFLAGS_STRICT_PROTOTYPES
-VL_PROG_CC_WARNINGS
-
-dnl Checks for programs.
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_MKDIR_P
-AC_PATH_PROGS(PERL5, perl5 perl, no, $PATH:/usr/bin:/usr/local/bin)
-if test "$PERL5" != no; then
-  AC_MSG_CHECKING(whether perl is v5 or higher)
-  if $PERL5 -e 'exit($] >= 5)'; then
-    PERL5=no
-    AC_MSG_RESULT(no)
-  else
-    AC_MSG_RESULT(yes)
-  fi
-fi
-
-if test "$PERL5" != no; then
-    BUILT_SCRIPTS="$BUILT_SCRIPTS deweb"
-    SCRIPTS="$SCRIPTS chkweb"
-else
-    AC_MSG_WARN(chkweb will not be installed since you do not have perl5.)
-fi
-
-AC_CHECK_PROGS(GROFF, 'groff -man -P-bu -Tlatin1' 'nroff -man', 'nroff -man')
-
-AC_PATH_PROG(LATEX, latex, no)
-dnl if test "$LATEX" = no; then
-dnl	AC_MSG_ERROR([No LaTeX on the system, cannot find latex program.])
-dnl fi
-
-AC_PATH_PROG(DVIPS, dvips)
-
-AC_PATH_PROG(LYNX, lynx)
-AC_PATH_PROG(LATEX2HTML, latex2html)
-
-dnl Checks for libraries.
-AC_CHECK_LIB(termlib, tgetent)
-AC_CHECK_LIB(termcap, tgetent)
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_HEADER_DIRENT
-AC_CHECK_HEADERS(limits.h stat.h strings.h stdarg.h dnl
-sys/stat.h termcap.h termlib.h unistd.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_TYPE_UINT64_T
-
-dnl Checks for library functions.
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(access closedir fileno isatty opendir readdir stat dnl
-strcasecmp strdup strlwr strtol)
-
-dnl Checks for declarations.
-AC_CHECK_DECLS([stpcpy])
-
-dnl Check for PCRE regular expression support
-AC_MSG_CHECKING(whether PCRE regular expressions are enabled)
-AC_MSG_RESULT($enable_pcre)
-if test "$enable_pcre" = "yes"; then
-  AC_CHECK_PROG(WITH_PCRE, pcre-config, yes, no)
-  if test "$WITH_PCRE" = "yes"; then
-    AC_DEFINE(HAVE_PCRE, 1, Whether PCRE can be used for user warnings.)
-    CFLAGS="${CFLAGS} $(pcre-config --cflags-posix)"
-    LDFLAGS="${LDFLAGS} $(pcre-config --libs-posix)"
-  else
-    AC_DEFINE(HAVE_PCRE, 0)
-    AC_MSG_WARN(PCRE library not found.)
-  fi
-else
-    AC_DEFINE(HAVE_PCRE, 0)
-    AC_MSG_WARN(PCRE regular expressions not enabled.)
-fi
-
-dnl Check for POSIX extended regular expression support
-AC_MSG_CHECKING(for POSIX extended regular expressions)
-AC_EGREP_CPP([yes],
-  [#include <regex.h>
-  #ifdef REG_EXTENDED
-  yes
-  # endif
-  ], posix_ere=yes, posix_ere=no)
-AC_MSG_RESULT($posix_ere)
-if test "$WITH_PCRE" = "yes"; then
-    AC_DEFINE(HAVE_POSIX_ERE, 0, Whether POSIX ERE can be used for user warnings.)
-else
-  if test "$enable_posixre" = "yes"; then
-    if test "$posix_ere" = "yes"; then
-      AC_DEFINE(HAVE_POSIX_ERE, 1)
-    else
-      AC_DEFINE(HAVE_POSIX_ERE, 0)
-    fi
-  else
-    AC_DEFINE(HAVE_POSIX_ERE, 0)
-    AC_MSG_WARN(Regular expressions not enabled.)
-  fi
-fi
-
-
-AC_CONFIG_HEADER(config.h)
-AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
-AC_OUTPUT(Makefile deweb rmeheader ChkTeX.tex)

Added: trunk/Build/source/texk/chktex/chktex-src/input/file
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/input/file	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/input/file	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,8 @@
+% -*- TeX -*-
+% chktex-file 22
+% This file tests that file suppressions are only valid in the current file.
+
+% It also ensures that git will create the input/
+% directory.  That ensures that the \input input in Test.tex is able
+% to distinguish between directories and regular files.
+% This was bug #56520.

Added: trunk/Build/source/texk/chktex/chktex-src/tests/main.expected
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/tests/main.expected	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/tests/main.expected	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,27 @@
+Message 22 in main.tex: Comment displayed.
+%% main.tex  
+^
+Message 22 in sub1/file.tex: Comment displayed.
+%% comment1  
+^
+Message 22 in sub1/subsub/subsubfile.tex: Comment displayed.
+%% subsubcomment  
+^
+Message 22 in sub1/file.tex: Comment displayed.
+%% comment2  
+^
+Message 22 in sub1/subsub/subsubfile.tex: Comment displayed.
+%% subsubcomment  
+^
+Message 22 in sub2/file1.tex: Comment displayed.
+%% comment 2.1  
+^
+Message 22 in sub2/file2.tex: Comment displayed.
+%% comment 2.2  
+^
+Message 22 in sub2/file1.tex: Comment displayed.
+%% comment 2.1 cont.  
+^
+Message 22 in sub2/file2.tex: Comment displayed.
+%% comment 2.2  
+^

Added: trunk/Build/source/texk/chktex/chktex-src/tests/main.tex
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/tests/main.tex	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/tests/main.tex	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,14 @@
+\documentclass{article}
+
+%% main.tex
+\begin{document}
+
+\input{sub1/file.tex}
+
+\input{sub1/subsub/subsubfile.tex}
+
+\input{sub2/file1.tex}
+
+\input{sub2/file2.tex}
+
+\end{document}


Property changes on: trunk/Build/source/texk/chktex/chktex-src/tests/main.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Build/source/texk/chktex/chktex-src/tests/run-tests.sh
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/tests/run-tests.sh	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/tests/run-tests.sh	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,137 @@
+#!/bin/dash
+# -- remember to change this to sh
+
+set -e
+
+usage() {
+    echo "$0 BUILDDIR SRCDIR"
+}
+
+if [ "x$1" = x ] || [ "x$2" = x ]; then
+    usage
+    exit 1
+fi
+
+builddir="$(cd $1; pwd)"
+srcdir="$(cd $2; pwd)"
+
+testsdir="$srcdir/tests"
+output="$testsdir/main.out"
+expected="$testsdir/main.expected"
+
+check_results() {
+    sed -i -e 's~Message 22 in .*tests/~Message 22 in ~;' "$output"
+	if cmp -s "$expected" "$output"; then
+		echo ">>> OK!"
+		rm -f "$output"
+        return 0
+	else
+		echo "***WARNING***";
+		echo "Unexpected test output";
+		diff -u "$expected" "$output";
+        return 1
+	fi
+}
+
+
+# We don't check in the test files because CTAN can't handle files
+# with the same names, and we need several that are named chktexrc.
+# Also, they don't like invisible files (start with '.') so we
+# generate those as well.
+echo ">>> Generating test files..."
+mkdir -p $testsdir/sub
+cat > $testsdir/sub/chktexrc <<EOF
+OutFormat
+{
+"loaded chktex/tests/sub %f!n"
+}
+EOF
+
+mkdir -p $testsdir/sub1/.config
+cat > $testsdir/sub1/.config/chktexrc <<EOF
+OutFormat
+{
+"loaded chktex/tests/sub1/.config/chktexrc %f!n"
+}
+EOF
+
+cat > $testsdir/sub2/.chktexrc <<EOF
+OutFormat
+{
+"loaded chktex/tests/sub2/.chktexrc %f!n"
+}
+EOF
+
+# Run the actual tests for inclusion
+echo ">>> Testing that inclusion works correctly..."
+# absolute path
+rm -f "$output"
+${builddir}/chktex -mall -r -g0 -l$srcdir/chktexrc -v5 -q \
+           $testsdir/main.tex 2>/dev/null \
+          1> $testsdir/main.out
+check_results
+
+# relative path
+cd "$srcdir"
+${builddir}/chktex -mall -r -g0 -l$srcdir/chktexrc -v5 -q \
+           tests/main.tex 2>/dev/null \
+	 	  1> tests/main.out
+check_results
+
+# file in the same directory
+cd "$testsdir"
+${builddir}/chktex -mall -r -g0 -l$srcdir/chktexrc -v5 -q \
+           main.tex 2>/dev/null \
+	 	  1> main.out
+check_results
+
+echo ">>> Testing that correct chktexrc files are loaded"
+# XDG variables
+unset HOME
+echo '%' \
+    | XDG_CONFIG_HOME=${testsdir}/sub \
+        ${builddir}/chktex -mall -v0 -q \
+    | grep 'loaded chktex/tests/sub stdin' \
+    || (echo XDG_CONFIG_HOME/chktexrc inclusion failed; exit 1)
+echo '%' \
+    | HOME=${testsdir}/sub1  \
+        ${builddir}/chktex -mall -v0 -q \
+    | grep 'loaded chktex/tests/sub1/.config/chktexrc stdin' \
+    || (echo HOME/.config/chktexrc inclusion failed; exit 1)
+
+# HOME, LOGDIR
+echo '%' \
+    | HOME=${testsdir}/sub2  \
+        ${builddir}/chktex -mall -v0 -q \
+    | grep 'loaded chktex/tests/sub2/.chktexrc stdin' \
+    || (echo HOME/.chktexrc inclusion failed; exit 1)
+echo '%' \
+    | LOGDIR=${testsdir}/sub2  \
+        ${builddir}/chktex -mall -v0 -q \
+    | grep 'loaded chktex/tests/sub2/.chktexrc stdin' \
+    || (echo LOGDIR/.chktexrc inclusion failed; exit 1)
+
+# CHKTEXRC
+echo '%' \
+    | CHKTEXRC=${testsdir}/sub2  \
+        ${builddir}/chktex -mall -v0 -q \
+    | grep 'loaded chktex/tests/sub2/.chktexrc stdin' \
+    || (echo CHKTEXRC/.chktexrc inclusion failed; exit 1)
+
+# CWD
+echo '%' \
+    | (cd ${testsdir}/sub2;  \
+        ${builddir}/chktex -mall -v0 -q)  \
+    | grep 'loaded chktex/tests/sub2/.chktexrc stdin' \
+    || (echo PWD/.chktexrc inclusion failed; exit 1)
+
+# Not sure how to test KPSE variables...
+# TEXMFMAIN CHKTEX_CONFIG
+echo ">>> OK!"
+
+# Command line options
+echo "Checking command line RC settings..."
+(${builddir}/chktex -d 4 -STabSize=7 </dev/null 2>&1 \
+     | grep -A1 TabSize | grep -E '\t7$' >/dev/null) \
+    || (echo Setting TabSize from command line failed; exit 1)
+echo ">>> OK!"


Property changes on: trunk/Build/source/texk/chktex/chktex-src/tests/run-tests.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Build/source/texk/chktex/chktex-src/tests/sub1/file.tex
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/tests/sub1/file.tex	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/tests/sub1/file.tex	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,8 @@
+file1
+%% comment1
+
+\input{sub1/subsub/subsubfile}
+
+%% comment2
+
+more file1


Property changes on: trunk/Build/source/texk/chktex/chktex-src/tests/sub1/file.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Build/source/texk/chktex/chktex-src/tests/sub1/subsub/subsubfile.tex
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/tests/sub1/subsub/subsubfile.tex	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/tests/sub1/subsub/subsubfile.tex	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,2 @@
+%% subsubcomment
+subsubfile


Property changes on: trunk/Build/source/texk/chktex/chktex-src/tests/sub1/subsub/subsubfile.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file1.tex
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file1.tex	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file1.tex	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,7 @@
+subfile 2.1
+
+%% comment 2.1
+\input{sub2/file2.tex}
+
+%% comment 2.1 cont.
+more subfile 2.1


Property changes on: trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file1.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file2.tex
===================================================================
--- trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file2.tex	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file2.tex	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,2 @@
+%% comment 2.2
+subfile 2.2


Property changes on: trunk/Build/source/texk/chktex/chktex-src/tests/sub2/file2.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Build/source/texk/chktex/chktex.test
===================================================================
--- trunk/Build/source/texk/chktex/chktex.test	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/chktex.test	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,6 +1,6 @@
 #! /bin/sh -vx
 # $Id$
-# Copyright 2017 Karl Berry <tex-live at tug.org>
+# Copyright 2017-2022 Karl Berry <tex-live at tug.org>
 # Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
 # You may freely use, modify and/or distribute this file.
 
@@ -9,7 +9,7 @@
 (bld=`pwd`
   cd $srcdir/$CHKTEX_TREE || exit 1
   CHKTEX_CONFIG=chktexrc \
-    $bld/chktex -mall -r -g0 -lchktexrc -v5 Test.tex || exit 1
+    $bld/chktex -mall -r -g0 -l../chktexrc -v5 Test.tex || exit 1
 ) >chktest || exit 1
 
 diff $srcdir/$CHKTEX_TREE/Test.posix-ere.out chktest || exit 1

Added: trunk/Build/source/texk/chktex/chktexrc
===================================================================
--- trunk/Build/source/texk/chktex/chktexrc	                        (rev 0)
+++ trunk/Build/source/texk/chktex/chktexrc	2022-12-15 11:48:56 UTC (rev 65275)
@@ -0,0 +1,794 @@
+##  Example resource file for ChkTeX.
+##
+##  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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+##
+## For more information visit https://www.nongnu.org/chktex/
+##
+
+## chktexrc file format
+#
+# The chktecrc file is essentially a bunch of variable assignments.
+# There are two types of variables, those that take single items and
+# those that take lists.
+#
+# In turn, there are two types of lists, case-sensitive and case-insentive.
+# Case-sensitive lists are delimited by `{' and `}'
+# while case-insensitive are delimited by `[' and `]'.
+# Only some variables support case insensitive lists, since in many
+# cases it doesn't make sense and would be unnecessarily slow.  Those
+# variables that *do* support case-insensitive lists will be marked as
+# such throughout the file.
+#
+# Variables can be set with or without an equals sign.  If included, the
+# `=' causes the variable to be overwritten.  This is the only thing
+# that makes sense for varibles taking a single item and so we always
+# include it in that case.  For list variables, omitting the equals
+# sign will cause the items in the list to be appended instead of
+# overwriting the entire list.
+#
+# Below are all the ways in which a variable can be set.  Note that lists
+# can span lines, though this is not shown here for brevity.
+#
+#
+# VariableName = item
+# # Overwrites
+# VariableName = { Item1 Item2 ... }
+# VariableName = [ item1 item2 ... ]
+# VariableName = { Item1 Item2 ... } [ item item ... ]
+# VariableName = [ item1 item2 ... ] { Item Item ... }
+# # Appends
+# VariableName { Item3 Item4 ... }
+# VariableName [ item3 item4 ... ]
+# VariableName { Item3 Item4 ... } [ item item ... ]
+# VariableName [ item3 item4 ... ] { Item Item ... }
+#
+#
+# Comments begin with `#', and continue for the end of the line.
+# Blank lines plus leading and trailing spaces are ignored.
+# Items are separated by spaces.
+# Newlines are considered spaces, but can't be escaped.
+# You can use double quotes `"' to surround an item with spaces, or you can
+# escape spaces as described later.
+#
+# Detection of tokens like `}' are somewhat context sensitve---they
+# have to be preceded by a space (or newline).  This allows them to be
+# part of an item without escaping.  Since some variables require such
+# characters, this generally makes life easier.
+#
+# To include characters that might otherwise interfere, escape
+# sequences are provided.  They are similar to those in C, but use
+# `!' instead of `\' for obvious reasons.
+# The entire list is below.
+#
+#   Sequence    Resulting character 
+#   `! '        Space 
+#   `!"'        `"' 
+#   `!#'        `#' 
+#   `!!'        `!' 
+#   `!{'        `{' 
+#   `!}'        `}' 
+#   `!['        `[' 
+#   `!]'        `]' 
+#   `!='        `=' 
+#   `!b'        Backspace 
+#   `!n'        New line 
+#   `!r'        Carriage return 
+#   `!t'        Tab 
+#   `!f'        Form feed 
+#   `!xNN'      NN must be a hexadecimal number (00 - ff),
+#                  both characters must be included. 
+#   `!dNNN'     NNN must be a decimal number (000 - 255), all
+#                  three characters must be included.
+#                  Unspecified results if NNN > 377. 
+#   `!NNN'      NNN must be a octal number (000 - 377), all
+#                  three characters must be included.
+#                  Unspecified results if NNN > 377.
+
+## Available Settings
+#
+# All avaiable settings follow.
+#
+
+## QuoteStyle
+#
+# The type of quote-style you are using.  There are currently two
+# styles:
+#
+#  Traditional:
+#      "An example," he said, "would be great."
+#
+#  Logical:
+#      "An example", he said, "would be great".
+#
+QuoteStyle = Logical
+
+
+## TabSize
+#
+# The width of a tab.  This is used for formatting the error message.
+# Only positive integers are allowed.
+#
+TabSize = 8
+
+
+## CmdSpaceStyle
+#
+# How to treat a command is followed by punction.  In all cases the
+# warnings are also governed by the main warning settings, namely
+# warnings 12 and 13 about interword and intersentence spacings.
+#
+# If set to Ignore, then it won't print any warnings when pucntuation
+# follows a command.
+#
+#
+# If CmdSpaceStyle is set to InterWord, then it will print warnings
+# when interword spacing should (potentially) be used.  For example,
+# without a command the following will trigger warning 12
+#
+#     `I've seen a UFOs, etc. in my life.'
+#
+# And if set to InterWord, so will
+#
+#     `I've seen a UFOs, \etc. in my life.'
+#
+#
+# If set to InterSentence, then it will print warnings when
+# intersentence spacing should (potentially) be used.  For example,
+# without a command the following will trigger warning 13
+#
+#     `I've seen an UFO! Right over there!'
+#
+# And if set to InterSentence, so will
+#
+#     `I've seen an \UFO! Right over there!'
+#
+#
+# Setting CmdSpaceStyle to Both will cause warnings to be printed in
+# both cases.
+#
+CmdSpaceStyle = Ignore
+
+
+## CmdLine
+#
+# Default command-line options.  For instance, you might like to put
+# `-v2' here.
+#
+CmdLine
+{
+}
+
+
+## UserWarn
+#
+# Arbitrary strings to warn about.  You can put here to help you find
+# your own little foibles.  See also UserWarnRegex.
+#
+# These patterns will be searched for throughout the text; regardless
+# of whether they appear as normal text, commands, in math mode, etc.
+# They are *not* found in comments.
+#
+# Suppose you define a special command like this:
+#    \def\unknown{\large\bf??}
+# which you use whenever you don't have some information at the time
+# of writing.  Thus, it makes sense to warn on it, and this is a
+# convenient way to do so.
+#
+UserWarn
+{
+    \unknown
+    # One should write \chktex or Chk\TeX - never ChkTeX.
+    ChkTeX
+}
+[ # You may put case-insensitive patterns here.
+]
+
+
+## UserWarnRegex
+#
+# A more sophisticated version of UserWarn using regular
+# expressions.  Use of these will be automatically disabled if ChkTeX
+# was built without regular expression support.  Because ChkTeX can be
+# with support for either POSIX or PCRE flavors of regular expression,
+# some of the following will not apply in all cases.  An expression
+# can be defined only when PCRE is enabled by prepending the
+# expression with `PCRE:' and similarly with `POSIX:'.
+#
+# These patterns will be searched for, no matter whether they appear
+# as normal text, commands, or arguments.  However, they will *not*
+# match in verbatim environments (see VerbEnvir).
+#
+# Remember that you have to escape (with a `!') the characters
+# `"#!=', as well as spaces and `{}[]' if they are
+# proceeded by a space.
+#
+# When using PCRE regular expressions, you can use `(?i)' to make
+# the expression case insensitive.  See the man pages (man pcresyntax)
+# or the nicely formatted http://perldoc.perl.org/perlre.html for
+# documentation on the regular expression syntax.  Note, however, that
+# some the features of perl regular expression are not available such
+# as running code (callouts), and replacing.
+#
+# An initial PCRE-style comment `(?# ... )' can be used
+# to change what is displayed, thereby reminding yourself how to fix
+# the problem.  This works even for POSIX expressions.
+#
+UserWarnRegex
+{
+    (?!#Always! use! \nmid)\\not! *(\||\\mid)
+
+    # Capitalize section when saying Section 6.
+    (?!#-1:Capitalize! before! references)PCRE:\b(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
+    (?!#1:Capitalize! before! references)POSIX:([^[:alnum:]]|^)(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
+
+    # Spell it introduction
+    # PCRE:(?i)\bintro\b(?!#Spell! it! out.! This! comment! is! not! used.)
+    # POSIX:([^[:alnum:]]|^)intro([^[:alnum:]]|$)
+
+    # Pretty tables--see http://texdoc.net/texmf-dist/doc/latex/booktabs/booktabs.pdf
+    (?!#-2:Use! \toprule,! midrule,! or! \bottomrule! from! booktabs)\\hline
+    # This relies on it being on a single line, and not having anything
+    # else on that line.  With PCRE we could match balanced [] and {},
+    # but I wonder if it's worth the complexity...
+    (?!#-2:Vertical! rules! in! tables! are! ugly)\\begin\{(array|tabularx?\*?)\}(\[.*\])?\{.*\|.*\}
+
+    (?!#-3:Optional! arguments! []! inside! optional! arguments! []! must! be! enclosed! in! {})\[(?!![^\]\[{}]*{(?!![^\]\[{}]*}))[^\]]*\[
+
+}
+
+
+## TeXInputs
+#
+# A list of paths where ChkTeX should look for files it `\input's.
+# By default, the current directory is searched (not recursively, use
+# `//' for that, see below).
+#
+# A `//' postfix is supported:
+# if you append a double path-separator we'll recursively search that
+# directory's directories.  MS-DOS users must append `\\'
+# instead, e.g. `C:\EMTEX\\'.  In order to search an
+# entire directory tree, you must use *three* slashes,
+# e.g. `c:\\\' or `///'.
+#
+TeXInputs
+{
+}
+
+
+## OutFormat
+#
+# Output formats which can be selected from the command-line.  The
+# `-v' option simply indexes into this list.  By default, entry number
+# *two* in this list is chosen (counting from 0), and `-v'
+# without any parameter selects entry number *three*.
+#
+# For explanation of the `%' format specifiers see the
+# documentation of the `--format' command-line argument
+# in the manual.
+#
+# Recall that to use `!' is the escape character, not `\'.
+#
+OutFormat
+{
+    # -v0; silent mode
+    %f%b%l%b%c%b%n%b%m!n
+    # -v1; normal mode
+    "%k %n in %f line %l: %m!n%r%s%t!n%u!n"
+    # -v2; fancy mode
+    "%k %n in %f line %l: %m!n%r%i%s%I%t!n!n"
+    # -v3; lacheck mode
+    "!"%f!", line %l: %m!n"
+    # -v4; verbose lacheck mode
+    "!"%f!", line %l: %m!n%r%s%t!n%u!n"
+    # -v5; no line number, ease auto-test
+    "%k %n in %f: %m!n%r%s%t!n%u!n"
+    # -v6; emacs compilation mode
+    "!"%f!", line %l.%c:(#%n) %m!n"
+}
+
+
+## Silent
+#
+# Commands which should not trigger a warning if terminated by a space.
+# This warning will not trigger in math mode.
+#
+# You can also specify regular expressions in the `[]'
+# section in case you have many custom macros that can be safely
+# terminated with a space.
+#
+Silent
+{
+    \rm \em \bf \it \sl \sf \sc \tt \selectfont
+    \rmfamily \sffamily \ttfamily \mdseries \bfseries \itshape
+    \slshape \scshape \relax
+    \vskip \pagebreak \nopagebreak
+
+    \textrm \textem \textbf \textit \textsl \textsf \textsc \texttt
+
+    \clearpage \ddots \dotfill \flushbottom \fussy \indent \linebreak
+    \onecolumn \pagebreak \pushtabs \poptabs \scriptsize \sloppy
+    \twocolumn \vdots
+    \today \kill \newline \thicklines \thinlines
+
+    \columnsep \space \item \tiny \footnotesize \small \normalsize
+    \normal \large \Large \LARGE \huge \Huge \printindex
+
+    \newpage \listoffigures \listoftables \tableofcontents
+    \maketitle \makeindex
+
+    \hline \hrule \vrule
+
+    \centering
+
+    \noindent \expandafter
+
+    \makeatletter \makeatother
+
+    \columnseprule
+
+    \textwidth \textheight \hsize \vsize
+
+    \if \fi \else
+
+    \csname \endcsname
+
+    \z@ \p@  warning \typeout
+
+    \dots \ldots \input \endinput \nextline \leavevmode \cdots
+    \appendix \listfiles \and \quad \bigskip \medskip \smallskip
+    \hskip \vfill \vfil \hfill \hfil \topmargin \oddsidemargin
+    \frenchspacing \nonfrenchspacing
+    \begingroup \endgroup \par
+
+    \vrefwarning \upshape \headheight \headsep \hoffset \voffset
+    \cdot \qquad \left \right \qedhere \xspace
+
+    \addlinespace \cr \fill \frontmatter
+    \toprule \midrule \bottomrule
+}[
+    # Here you can put regular expressions to match Silent macros.  It
+    # was designed for use with many custom macros sharing a common
+    # prefix, but can of course be used for other things.
+
+    # Support ConTeXt to at least some extent
+    \\start.* \\stop.*
+]
+
+
+## HyphDash
+#
+# The number of dashes allowed between two alphabetic characters.
+# Use 0 to always return an error.  For example:
+#      foo-bar 
+#      Use of two--dashes is not usually allowed in English. 
+#      like this---see?
+#
+# For English, this will often be a single dash (hyphen).  If you like
+# m-dashes with no spaces between them and the surrounding words, then
+# it should include 3 as well.  There *are* cases when an n-dash
+# is valid between two alphabetic characters.  See DashExcpt.
+#
+HyphDash { 1 3 }
+
+
+## NumDash
+#
+# The number of dashes allowed between two numeric characters.
+# Use 0 to always return an error.  This does *not* apply in
+# math mode.  For example:
+#      123--456 is a range 
+#      $12-4$ \% okay because it's in math mode
+#
+# For English, this should be 2 because an n-dash is used to indicate
+# a range of numbers and subtraction should be in math mode where this
+# does not apply.
+#
+NumDash  { 2 }
+
+
+## WordDash
+#
+# The number of dashes allowed between two space characters.
+# Use 0 to always return an error.  For example:
+#      not like - this,  
+#      or like -- this.  
+#      like this --- see?
+#
+WordDash { 3 }
+
+
+## DashExcpt
+#
+# Exceptions to the dash rules above.  For example, an n-dash
+# `--' between words is usually wrong, but in some cases it is correct,
+# such as when naming a theorem.  The Birch--Swinnerton-Dyer
+# conjecture is one example where the difference matters.  You can
+# tell that Birch is one person and Swinnerton-Dyer is another based
+# on the dashes used.
+#
+# Adding line suppressions for these is possible, but can quickly
+# become tedious if a certain theorem is referenced often.  For this
+# reason exceptions can be specified here.  They are case-sensitive.
+#
+# Unfortunately, there are no warnings if the dashes are surrounded by differing
+# types of characters.  For example:
+#      like this ---see? (space and alphabet)  
+#      a--123            (number and alphabet) 
+#      a.--b.            (other character, namely `.')
+# Similarly, no warnings are issued if the hyphenation is correct,
+# according to the other rules, for example:
+#      Birch-Swinnerton-Dyer
+#
+DashExcpt
+{
+    Birch--Swinnerton-Dyer
+}
+
+
+## WipeArg
+#
+# Commands whose arguments aren't LaTeX code, and thus should be
+# ignored.
+#
+# After the command, you may place arguments (separated from the
+# command with a colon) that should be wiped.  Use `[]' for optional
+# arguments, `{}' for required ones, and `*' if the command supports a
+# star variant.  Some commands (e.g. `\cmidrule') use `()' to
+# delimit an optional argument and so this syntax is supported as well.
+#
+# For instance, if you would like to wipe the `\newcommand' command,
+# you would declare it as `\newcommand:*[][]{}' since it has a
+# star variant, two optional arguments, and one required argument.
+#
+# These commands may be ``evaluated'' before they're wiped, so you will
+# typically list filehandling commands and similar here.
+#
+WipeArg
+{
+    \label:{} \ref:{} \eqref:{} \vref:{} \pageref:{} \index:[]{}
+    \cite:[][]{} \nocite:{}
+    \input:{} \verbatiminput:[]{} \listinginput:[]{}{}
+    \graphicspath:{}
+    \verbatimtabinput:[]{} \include:{} \includeonly:{}
+    \bibitem:[]{}
+    \cline:{} \cmidrule:[](){}
+    \href:{}{}
+    # Cleveref -- there are many others that could be here as well...
+    \cref:*{} \cpageref:*{} \crefrange:*{}{} \cpagerefrange:*{}{}
+    \Cref:*{} \Cpageref:*{} \Crefrange:*{}{} \Cpagerefrange:*{}{}
+    # natbib
+    \citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{}
+    \Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{}
+    \citetext:{} \citeyear:*{} \citeyearpar:{}
+    # biblatex - not including special commands
+    \autocite:*[][]{} \autocites:*[][]{} \Autocite:*[][]{} \Autocites:*[][]{}
+    \parencite:*[][]{} \parencites:*[][]{} \Parencite:*[][]{} \Parencites:*[][]{}
+    \footcite:*{} \footcites:*[][]{} \Footcite:*[][]{} \Footcites:*[][]{}
+    \textcite:*{} \textcites:*[][]{} \Textcite:*[][]{} \Textcites:*[][]{}
+    \citeauthor:*{} \citeauthors:*[][]{} \Citeauthor:*[][]{} \Citeauthors:*[][]{}
+    \citeyear:*{} \citeyears:*[][]{} \Citeyear:*[][]{} \Citeyears:*[][]{}
+    \citetitle:*{} \citetitles:*[][]{} \Citetitle:*[][]{} \Citetitles:*[][]{}
+    # tipa which uses "
+    \textipa:{}
+    # LuaTeX
+    \directlua:{} \luaescapestring:{}
+}
+
+
+## MathEnvir
+#
+# Environments which typeset their contents as mathematics.
+# This turns on/off some warnings.
+#
+# A `*' variant is automatically added for each keyword.
+#
+MathEnvir
+{
+    displaymath math eqnarray array equation
+    align alignat gather flalign multline
+    dmath dgroup darray
+}
+
+
+## TextEnvir
+#
+# Environments which typeset their contents as text, for use inside
+# mathematics.  This turns on/off some warnings.
+#
+TextEnvir
+{
+    dsuspend
+}
+
+
+## MathCmd
+#
+# Commands whose argument will be typeset as mathematics.
+# The commands are assumed to have one mandatory argument which is in
+# math mode.  This turns on/off some warnings.
+#
+MathCmd
+{
+    \ensuremath
+}
+
+
+## TextCmd
+#
+# Commands whose argument will *not* be typeset as
+# mathematics even if it would otherwise be in math mode.
+# The commands are assumed to have one mandatory argument which is in
+# text mode.  This turns on/off some warnings.
+#
+TextCmd
+{
+    \text \intertext \shortintertext \mbox \condition
+}
+
+
+## VerbEnvir
+#
+# Environments containing non-LaTeX content of some kind, and
+# therefore should not trigger any warnings.
+#
+# A `*' variant is automatically added for each keyword.
+#
+VerbEnvir
+{
+    verbatim comment listing verbatimtab rawhtml errexam picture texdraw
+    filecontents pgfpicture tikzpicture minted lstlisting IPA
+}
+
+
+## Abbrev
+#
+# Abbreviations not automatically handled by ChkTeX.
+#
+# ChkTeX automagically catches most abbreviations; the ones we need to
+# list here, are those which are most likely to be followed by a word
+# with an upper-case letter which is not the beginning of a new
+# sentence.
+#
+# The case-insensitive abbreviations are not fully case-insensitive.
+# Rather, only the first character is case-insensitive, while the
+# remaining characters are case-sensitive.
+#
+# To speed up the searching process somewhat, we require that these
+# end in a `.' which should not be a problem in practice.
+#
+# Much of this work (both the abbreviations below, and the regular
+# expressions necessary to catch the remaining automatically) have
+# been provided by Russ Bubley, <russ at scs.leeds.ac.uk>.
+#
+Abbrev
+{
+    # Ordinals
+    1st. 2nd. 3rd. 4th.
+    # Titles
+    Mr. Mrs. Miss. Ms. Dr. Prof. St.
+    #
+    # Days
+    # Mon. Tue. Wed. Thu. Fri. Sat. Sun.
+    #
+    # Months
+    # Jan. Feb. Mar. Apr. May. Jun. Jul. Aug. Sep. Oct. Nov. Dec.
+    #
+    # Letters
+    # Kt. Jr.
+    #
+    # Corporate
+    # Co. Ltd.
+    #
+    # Addresses
+    # Rd. Dr. St. Ave. Cres. Gdns. Sq. Circ. Terr. Pl. Arc. La. Clo. Ho. Est. Gn.
+    #
+    # Misc.
+    # oe. pbab. ps. rsvp. Tx.
+}
+[
+    # The first letter is case-insensitive in the abbrevs in this
+    # list. Due to the nature of the checking algorithm used for
+    # this, entries consisting of only one character will be
+    # silently ignored.
+    #
+    # Latin
+    # cf. "et al." etc. qed. qv. viz.
+    #
+    # Corporate
+    # inc. plc.
+    #
+    # Misc
+    # fax. pcs. qty. tel. misc.
+]
+
+
+## IJAccent
+#
+# Commands which add accents above characters.  This means that `\i' or `\j'
+# (`\imath' and `\jmath' in mathmode) should be used instead of `i' and `j'.
+#
+# Other accent commands such as `\c', `\d', and `\b', put their accent under
+# the character, and thus should be used with normal `i's and `j's.
+#
+IJAccent
+{
+    \hat \check \breve \acute \grave \tilde \bar \vec \dot \ddot
+    \' \` \^ \" \~ \= \. \u \v \H \t
+}
+
+
+## Italic
+#
+# Commands which need italic correction when the group is terminated.
+#
+Italic
+{
+    \it \em \sl \itshape \slshape
+}
+
+
+## NonItalic
+#
+# Commands which makes the font non-italic.
+#
+NonItalic
+{
+    \bf \rm \sf \tt \sc
+    \upshape
+}
+
+
+## ItalCmd
+#
+# Commands which put their argument into italic (and thus possibly
+# needs italic correction in the end).
+#
+# This is currently empty, since `\textit', `\textsl', and `\emph'
+# automatically add italic corecction.
+#
+ItalCmd
+{
+}
+
+
+## PostLink
+#
+# Commands in front of which a page break is highly undesirable.
+# Thus there should be no space in front of them.
+#
+PostLink
+{
+    \index \label
+}
+
+
+## NotPreSpaced
+#
+# Commands that should not have a space in front of them for various
+# reasons.  Much the same as PostLink, but produces a different warning.
+#
+NotPreSpaced
+{
+    \footnote \footnotemark \/
+}
+
+
+## Linker
+#
+# Commands that should be prepended with a `~'.  For example
+#     `look in table~\ref{foo}'
+# to avoid the references being split across lines.
+#
+Linker
+{
+    \ref \vref \pageref \eqref \cite
+}
+
+
+## CenterDots
+#
+# Commands or characters which should have `\cdots' in between.
+# For example, $1+2+3+\cdots+n$.
+#
+CenterDots
+{
+    = + - \cdot \div & \times \geq \leq < >
+}
+
+
+## LowDots
+#
+# Commands or characters which should have `\ldots' in between.
+# For example, $1,2,3,\ldots,n$.
+#
+LowDots
+{
+    . , ;
+}
+
+
+## MathRoman
+#
+# Words that should appear in roman (upright) in math mode.  There are
+# certain aliases for mathematical operators (like sin or cos) that
+# appear in roman rather than the usual italic (slanted) font.
+#
+# These entries do not need a leading slash since the mistake is often
+# to *not* include the leading slash.
+#
+MathRoman
+{
+    log lg ln lim limsup liminf sin arcsin sinh cos arccos cosh tan
+    arctan tanh cot coth sec csc max min sup inf arg ker dim hom det
+    exp Pr gcd deg bmod pmod mod
+}
+
+
+## Primitives
+#
+# Commands that are used in TeX but have become unnecessary in
+# LaTeX, as there are LaTeX commands which do the same.  Purists
+# should thus avoid these in their code.
+#
+Primitives
+{
+   \above \advance \catcode \chardef \closein \closeout \copy \count
+   \countdef \cr \crcr \csname \delcode \dimendef \dimen \divide
+   \expandafter \font \hskip \vskip \openout
+}
+
+
+## NoCharNext
+#
+# Commands and a set of characters that should *not* follow them.  For
+# example, in math mode, `\left' should be followed by a delimiter
+# which is to change size.  Therefore, it should not be followed by the
+# end of math mode `$' or a grouping character `{' or `}'.
+#
+# The format is `\command:characters'.
+#
+NoCharNext
+{
+   \left:{}$ \right:{}$
+}
+
+
+## VerbClear
+#
+# The character to replace verbatim text with.
+#
+# The arguments of commands listed in WipeArg, as well as
+# `\verb+...+' commands, are replaced with an innocuous character
+# to prevent that data from inadvertantly producing a warning.
+#
+# This should not contain an alphabetic character (in case the user
+# writes (`\foo\verb+bar+'), neither should it contain be one of
+# LaTeX's reserved characters (`#$%&~_^\{}'), or any parenthesis
+# character (`()[]{}').  If possible, don't use a punctuation
+# character or any spacing characters either.  All of these characters
+# have warnings associated with them and thus could cause spurious
+# warnings to appear.
+#
+# The asterisk is also unsuitable, as some commands behave in another
+# way if they are appended with an asterisk.  Which more or less
+# leaves us with the pipe.
+#
+# Please note that this may also be a `string', which will be
+# repeated until the proper length is reached.
+#
+VerbClear = "|"
+
+
+## That's all for now - Happy LaTeXing!

Modified: trunk/Build/source/texk/chktex/configure
===================================================================
--- trunk/Build/source/texk/chktex/configure	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/configure	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for ChkTeX (TeX Live) 1.7.6.
+# Generated by GNU Autoconf 2.71 for ChkTeX (TeX Live) 1.7.8.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -629,8 +629,8 @@
 # Identity of this package.
 PACKAGE_NAME='ChkTeX (TeX Live)'
 PACKAGE_TARNAME='chktex--tex-live-'
-PACKAGE_VERSION='1.7.6'
-PACKAGE_STRING='ChkTeX (TeX Live) 1.7.6'
+PACKAGE_VERSION='1.7.8'
+PACKAGE_STRING='ChkTeX (TeX Live) 1.7.8'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1386,7 +1386,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ChkTeX (TeX Live) 1.7.6 to adapt to many kinds of systems.
+\`configure' configures ChkTeX (TeX Live) 1.7.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1458,7 +1458,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ChkTeX (TeX Live) 1.7.6:";;
+     short | recursive ) echo "Configuration of ChkTeX (TeX Live) 1.7.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1578,7 +1578,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ChkTeX (TeX Live) configure 1.7.6
+ChkTeX (TeX Live) configure 1.7.8
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2102,7 +2102,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ChkTeX (TeX Live) $as_me 1.7.6, which was
+It was created by ChkTeX (TeX Live) $as_me 1.7.8, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -8425,7 +8425,7 @@
 
 # Define the identity of the package.
  PACKAGE='chktex--tex-live-'
- VERSION='1.7.6'
+ VERSION='1.7.8'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -14934,7 +14934,7 @@
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-ChkTeX (TeX Live) config.lt 1.7.6
+ChkTeX (TeX Live) config.lt 1.7.8
 configured by $0, generated by GNU Autoconf 2.71.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -16541,7 +16541,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ChkTeX (TeX Live) $as_me 1.7.6, which was
+This file was extended by ChkTeX (TeX Live) $as_me 1.7.8, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16609,7 +16609,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-ChkTeX (TeX Live) config.status 1.7.6
+ChkTeX (TeX Live) config.status 1.7.8
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/texk/chktex/version.ac
===================================================================
--- trunk/Build/source/texk/chktex/version.ac	2022-12-15 00:49:32 UTC (rev 65274)
+++ trunk/Build/source/texk/chktex/version.ac	2022-12-15 11:48:56 UTC (rev 65275)
@@ -1,4 +1,5 @@
 dnl
+dnl   Copyright 2017-2022 Karl Berry <tex-live at tug.org>
 dnl   Copyright 2012-2015 Peter Breitenlohner <tex-live at tug.org>
 dnl
 dnl   This file is free software; the copyright holder
@@ -8,4 +9,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current chktex version
-m4_define([chktex_version], [1.7.6])
+m4_define([chktex_version], [1.7.8])



More information about the tex-live-commits mailing list.