% Just in case the file is input from IniTeX \catcode`\{=1 \catcode`\}=2 % Check first for LaTeX2e \expandafter\let\expandafter\END\csname @@end\endcsname \ifx\END\relax \let\END\end \fi \def\Message{\immediate\write 16} \def\Temp{LaTeX2e}\ifx\Temp\fmtname\else \ifx\documentstyle\undefined \Message{***********************************************************} \Message{*** This installation script needs to be run with latex ***} \Message{***********************************************************} \else \Message{***************************************} \Message{*** This installation needs LaTeX2e ***} \Message{***************************************} \fi \expandafter\END \fi % Then for the correct format date (which implies docstrip 2.4) \def\ParseVersion#1/#2/#3#4#5\Temp{#1#2#3#4 } \ifnum\expandafter\ParseVersion\fmtversion//00\Temp <19961201 \Message{*************************************************************} \Message{*** This installation needs LaTeX2e <1996/12/01> or later ***} \Message{*************************************************************} \expandafter\END \fi % We have the correct LaTeX format, which implies docstrip 2.4 or higher \input docstrip.tex \keepsilent \askforoverwritefalse % First we define some abbreviations \edef\usingfile{\jobname.dtx} \def\mainfile#1#2{\file{#1}{\from{\usingfile}{#2}}} \def\configfile#1#2{% \edef\onelinepreamble{\MetaPrefix\space Generated from \usingfile\space with options `#2'.^^J\MetaPrefix} \usepreamble\onelinepreamble \usepostamble\empty \file{#1}{\from{\usingfile}{#2}}} \def\example#1#2{\def\usingfile{kulexamp.dtx}% \configfile{#1}{example,#2}} \Msg{*******************************************************} \Msg{** Generation of the classes and configuration files **} \Msg{*******************************************************} \generate{ \mainfile{kulbrief.cls}{class,brief} \mainfile{kulfax.cls}{class,fax} \mainfile{kulmemo.cls}{class,memo} \mainfile{kulverslag.cls}{class,verslag} \mainfile{kulkaart.cls}{class,kaart} %% You can use "kulstijl.dtx" instead of "kulstijl.drv"! % \mainfile{kulstijl.drv}{driver} \configfile{english.cfg}{english} \configfile{dutch.cfg}{dutch} \configfile{esat.def}{esat} } \Msg{*************************************} \Msg{** Generation of the example files **} \Msg{*************************************} \generate{ \example{brief.tex}{brief,def,cfg} \example{fax.tex}{fax,def,cfg} \example{memo.tex}{memo,def,cfg} \example{verslag.tex}{verslag,def,cfg} \example{kaart.tex}{kaart,def,cfg} %% We do not generate the def and cfg files because they are included above! % \example{kulstijl.def}{def} % \example{kulstijl.cfg}{cfg} %% You can use "kulexamp.dtx" instead of "kulexamp.drv"! % \mainfile{kulexamp.drv}{driver} } \ifToplevel{% \Msg{**************************************************************} \Msg{* To finish the installation you have to} \Msg{*} \Msg{* \space\space move the files *.cls into a directory searched by TeX;} \Msg{*} \Msg{* \space\space make a central kulstijl.def (see the documentation)} \Msg{* \space\space and place it into a directory searched by TeX;} \Msg{*} \Msg{* \space\space adapt your english.cfg and dutch.cfg (if using Babel)} \Msg{* \space\space according to the examples in this directory.} \Msg{*} \Msg{* To produce the documentation run kulstijl.dtx through LaTeX.} \Msg{**************************************************************} } \endbatchfile