% \iffalse
%
% This is file `hc.dtx'.
%
%% Copyright (C) 1998--2000 Christian Siefkes <error@cs.tu-berlin.de>
%% 
%% Updates are available via http://tal.cs.tu-berlin.de/error/TeX/
%% 
%% This file is part of the HC Bundle for LaTeX2e.
%% -----------------------------------------------
%% 
%% This file is free software; you can redistribute it and/or modify 
%% it under the terms of the GNU Library General Public License as
%% published by the Free Software Foundation; either version 2 of the
%% License, or (at your option) any later version.
%% 
%% This document 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; see the file COPYING. If not, write to
%% the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
%% Boston, MA 02111-1307, USA.
%%
% \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         \~}
%
%<class>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%<*dtx>
              \ProvidesFile{hc.dtx}%
%</dtx>
%<german>\ProvidesFile{german.hld}%
%<hcart>\ProvidesClass{hcart}%
%<hcletter>\ProvidesClass{hcletter}%
%<hcreport>\ProvidesClass{hcreport}%
%<hcslides>\ProvidesClass{hcslides}%
% \fi
%             \ProvidesFile{hc.dtx}%
              [2000/03/23 v1.07 LaTeX2e HC Bundle]
% \iffalse
%
%<*driver>
\documentclass[paper]{hcart}
\usepackage{doc}
\begin{document}
\DocInput{hc.dtx}
\end{document}
%</driver>
% \fi
% 
% \newcommand{\cs}[1]{\texttt{\backslash #1}}
% \changes{v0.9}{1999/09/09}{First public prerelease}
% \changes{v1.0}{1999/11/01}{First official public version}
% \changes{v1.01}{1999/11/05}{better PDF support, 
%     \cs{keywords} and \cs{hyperinfo} commands added}
% \changes{v1.02}{1999/11/28}{author's email \& homepage made
%     hyperlinks, \cs{phyp} and \cs{arrow} commands added}
% \changes{v1.02a}{1999/12/23}{bugs fixed (load \texttt{babel} after
%    \texttt{natbib} package; correct formatting of \cs{tit(sub)info)}}
% \changes{v1.02b}{1999/12/26}{\cs{bibfirst} command removed}
% \changes{v1.02c}{2000/01/02}{\cs{addrdiv} command added}
% \changes{v1.02d}{2000/01/04}{\cs{enge} command added,
%    \cs{bibmov} command modified}
% \changes{v1.02e}{2000/01/05}{\cs{etal} command modified}
% \changes{v1.02f}{2000/01/30}{bug fixed (\texttt{german} option)}
% \changes{v1.03}{2000/01/31}{\cs{cfcite} command added}
% \changes{v1.04}{2000/02/23}{\texttt{xspace} package support added}
% \changes{v1.04a}{2000/02/24}{\texttt{mathpple} package support added}
% \changes{v1.04b}{2000/02/29}{output of \cs{noyear} and \cs{noplace}
%    commands changed}
% \changes{v1.05}{2000/03/04}{\texttt{dialog} environment and \cs{newspeaker}
%    command added}
% \changes{v1.06}{2000/03/10}{\texttt{fnbib} option and \cs{f} command added}
% \changes{v1.06a}{2000/03/11}{bug fixed (\texttt{fnbib} option)}
% \changes{v1.06b}{2000/03/13}{implementation of (\texttt{bib} option changed)}
% \changes{v1.06c}{2000/03/14}{\cs{ps@headings} macro changed)}
% \changes{v1.07}{2000/03/23}{\cs{see} macro added)}
% \GetFileInfo{hc.dtx}
%
% \tit[\filedate]{The HC Bundle for \LaTeXe\\\fileversion}
%
% \MakeShortVerb{\|}
% \newcommand{\descOpt}[1]{\marginbox{#1}}
% \newcommand{\descCom}[1]{\marginbox{\tt\textbackslash #1}}
% \newcommand{\descEnv}[2][]
%    {\marginbox{\texttt{\textbackslash begin{\tt\string{}#2{\tt\string}}}#1}}
% \newcommand{\comdiv}{\\ \tt\textbackslash}
% \newcommand{\m}[1]{\mbox{\it #1\/}}
% \renewcommand{\arg}[1]{{\tt\string{}\m{#1}{\tt\string}}}
% \newcommand{\oarg}[1]{{\tt[}\m{#1}{\tt]}}
% \newcommand{\rarg}[1]{<\m{#1}>}
%
% \section{Introduction}
% The HC Bundle for \LaTeXe\ provides the following four classes as 
% replacement for the \LaTeX\ default classes:
% \begin{flexlist}{hcreport.cls}
% \item[hcart.cls] substitute for the |article| class,\\
%      based upon the |scrartcl| class from the KoMa-Script bundle;
% \item[hcreport.cls] substitute for the |report| class,\\
%      based upon the |scrreprt| class from the KoMa-Script bundle;
% \item[hcletter.cls] substitute for the |letter| class,\\
%      based upon the |scrlettr| class from the KoMa-Script bundle;
% \item[hcslides.cls] substitute for the |slides| class,\\
%      based upon the |seminar| class.
% \end{flexlist}
%    \begin{macrocode}
%<*hcart>
\newcommand{\thisclass}{hcart}
\newcommand{\superclass}{scrartcl}
%</hcart>
%<*hcletter>
\newcommand{\thisclass}{hcletter}
\newcommand{\superclass}{scrlettr}
%</hcletter>
%<*hcreport>
\newcommand{\thisclass}{hcreport}
\newcommand{\superclass}{scrreprt}
%</hcreport>
%<*hcslides>
\newcommand{\thisclass}{hcslides}
\newcommand{\superclass}{seminar}
%</hcslides>
%    \end{macrocode}
% \section{Options}
% \subsection{General Options}
% \descOpt{german\\english}
% Loads a language. Default is English. At the moment no other languages are
% supported. Requires the |babel| package.
%    \begin{macrocode}
%<*class>
\newif\if@german
\@germanfalse
\newif\if@deflang
\@deflangtrue
\DeclareOption{german}{\@deflangfalse\@germantrue
  \PassOptionsToPackage{ngerman}{babel}
  \PassOptionsToPackage{german}{fancyref}
  \AtEndOfClass{\input{german.hld}}}
\DeclareOption{english}{\@deflangfalse
  \PassOptionsToPackage{\CurrentOption}{babel}}
%    \end{macrocode}
% \descOpt{a4paper\\letterpaper}
% Use the DIN~A4 (default) or the letter paper format? At the moment no other
% paper formats are supported.
%    \begin{macrocode}
\newif\if@defpaper
\@defpapertrue
\DeclareOption{a4paper}{
%<hcart|hcletter|hcreport>\PassOptionsToClass{\CurrentOption}{\superclass}
%<hcslides>\PassOptionsToClass{a4}{\superclass}
\PassOptionsToPackage{\CurrentOption}{hyperref}
\@defpaperfalse}
\DeclareOption{letterpaper}{
%<hcart|hcletter|hcreport>\PassOptionsToClass{\CurrentOption}{\superclass}
\PassOptionsToPackage{\CurrentOption}{hyperref}
\@defpaperfalse}
%    \end{macrocode}
% \descOpt{palatino\\nopalatino}
% Use the Palatino or the Standard \TeX\ font? Palatino is default (requires
% the |palatino| and the |mathpple| packages).
%    \begin{macrocode}
\newif\if@palatino
\@palatinotrue
\DeclareOption{palatino}{\@palatinotrue}
\DeclareOption{nopalatino}{\@palatinofalse}
%    \end{macrocode}
% \descOpt{ding}
% Provide some fancy lists and symbols using the Dingbat symbols (requires
% the |pifont| style of the |psnfss| package)?
%    \begin{macrocode}
\newif\if@ding
\@dingfalse
\DeclareOption{ding}{\@dingtrue}
%    \end{macrocode}
% \descOpt{euro\\noeuro}
% Provide the Euro symbol \E\ (default, requires the |eurofont| package)?
%    \begin{macrocode}
\newif\if@euro
\@eurotrue
\DeclareOption{euro}{\@eurotrue}
\DeclareOption{noeuro}{\@eurofalse}
%    \end{macrocode}
% \descOpt{fancyref\\nofancyref}
% Provide fancy reference commands (default, requires the |fancyref| and the
% |varioref| packages)?
%    \begin{macrocode}
\newif\if@fancyref
\@fancyreftrue
\DeclareOption{fancyref}{\@fancyreftrue}
\DeclareOption{nofancyref}{\@fancyreffalse}
%    \end{macrocode}
% \descOpt{html\\nohtml}
% Provide HTML commands (default, requires the |html| package bundled with
% \LaTeX2HTML)?
%    \begin{macrocode}
\newif\if@html
\@htmltrue
\DeclareOption{html}{\@htmltrue}
\DeclareOption{nohtml}{\@htmlfalse}
%</class>
%    \end{macrocode}
% \subsection{Options for the hcart and hcreport classes}
% \descOpt{headsepline\\headnosepline}
% Draw a horizontal line below the header line (default)?
%    \begin{macrocode}
%<*hcart|hcreport>
\newif\if@defhsl
\@defhsltrue
\DeclareOption{headsepline}{\PassOptionsToClass
{\CurrentOption}{\superclass}\@defhslfalse}
\DeclareOption{headnosepline}{\PassOptionsToClass
{\CurrentOption}{\superclass}\@defhslfalse}
%    \end{macrocode}
% \descOpt{onecolumn\\twocolumn}
% Set the text in one or two columns (default is one)?
%    \begin{macrocode}
\DeclareOption{onecolumn}{\PassOptionsToClass
{\CurrentOption}{\superclass}}
\DeclareOption{twocolumn}{\PassOptionsToClass
{\CurrentOption}{\superclass}}
%    \end{macrocode}
% \descOpt{hcarea\\hcnoarea}
% Set the default area to 240mm $\times$ 150mm (default)? Otherwise,
% the default value from the |scrartcl| resp. |scrreprt| classes is used
% if you do not set the area manually (e.g. with the |\areaset| command).
%    \begin{macrocode}
\newif\if@hcarea
\@hcareatrue
\DeclareOption{hcarea}{\@hcareatrue}
\DeclareOption{hcnoarea}{\@hcareafalse}
%    \end{macrocode}
% \descOpt{hcfootnotes\\hcnofootnotes}
% Nicer formatting of footnotes (default)?
%    \begin{macrocode}
\newif\if@hcfootnotes
\@hcfootnotestrue
\DeclareOption{hcfootnotes}{\@hcfootnotestrue}
\DeclareOption{hcnofootnotes}{\@hcfootnotesfalse}
%    \end{macrocode}
% \descOpt{magazine}
% Provide commands for magazine or newspaper articles? This sets the
% |html| option too.
%    \begin{macrocode}
\newif\if@magazine
\@magazinefalse
\DeclareOption{magazine}{\@magazinetrue\@htmltrue}
%    \end{macrocode}
% \descOpt{parskip}
% Skip paragraphs instead of indenting them?
%    \begin{macrocode}
\newif\if@parskip
\@parskipfalse
\DeclareOption{parskip}{\@parskiptrue}
%    \end{macrocode}
% \descOpt{wide}
% Use a wide line distance (ca. 1.5)?
%    \begin{macrocode}
\newif\if@wide
\@widefalse
\DeclareOption{wide}{\@widetrue}
%</hcart|hcreport>
%    \end{macrocode}
% \subsection{Options for the hcart, hcreport and hcletter classes}
% \descOpt{10pt\\11pt\\12pt}
% Use a font size of 10, 11, or 12 (default) points?
%    \begin{macrocode}
%<*hcart|hcreport|hcletter>
\newif\if@defsize
\@defsizetrue
\DeclareOption{10pt}{\PassOptionsToClass{\CurrentOption}{\superclass}
\@defsizefalse}
\DeclareOption{11pt}{\PassOptionsToClass{\CurrentOption}{\superclass}
\@defsizefalse}
\DeclareOption{12pt}{\PassOptionsToClass{\CurrentOption}{\superclass}
\@defsizefalse}
%</hcart|hcreport|hcletter>
%    \end{macrocode}
% \subsection{Options for the hcart, hcreport and hcslides classes}
% \descOpt{bib\\nobib}
% Use \BibTeX?
%    \begin{macrocode}
%<*hcart|hcreport|hcslides>
\newif\if@bib
\@bibfalse
\DeclareOption{bib}{\@bibtrue}
\DeclareOption{nobib}{\@bibfalse}
%    \end{macrocode}
% \descOpt{fnbib\\autbib\\numbib}
% \BibTeX\ references are written in footnotes (default) or in
% author-year or in numerical style.
% These options set the |bib| option too.
%    \begin{macrocode}
\newif\if@fnbib
\@fnbibtrue
\newif\if@autbib
\@autbibfalse
\newif\if@numbib
\@numbibfalse
\DeclareOption{fnbib}{\@fnbibtrue\@autbibfalse\@numbibfalse\@bibtrue}
\DeclareOption{autbib}{\@fnbibfalse\@autbibtrue\@numbibfalse\@bibtrue}
\DeclareOption{numbib}{\@fnbibfalse\@autbibfalse\@numbibtrue\@bibtrue}
%    \end{macrocode}
% \descOpt{htmlbib\\nohtmlbib}
% Use the |html| package for online references with \BibTeX\ (default)?
% This loads the |html| option too.
%    \begin{macrocode}
\newif\if@htmlbib
\@htmlbibtrue
\DeclareOption{htmlbib}{\@htmlbibtrue\@htmltrue}
\DeclareOption{nohtmlbib}{\@htmlbibfalse}
%    \end{macrocode}
% \descOpt{paper}
% Provide formatting and commands for a scientific paper? This sets the
% |bib| and |html| options too.
%    \begin{macrocode}
\newif\if@paper
\@paperfalse
\DeclareOption{paper}{\@papertrue\@bibtrue\@htmltrue}
%    \end{macrocode}
% \descOpt{pdf\\nopdf}
% Prepare file for the PDF format? This loads the |hyperref| package.
% This option is set automagically by running |pdflatex|.
%    \begin{macrocode}
\newif\if@pdf
\ifx\pdfoutput\undefined
  \@pdffalse
\else
  \@pdftrue
\fi
\DeclareOption{pdf}{\@pdftrue}
\DeclareOption{nopdf}{\@pdffalse}
%</hcart|hcreport|hcslides>
%    \end{macrocode}
% \subsection{Options for the hcreport class}
% \descOpt{openany\\openright}
% Start new chapters always on a right page (not by default)?
%    \begin{macrocode}
%<*hcreport>
\DeclareOption{openany}
  {\PassOptionsToClass{\CurrentOption}{\superclass}}
\DeclareOption{openright}
  {\PassOptionsToClass{\CurrentOption}{\superclass}}
%</hcreport>
%    \end{macrocode}
% \subsection{Options for the hcslides class}
% \descOpt{twotoc\\onetoc}
% Print table of contents in two columns (requires the |multicol| package)?
%    \begin{macrocode}
%<*hcslides>
\newif\if@twotoc
\@twotocfalse
\DeclareOption{twotoc}{\@twotoctrue}
\DeclareOption{onetoc}{\@twotocfalse}
%</hcslides>
%    \end{macrocode}
% \subsection{Other Options}
% Other options are ignored.
%    \begin{macrocode}
%<*class>
\DeclareOption*{\ClassWarning{\thisclass}%
   {Unknown Option: `\CurrentOption '}%
}  
%    \end{macrocode}
% Options not implemented: 
% \begin{widedesc}
% \item[scrartcl, scrlettr, scrreprt]
% paper sizes except a4 and letter (a5paper, b5paper, legalpaper, 
% executivepaper ...);  oneside, twoside;
% \item[scrartcl, scrreprt]
% DIV\dots, DIVcalc, DIVclassic, BCOR; headinclude, headexclude, footinclude,
% footexclude; footsepline, footnosepline;
% bigheadings, normalheadings, smallheadings;
% pointednumbers, pointlessnumbers; abstracton, abstractoff;
% titlepage, notitlepage; leqno, fleqn; openbib; portrait, landscape;
% draft, final; bibtotocnumbered;
% \item[scrlettr]
% orgdate; wlocfield, slocfield;
% \item[seminar]
% portrait, landscape; article, slidesonly, notes,
% notesonly; semlayer, semcolor.
% \end{widedesc}
% \section{Commands and Environments}
% \subsection{Configuration}
% \descCom{defaulttitle\arg{title}\comdiv
%   defaultauthor\arg{author}\comdiv
%   defaultaddress\arg{address}\comdiv
%   defaultemail\arg{mail-address}\comdiv
%   defaulthomepage\arg{website}}
% Used if no author information is specified.
% They are all empty by default. Renew them in one of the config files
% (see below). 
% \descCom{autdiv}
% Use instead of |\\| in |\defaultauthor|.
% \descCom{autinfodiv}
% Use instead of |\\| in |\defaultaddress| etc.
%    \begin{macrocode}
\newcommand{\defaulttitle}{}
\newcommand{\defaultauthor}{}
\newcommand{\defaultaddress}{}
\newcommand{\defaultemail}{}
\newcommand{\defaulthomepage}{}
\newcommand{\currenttitle}{\defaulttitle}
\newcommand{\currentauthor}{\defaultauthor}
\newcommand{\autdiv}{\\[-0.4ex]\normalfont\Large}
\newcommand{\autinfodiv}{\\[-1ex]\normalfont\normalsize}
\ProcessOptions\relax
%</class>
%<*hcart|hcreport>
\if@defhsl
  \PassOptionsToClass{headsepline}{\superclass}
