%% 
%% This is file `ltxcheck.tex', generated 
%% on <1994/9/6> with the docstrip utility (2.2h).
%% 
%% The original source files were:
%% 
%% ltdirchk.dtx  (with options: `ltxcheck')
%% 
%% Copyright 1994 the LaTeX3 project and the individual authors. 
%% All rights reserved. For further copyright information see the file 
%% legal.txt, and any other copyright indicated in this file. 
%% 
%% This file is part of the LaTeX2e system. 
%% ---------------------------------------- 
%% 
%% This system 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. 
%% 
%% 
%% IMPORTANT NOTICE: 
%% 
%% For error reports in case of UNCHANGED versions see readme files. 
%% 
%% Please do not request updates from us directly. Distribution is 
%% done through Mail-Servers and TeX organizations. 
%% 
%% You are not allowed to change this file. 
%% 
%% You are allowed to distribute this file under the condition that 
%% it is distributed together with all files mentioned in 00readme.txt. 
%% 
%% If you receive only some of these files from someone, complain! 
%% 
%% You are NOT ALLOWED to distribute this file alone. You are NOT 
%% ALLOWED to take money for the distribution or use of either this 
%% file or a changed version, except for a nominal charge for copying 
%% etc. 
%%% File: ltdirchk
\NeedsTeXFormat{LaTeX2e}
\makeatletter
\typeout{^^J%
LaTeX2e installation check file^^J%
===============================}

\typeout{^^J%
 Before running this file through LaTeX2e you should have installed^^J%
 the Standard LaTeX2e files in their final `system' directories.^^J%
 This file should *not* be run in a directory that contains article.cls}
\def\pause{%
  \typeout{}%
  \message{** Hit return to continue: }%
  \read -1  to \xxx
  \typeout{}}
\typeout{^^J%
  After certain tests, LaTeX will pause so that you can read the^^J%
  output without it scrolling off the screen.^^J%
  When you are ready just hit <return> and LaTeX will continue.^^J%
  When LaTeX pauses, you will see a prompt like the one below.^^J^^J%
  If a test fails, a message will be displayed followed by^^J%
  an error message starting `! BAD'.^^J%
  LaTeX will quit if you try to scroll past such an error message.}
\pause
\typeout{^^J%
  Checking the current directory syntax^^J%
  =====================================}
\newif\iftest\testfalse
\ifx\@currdir\@undefined
  \typeout{^^J%
  \noexpand\@currdir is undefined !!^^J%
  Something is seriously wrong with the LaTeX2e initialisation.^^J%
  Either you have corrupted files or this is a LaTeX bug.}
  \errmessage{BAD LaTeX2e system!!}
  \expandafter\@@end
