%%
%% This is file `dtk.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% dtk.dtx 
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% You are *not* allowed to modify this file.
%% 
%% You are *not* allowed to distribute this file.
%% For distribution of the original source see the terms
%% for copying and modification in the file dtk.dtx.
%% 
%%^^A $Id: dtk.dtx,v 1.1 1996/09/13 22:03:51 gerd Exp gerd $
\def\DTK@RCS$#1: #2 #3${#2}
\def\filename{dtk.dtx}
\xdef\fileversion{\DTK@RCS$Revision: 1.1 $}
\xdef\filedate{\DTK@RCS$Date: 1996/09/13 22:03:51 $}
\let\docversion=\fileversion
\let\docdate=\filedate
\typeout{%
%% Purpose:
        A LaTeX Class/Style for ``Die TeXnische Komoedie''.
        Version \fileversion
}%
%%
%% Documentation:
%%      The documentation  can be generated   from the original  file
%%      dtk.dtx with the doc style/package. LaTeX the file dtk.tex to
%%      get the full documentation in {\sc dvi} format.
%%
%%
%% Author: Gerd Neugebauer
%%         Mainzer Str. 8
%%         56321 Rhens
%% Mail:   gerd@informatik.uni-koblenz.de
%%
%% Copyright (C) 1995-1996 Gerd Neugebauer
%%
%%  dtk.dtx is distributed in the hope that it  will  be useful, but
%%  WITHOUT  ANY  WARRANTY.   No    author  or  distributor  accepts
%%  responsibility to anyone for the consequences of using it or for
%%  whether it serves any particular purpose or works at all, unless
%%  he says so in writing.
%%
%%  Everyone is granted permission to  copy, modify and redistribute
%%  dtk.dtx,  provided  this copyright notice is preserved  and  any
%%  modifications are indicated.
%%
%%
%% This style is still under development and  may be replaced with a
%% new version which provides an enhanced functionality.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\newif\ifOldLaTeX
\@ifundefined{documentclass}{\OldLaTeXtrue}{\OldLaTeXfalse}
\newif\ifDTK@Author@
\DTK@Author@true
\newif\ifDTK@german@
\DTK@german@true
\newif\ifDTK@ancient@layout@
\DTK@ancient@layout@false
\ifOldLaTeX
  \newcommand\RequirePackage[1]{
    \chardef\DTK@cat=\the\catcode`\@
    \catcode`\@=11
    \input{#1.sty}%
    \catcode`\@=\DTK@cat}
  \let\LoadClass=\RequirePackage
  \newcommand\InputIfFileExists[3]{%
    \openin\DTK@file #1
    \ifeof\DTK@file\closein\DTK@file #3%
    \else\closein\DTK@file #2\input{#1}%
    \fi}
  \newcommand\DeclareOption{\@ifstar{\@gobble}{\DTK@DeclareOption}}
  \newcommand\DTK@DeclareOption[2]{\@namedef{ds@#1}{#2}}
  \let\ProcessOptions=\relax
  \let\OptionNotUsed=\gobble
  \def\ProvidesClass#1[#2]{\typeout{Document Style #1 #2}}
  \newcommand\emph[1]{{\em #1}\/}
  \newcommand\textbf[1]{{\bf #1}}
  \newcommand\textrm[1]{{\rm #1}}
  \newcommand\textsc[1]{{\sc #1}}
  \newcommand\textsf[1]{{\sf #1}}
  \newcommand\textsl[1]{{\sl #1\/}}
  \newcommand\textit[1]{{\it #1\/}}
  \newcommand\texttt[1]{{\tt #1}}

  \@ifundefined{fontshape}{\let\fontshape=\@gobble}{}
  \@ifundefined{selectfont}{\let\selectfont=\relax}{}

  \newcommand\providescommand[2]{\ifx#1\@undefined\newcommand#1{#2}\fi}
\fi
\newread\DTK@file
\ProvidesClass{dtk}[\filedate\space  gene]
\DeclareOption{10pt}{\OptionNotUsed}
\DeclareOption{11pt}{\OptionNotUsed}
\DeclareOption{12pt}{\OptionNotUsed}
\DeclareOption{twoside}{\OptionNotUsed}
\DeclareOption{oneside}{\OptionNotUsed}
\DeclareOption{full}{\DTK@Author@false}
\DeclareOption{omitgerman}{\DTK@german@false}
\DeclareOption{ancient}{\DTK@ancient@layout@true}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessOptions
\LoadClass{book}
\ifDTK@german@
\RequirePackage{german}
\else
\typeout{*** Warning: Loading of german has been omitted. You have to
  load it manually.}
\typeout{*** Don't forget to use the macro \string\DTKgerman\space
  afterwards.}
\fi
\ifDTK@Author@\else
  \RequirePackage{multicol}
\fi
\textheight = 484pt
\textwidth  = 342pt
\oddsidemargin  = 0pt
\evensidemargin = \oddsidemargin
\topmargin      = 0pt
\ifDTK@ancient@layout@
  \headheight = 14pt
  \headsep    = 12pt
\else
  \headheight = 17pt
  \headsep    = 17pt
\fi
\ifDTK@ancient@layout@
  \footskip = 21pt
\else
  \footskip = 24pt
\fi
\parskip   = 0.5\baselineskip \advance\parskip by 0pt plus 2pt
\parindent = 0pt
\renewcommand\topfraction{.9}
\renewcommand\bottomfraction{.9}
\renewcommand\textfraction{.1}
\raggedbottom
\clubpenalty  = 10000
\widowpenalty = 10000
\newcommand\DTKgerman{
  \let\DTK@captionsgerman=\captionsgerman
  \let\captionsgerman=\DTK@captionsgerman
}
\newcommand\DTK@captionsgerman{
  \DTK@captionsgerman
  \gdef\refname{Literatur}%
  \gdef\bibname{Literatur}%
  \gdef\contentsname{Inhalt Heft \volume}%
}
\ifDTK@german@
  \DTKgerman
\fi
\newcommand\addressname{Autoren/Organisatoren}
\newcommand\volume{?/?? --- Entwurf}
\newcommand\footmark{Die \TeX nische Kom{\"o}die \volume}
\ifDTK@ancient@layout@
  \newcommand\ChapterFont{\Large\bf}
\else
  \newcommand\ChapterFont{\Large\sf}
\fi
\ifDTK@ancient@layout@
  \newcommand\SectionFont{\normalsize\bf}
\else
  \newcommand\SectionFont{\large\sf}
\fi
\ifDTK@ancient@layout@
  \newcommand\SubsectionFont{\normalsize\it}
\else
  \newcommand\SubsectionFont{\normalsize\sf}
\fi
\ifDTK@ancient@layout@
  \newcommand\SubsubsectionFont{\normalsize\it}
\else
  \newcommand\SubsubsectionFont{\normalsize\sf}
\fi
\ifDTK@ancient@layout@
  \newcommand\AuthorFont{\normalsize\rm}
\else
  \newcommand\AuthorFont{\large\sf}
\fi
\ifDTK@ancient@layout@
  \newcommand\TitleFont{\large\bf}
\else
  \newcommand\TitleFont{\Large\sf}
\fi
\ifDTK@ancient@layout@
  \newcommand\HeadFont{\sl}
\else
  \newcommand\HeadFont{\sf\fontshape{sl}\selectfont}
\fi
\ifDTK@ancient@layout@
  \newcommand\FootFont{\footnotesize\sl}
\else
  \newcommand\FootFont{\footnotesize\sf\fontshape{sl}\selectfont}
\fi
\ifDTK@ancient@layout@
  \newcommand\PagenoFont{\rm}
\else
  \newcommand\PagenoFont{\sf}
\fi
\newcommand\NewpageThreshold{100pt}
\ifDTK@ancient@layout@
  \newcommand\HeadRuleDepth{0.1pt}
\else
  \newcommand\HeadRuleDepth{0pt}
\fi
\ifDTK@ancient@layout@
  \newcommand\FootRuleDepth{0.1pt}
\else
  \newcommand\FootRuleDepth{0pt}
\fi
\newcommand\ContentsParSkip{1pt}
\ifOldLaTeX
\expandafter\ifx\csname selectfont\endcsname\relax
  % Fuer OFSS benoetigen wir noch einen Hack, damit
  % wir wieder auf die Schriftfamilie/Series/Shape
  % zurueckwechseln. Dazu ``missbrauchen'' wir die
  % `math group/fam', die in den Makros in der Datei
  % "lfonts.tex" entsprechend mit veraendert wird.
  \newcommand{\logo@sm@ller}{\relax
    \expandafter\logo@sm@ll@r\expandafter{\the\fam}}
  \newcommand{\logo@sm@ll@r}[1]{%
    % \ifx\@currsize\tiny \tiny\fi
    \ifx\@currsize\scriptsize \tiny\fi
    \ifx\@currsize\footnotesize \tiny\fi
    \ifx\@currsize\small \scriptsize\fi
    \ifx\@currsize\normalsize \scriptsize\fi
    \ifx\@currsize\large \footnotesize\fi
    \ifx\@currsize\Large \normalsize\fi
    \ifx\@currsize\LARGE \large\fi
    \ifx\@currsize\huge \Large\fi

    \ifx\@currsize\Huge \huge\fi
    \ifcase#1\relax\rm\or\mit\or\cal\or\tenex  % not sure about the tenex
        \or\it\or\sl\or\bf\or\tt\or\sf\or\sc\or\ly\fi}
\else
  % Mit NFSS (fuer LaTeX 2.09) koennen wir die Groesse
  % unabhaengig von den anderen Font-Eigenschaften aendern,
  % so dass dies etwas einfacher geht.
  \newcommand{\logo@sm@ller}{%
    \relax\@nomath\logo@smaller
    \ifx\f@size\@vpt \else
      \ifx\f@size\@vipt  \fontsize\@vpt{6pt}\fi
      \ifx\f@size\@viipt \fontsize\@vpt{6pt}\fi
      \ifx\f@size\@viiipt \fontsize\@vipt{7pt}\fi
      \ifx\f@size\@ixpt \fontsize\@vipt{7pt}\fi
      \ifx\f@size\@xpt \fontsize\@viipt{8pt}\fi
      \ifx\f@size\@xipt \fontsize\@viiipt{9.5pt}\fi
      \ifx\f@size\@xiipt \fontsize\@viiipt{9.5pt}\fi
      \ifx\f@size\@xivpt \fontsize\@xpt{12pt}\fi
      \ifx\f@size\@xviipt \fontsize\@xiipt{14pt}\fi
      \ifx\f@size\@xxpt \fontsize\@xivpt{18pt}\fi
      \ifx\f@size\@xxvpt \fontsize\@xxpt{25pt}\fi
      \selectfont
    \fi}
  % die ersten NFSS-Versionen benutzten noch den Makroname
  % \size statt \fontsize
  \@ifundefined{fontsize}{\let\fontsize=\size}{}
\fi
\newcommand{\logo@smaller}{\protect\logo@sm@ller}
\fi
\renewcommand\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX%
  \spacefactor1000 }
\@ifundefined{AmS}{%
  \def\AmS{\(\cal A\)\kern-.1667em\lower.5ex\hbox
    {\(\cal M\)}\kern-.125em{\(\cal S\)}}}{}
\@ifundefined{AMS}{\let\AMS=\AmS}{}
\@ifundefined{AmSLaTeX}{\def\AmSLaTeX{\AmS-\LaTeX}}{}
\@ifundefined{AMSLaTeX}{\let\AMSLaTeX=\AmSLaTeX}{}
\@ifundefined{AmSTeX}{%
  \def\AmSTeX{$\cal A$\kern-.1667em\lower.5ex\hbox{$\cal M$}%
    \kern-.125em$\cal S$-\TeX}}{}
\@ifundefined{AMSTEX}{\let\AMSTEX=\AmSTeX}{}
\@ifundefined{AMSTeX}{\let\AMSTeX=\AmSTeX}{}
\ifOldLaTeX
  \newcommand{\BibTeX}{\protect\pBibTeX}
  \newcommand{\pBibTeX}{B\kern-.05em%
    \hbox{\logo@smaller I\kern-.025emB}\kern-.08em%
    \-\TeX}
\else
  \DeclareRobustCommand{\BibTeX}{B\kern-.05em%
    % Der folgende Hack stammt aus der Definition des
    % Makros \LaTeX, siehe Datei `ltlogos.dtx' der
    % LaTeX2e-Verteilung.
    \hbox{$\m@th$% %% force math size calculations
          \csname S@\f@size\endcsname
          \fontsize\sf@size\z@
          \math@fontsfalse\selectfont
          I\kern-.025emB}%
    \kern-.08em%
    \-\TeX}
\fi
\@ifundefined{BIBTeX}{\let\BIBTeX=\BibTeX}{}
\@ifundefined{BIBTEX}{\let\BIBTEX=\BibTeX}{}
\@ifundefined{LAMSTeX}{%
  \newcommand\LAMSTeX{L\raise.42ex\hbox{\kern-.3em\the\scriptfont2 A}%
    \kern-.2em\lower.376ex\hbox{\the\textfont2 M}%
    \kern-.125em {\the\textfont2 S}-\TeX}}{}
\@ifundefined{LamSTeX}{\let\LamSTeX=\LAMSTeX}{}
\@ifundefined{LAmSTeX}{\let\LAmSTeX=\LAMSTeX}{}
\@ifundefined{LaTeX}{%
  \def\LaTeX{L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em\TeX}}{}
\@ifundefined{LATEX}{\let\LATEX=\LaTeX}{}
\ifOldLaTeX
  \newcommand\LaTeXTeX{(\kern-.15emL\kern-.36em\raise.3ex\hbox{\sc
      a}\kern-.3em)\kern-.15em\TeX}%
\else
  \DeclareRobustCommand{\LaTeXTeX}{(\kern-.15emL\kern-.36em%
    {\sbox\z@ T%
      \vbox to\ht0{\hbox{$\m@th$%
          \csname S@\f@size\endcsname
          \fontsize\sf@size\z@
          \math@fontsfalse\selectfont
          A}%
        \vss}%
      }\kern-.2em)%
    \kern-.15em%
    \TeX}
\fi
\ifOldLaTeX
  \ifx\manfnt\@undefined
    \font\manfnt=logo10
  \fi
  \ifx\manfntsl\@undefined
    \font\manfntsl=logosl10
  \fi
  \def\MF{{\ifdim\fontdimen1\font>0pt \let\manfnt = \manfntsl \fi
      {\manfnt META}\-{\manfnt FONT}}\spacefactor1000 }%
  \def\MP{{\ifdim\fontdimen1\font>0pt \let\manfnt = \manfntsl \fi
      {\manfnt META}\-{\manfnt POST}}\spacefactor1000 }%
\else
\DeclareFontFamily{U}{logo}{}
\DeclareFontShape{U}{logo}{m}{n}{
  <8> <9> gen * logo
  <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logo10
}{}
\DeclareFontShape{U}{logo}{m}{it}{
  <8> <9> gen * logosl
  <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logosl10
}{}
\DeclareFontShape{U}{logo}{m}{sl}{
  <-> ssub * logo/m/it
}{}
\DeclareFontShape{U}{logo}{sbc}{n}{
  <8> <9> sub * logo/m/n
  <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logobf10
}{}
\DeclareFontShape{U}{logo}{b}{n}{
  <8> <9> sub * logo/m/n
  <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logod10
}{}
\DeclareFontShape{U}{logo}{bx}{n}{
  <-> ssub * logo/b/n
}{}
\DeclareRobustCommand\logofamily{%
  \not@math@alphabet\logofamily\relax
  \fontencoding{U}\fontfamily{logo}\selectfont}
\DeclareTextFontCommand{\textlogo}{\logofamily}
\def\MF{\textlogo{META}\-\textlogo{FONT}\@}
\def\MP{\textlogo{META}\-\textlogo{POST}\@}
\fi
\@ifundefined{METAFONT}{\let\METAFONT=\MF}{}
\@ifundefined{METAPOST}{\let\METAPOST=\MP}{}
\@ifundefined{SLITEX}{
  \newcommand\SLITEX{%
    S\kern-.065em L\kern-.18em\raise.32ex\hbox{i}%
    \kern-.03em\TeX}}{}
\@ifundefined{SLiTeX}{\let\SLiTeX=\SLITEX}{}
\@ifundefined{SliTeX}{\let\SliTeX=\SLITEX}{}
\@ifundefined{SLITeX}{\let\SLITeX=\SLITEX}{}
\newcommand\NTS{\mbox{\mathsurround=0pt
    \(\cal N\mkern -4mu\lower .5ex\hbox{$\cal T$}\mkern -2mu S\)}}
\newcommand\MakeIndex{\textit{Make\-Index}}
\ifDTK@ancient@layout@
  \newcommand\eV{e.\kern-.18emV\kern-.18em\@ifnextchar.{}{.}}
\else
  \newcommand\eV{e.V\kern-.18em\@ifnextchar.{}{.}}
\fi
\newcommand\dante{DANTE \eV}
\newcommand\Dante{DANTE, Deutschsprachige Anwendervereinigung \TeX~\eV}
\newcommand\DTK{Die \TeX\-ni\-sche Ko\-m{\"o}\-die}
\ifx\LaTeXe\@undefined
  \def\LaTeXe{\LaTeX{}\kern.05em2$_{\textstyle\varepsilon}$}
\fi
\newcommand\PS{Post\-Script}
\newcommand\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC}
\newcommand\PiCTeX{\PiC\kern-.11em\TeX}
\newcommand\TUG{\TeX{} Users Group}
\newcommand\TUGboat{\textsl{TUGboat}}
\newcommand\TTN{\textsl{\TeX{} and TUG NEWS}}
\newcommand\NFSS{\textsf{NFSS}}
\newcommand\DTK@math{%
  \abovedisplayskip      = 4pt plus 2pt minus 1pt
  \belowdisplayskip      = \abovedisplayskip
  \abovedisplayshortskip = 2pt plus 2pt
  \belowdisplayshortskip = \abovedisplayshortskip
}
\let\DTK@@normalsize=\@normalsize
\def\@normalsize{%
  \DTK@@normalsize
  \DTK@math
  \let\@listi=\@listI}
\let\DTK@normalsize=\normalsize
\renewcommand\normalsize{%
  \DTK@normalsize
  \DTK@math
  \let\@listi=\@listI}
\normalsize
\let\DTK@small=\small
\renewcommand\small{%
  \DTK@small
  \DTK@math
  \let\@listi=\@listI}
\let\DTK@footnotesize=\footnotesize
\renewcommand\footnotesize{%
  \DTK@footnotesize
  \DTK@math
  \let\@listi=\@listI}
\def\@listI{%
  \leftmargin = \leftmargini
  \parsep     = \parskip
  \topsep     = 0pt plus 2pt
  \itemsep    = 0pt plus 2pt}
\let\@listi=\@listI
\def\@listii{%
  \leftmargin = \leftmarginii
  \labelwidth = \leftmarginii
  \advance   \labelwidth by-\labelsep
  \parsep     = \parskip
  \topsep     = 0pt plus 2pt
  \itemsep    = 0pt plus 2pt}
\def\@listiii{%
  \leftmargin = \leftmarginiii
  \labelwidth = \leftmarginiii
  \advance   \labelwidth by-\labelsep
  \partopsep  = 1pt plus 0pt minus 1pt
  \parsep     = \parskip
  \topsep     = 0pt plus 2pt
  \itemsep    = 0pt plus 2pt}
\@listi
\ifDTK@ancient@layout@\else
  \renewcommand\labelitemi{$\m@th\circ$}
  \renewcommand\labelitemii{$\m@th\triangleright$}
  \renewcommand\labelitemiii{$\m@th\diamond$}
  \setlength\leftmargini{1.5em}
  \setlength\leftmarginii{1.4em}
  \setlength\leftmarginiii{1.3em}
  \setlength\leftmarginiv{1.2em}
\fi
\renewenvironment{description}{%
  \begin{list}{}{%
    \labelwidth = 0pt
    \itemindent = -\leftmargin
    \parsep     = \parskip
    \topsep     = 0pt plus 2pt
    \itemsep    = 0pt plus 2pt
    \let\makelabel=\descriptionlabel}%
  }{\end{list}}

\ifDTK@ancient@layout@\else
\renewcommand\descriptionlabel[1]{\hspace\labelsep
                                {\normalsize\it #1}}
\fi
\ifDTK@ancient@layout@\else
\renewenvironment{quotation}{
  \list{}{\rightmargin\leftmargin}%
  \item\relax
}{\endlist}
\fi
\newenvironment{roll}%
  {\@ifnextchar[{\r@ll}{\r@ll[0pt]}}%
  {\end{list}}
\def\r@ll[#1]{\begin{list}{}{%
    \labelwidth = #1
    \leftmargin = \labelwidth
    \itemsep    = .3ex
    \let\makelabel=\rolllabel}%
  }
\newcommand\rolllabel[1]{\hspace\labelsep \textbf{#1}\hfill}
\newenvironment{example}{\begin{quote}\small}{\end{quote}}
\long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
  ext@#1\endcsname}{#1}{\protect\numberline{\csname
  the#1\endcsname}{\ignorespaces #2}}\begingroup
    \@parboxrestore
    \small
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}
\setcounter{secnumdepth}{0}
\newif\ifFirstArticle
\FirstArticletrue
\ifDTK@Author@
  \renewcommand\part{%
    \typeout{*** Parts can not be used in single articles.}}
\else
  \renewcommand\part{%
    \clearpage
    \thispagestyle{part}%
    \FirstArticletrue
    \Advance@Label@Prefix
    \part@star*}
\fi
\def\part@star*{%
  \@ifnextchar*{\part@star}{%
    \@ifnextchar[{\part@optional}{\part@normal}}}
\def\part@optional[#1]#2{%
  \markboth{#1}{#1}%
  \addcontentsline{toc}{part}{#1}%
  \@ifnextchar[{\part@subtitle{#2}}{\part@nosubtitle{#2}}}
\def\part@normal#1{%
  \markboth{#1}{#1}%
  \addcontentsline{toc}{part}{#1}%
  \@ifnextchar[{\part@subtitle{#1}}{\part@nosubtitle{#1}}}
\def\part@subtitle#1[#2]{\TopArt{#1}{\\#2}\bigskip\par}
\def\part@nosubtitle#1{\TopArt{#1}{}\bigskip\par}
\ifDTK@ancient@layout@
\newcommand\TopArt[2]{%
  \begingroup
    \unitlength = 1pt
    \@tempcnta  = \textwidth
    \divide\@tempcnta by \unitlength
    \framebox(\@tempcnta,38){\parbox{.95\textwidth}{%
        \begin{center}{\large\bf #1}#2 \end{center}}}
  \endgroup}
\else
\newcommand\TopArtRule{2pt}
\newcommand\TopArt[2]{%
  \begin{minipage}{\textwidth}\parskip=0pt\parindent=0pt
    \null\vspace{18pt}\par\raggedright\large\sf
    {\huge\sf #1}\\[-.5ex]\rule{\textwidth}{\TopArtRule}%
    \vspace{2pt} #2
  \end{minipage}}
\fi
\ifDTK@Author@
  \renewcommand\chapter{%
    \typeout{*** Chapters can not be used in single articles.}}
\else
  \renewcommand\chapter{%
    \@ifnextchar*{\chapter@star}{%
      \@ifnextchar[{\chapter@optional}{\chapter@normal}}}
\fi
\def\chapter@star*{\chapter}
\def\chapter@normal#1{\chapter@optional[#1]{#1}}
\def\chapter@optional[#1]{%
  \typeout{#1}%
  \Advance@Label@Prefix
  \addcontentsline{toc}{chapter}{#1}%
  \markboth{#1}{#1}%
  \FirstArticletrue
  \@startsection{chapter}{0}{\z@}{-1ex plus-1ex minus
    -.2ex}{.5ex plus.2ex}{\ChapterFont}*%
  }
\ifDTK@ancient@layout@
\renewcommand\section{\@startsection{section}{1}{\z@}{%
    -1ex plus-1ex minus-.2ex}{.5ex plus.2ex}{\SectionFont}}
\else
\renewcommand\section{\@startsection{section}{1}{\z@}{%
    -2ex plus-1ex minus-.2ex}{.5ex plus.2ex}{\SectionFont}}
\fi
\ifDTK@ancient@layout@
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}{%
    -1ex plus-1ex minus-.2ex}{0.75ex plus.2ex}{\SubsectionFont}}
\else
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}{%
    -2ex plus-1ex minus-.2ex}{0.75ex plus.2ex}{\SubsectionFont}}
\fi
\ifDTK@ancient@layout@
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{%
    -1ex plus-1ex minus-.2ex}{0.75ex plus.2ex}{\SubsubsectionFont}}
\else
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{%
    -2ex plus-1ex minus-.2ex}{0.75ex plus.2ex}{\SubsubsectionFont}}
\fi
\ifDTK@ancient@layout@
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{%
    1ex plus1ex minus.2ex}{-.5ex}{\SubsubsectionFont}}
\else
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}{%
    0ex plus1ex minus.2ex}{-.5ex}{\SubsubsectionFont}}
\fi
\ifDTK@ancient@layout@
\renewcommand\subparagraph{\@startsection{subparagraph}{4}%
  {\parindent}{1ex plus1ex minus.2ex}{-.5ex}{\SubsubsectionFont}}
\else
\renewcommand\subparagraph{\@startsection{subparagraph}{4}%
  {\parindent}{0ex plus1ex minus.2ex}{-.5ex}{\SubsubsectionFont}}
\fi
\renewcommand\maketitle{%
  \ifDTK@Author@ \thispagestyle{part}\fi
  \ifDTK@ancient@layout@\else\vspace{12pt}\fi
  \begingroup
    \dimen0=\vsize
    \advance\dimen0 by -\pagetotal
    \ifdim\dimen0<\NewpageThreshold
      \newpage
      \global\FirstArticletrue
    \fi
  \endgroup
  \Advance@Label@Prefix
  \begingroup
    \begin{minipage}{\textwidth}
      \ifFirstArticle
        \global\FirstArticlefalse
        \vskip 3pt
      \else
        \ifDTK@ancient@layout@
          \rule{\textwidth}{.4pt}%
          \vskip 14pt plus 8pt minus 12pt%
        \else
          \vspace{32pt plus 8pt minus 16pt}%
        \fi
      \fi
      \setcounter{footnote}0
      \@flushglue=0pt plus .3\textwidth\relax
      \raggedright
      \TitleFont
      \spaceskip=\fontdimen2\font\relax
      \xspaceskip=\fontdimen7\font\relax
      \@title
      \ifx\@author\@empty\else
        \bigskip\par
        \AuthorFont\@author
      \fi
    \end{minipage}%
    \@thanks
    \let\thanks\@gobble
    \addcontentsline{toc}{chapter}{\@title}%
    \markboth{\@title}{\@title}%
  \endgroup
  \let\@title=\@empty
  \let\@author=\@empty
  \let\@thanks=\@empty
  \setcounter{figure}0
  \setcounter{table}0
  \setcounter{equation}0
  \medskip\par}
\renewcommand\and{, }
\let\@title=\@empty
\let\@author=\@empty
\let\@thanks=\@empty
\newenvironment{abstract}{%
  \begin{quote}\small
    }{%
  \end{quote}\medskip\par}
\renewcommand\thefigure{\arabic{figure}}
\renewcommand\thetable{\arabic{table}}
\renewcommand\theequation{\arabic{equation}}
\newcount\DTL@label
\DTL@label=0
\newcommand\Advance@Label@Prefix{%
  \advance\DTL@label 1
  \xdef\Label@Prefix{module \the\DTL@label:}}
\Advance@Label@Prefix
\let\Ref=\ref
\let\Label=\label
\let\Pageref=\pageref
\renewcommand\ref[1]{\Ref{\Label@Prefix:#1}}
\renewcommand\label[1]{\Label{\Label@Prefix:#1}}
\renewcommand\pageref[1]{\Pageref{\Label@Prefix:#1}}
\renewcommand\thebibliography[1]{%
  \section*{\refname}%
  \list{[\arabic{enumi}]}{%
    \settowidth\labelwidth{[#1]}%
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumi}}
  \def\newblock{\hskip .11em plus .33em minus .07em}
  \sloppy\clubpenalty4000\widowpenalty4000
  \sfcode`\.=1000\relax}
\newcommand\DTK@bibliography[1]{
  \InputIfFileExists{#1.bbl}{}{\typeout{--- File #1.bbl not found.}}}
\newcommand\DTK@fnrightmargin{0em}
\newcommand\DTK@fnleftmargin{1em}
\ifDTK@ancient@layout@\else
\long\def\@makefntext#1{%
  \begin{list}{}{%
      \rightmargin=0pt%
      \parsep=0.333\baselineskip plus 2pt
      \leftmargin=\DTK@fnleftmargin}
  \item\mbox{}\llap{$^{\@thefnmark}$\kern1pt}#1
  \end{list}}

\renewcommand\footnoterule{%
  \kern-3\p@
  \hrule\@width0.333\columnwidth
  \kern2.6\p@}
\fi
\renewcommand\ps@plain{%
  \let\@mkboth=\@gobbletwo
  \let\chaptermark=\@gobble
  \let\sectionmark=\@gobble
  \let\subsectionmark=\@gobble
  \def\@oddhead{\vbox{\hbox to \textwidth{%
        \let\\=\relax
        \HeadFont \rightmark \hfil\PagenoFont\thepage}\kern 3pt
      \ifdim\HeadRuleDepth>0pt \hrule depth\HeadRuleDepth\fi}}%
  \def\@evenhead{\vbox{\hbox to \textwidth{%
        \let\\=\relax
        \PagenoFont \thepage\hfil\HeadFont \leftmark}\kern 3pt
      \ifdim\HeadRuleDepth>0pt \hrule depth\HeadRuleDepth\fi}}%
  \def\@oddfoot{\vbox{%
      \ifdim\FootRuleDepth>0pt \hrule depth\FootRuleDepth \fi
      \kern 5pt \hbox to \textwidth{\FootFont \footmark\hfil\null}}}%
  \def\@evenfoot{\vbox{%
      \ifdim\FootRuleDepth>0pt \hrule depth\FootRuleDepth \fi
      \kern 5pt \hbox to \textwidth{\null\hfil\FootFont \footmark}}}}
\newcommand\ps@part{%
  \let\@mkboth=\@gobbletwo
  \let\chaptermark=\@gobble
  \let\sectionmark=\@gobble
  \let\subsectionmark=\@gobble
  \let\@oddhead=\@empty
  \let\@evenhead=\@empty
  \def\@oddfoot{\vbox{%
      \ifdim\FootRuleDepth>0pt \hrule depth\FootRuleDepth \fi
      \kern 5pt \hbox to \textwidth{\FootFont \footmark\hfil\null}}}%
  \def\@evenfoot{\vbox{%
      \ifdim\FootRuleDepth>0pt \hrule depth\FootRuleDepth \fi
      \kern 5pt \hbox to \textwidth{\null\hfil\FootFont \footmark}}}}
\pagestyle{plain}
\ifDTK@Author@\else
  \newcommand\DieTeXnischeKomoedie[3]{%
    \thispagestyle{empty}%
    \gdef\volume{#1}%
    \gdef\DTKedition{#2}%
    \gdef\DTKdate{#3}%
    \global\let\bibliography=\DTK@bibliography
    \global\let\bibliographystyle=\@gobble
    \CoverArt{#1}{#2}{#3}%
    \newpage}
\fi
\ifDTK@ancient@layout@
\newcommand\CoverArt[3]{
  \ifx\CoverTitleFont\@undefined
    \newfont\CoverTitleFont{cmr17 scaled \magstep 5}%
  \fi
  \begin{center}
    {\LARGE DANTE\\[14pt]
     \Large Deutschsprachige Anwendervereinigung \TeX\ \eV}%
    \\\rule{\textwidth}{2pt}\par\vfill
    \CoverTitleFont    Die
    \\[22pt]       \TeX nische
    \\[22pt]       Kom{\"o}die
    \par\vfill\rule{\textwidth}{2pt}\\[4pt]\large
    Heft #1\hfill #2.\ Jahrgang\hfill #3
    \normalsize
  \end{center}\vspace*{28.5pt}}
\else
\newcommand\CoverArt@linewidth{0pt}%{1.2pt}
\newcommand\CoverArt@barwidth{2.41pt}
\newcommand\CoverArt@font{\Large\raggedleft}
\newcommand\CoverArt@small{\footnotesize}
\newcommand\CoverArt@gap{2em}
\newcommand\CoverArt[3]{%
  \ifx\CoverTitleFont\@undefined
  \newfont\CoverTitleFont{cmr17 scaled \magstep 5}
  \fi
  \ifx\CoverNumberFont\@undefined
  \newfont\CoverNumberFont{cmr17 scaled 3583}
  \fi
  \vspace*{-34pt}\hfill
  \setbox\@tempboxa=\hbox to \textheight{\null\hfill\CoverTitleFont
    Die \TeX nische Kom\"odie\hfill\null}%
  \@tempdimb=\ht\@tempboxa
  \advance\@tempdimb by\dp\@tempboxa
  \hbox to\@tempdimb{%
    \vbox to\wd\@tempboxa{%
      \vskip\wd\@tempboxa
      \special{ps:gsave currentpoint currentpoint translate
        270 rotate neg exch neg exch translate}%
      \box\@tempboxa\vss}\hss}%
  \special{ps:currentpoint grestore moveto} \
  \rule{\CoverArt@barwidth}{\textheight}
  \begin{minipage}[b]{.7\textwidth}\raggedright
    \rule{1em}{0pt}%
    \dimen2=\textwidth\advance\dimen2-1em
    \parbox{\dimen2}{\CoverArt@font
      DANTE\\
      Deutschsprachige\\
      Anwendervereinigung
      \TeX\ \eV}\\[1ex]
    \dimen3=\textwidth\advance\dimen3-\CoverArt@gap
    \hfill\rule{\dimen3}{\CoverArt@linewidth}%
    \\[-\baselineskip]\null\hspace{1em}%
    {\CoverArt@small #2. Jahrgang\quad Heft #1\quad #3}%
    \\[-\baselineskip]\rule{0pt}{.617647\textheight}%
    \CoverNumberFont
    \null\hfill
    \makebox(0,0)[br]{%
      \special{ps:gsave \CoverArt@gray}%
      \CoverArt@strip@no #1;\hspace{1pt}%
      \special{ps:grestore}}%
  \end{minipage}%
}

\newcommand\CoverArt@gray{.95 setgray}

\def\CoverArt@strip@no#1/#2#3#4#5;{#1\raisebox{0.35ex}{\CoverTitleFont/}#4#5}
\fi
\newcommand\address[3]{%
  \begingroup
    \def\"##1{\@ifundefined{detex@@##1}{##1}%
      {\csname detex@@##1\endcsname}}%
    \let"=\"%
    \def\ss{ss}%
    \let\'=\relax
    \let\`=\relax
    \let\^=\relax
    \let\.=\relax
    \let\==\relax
    \let\d=\relax
    \let\b=\relax
    \let\c=\relax
    \let\v=\relax
    \let\H=\relax
    \let\t=\relax
    \let\u=\relax
    \let\~=\relax
    \def\o{o}%
    \def\O{O}%
    \def\aa{aa}%
    \def\AA{Aa}%
    \def\l{l}%
    \def\L{L}%
    \def\ae{ae}%
    \def\AE{Ae}%
    \def\oe{oe}%
    \def\OE{Oe}%
    \def\TeX{TeX}%
    \def\LaTeX{LaTeX}%
    \def\LaTeXe{LaTeX2e}%
    \let\null=\relax
    \xdef\@ddress{#2, #1}%
  \endgroup
  \begingroup
    \def\\{\string\\}%
    \def\"{\string"}%
    \def"{\string"}%
    \def\null{}%
    \expandafter\@strip\@ddress$%$
    \index{\STRIP@*#1 #2!#3}%
  \endgroup
}
\let\strip@grp={
\let\strip@end=$%$
\def\@strip{\def\STRIP@{}\strip@I}
\def\strip@I{\let\strip@next=\strip@I
  \futurelet\strip@CHAR\strip@II}
\def\strip@II#1{%
  \ifx\strip@CHAR\strip@end
    \let\strip@next=\relax
  \else\ifx\strip@CHAR\strip@grp
    \strip@I #1$%$
    \let\strip@next=\strip@I
  \else\ifcat\strip@CHAR A
    \xdef\STRIP@{\STRIP@#1}%
  \else\ifcat\strip@CHAR.
    \xdef\STRIP@{\STRIP@#1}%
  \else\ifcat\strip@CHAR\space
    \xdef\STRIP@{\STRIP@ #1}%
  \fi\fi\fi\fi\fi
  \strip@next}
\def\detex@@a{ae}
\def\detex@@o{oe}
\def\detex@@u{ue}
\def\detex@@A{Ae}
\def\detex@@O{Oe}
\def\detex@@U{Ue}
\def\detex@@s{ss}
\ifDTK@Author@\else
\newenvironment{theaddresses}{%
  \chapter{\addressname}\Label{addresses}
  \begingroup
  \def\addressitem##1##2##3{\par{\bf ##1}\hfill[\ignorespaces ##3]%
    \\ ##2}
  \begin{multicols}{2}%
    }{%
  \end{multicols}%
  \endgroup
  }
\fi
\ifDTK@Author@
  \newcommand\listofaddresses{%
    \typeout{*** listofaddresses not supported in articles.}}
\else
  \newcommand\listofaddresses{%
    \InputIfFileExists{\jobname.ind}{}{%
      \typeout{No file \jobname.ind.}%
      \typeout{Use the following command to create it:\space\space
        makeindex -s dtk.ist \jobname}%
      \typeout{\space}}%
  }
\fi
\ifDTK@Author@
  \renewcommand\tableofcontents{%
    \typeout{*** tabelofcontents not supported in articles.}}
\else
  \renewcommand\tableofcontents{%
    \clearpage
    \thispagestyle{empty}%
    \markboth{\contentsname}{\contentsname}%
    \ContentsArt
    \begingroup
      \parskip=\ContentsParSkip
      \let\\=\relax
      \@starttoc{toc}
    \endgroup
  }
  \ifDTK@ancient@layout@
  \newcommand\ContentsArt{\part@nosubtitle{\contentsname}}
  \else
  \newcommand\ContentsArt{%
    \vspace*{-\headheight}\vspace*{-\headsep}\vspace*{-2pt}
    \begin{minipage}{\textwidth}
        \Huge Die \TeX nische Kom\"odie\\[2pt]%
        \rule{\textwidth}{2pt}\\[2pt]%
        \null\hfill
        \CoverArt@small \DTKedition. Jahrgang\quad Heft \volume\quad\DTKdate
    \end{minipage}\vspace{16pt minus 8pt}\par
    }
  \fi
\fi
\setcounter{tocdepth}{0}
\renewcommand\l@part[2]{%
  \addpenalty{-\@highpenalty}%
  \addvspace{0.5em plus 0pt}% space above part line
  \@tempdima 1.5em
  \begingroup
    \parindent \z@ \rightskip \@pnumwidth
    \parfillskip -\@pnumwidth
    \bf
    \leavevmode
    \advance\leftskip\@tempdima
    \hskip -\leftskip
    #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
    \penalty\@highpenalty
  \endgroup}
\renewcommand\l@chapter{\@dottedtocline{0}{1.5em}{2.3em}}
\endinput
%%
%% End of file `dtk.cls'.
