%%
%% This docstrip .ins file makes it possible to unpack a docstrip
%% file using initex. This would enable a doc format LaTeX distribution 
%% to be bootstrapped just from the web (2c) sources for TeX, and the
%% LaTeX files. It saves building plain.fmt :-)
%%
%%  David Carlisle 
%%
\catcode`\Z=\catcode`\% 
\ifnum1=\catcode`\{{\egroup\else
  \catcode`\Z=9
Z
Z  \catcode`\{=1  \catcode`\}=2 
Z  \catcode`\#=6  \catcode`\^=7
Z  \catcode`\@=11 \catcode`\^^L=13
Z  \let\bgroup={  \let\egroup=}
Z
Z  \dimendef\z@=10 \z@=0pt \chardef\@ne=1 \countdef\m@ne=22 \m@ne=-1
Z
Z  \def\wlog{\immediate\write\m@ne} \def\space{ }
Z
Z  \count10=22 % allocates \count registers 23, 24, ...
Z  \count15=9 % allocates \toks registers 10, 11, ...
Z  \count16=-1 % allocates input streams 0, 1, ...
Z  \count17=-1 % allocates output streams 0, 1, ...
Z
Z  \def\alloc@#1#2#3{\advance\count1#1\@ne#2#3\count1#1\relax}
Z
Z  \def\newcount{\alloc@0\countdef} \def\newtoks{\alloc@5\toksdef}
Z  \def\newread{\alloc@6\chardef}   \def\newwrite{\alloc@7\chardef}
Z
Z  \def\newif#1{%
Z    \@if\def#1{true}{\let#1\iftrue}\@if\def#1{false}{\let#1\iffalse}%
Z    \@if\relax#1{false}}
Z
Z  \def\@if#1#2#3{%
Z    \expandafter#1\csname\expandafter\@gobblethree\string#2#3\endcsname}
Z  \def\@gobblethree#1#2#3{}
Z
Z  \def\loop#1\repeat{\def\body{#1}\iterate}
Z  \def\iterate{\body \let\next\iterate \else\let\next\relax\fi \next}
Z  \let\repeat\fi
Z
Z  \def\empty{}
Z
Z  \def\tracingall{\tracingcommands2 \tracingstats2 
Z    \tracingpages1 \tracingoutput1 \tracinglostchars1 
Z    \tracingmacros2 \tracingparagraphs1 \tracingrestores1 
Z    \showboxbreadth 10000 \showboxdepth 10000 \errorstopmode
Z    \errorcontextlines 10000 \tracingonline1 }
Z
\bgroup}\fi\catcode`\Z=11


\def\batchfile{unpack.ins}

\let\documentclass\undefined
\input ltdirchk.dtx
\input testdist.dtx
\input docstrip.dtx

{
\def\ProvidesFile#1\end#2{}
\def\everyjob#1\endinput{}
\@@input ltvers.dtx
\Msg{**********************************************}
\Msg{*}
\Msg{* Welcome to the Installation routine of}
\Msg{*}
\Msg{* \space\space\space\space\fmtname\space <\fmtversion>}
\Msg{*}
\Msg{* Depending on your machine the installation}
\Msg{* might take a long time --- this is the}
\Msg{* price for being able to run on all platforms.}
\Msg{* So please be patient :-)}
\Msg{*}
\Msg{**********************************************}
\Msg{}
\Msg{}
}

\let\OriginalAsk=\Ask
\def\Ask#1#2{%
  \OriginalAsk{#1}{#2}%
  \global\let\Ask\OriginalAsk
  \Ask\noprompt{%
  By default you will be asked this question for every file.^^J%
  If you enter `y' now, I will asssume `y' for all future questions^^J%
  without prompting.}%
   \ifx\y\noprompt\gdef\Ask##1##2{\def##1{y}}\else
      \ifx\yes\noprompt\gdef\Ask##1##2{\def##1{y}}\fi\fi}
           
   