\fi
%    \end{macrocode}
% The |twoside|, |pointlessnumbers|,
% |liststotoc|, |bibtotoc| and |idxtotoc|
% options are always used with the |hcart| and |hcreport| classes.
% The |hcletter| class always uses the |wlocfield| option.
%    \begin{macrocode}
\PassOptionsToClass{twoside,pointlessnumbers,liststotoc,
  bibtotoc,idxtotoc}{\superclass}
%</hcart|hcreport>
%<hcletter>\PassOptionsToClass{wlocfield}{\superclass}
%<*hcart|hcreport|hcletter>
\if@defsize
  \PassOptionsToClass{12pt}{\superclass}
\fi
%</hcart|hcreport|hcletter>
%<*class>
\if@deflang
  \PassOptionsToPackage{english}{babel}
\fi
\if@defpaper
%<hcart|hcreport>  \PassOptionsToClass{a4paper}{\superclass}
%<hcslides>  \PassOptionsToClass{a4}{\superclass}
  \PassOptionsToPackage{a4paper}{hyperref}
\fi
\LoadClass{\superclass}
%    \end{macrocode}
% The normal spacing is used after the end of a sentence.
%    \begin{macrocode}
\sloppy
\clubpenalty9999
\@clubpenalty\clubpenalty
\widowpenalty9999
\displaywidowpenalty1000
\brokenpenalty1000
\frenchspacing
%    \end{macrocode}
% The modern font encoding (T1) and the latin1 input encoding are used
% (this requires the |T1| and |latin1| packages). The |ifthen|,
% the |babel| and the |xspace| packages are always used.
% The |bib| option loads the |natbib| package.
%    \begin{macrocode}
%<hcart|hcreport|hcslides>\RequirePackage{natbib}
\RequirePackage[T1]{fontenc}
\RequirePackage[latin1]{inputenc}
\RequirePackage{ifthen}
\RequirePackage{babel}
\RequirePackage{xspace}
%    \end{macrocode}
% The config file |hc.cfg| is used by all classes. Every class also
% uses a config file with its own name, e.g. the hcart class uses
% |hcart.cfg|. The settings in |hc.cfg| may be overwritten by the
% class specific config files.
%    \begin{macrocode}
\InputIfFileExists{hc.cfg}{%
  \ClassInfo{\thisclass}
    {Loading configuration file hc.cfg}}{%
  \ClassInfo{\thisclass}
    {Configuration file hc.cfg not found}}