\fi
\ifx\@currdir\@empty
  \typeout{^^J%
  \noexpand\@currdir is defined to be empty.^^J%
  This means that LaTeX can not distinguish between a file^^J%
  aaaaa.tex^^J%
  that exists in the current directory, and  a file aaaaa.tex^^J%
  in another directory.^^J%
  It may be that this Operating System has no concept of `directory'^^J%
  in which case the setting is correct. If however it is possible to^^J%
  uniquely refer to a file then a suitable definition of
    \noexpand\@currdir^^J%
  should be added to texsys.cfg, and the format remade.}
  \pause
\else
  \typeout{^^J%
\noexpand\@currdir is defined as
    \expandafter\strip@prefix\meaning\@currdir^^J%
  (Testing...)}
\begingroup
\endlinechar=-1
\count@\time
\divide\count@ 60
\count2=-\count@
\multiply\count2 60
\advance\count2 \time
\edef\today{%
  \the\year/\two@digits{\the\month}/\two@digits{\the\day}:%
    \two@digits{\the\count@}:\two@digits{\the\count2}}
  \immediate\openout15=ltxcheck.aux
  \immediate\write15{\today^^J}
  \immediate\closeout15 %
  \openin\@inputcheck\@currdir ltxcheck.aux %
  \ifeof\@inputcheck
    \typeout{\@currdir ltxcheck.aux  not found}%
  \else
    \read\@inputcheck to \@tempa
    \ifx\@tempa\today
      \typeout{\@currdir ltxcheck.aux found}
      \testtrue
    \else
      \typeout{BAD: old file \@tempa (should be \today)}%
      \testfalse
    \fi
  \fi
  \closein\@inputcheck
  \iftest
    \endgroup
    \typeout{\noexpand \@currdir OK!}
  \else
  \endgroup
  \typeout{^^J%
    The LaTeX2e installation has defined \noexpand\@currdir^^J%
    to be \expandafter\strip@prefix\meaning\@currdir.^^J%
    This appears to be incorrect.^^J%
    You should add a correct definition to texsys.cfg^^J%
    and rebuild the format.}
  \errmessage{BAD LaTeX2e system!!}
  \expandafter\expandafter\expandafter\@@end
  \fi
  \pause
\fi
\typeout{^^J%
  Checking the input path^^J%
  =======================^^J}
\begingroup
\let\input@path\@undefined
\ifx\@currdir\@empty\else
  \IfFileExists{\@currdir article.cls}
   {\typeout{article.cls in current directory!}%
    \errmessage{This file should not be run in a `system directory'}}{}
\fi
\endgroup
\IfFileExists{article.cls}
  {\typeout{input path OK!}}
  {\typeout{^^J%
     LaTeX claims that article.cls is not on the system.^^J%
     Either LaTeX has been incorrectly installed, or the
     \noexpand\input@path^^J%
     is incorrect. A correct definition should be added to^^J%
     texsys.cfg, and the format remade.}
   \pause
   \typeout{^^J%
     Typical definitions of \noexpand\input@path include:^^J^^J%
     \string\let\string\input@path=\noexpand\@undefined
      (the default definition)^^J^^J%
     \string\def\string\input@path{\@percentchar^^J
       {/usr/lib/tex/inputs/} {/usr/local/lib/tex/inputs/} }^^J^^J%
     \string\def\string\input@path{\@percentchar^^J
       {c:/tex/inputs/} {a:/} }^^J^^J%
     \string\def\string\input@path{\@percentchar^^J
       {tex_inputs:} {[SOMEWHERE.TEX.INPUTS]} }^^J}%
   \pause
   \typeout{^^J%
     Note that \noexpand\input@path should be undefined
       unless your^^J%
     TeX installation does not make
       \noexpand\openin and \noexpand\input^^J%
     search the same directories.^^J%
     If \noexpand\input@path is defined, entries should be^^J%
     in the same syntax as \noexpand\@currdir^^J%
     ie full directory names that may be concatenated with the^^J%
     basename (note the final / and ] in the above examples).^^J%
     Some systems may need more complicated settings.^^J%
     See texsys.cfg for more examples.^^J%
    ! BAD \noexpand\input@path!!}
   \@@end}%
\pause
\typeout{^^J%
  Checking the TeX version^^J%
  ========================}
\ifx\noboundary\relax
  \typeout{^^J%
    This is TeX 2. You will not be able to use all the new features^^J%
    of LaTeX2e with such an old TeX.^^J%
    The current version (1993/12/16) is TeX 3.1415^^J%
    Consider upgrading your TeX}
\else
    \typeout{^^J%
    This is at least TeX3. Good!^^J%
    If the following `lines' appear on the same line, separated by
    \string^\string^J^^J%
    then consider upgrading to a TeX newer than 3.141.^^J%
    The current version (1994/05/24) is TeX 3.1415}
\message{line1^^Jline2^^Jline3}
   \ifx\@TeXversion\@undefined
   \typeout{^^J%
      If the above message does contain \string^\string^J's^^J%
      You have a TeX between 3.0 and 3.14. Please add a line^^J%
      \@spaces\string\def\string\@TeXversion{3.<your TeX version>}^^J%
      to texsys.cfg, and rebuild the format.}
   \fi
\pause
\fi
\@@end
\endinput
%% 
%% End of file `ltxcheck.tex'.