\testdistribution{manifest.txt}{Missing distribution files.}{%
   The above files are missing from your LaTeX2e distribution.
^^JYou should be able to get the files from the same source as
^^Jthe rest of the distribution.  If you can't, then complain!
^^JThe full list of LaTeX2e distributed files is in manifest.txt.
^^JMore information about the installation is in install.txt.
^^JPress <RETURN> to continue, or X<RETURN> to exit.
}


\keepsilent


\preamble

This is a generated file.

Copyright 1993-1995 the LaTeX3 project and any individual authors
listed elsewhere in this file.  All rights reserved.

For further copyright information see the file legal.txt, and any
other copyright notices 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.

  For error reports concerning UNCHANGED versions of this file no more
  than one year old, see bugs.txt.

  Please do not request updates from us directly.  Primary
  distribution is through the CTAN archives.


IMPORTANT COPYRIGHT NOTICE:

You are NOT ALLOWED to distribute this file alone.

You are allowed to distribute this file under the condition that it is
distributed together with all the files listed in manifest.txt.

If you receive only some of these files from someone, complain!

Permission is granted to copy this file to another file with a clearly
different name and to customize the declarations in that copy to serve
the needs of your installation, provided that you comply with
the conditions in the file legal.txt.

However, NO PERMISSION is granted to generate or to distribute a
modified version of this file under its original name.
 
You are NOT ALLOWED to change this file.


MODIFICATION ADVICE:

If you want to customize this file, it is best to make a copy of the
source file(s) from which it was produced.  Use a different name for
your copy(ies) and modify the copy(ies); this will ensure that your
modifications do not get overwritten when you install a new release of
the standard system.  You should also ensure that your modified source
file does not generate any modified file with the same name as a
standard file.  You can then easily distribute your modifications by
distributing the modified and renamed copy of the source file, taking
care to observe the conditions in legal.txt; this will ensure that
other users can safely use your modifications.

You will also need to produce your own, suitably named, .ins file to
control the generation of files from your source file; this file
should contain your own preambles for the files it generates, not
those in the standard .ins files.

The names of the source files used are shown above.


\endpreamble

\let\mainpreamble\WritePreamble

\def\Lbatchinput#1{%
  \let\savedpream\WritePreamble
  \let\savedpostam\WritePostamble
  \batchinput{#1}
  \let\WritePreamble\savedpream
  \let\WritePostamble\savedpostam}

\generateFile{oldlfont.sty}{t}{%
  \from{oldlfont.dtx}{package}
}

\generateFile{newlfont.sty}{t}{%
  \from{newlfont.dtx}{package}
}