\InputIfFileExists{\thisclass.cfg}{%
  \ClassInfo{\thisclass}
    {Loading configuration file \thisclass.cfg}}{%
  \ClassInfo{\thisclass}
    {Configuration file \thisclass.cfg not found}}
%    \end{macrocode}
% \subsection{General Commands and Environments}
% \descCom{q\arg{quote}}
% \rarg{quote} is put into quotation marks. May be nested: A quote inside
% another quote uses inner quotation marks.
%    \begin{macrocode}
\newcommand{\nextstartq}{`}
\newcommand{\nextendq}{'}
\newcommand{\otherstartq}{``}
\newcommand{\otherendq}{''}
\newcommand{\tmpq}{}
\newcommand{\q}[1]{\nextstartq{}%
  \let\tmpq\nextstartq%
  \let\nextstartq\otherstartq%
  \let\otherstartq\tmpq%
  \let\tmpq\nextendq%
  \let\nextendq\otherendq%
  \let\otherendq\tmpq%
  #1%
  \let\tmpq\nextstartq%
  \let\nextstartq\otherstartq%
  \let\otherstartq\tmpq%
  \let\tmpq\nextendq%
  \let\nextendq\otherendq%
  \let\otherendq\tmpq%
  \nextendq{}%
}
%    \end{macrocode}
% \descCom{hq\arg{quote}}
% \rarg{quote} is always put into inner (\hq{half}) quotation marks.
%    \begin{macrocode}
\newcommand{\hq}[1]{``#1''}
%    \end{macrocode}
% \descCom{fq\arg{quote}}
% \rarg{quote} is always put into outer (\fq{full}) quotation marks.
%    \begin{macrocode}
\newcommand{\fq}[1]{`#1'}
%    \end{macrocode}
% \descCom{dash\arg{text}}
% \rarg{text} is put between dashes.
%    \begin{macrocode}
\newcommand{\dash}[1]{---#1---}
%    \end{macrocode}
% \descEnv[\oarg{separator}\arg{longest-title}]{flexlist}
% A list environment similar to the |description| environment.
% All items are indented by the  width of \rarg{longest-title}.
% The default \rarg{separator} is \q{:}.
%    \begin{macrocode}
\newenvironment{flexlist}[2][:]
    {\begin{list}{}
      {\settowidth{\labelwidth}{\sffamily\bfseries #2#1 }
       \setlength{\leftmargin}{\labelwidth}
       \addtolength{\leftmargin}{\labelsep}
       \renewcommand{\makelabel}[1]
         {\sffamily\bfseries ##1#1 \hfill}}}
    {\end{list}}
%    \end{macrocode}
% \descEnv[\oarg{separator}]{widedesc}
% A variation of the |flexlist| environment.
% All items are indented by the width of a date (\q{00.00.0000}).
% The default \rarg{separator} is \q{:}.
%    \begin{macrocode}
\newenvironment{widedesc}[1][:]
  {\begin{flexlist}[#1]{00.00.0000}}
  {\end{flexlist}}
%    \end{macrocode}
% \descCom{pcent\arg{value}}
% Prints \rarg{value} followed by the percent symbol \%.
%    \begin{macrocode}
\newcommand{\pcent}[1]{#1\,\%}
%    \end{macrocode}
% \descCom{qdots}
% Prints the scientific omission symbol \qdots.
%    \begin{macrocode}
\newcommand{\qdots}{\mbox{[\dots]}\xspace}
%    \end{macrocode}
% \descCom{phyp}
% Prints a (part of a) word in parenthesis, ended by a hypen, like
% \phyp{love}letter.
%    \begin{macrocode}
\newcommand{\phyp}[1]
  {(#1\textormath{\leavevmode\hbox{-}}{-})\hskip\z@skip}
%    \end{macrocode}
% \descCom{arrow}
% Prints an arrow: \arrow.
%    \begin{macrocode}
\newcommand{\arrow}{\ensuremath{\rightarrow}\xspace}
%    \end{macrocode}
% \descCom{f\comdiv ff}
% Print the abbreviations for \q{the following page(s)}
% (\q{f} resp. \q{ff} after a small space).
%    \begin{macrocode}
\newcommand{\f}{\,f}
\newcommand{\ff}{\,ff}
%    \end{macrocode}
% \descCom{distance}
% Starts a new un-indented paragraph following an empty line.
%    \begin{macrocode}
\newcommand{\distance}{\par\bigskip\noindent}
%    \end{macrocode}
% \descCom{stardistance}
% Starts a new un-indented paragraph following three centered stars.
%    \begin{macrocode}
\newcommand{\stardistance}
  {\par\bigskip{\centering *~~~*~~~*\par}\bigskip\noindent}
%    \end{macrocode}
% \descCom{linedistance}
% Starts a new un-indented paragraph following an horizontal rule.
%    \begin{macrocode}
\newcommand{\linedistance}{%
  \begin{center}
  \begin{tabular}{p{0.33\textwidth}}
  \hrule
  \end{tabular}
  \end{center}
  \medskip\noindent%
}
%    \end{macrocode}
% \descCom{sig\arg{name}}
% Prints \rarg{name} as signature (flushright in italics).
%    \begin{macrocode}
\newcommand{\sig}[1]{\par{\raggedleft\emph{#1}\par}}
%    \end{macrocode}
% \descCom{intro\arg{text}}
% \rarg{text} is centered in an extra paragraph, using a bold font.
% Followed by some space.
%    \begin{macrocode}
\newcommand{\intro}[1]{{\par\centering\textbf{#1}\par}
  \medskip\noindent\ignorespaces}
%    \end{macrocode}
% \descCom{hint\arg{text}}
% \rarg{text} is centered in an extra paragraph, using a large font.
%    \begin{macrocode}
\newcommand{\hint}[1]{{\par\centering\LARGE #1\par}
  \noindent\ignorespaces}
%    \end{macrocode}
% \descCom{cen\arg{text}}
% An alternative to the |center| environment using less space before and after.
%    \begin{macrocode}
\newcommand{\cen}[1]
  {{\par\centering #1\par}\noindent\ignorespaces}
%    \end{macrocode}
% \descCom{marginbox\arg{text}}
% A text in a box, set out into the margin. Lines are divided by |\\|.
%    \begin{macrocode}
\newcommand{\marginbox}[1]%
  {\par\small\addvspace{4.5ex plus 1ex}%
   \vskip -\parskip
%<hcart|hcletter|hcreport>   \noindent\hspace{-.75\leftmargini}%
%<hcslides>   \noindent
   \begin{tabular}{|l|}\hline\ignorespaces
   #1
   \\\hline\end{tabular}\nobreak\par\nobreak
   \vspace{2.3ex}\vskip -\parskip\noindent\ignorespaces}
%    \end{macrocode}
% \descCom{rightaddress}
% Like the |\verse| environment, but moved to the right as far as possible.
% Lines are divided by |\\|.
%    \begin{macrocode}
\newcommand{\rightaddress}[1]{%
  \par\medskip
  {\raggedleft \begin{tabular}{l}\ignorespaces
  #1
  \end{tabular}
  \medskip\par}\noindent\ignorespaces%
}
%    \end{macrocode}
% \descCom{shorttoday}
% Prints the short form (YY/MM/DD) of the current date (|\today|).
%    \begin{macrocode}
\newcounter{shortyear}
\setcounter{shortyear}{\the\year}
\addtocounter{shortyear}{-1900}
\whiledo{\theshortyear>99}{\addtocounter{shortyear}{-100}}
\newcommand{\shorttoday}
  {\two@digits{\theshortyear}/\the\month/\the\day\xspace}
%    \end{macrocode}
% \descEnv{dialog}
% An environment for dialogues and screenplay-like scenes. 
% Use the |\newspeaker| command to make the persons you want to
% use in the dialogues.
%    \begin{macrocode}
\newenvironment{dialog}
  {\begin{flexlist}[\normalfont\emph{:}]{i}
     \setlength{\itemsep}{0ex}}
  {\end{flexlist}}
\makeatletter
%    \end{macrocode}
% \descCom{newspeaker\arg{command-name}\arg{speaker's-name}}
% Produces the command \rarg{command-name} to mark the speeches of
% \rarg{speaker's-name} in a dialogue. \rarg{command-name} must begin
% with a backslash, like all commands.\\
% Then the command \rarg{command-name} may be called in a |dialog|
% environment as follows:\\
% |command-name\oarg{optional-explanation}\arg{speech-contribution}|
%    \begin{macrocode}
\newcommand{\newspeaker}[2]{\newcommand{#1}[2][]
  {\item[\normalfont\emph{#2\ifthenelse{\equal{##1}{}}
     {}{ (##1)}}] ##2}}
%    \end{macrocode}
% \descCom{enge\arg{English text}\arg{German text}}
% Prints \arg{English text}. With the |german| option, \rarg{German text}
% is printed instead.
%    \begin{macrocode}
\newcommand{\enge}[2]{#1}
%    \end{macrocode}
% Some language specific texts.
%    \begin{macrocode}
\newcommand{\versiontext}{Version date:}
\newcommand{\onlinetext}{Online:}
\newcommand{\accesstext}{Access date:}
\newcommand{\cftext}{cf.}
\newcommand{\bibvoltext}{of}
\newcommand{\bvtext}{vol.}
\newcommand{\bibdir}{Director }
\newcommand{\bibmovtext}{Movie}
\newcommand{\bibactorsbefore}{With}
\newcommand{\bibactorsafter}{et~al}
\newcommand{\noyear}{n.d.}
\newcommand{\noaddress}{n.p.}
\newcommand{\otherabstractname}{Zusammenfassung}
\newcommand{\keywordsname}{Keywords}
%    \end{macrocode}
% \subsubsection{The palatino option}
%    \begin{macrocode}
\if@palatino
  \RequirePackage{palatino}
  \RequirePackage{mathpple}
\fi
%    \end{macrocode}
% \subsubsection{The ding option}
%    \begin{macrocode}
\if@ding
   \RequirePackage{pifont}
%    \end{macrocode}
% \descCom{tick}
% Prints a tick.
%    \begin{macrocode}
   \newcommand{\tick}{\ding{52}}
%    \end{macrocode}
% \descCom{cross}
% Prints a cross.
%    \begin{macrocode}
   \newcommand{\cross}{\ding{56}}
%    \end{macrocode}
% \descCom{checkbox}
% Prints a checkbox.
%    \begin{macrocode}
   \newcommand{\checkbox}{\ding{114}}
%    \end{macrocode}
% \descEnv{ticklist}
% A item environment which uses a tick as label 
% (e.g. for lists of do's).
%    \begin{macrocode}
   \newenvironment{ticklist}
    {\begin{dinglist}{52}}{\end{dinglist}}
%    \end{macrocode}
% \descEnv{crosslist}
% A item environment which uses a cross as label 
% (e.g. for lists of don't).
%    \begin{macrocode}
   \newenvironment{crosslist}
    {\begin{dinglist}{56}}{\end{dinglist}}
%    \end{macrocode}
% \descEnv{checklist}
% A item environment which uses a checkbox as label 
% (e.g. for check lists).
%    \begin{macrocode}
   \newenvironment{checklist}
    {\begin{dinglist}{114}}{\end{dinglist}}
\fi
%    \end{macrocode}
% \subsubsection{The euro option}
% \descCom{E}
% Prints the Euro symbol \E.
% \descCom{Es\arg{value}}
% Prints the Euro symbol followed by \rarg{value}.
%    \begin{macrocode}
\if@euro
   \RequirePackage[right,notextcomp]{eurofont}
   \newcommand{\E}{\textsf{\makefakelighteuro}\xspace}
   \newcommand{\Es}[1]{\E\nobreak\,#1}
\fi
%    \end{macrocode}
% \subsubsection{The fancyref option}
% Loads the |fancyref| package which provides the command
% |\fref|\arg{prefix:labelname}. This prints not only the number, but also
% the type of a reference. The following prefixes (types) are recognized:
% |chap| (Chapter),
% |sec| (Section),
% |eq| (Equation),
% |fig| (Figure),
% |tab| (Table),
% |enum| (Enumeration),
% |fn| (Footnote).
% At the beginning of a sentence use |\Fref| instead, which gives upper-case
% output (in German documents there is no difference).
%    \begin{macrocode}
\if@fancyref
  \RequirePackage{fancyref}
\fi
%    \end{macrocode}
% \descCom{see\arg{reference}}
% Prints \q{see \rarg{reference}} in a footnote, using the |\fref| command
% to print \rarg{reference}.
%    \begin{macrocode}
\newcommand{\seetext}{see}
\newcommand{\see}[1]{\footnote{\seetext\ \fref{#1}}}
%    \end{macrocode}
% \subsubsection{The html option}
% \descCom{htlink\arg{linked text}\arg{url}}
% Prints \rarg{linked text} followed by the \rarg{url}. With the |paper|
% option, a footnote is used. In the HTML version
% \rarg{linked text} becomes an active link to \rarg{url}.
% \descCom{hturl\arg{url}}
% Prints \rarg{url} nice and makes it an active link in the
% HTML version.  
% \descCom{htmail\arg{mail-adress}}
% Prints \rarg{mail-adress} nice and makes it an active email link in the
% HTML version.
%    \begin{macrocode}
\if@html
%</class>
%<*hcletter>
  \newcounter{part}
  \newcounter{section}
  \newcounter{subsection}
  \newcounter{subsubsection}
  \newcounter{paragraph}
  \newcommand{\part}{}
  \newcommand{\section}{}
  \newcommand{\subsection}{}
  \newcommand{\subsubsection}{}
  \newcommand{\paragraph}{}
  \newcommand{\subparagraph}{}
  \RequirePackage{html}
  \newcommand{\htlink}[2]
    {{\htmladdnormallink{#1 \texttt{<#2>}}{#2}}}
%</hcletter>
%<*hcart|hcreport|hcslides>
  \RequirePackage{html}
  \if@paper
    \newcommand{\htlink}[2]
      {\htmladdnormallink{#1}{#2}%
       \footnote{\htmladdnormallink{\texttt{#2}}{#2}}}
  \else
    \newcommand{\htlink}[2]
      {{\htmladdnormallink{#1 \texttt{<#2>}}{#2}}}
  \fi
%</hcart|hcreport|hcslides>
%<*class>
  \newcommand{\hturl}[1]
    {{\htmladdnormallink{\texttt{#1}}{#1}}}
  \newcommand{\htmail}[1]
    {{\htmladdnormallink{\texttt{#1}}{mailto:#1}}}
\fi
%</class>
%    \end{macrocode}
% \subsection{Commands and Environments for the hcart and hcreport classes}
% The default depth of section numbering and table of contents is three.
% |headings| is the default page style. The page number is printed in the
% header line, the footer line is empty.
%    \begin{macrocode}
%<*hcart|hcreport>
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\RequirePackage[breakwords]{truncate}
\newlength{\rightmarklength}
\def\ps@headings{\let\@mkboth\markboth
  \def\@evenhead{\vbox{\hsize=\textwidth
    \hb@xt@ \textwidth{%
    {\pnumfont\thepage\hfil\headfont\truncate{0.92\textwidth}%
      {\raggedleft\strut\leftmark}}}%
    \if@hsl \vskip 1.5\p@ \hrule \fi}}
  \def\@oddhead{\settowidth{\rightmarklength}{\rightmark}%
   \vbox{\hsize=\textwidth
    \hb@xt@ \textwidth{{\headfont\truncate{0.92\textwidth}%
      {\strut\ifthenelse{\lengthtest{\rightmarklength=0em}}%
       {\leftmark{}}{\rightmark{}}%
       \hfil}\hfil\pnumfont\thepage}}%
    \if@hsl \vskip 1.5\p@ \hrule \fi}}
  \def\@evenfoot{\vbox{\hsize=\textwidth
    \if@fsl \hrule \vskip 3\p@ \fi
    \hb@xt@ \textwidth{{\pnumfont\hfil}}}}%
  \def\@oddfoot{\vbox{\hsize=\textwidth
    \if@fsl \hrule \vskip 3\p@ \fi
    \hb@xt@ \textwidth{{\pnumfont\hfil}}}}%
%<hcreport>  \def\chaptermark##1{%
%<hcreport>   \markboth {\ifnum \c@secnumdepth >\m@ne
%<hcreport>        \chaptermarkformat\fi
%<hcreport>        ##1}{}}%
%<hcreport>  \def\sectionmark##1{%
%<hcreport>    \markright {\ifnum \c@secnumdepth >\z@
%<hcreport>        \sectionmarkformat\fi
%<hcreport>        ##1}}}
%<hcart>  \def\sectionmark##1{%
%<hcart>   \markboth {\ifnum \c@secnumdepth >\z@%
%<hcart>    \sectionmarkformat\fi ##1}{}}
%<hcart>  \def\subsectionmark##1{%
%<hcart>   \markright {\ifnum \c@secnumdepth >\@ne%
%<hcart>    \subsectionmarkformat\fi ##1}}}
\pagestyle{headings}
%    \end{macrocode}
% \subsubsection{The hcarea option}
%    \begin{macrocode}
\if@hcarea
  \RequirePackage{typearea}
  \areaset[15mm]{150mm}{240mm}
\fi
%    \end{macrocode}
% \subsubsection{The hcfootnotes option}
%    \begin{macrocode}
\if@hcfootnotes
  \deffootnote{1em}{0.5em}
    {\textsuperscript{\normalfont\thefootnotemark}\,}
\fi
%    \end{macrocode}
% \subsubsection{The magazine option}
% \descCom{articletitle\arg{title}}
% Prints the article \rarg{title}.
% \descCom{subjecttitle\arg{subject}\arg{title}}
% Prints before the article \rarg{title} the \rarg{subject} in a smaller font.
% \descCom{titlesubject\arg{title}\arg{subject}}
% Prints after the article \rarg{title} the \rarg{subject} in a smaller font.
% \descCom{articlesection\arg{heading}}
% Prints a heading within an article (actually, a |\subsection*|).
% \descEnv[\oarg{signature}\arg{title}]{art}
% A magazine article set in two columns with a \rarg{title} (using
% |\articletitle|) and an optional \rarg{signature} (using |\sig|).
% Requires the |multicol| package.
% \descEnv[\oarg{signature}\arg{subject}\arg{title}]{artsubtit}
% Like the |art| environment, but uses |\subjecttitle| instead of
% |\articletitle|.
% \descEnv[\oarg{signature}\arg{title}\arg{subject}]{arttitsub}
% Like the |art| environment, but uses |\titlesubject| instead of
% |\articletitle|.
%    \begin{macrocode}
\if@magazine
  \RequirePackage{multicol}
  \newcommand{\articletitle}[1]
    {\addsec[#1]{\LARGE #1}}
  \newcommand{\subjecttitle}[2]
    {\addsec[#2]{{\large #1}\\{\LARGE #2}}}
  \newcommand{\titlesubject}[2]
    {\addsec[#1]{{\LARGE #1}\\{\large #2}}}
  \newcommand{\articlesection}[1]{\subsection*{#1}}
  \newcommand{\currentsig}{}
  \newenvironment{@art}[2][]{%
    \begin{multicols}{2}[#2]
    \renewcommand{\currentsig}{#1}%
  }{%
    \ifthenelse{\equal{\currentsig}{}}
      {}
      {\sig{\currentsig}}
    \end{multicols}%
  }
  \newenvironment{art}[2][]
    {\begin{@art}[#1]{\articletitle{#2}}}{\end{@art}}
  \newenvironment{artsubtit}[3][]
    {\begin{@art}[#1]{\subjecttitle{#2}{#3}}}{\end{@art}}
  \newenvironment{arttitsub}[3][]
    {\begin{@art}[#1]{\titlesubject{#2}{#3}}}{\end{@art}}
\fi
%    \end{macrocode}
% \subsubsection{The parskip option}
%    \begin{macrocode}
\if@parskip
  \setlength\parskip{\medskipamount}
  \setlength\parindent{0pt}
\fi
%    \end{macrocode}
% \subsubsection{The wide option}
%    \begin{macrocode}
\if@wide
  \linespread{1.3}
\fi
%</hcart|hcreport>
%    \end{macrocode}
% \subsection{Commands and Environments for the hcart, hcreport and 
%   hcslides classes}
% \subsubsection{The bib option}
% With the |fnbib| option (default), the |\cite| and |\citet| and |\cite|
% commands all work the same.
% 
% With the |autbib| option, |\cite| always works like |\citep|, 
% i.\,e. puts the citation in brackets.
% Use |\citet| if you do not want this.
%
% Commands like |\cite| should always be used \emph{without} a space between
% them and the preceeding text.
%    \begin{macrocode}
%<class>\newcommand{\bibliostyle}{hc-en}
%<*hcart|hcreport|hcslides>
\if@bib
\if@fnbib
  \bibpunct[, ]{}{}{;}{a}{}{,}
  \renewcommand\NAT@cite%
    [3]{\footnote{\ifNAT@swa\NAT@@open\if*#2*\else#2\ \fi
        #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi}\endgroup}
  \let\@cite\NAT@cite
\fi
\if@autbib
  \bibpunct[, ]{ [}{]}{;}{a}{}{,}
  \let\cite\citep
\fi
\if@numbib
   \bibpunct[, ]{ [}{]}{;}{n}{}{,}
\fi
%    \end{macrocode}
% \descCom{cfcite\oarg{pages}\arg{source}}
% Shortcut for |\cite|\oarg{\cftext}\oarg{pages}\arg{source}.
%    \begin{macrocode}
\newcommand{\cfcite}[2][]{\cite[\cftext][#1]{#2}}
%    \end{macrocode}
% \descCom{biblio\oarg{style}\arg{bib files}}
% Writes the bibliography. \rarg{bib files} is a comma-separated list
% of bib files, \rarg{style} the \BibTeX\ style file (by default
% |hc-en| for English documents).
%    \begin{macrocode}
%<hcart|hcslides>\if@paper
%<hcart|hcslides>  \newcommand{\beforebiblio}{\newpage}
%<hcart|hcslides>\else
%<hcart|hcslides>  \newcommand{\beforebiblio}{\vfill}
%<hcart|hcslides>\fi
\newcommand{\biblio}[2][\bibliostyle]{%
%<hcart|hcslides>  \beforebiblio
  \bibliographystyle{#1}
  \bibliography{#2}%
}
%    \end{macrocode}
% \descCom{qu\oarg{pages}\arg{source}\arg{quotation}}
% A \rarg{quotation} in quotes followed by the reference {[}\rarg{source},
% \rarg{pages}{]}.
%    \begin{macrocode}
\newcommand{\qu}[3][]{\q{#3}\cite[#1]{#2}}
%    \end{macrocode}
% \descCom{qul\oarg{pages}\arg{source}\arg{quotation}}
% Like |\qu| but inside a |quote| environment (for longer quotions).
%    \begin{macrocode}
\newcommand{\qul}[3][]{\begin{quote}
  \qu[#1]{#2}{#3}
  \end{quote}}
%    \end{macrocode}
% \descCom{biburl\arg{url}\arg{access date}}
% \rarg{url} and \rarg{access date} of online documents.
% For online-only documents use a \textsc{manual} entry with |\biburl| 
% in the \textsc{organization} field. 
% For other documents put it in the \textsc{note} field.
%    \begin{macrocode}
  \if@htmlbib
    \newcommand{\biburl}[2]{\onlinetext\\
     {\small\hturl{#1}}\\\accesstext\ #2}
  \else
    \newcommand{\biburl}[2]{\onlinetext\\
     {\small\texttt{#1}}\\\accesstext\ #2}
  \fi
%    \end{macrocode}
% \descCom{bibdiv}
% Separator between the title and subtitle of a document.
%    \begin{macrocode}
   \newcommand{\bibdiv}{. }
%    \end{macrocode}
% \descCom{bibvol\oarg{separating word}\arg{volume number}\arg{serial title}}
% Use at the end of the \textsc{title} field (without space before) 
% if the output of the \textsc{volume} and \textsc{series} fields 
% is not convincing. Interesting 
% especially for German documents where \q{der} instead of \q{von}
% is used as \rarg{separating word} (English: \q{of}).
%    \begin{macrocode}
   \newcommand{\bibvol}[3][\bibvoltext]
     {\emph{, \bvtext~#2 #1} #3}
%    \end{macrocode}
% \descCom{addrdiv}
% Separator between different places in a \BibTeX\ entry's
% \textsc{address} field.
%    \begin{macrocode}
   \newcommand{\addrdiv}{ -- }
%    \end{macrocode}
% \descCom{etal\oarg{year}}
% Ends a list (e.\,g. of places in a \BibTeX\ entry's \textsc{address} field) 
% which is not complete \mbox{(\q{\etal})}. A \rarg{year} can be given which
% is printed afterwards.
%    \begin{macrocode}
\newcommand{\etal}[1][]{ et~al%
  \ifthenelse{\equal{#1}{}}{}{. #1}%
}
%    \end{macrocode}
% \descCom{noyear\comdiv noaddress}
% Use in the \textsc{year} resp. \textsc{address} field of a \BibTeX\ entry 
% when no year resp. address is known.
% \minisec{The following commands are for movie databases 
% (use \textsc{manual} entry):}
% \descCom{bibdir}
% Give the director in the \textsc{author} field in the following way:\\
% |Surname, \bibdir, Christian Name|
% \descCom{bibmov\arg{country}\arg{studio}\arg{main actors}}
% Put in the \textsc{organization} field.
%    \begin{macrocode}
  \newcommand{\bibmov}[3]{\bibmovtext\bibdiv\ #2, #1\bibdiv\ 
    \bibactorsbefore\ #3 \bibactorsafter}
\fi
%    \end{macrocode}
% \subsubsection{The pdf option}
%    \begin{macrocode}
\newcommand{\hypertitle}{}
\newcommand{\hyperauthor}{}
\newcommand{\hyperabstract}{}
\newcommand{\hyperkeywords}{}
\if@pdf
  \AtEndOfClass{\RequirePackage[hyperindex,colorlinks=true,
     pdftex,latex2html,extension=pdf]{hyperref}}
  \AtBeginDocument{%
    \let\oldautdiv\autdiv
    \renewcommand{\autdiv}{, }
    \ifthenelse{\equal{\hypertitle}{}}
       {\renewcommand{\hypertitle}{\currenttitle}}{}
    \ifthenelse{\equal{\hyperauthor}{}}
       {\renewcommand{\hyperauthor}{\currentauthor}}{}
    \ifthenelse{\equal{\hyperabstract}{}}
       {\renewcommand{\hyperabstract}{\abstext}}{}
    \ifthenelse{\equal{\hyperkeywords}{}}
       {\renewcommand{\hyperkeywords}{\keywordstext}}{}
    \pdfinfo{
       /Title (\hypertitle)
       /Author (\hyperauthor)
       /Subject (\hyperabstract)
       /Keywords (\hyperkeywords)
      }
      \let\autdiv\oldautdiv
  }
\fi
%</hcart|hcreport|hcslides>
%    \end{macrocode}
% \subsubsection{Title commands}
% \descCom{toc}
% Puts the table of contents at the end of the current page (i.e. after
% a vertical fill and before a pagebreak).
% With the |paper| option the table of contents is generated automatically, 
% so |\toc| does nothing at all.
%    \begin{macrocode}
%<*hcart|hcslides>
\if@paper
  \newcommand{\@toc}{%
    \newpage
%<hcart>    \thispagestyle{empty}
%<hcslides>    \slidepagestyle{HC}
%<hcart>    \if@wide \linespread{1} \fi
    \tableofcontents
%<hcart>    \if@wide \linespread{1.3} \fi
    \newpage%
  }
  \newcommand{\toc}{}
\else
  \newcommand{\@toc}{%
    \vfill
%<hcart>    \thispagestyle{empty}
%<hcslides>    \slidepagestyle{HC}
%<hcart>    \if@wide \linespread{1} \fi
    \tableofcontents
%<hcart>    \if@wide \linespread{1.3} \fi
    \newpage%
  }
  \newcommand{\toc}{\@toc}
\fi
%</hcart|hcslides>
%<*hcreport>
\newcommand{\@toc}{
  \if@wide \linespread{1} \fi
  \tableofcontents
  \if@wide \linespread{1.3} \fi
  \thispagestyle{empty}
}
\if@paper
  \newcommand{\toc}{}
\else
  \newcommand{\toc}{\@toc}
\fi
%</hcreport>
%    \end{macrocode}
% \descCom{titsubinfo\arg{main title}\arg{sub title}\arg{more info}\comdiv
%   titsub\arg{main title}\arg{sub title}\comdiv
%   titinfo\arg{main title}\arg{more info}
% }
% They should be used in the premable --
% call |\tit[ver]| or |\titaut[ver]| in the document body.
% Use if your document has a main title and a sub title and/or you want to
% give additional information. Leave
% the \rarg{title} parameter of |\tit|\texttt{\qdots} empty.
% \rarg{more info} is printed below the \rarg{(sub) title} 
% in a small font.
%    \begin{macrocode}
%<*hcart|hcreport|hcslides>
\if@paper
  \newcommand{\titsubinfo}[3]{
    \renewcommand{\defaulttitle}{%
      #1\vfill
      {\Large #2\vfill}
      \vfill {\normalsize #3\vfill}%
    }
    \renewcommand{\currenttitle}{#1}%
  }
  \newcommand{\titsub}[2]{
    \renewcommand{\defaulttitle}{%
      #1\vfill
      {\Large #2\vfill\vfill}%
    }
    \renewcommand{\currenttitle}{#1}%
  }
  \newcommand{\titinfo}[2]{
    \renewcommand{\defaulttitle}{%
      #1\vfill
      \vfill {\normalsize #2\vfill}%
    }
    \renewcommand{\currenttitle}{#1}%
  }
\else
  \newcommand{\titsubinfo}[3]{
    \renewcommand{\defaulttitle}{#1\\[0.8ex] 
      {\Large #2\\[0.8ex]}
      {\normalsize #3\\}%
    }
    \renewcommand{\currenttitle}{#1}%
  }
  \newcommand{\titsub}[2]{
    \renewcommand{\defaulttitle}{#1\\[0.8ex] 
      {\Large #2\\[0.8ex]}%
    }
    \renewcommand{\currenttitle}{#1}%
  }
  \newcommand{\titinfo}[2]{
    \renewcommand{\defaulttitle}{#1\\[0.8ex] 
      {\normalsize #2\\}%
    }
    \renewcommand{\currenttitle}{#1}%
  }
\fi
%    \end{macrocode}
% \descCom{autinfo\arg{author}\arg{address}\arg{email}\arg{homepage}}
% Should be used in the premable --
% call |\tit|, |\titaut| or |\titautver| in the document body.
% Specifies information about the author (name, address, mail-address and
% homepage). Use |\autdiv| resp. |\autinfodiv| instead of |\\|.
%    \begin{macrocode}
\newcommand{\autinfo}[4]{%
  \renewcommand{\defaultauthor}{#1}
  \renewcommand{\defaultaddress}{#2}
  \renewcommand{\defaultemail}{#3}
  \renewcommand{\defaulthomepage}{#4}
  \renewcommand{\currentauthor}{#1}
}
%    \end{macrocode}
% \descCom{abs\oarg{other-language abstract}\arg{abstract}}
% Should be used in the premable --
% call |\tit|, |\titaut| or |\titautver| in the document body.
% Prints an abstract text. Optionally an additional abstract in another
% language is printed below. The title of the other-language abstract
% may be changed by redefining |\otherabstractname|. By default
% \q{\otherabstractname} is used (German).
%    \begin{macrocode}
\newcommand{\abstext}{}
\newcommand{\otherabstext}{}
\newcommand{\abs}[2][]{%
  \renewcommand{\otherabstext}{#1}
  \renewcommand{\abstext}{#2}
}
%    \end{macrocode}
% \descCom{keywords\arg{keywords}}
% Should be used in the premable --
% call |\tit|, |\titaut| or |\titautver| in the document body.
% Prints a list of keywords.
%    \begin{macrocode}
\newcommand{\keywordstext}{}
\newcommand{\keywords}[1]{%
  \renewcommand{\keywordstext}{#1}
}
%    \end{macrocode}
% \descCom{hyperinfo\arg{title}\arg{author}\arg{abstract}\arg{keywords}}
% An alternative way to specify document information for the PDF version.
% Use when the default document information extracted from 
% |\tit[sub][info]|, |\autinfo|,
% |\abs| and |\keywords| does not work as it should.
% If one of the parameters is left empty the default information
% is used instead.
% Do not use any formatting or special commands.
% Must be used in the premable. Without the |pdf| option this command
% is ignored.
%    \begin{macrocode}
\if@pdf
  \newcommand{\hyperinfo}[4]{
    \renewcommand{\hypertitle}{#1}
    \renewcommand{\hyperauthor}{#2}
    \renewcommand{\hyperabstract}{#3}
    \renewcommand{\hyperkeywords}{#4}
  }
\else
  \newcommand{\hyperinfo}[4]{}
\fi
%    \end{macrocode}
% \descCom{titaut\oarg{date}\arg{title}\arg{author}}
% Replacement for:
% |\title|\arg{title}
% |\author|\arg{author}
% |\date|\arg{date}
% |\maketitle|\\
% Default date is |\today|. With the |paper| option, a titlepage and
% a table of contents are generated.
%    \begin{macrocode}
\if@paper
  \newcommand{\titaut}[3][\today]{%
%<hcart|hcreport>    \if@wide \linespread{1} \fi
%<hcslides>    \slidepagestyle{empty}\setcounter{slide}{0}
    \ifthenelse{\equal{#2}{}}
      {}
      {\renewcommand{\defaulttitle}{#2}
        \renewcommand{\currenttitle}{#2}}
    \title{\normalfont\huge \defaulttitle \vfill}
    \ifthenelse{\equal{#3}{}}
      {}
      {\renewcommand{\defaultauthor}{#3}
        \renewcommand{\currentauthor}{#3}}
    \author{\normalfont\Large \defaultauthor\\[0.8ex] 
      \normalfont\normalsize \defaultaddress\\[0.4ex] 
      \normalfont\normalsize 
      \htmladdnormallink{\defaultemail}{mailto:\defaultemail}\\[-1ex]
      \normalfont\normalsize 
      \htmladdnormallink{\defaulthomepage}{\defaulthomepage}
}
    \date{\vfill\vfill \normalfont\normalsize #1}
%<hcreport>    \lowertitleback{%
%<hcreport>      \ifthenelse{\equal{\otherabstext}{}}{}%
%<hcreport>         {\minisec{\centering\abstractname}
%<hcreport>           \abstext}%
%<hcreport>      \ifthenelse{\equal{\otherabstext}{}}{}%
%<hcreport>         {\minisec{\centering\otherabstractname}
%<hcreport>           \otherabstext}%
%<hcreport>      \ifthenelse{\equal{\keywordstext}{}}{}%
%<hcreport>         {\minisec{\centering\keywordsname}
%<hcreport>           \cen{\keywordstext}}%
%<hcreport>    }
    \maketitle
    \ifthenelse{\isundefined{\currentdate}}
      {\newcommand{\currentdate}{#1}}{}
%<hcart|hcslides>    \setcounter{page}{0}
%<hcart|hcslides>    \thispagestyle{empty}
%<hcart|hcslides>     \ifthenelse{\equal{\abstext}{}}{%
%<hcart|hcslides>        \ifthenelse{\equal{\keywordstext}{}}{}{
%<hcart|hcslides>           \vfill\vfill
%<hcart|hcslides>           \minisec{\centering\keywordsname}
%<hcart|hcslides>           \cen{\keywordstext}}
%<hcart|hcslides>    }{%
%<hcart|hcslides>       \vfill\vfill
%<hcart|hcslides>          \minisec{\centering\abstractname}
%<hcart|hcslides>          \abstext
%<hcart|hcslides>          \ifthenelse{\equal{\otherabstext}{}}{}
%<hcart|hcslides>             {\minisec{\centering\otherabstractname}
%<hcart|hcslides>               \otherabstext}
%<hcart|hcslides>          \ifthenelse{\equal{\keywordstext}{}}{}
%<hcart|hcslides>             {\minisec{\centering\keywordsname}
%<hcart|hcslides>               \cen{\keywordstext}}
%<hcart|hcslides>    }
    \setcounter{page}{0}
    \thispagestyle{empty}
    \@toc%
%<hcart|hcreport>    \if@wide \linespread{1.3} \fi
%<hcslides>        \slidepagestyle{HC}%
  }
\else
  \newcommand{\titaut}[3][\today]{%
%<hcart|hcreport>    \if@wide \linespread{1} \fi
%<hcslides>    \slidepagestyle{empty}\setcounter{slide}{0}
    \ifthenelse{\equal{#2}{}}
      {}
      {\renewcommand{\defaulttitle}{#2}
        \renewcommand{\currenttitle}{#2}}
    \title{\normalfont\huge \defaulttitle}
    \ifthenelse{\equal{#3}{}}
      {}
      {\renewcommand{\defaultauthor}{#3}
        \renewcommand{\currentauthor}{#3}}
    \author{\normalfont\Large \defaultauthor}
    \date{\normalfont\normalsize #1}
%<hcreport>    \lowertitleback{%
%<hcreport>      \ifthenelse{\equal{\otherabstext}{}}{}%
%<hcreport>         {\minisec{\centering\abstractname}
%<hcreport>           \abstext}%
%<hcreport>      \ifthenelse{\equal{\otherabstext}{}}{}%
%<hcreport>         {\minisec{\centering\otherabstractname}
%<hcreport>           \otherabstext}%
%<hcreport>      \ifthenelse{\equal{\keywordstext}{}}{}%
%<hcreport>         {\minisec{\centering\keywordsname}
%<hcreport>           \cen{\keywordstext}}%
%<hcreport>    }
    \maketitle
    \ifthenelse{\isundefined{\currentdate}}
      {\newcommand{\currentdate}{#1}}{}
%<hcart|hcslides>    \setcounter{page}{0}
%<hcart|hcslides>    \thispagestyle{empty}
%<hcart|hcslides>     \ifthenelse{\equal{\abstext}{}}{}{
%<hcart|hcslides>          \minisec{\centering\abstractname}
%<hcart|hcslides>          \abstext
%<hcart|hcslides>          \ifthenelse{\equal{\otherabstext}{}}{}
%<hcart|hcslides>             {\minisec{\centering\otherabstractname}
%<hcart|hcslides>               \otherabstext}
%<hcart|hcslides>    }
%<hcart|hcslides>     \ifthenelse{\equal{\keywordstext}{}}{}
%<hcart|hcslides>        {\minisec{\centering\keywordsname}
%<hcart|hcslides>          \cen{\keywordstext}}
    \setcounter{page}{0}
    \thispagestyle{empty}%
%<hcart|hcreport>    \if@wide \linespread{1.3} \fi
%<hcslides>    \newpage\slidepagestyle{HC}%
  }
\fi
%    \end{macrocode}
% \descCom{tit\oarg{date}\arg{title}}
% Calls |\titaut| with the default author information.
%    \begin{macrocode}
\newcommand{\tit}[2][\today]{\titaut[#1]{#2}{}}
%    \end{macrocode}
% \descCom{titautver\oarg{version 
%   date}\arg{title}\arg{author}\arg{general date}}
% Prints a general date (e.g. of first release) and a version date
% (default: |\today|).
%    \begin{macrocode}
\newcommand{\titautver}[4][\today]{
  \newcommand{\currentdate}{#1}%
  \titaut[#4\\\versiontext\ #1]{#2}{#3}
}
%    \end{macrocode}
% \descCom{titver\oarg{version date}\arg{title}\arg{general date}}
% Calls |\titautver| with the default author information.
%    \begin{macrocode}
\newcommand{\titver}[3][\today]{\titautver[#1]{#2}{}{#3}}
%    \end{macrocode}
% \subsubsection{Sectioning Commands}
% \descCom{fictionsec}
% A sectioning command producing just a number, no text -- useful e.g.
% for fiction without section headings. 
% When a new |\section| starts the counter is reset.
%    \begin{macrocode}
\newcounter{fictionsec}[section]
\newcommand{\fictionsec}{\addtocounter{fictionsec}{1}%
  \subsection*{\centering\thefictionsec}}
%</hcart|hcreport|hcslides>
%    \end{macrocode}
% \subsection{Commands and Environments for the hcart class}
% A |\part| command starts a new page.
%    \begin{macrocode}
%<*hcart>
\renewcommand\part{\clearpage
   \@afterindentfalse
   \secdef\@part\@spart}
%</hcart>
%    \end{macrocode}
% \subsection{Settings for the hcletter class}
% No fold marks are printed.
%    \begin{macrocode}
%<*hcletter>
\foldmarksoff
%</hcletter>
%    \end{macrocode}
% \subsection{Commands and Environments for the hcreport class}
% The first page of a chapter and the title page of a part do not 
% have a page number.
%    \begin{macrocode}
%<*hcreport>
\renewcommand\chapter
    {\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{empty}%
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}
\renewcommand\addchap
    {\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{empty}%
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@addchap\@saddchap}
\renewcommand\part
    {\if@openright\cleardoublepage\else\clearpage\fi
                 \thispagestyle{empty}%
                 \if@twocolumn
                     \onecolumn
                     \@tempswatrue
                   \else
                     \@tempswafalse
                 \fi
                 \null\vfil
                 \secdef\@part\@spart}
%</hcreport>
%    \end{macrocode}
% \subsection{Commands and Environments for the hcslides class}
% A new page is started by a section or manually with the |\newslide| 
% command.
%
% Everything is printed sans serif.
% The |HC| pagestyle is always used.
% The |fancybox| package is required for drawing an shadowed box around
% sections.
% \descCom{addsec\oarg{toc-entry}\arg{heading}}
% For compatibily with the |hcart| and |hcreport| classes. 
% Should always be used instead of the |\section*| command.
% \descCom{minisec\arg{heading}}
% For compatibily with the |hcart| and |hcreport| classes. 
% Sectioning level between |\subsubsection| and |\paragraph|.
%    \begin{macrocode}
%<*hcslides>
\AtBeginDocument{\begin{slide}}
\AtEndDocument{\end{slide}}
\renewcommand{\rmdefault}{\sfdefault}
\raggedslides[5em]
\newcommand{\addsec}[2][]{%
  \section*{#2}
  \ifthenelse{\equal{#1}{}}
    {\addcontentsline{toc}{section}{#2}}
    {\addcontentsline{toc}{section}{#1}}%
}
\newcommand\minisec[1]{\@afterindentfalse \vskip 1.5ex
  {\parindent \z@ \raggedright\sffamily\bfseries #1\par\nobreak}%
  \@afterheading}
\setlength{\slideheight}{0.74\paperwidth}
\setlength{\slidewidth}{0.84\paperheight}
\renewcommand{\slidetopmargin}{0.12\paperwidth}
\renewcommand{\slidebottommargin}{0.12\paperwidth}
\renewcommand{\slideleftmargin}{0.08\paperheight}
\renewcommand{\sliderightmargin}{0.08\paperheight}
\slideframe{none}
\AtBeginDocument{
  \ifthenelse{\equal{\defaultemail}{}}
    {\newcommand{\@email}{}}
    {\newcommand{\@email}
      { \texttt{<}\htmail{\defaultemail}\texttt{>}}}
  \newpagestyle{HC}%
    {\parbox[b]{\textwidth}%
       {\currenttitle\hfill\currentdate\\[-.6ex]%
        \rule{\textwidth}{0.6pt}}}
    {\parbox[t]{\textwidth}{\rule{\textwidth}{0.6pt}\\[.6ex]%
       \renewcommand{\autdiv}{, }%
       \currentauthor\@email\hfill\thepage}}
  \pagestyle{HC}
}
\RequirePackage{fancybox}
\setcounter{tocdepth}{3}
\renewcommand\section{\@startsection {section}{1}{\z@}%
  {-3.5ex \@plus -1ex \@minus -.2ex}%
  {2.3ex \@plus.2ex}%
  {\newslide\normalfont\Large\bfseries\shadowbox}}
\renewcommand\part{\clearpage
                 \if@twocolumn
                     \onecolumn
                     \@tempswatrue
                   \else
                     \@tempswafalse
                 \fi
                 \secdef\@part\@spart}
%    \end{macrocode}
% \subsubsection{The twotoc option}
%    \begin{macrocode}
\if@twotoc
  \RequirePackage{multicol}
  \renewcommand*\tableofcontents{%
    \newlength{\old@columnseprule}
    \setlength{\old@columnseprule}{\columnseprule}
    \setlength{\columnseprule}{0.4pt}
    \begin{multicols}{2}[\section*{\contentsname}]
    \@starttoc{toc}%
    \end{multicols}
    \setlength{\columnseprule}{\old@columnseprule}
    }  
\fi
%</hcslides>
%    \end{macrocode}
% \section{German Language Definitions}
% The |babel| package is loaded with the new German orthograpy (option
% |ngerman|: this requires a rather new version of |babel|). The commands
% |\q|, |\hq|, |\dash|, |\Es| and |\shorttoday|
% are adapted to the German typography. The |\enge| command is redefined.
% The German \BibTeX\ style |hc-de| is used by default.
% The language specific texts are redefined. The German redefinitions of the
% |varioref| package do not seem to work, so the are repeated.
%    \begin{macrocode}
%<*german>
\addto{\captionsngerman}{%
  \renewcommand{\nextstartq}{\guillemotright}
  \renewcommand{\nextendq}{\guillemotleft}
  \renewcommand{\otherstartq}{\guilsinglright}
  \renewcommand{\otherendq}{\guilsinglleft}
  \renewcommand{\hq}[1]{\guilsinglright{}#1\guilsinglleft{}}
  \renewcommand{\fq}[1]{\guillemotright{}#1\guillemotleft{}}
  \renewcommand{\dash}[1]{--~#1~--}
  \renewcommand{\shorttoday}
    {\the\day.\the\month.\two@digits{\theshortyear}\xspace}
  \renewcommand{\enge}[2]{#2}
  \renewcommand{\bibliostyle}{hc-de}
  \renewcommand{\contentsname}{Inhalt}
  \renewcommand{\versiontext}{Version vom}
  \renewcommand{\accesstext}{Zugriff am}
  \renewcommand{\cftext}{vgl.}
  \renewcommand{\bibvoltext}{der}
  \renewcommand{\bvtext}{Bd.}
  \renewcommand{\bibdir}{Regie }
  \renewcommand{\bibmovtext}{Spielfilm}
  \renewcommand{\bibactorsbefore}{Mit}
  \renewcommand{\bibactorsafter}{u.a}
  \renewcommand{\noyear}{o.J.}
  \renewcommand{\noaddress}{o.O.}
  \renewcommand{\otherabstractname}{Abstract}
  \renewcommand{\keywordsname}{Schl\"usselw\"orter}
  \renewcommand{\seetext}{siehe}
}
\if@euro
  \addto{\captionsngerman}{%
    \renewcommand{\Es}[1]{#1\nobreak\,\E}
  }
\fi
\if@fancyref
    \def\reftextfaceafter {auf der n\"achsten Seite}%
    \def\reftextfacebefore{auf der vorherigen Seite}%
    \let\reftextafter     \reftextfaceafter
    \let\reftextbefore    \reftextfacebefore
    \def\reftextcurrent   {auf dieser Seite}%
    \def\reftextfaraway#1{auf Seite~\pageref{#1}}%
    \def\reftextpagerange#1#2{auf 
       Seiten~\pageref{#1}--\pageref{#2}}%
    \def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
\fi
%</german>
%    \end{macrocode}
%
% \StopEventually
% \Finale
%
\endinput
%
% End of File `hc.dtx'