\generateFile{tracefnt.sty}{t}{%
  \from{ltfsstrc.dtx}{package,trace}
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% \generateFile{fltrace.sty}{t}{%       %%% not yet finished
%  \from{ltoutput.dtx}{fltrace,trace}
% }

\generateFile{flafter.sty}{t}{%
  \from{ltoutput.dtx}{flafter,trace}
}

%%% generate .def files for encoding support

\Lbatchinput{inputenc.ins}
\Lbatchinput{ltoutenc.ins}

%%% generate main kernel file

\generateFile{latex.ltx}{t}{%
  \from{ltdirchk.dtx}{initex,2ekernel,dircheck}
  \from{ltplain.dtx}{2ekernel}
  \from{ltvers.dtx}{2ekernel}
  \from{ltdefns.dtx}{2ekernel}
  \from{ltalloc.dtx}{2ekernel}
  \from{ltcntrl.dtx}{2ekernel}
  \from{lterror.dtx}{2ekernel}
  \from{ltpar.dtx}{2ekernel}
  \from{ltspace.dtx}{2ekernel}
  \from{ltlogos.dtx}{2ekernel}
  \from{ltfiles.dtx}{2ekernel}
  \from{ltoutenc.dtx}{2ekernel}
  \from{ltfssbas.dtx}{2ekernel}
  \from{ltfsstrc.dtx}{2ekernel}
  \from{ltfsscmp.dtx}{compat,2ekernel}
  \from{ltfssdcl.dtx}{compat,2ekernel}
  \from{ltfssini.dtx}{compat}
  \from{ltfntcmd.dtx}{2ekernel}
  \from{ltcounts.dtx}{2ekernel}
  \from{ltpageno.dtx}{2ekernel}
  \from{ltxref.dtx}{2ekernel}
  \from{ltlength.dtx}{2ekernel}
  \from{ltmiscen.dtx}{2ekernel}
  \from{ltmath.dtx}{2ekernel}
  \from{ltlists.dtx}{2ekernel}
  \from{ltboxes.dtx}{2ekernel}
  \from{lttab.dtx}{2ekernel}
  \from{ltpictur.dtx}{2ekernel}
  \from{ltthm.dtx}{2ekernel}
  \from{ltsect.dtx}{2ekernel}
  \from{ltfloat.dtx}{2ekernel}
  \from{ltidxglo.dtx}{2ekernel}
  \from{ltbibl.dtx}{2ekernel}
  \from{ltpage.dtx}{2ekernel}
  \from{ltoutput.dtx}{2ekernel}
  \from{ltclass.dtx}{2ekernel}
  \from{ltfinal.dtx}{2ekernel}  
}


\generateFile{ltxcheck.tex}{t}{%
  \from{ltdirchk.dtx}{ltxcheck}}



%%%%%%%%%%%%%%%%% CUSTOMISABLE FILES

\keepsilent

\preamble

This is a generated file.  

Copyright 1993-1995 the LaTeX3 project and any individual authors
listed elsewhere in this file.  All rights reserved.

For further copyright information see the file legal.txt, and any
other copyright notices 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.

  For error reports concerning UNCHANGED versions of this file no more
  than one year old, see bugs.txt.

  Please do not request updates from us directly.  Primary
  distribution is through the CTAN archives.


IMPORTANT COPYRIGHT NOTICE:

You are NOT ALLOWED to distribute this file alone.

You are allowed to distribute this file under the condition that it is
distributed together with all the files listed in manifest.txt.

If you receive only some of these files from someone, complain!

No other permissions to distribute this file in any form are granted
and in particular NO PERMISSION to modify its contents.

You are NOT ALLOWED to change this file.


MODIFICATION ADVICE:

Details of how to use a configuration file to modify this part of the
system are in the document cfgguide.tex.

\endpreamble


\generateFile{hyphen.ltx}{t}{%
  \from{lthyphen.dtx}{default}
}


\generateFile{fonttext.ltx}{t}{
     \from{fontdef.dtx}{text}}


\generateFile{fontmath.ltx}{t}{
     \from{fontdef.dtx}{math}}


\generateFile{preload.ltx}{t}{%
  \from{preload.dtx}{preload,cm,xpt,tex}}





%%%%%%%%%%%%%%%%%%%%%%%%%%%% OTHER PACKAGES
\let\WritePreamble\mainpreamble

\Lbatchinput{classes.ins}

\Lbatchinput{letter.ins}

\Lbatchinput{slides.ins}

\Lbatchinput{proc.ins}

\Lbatchinput{latexsym.ins}

\Lbatchinput{cmfonts.ins}

\Lbatchinput{latex209.ins}

\Lbatchinput{docstrip.ins}

\Lbatchinput{ifthen.ins}

\Lbatchinput{graphpap.ins}

\Lbatchinput{pict2e.ins}

\Lbatchinput{makeindx.ins}

\Lbatchinput{syntonly.ins}

\Lbatchinput{exscale.ins}

\Lbatchinput{alltt.ins}


\testdistribution{unpacked.txt}{Missing unpacked files.}{%
   The above files should have been unpacked by this installation.
^^JIf they are missing, then this means that something is wrong.
^^JRead install.txt to find out what to do now.
^^JThe list of files which should have been unpacked is in unpacked.txt.
^^JPress <RETURN> to continue, or X<RETURN> to exit.
}

\Msg{}
\Msg{***********************************}
\Msg{*}
\Msg{*  Now run INITEX on latex.ltx}
\Msg{*}
\Msg{***********************************}
\Msg{}

\endinput
