%%%
%%% LaTeX2e-Package `uebung.sty' zum Setzen von Übungsblättern
%%%
%%% (c) 1999  O. Karch
%%% (c) 2002  H.-C. Wirth
%%%
%%% (basierend auf einem Package von H.-C. Wirth)
%%% (und auf Modifikationen von Olli)
%%%
%%% Aufruf:
%%%
%%% \documentclass{article}
%%% \usepackage[hansi,olli,dirk,auto]{uebung}
%%% ...
%%% 
%%% Optionen:
%%%    solutions      druckt Lösungen 
%%%    nosolutions    druckt keine Lösungen (default)
%%%    autosolutions  druckt Lösungen, falls Filename auf "-lsg.tex" endet
%%%                   (mittels hardlink hat man also beide Versionen)
%%% 
%%%    newpage        wählt für jede Aufgabe eine neue Seite
%%%    autonewpage    tut das nur, wenn Lösungen eingeschaltet sind
%%%    
%%%    inline         druckt Lösungen unmittelbar nach jeder Aufgabe
%%%    end            sammelt Lösungen am Ende des Blattes (default)
%%%    autoinline     ist mir gerade auch nicht ganz klar
%%%
%%%    auto           autosolutions, autonewpage, autoinline 
%%%
%%% Verbesserungsvorschläge und Fehlermeldungen bitte an
%%% wirth@informatik.uni-wuerzburg.de
%%%
%%% History:
%%%
%%% 2002-10-30 v2.2   Automatisch generierte Punkteübersicht
%%% 2002-10-08 v2.1   autosolutions-Option, autonewpage, autoinline, auto
%%%
 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{uebunghcw}[2002/10/30 v2.2]

%%%
%%% einige if-Variablen
%%% 

\newif\ifuebung@usesolutions \uebung@usesolutionsfalse
\newif\ifuebung@endsolutions \uebung@endsolutionstrue
\newif\ifuebung@newpage \uebung@newpagefalse
\newif\ifuebung@firstaufgabe \uebung@firstaufgabetrue
\newif\ifuebung@autoinline \uebung@autoinlinefalse
\newif\ifuebung@autonewpage \uebung@autonewpagefalse
\newif\ifuebung@nextvpl \uebung@nextvplfalse

%%% ein übler Hack von Michael J Downes aus comp.text.tex, mit dem
%%% der \jobname auf das Suffix "-lsg.tex" getestet wird.  Der Test wird
%%% mittels \uebung@testsuffix ausgeführt; je nach Ausgang des Tests wird
%%% \uebung@testsuffixT oder \uebung@testsuffixF expandiert

\begingroup
\edef\x#1-lsg{\endgroup#1-\string l\string s\string g}\x
% The above hackery allows us to write the following definition in a
% readable way but still get catcode 12 for the letters "lsg".
%%
% This section is all that would be needed if \jobname contents did not
% have the restricted catcodes that it does.
\def\uebung@@testsuffix#1-lsg\relax #2#3#{%
  \csname uebung@testsuffix#2\endcsname}
%
\def\uebung@testsuffix{%
  \expandafter\uebung@@testsuffix\jobname \relax T-lsg\relax F{}}
%
% But \uebung@testsuffix won't work as written unless we fix the catcodes of
% the letters to match what we will find in \jobname.
\begingroup
\edef\x#1-#2#3#4#5\x{\endgroup
  \def\noexpand\uebung@testsuffix{#1-\string l\string s\string g#5}}
\expandafter\x\uebung@testsuffix\x

%%%
%%% Jetzt die Optionen deklarieren
%%%

% Lösungen drucken oder nicht
\DeclareOption{solutions}{\uebung@usesolutionstrue}
\DeclareOption{nosolutions}{\uebung@usesolutionsfalse}

% Lösungen drucken, falls Filename auf "-lsg.tex" endet
\DeclareOption{autosolutions}{%
  \def\uebung@testsuffixT{%
%    \typeout{uebunghcw: autosolutions decided for `true'}%
    \ExecuteOptions{solutions}%
    }
  \def\uebung@testsuffixF{%
%    \typeout{uebunghcw: autosolutions decided for `false'}%
    \ExecuteOptions{nosolutions}%
    }
  \uebung@testsuffix
  }

% nach jeder Aufgabe eine neue Seite
\DeclareOption{newpage}{\uebung@newpagetrue}
\DeclareOption{autonewpage}{\uebung@autonewpagetrue}

% Lösungen direkt bei den Aufgaben oder gesammelt am Ende
\DeclareOption{inline}{\uebung@endsolutionsfalse}
\DeclareOption{end}{\uebung@endsolutionstrue}
\DeclareOption{autoinline}{\uebung@autoinlinetrue}

%
\DeclareOption{auto}{%
  \ExecuteOptions{autosolutions}%
  \ExecuteOptions{autoinline}%
  \ExecuteOptions{autonewpage}%
  }


%
% spezielle Makros für spezielle Vorlesungen
\DeclareOption{theoinf}{%
  \AtEndOfPackage{\RequirePackage{mdwlist,booktabs}}
  \AtEndOfPackage{\RequirePackage[noend]{algorithmic_ok}}
  \AtEndOfPackage{%
    \renewcommand*{\descriptionlabel}[1]{\hspace\labelsep
      \normalfont\itshape #1}
    
    \RequirePackage[amsmath,thmmarks,thref]{ntheoremhcw}
    \theoremstyle{break}
    \theorembodyfont{\slshape}
    \theoremheaderfont{\bfseries\upshape}
    
    \newtheorem{theorem}{Satz}
    \newtheorem{lemma}[theorem]{Lemma}
    \newtheorem{Corollary}[theorem]{Korollar}
    \newtheorem{proposition}[theorem]{Proposition}
    \newtheorem{observation}[theorem]{Observation}
    \newtheorem{assumption}[theorem]{Assumption}
    \newtheorem{property}[theorem]{Property}
    \newtheorem{definition}[theorem]{Definition}
    \newtheorem{example}[theorem]{Beispiel}
    
    \qedsymbol{\quad\ensuremath{\Box}}
    \theoremstyle{nonumberplain}
    \theoremheaderfont{\normalfont\scshape}
    \theorembodyfont{\normalfont}
    \theoremseparator{:}
    \newtheorem{zz}[theorem]{Zu zeigen}
    \newtheorem{claim}[theorem]{Behauptung}
    \newtheorem{remark}[theorem]{Bemerkung}
    \newtheorem{corollary}[theorem]{Korollar}

    \theoremsymbol{\quad\ensuremath{\Box}}
    \theoremseparator{.}
    \newtheorem{proof}{Beweis}
    }

  \newcommand{\NN}{\mathbb{N}}
  \newcommand{\ZZ}{\mathbb{Z}}
  \newcommand{\RR}{\mathbb{R}}
  \newcommand{\PP}{\mathbb{P}}
  \newcommand{\FF}{\mathbb{F}}
  \newcommand{\bin}{\mathop{\operator@font bin}\nolimits}
  \newcommand{\sgn}{\mathop{\operator@font sgn}\nolimits}
  \newcommand{\sgnq}{\mathop{\overline{\operator@font sgn}}\nolimits}
  \let\epsilon\varepsilon

  \newcommand{\sdiff}{%
    \begingroup\mathbin{%
      \mathchoice
      {\setbox0\hbox{.}\overset{\box0}{\raisebox{0pt}[2pt]{$\displaystyle-$}}}%
      {\setbox0\hbox{.}\overset{\box0}{\raisebox{0pt}[2pt]{$\textstyle-$}}}%
      {\setbox0\hbox{.}\overset{\box0}{\raisebox{0pt}[1.5pt]{$\scriptstyle-$}}}%
      {\setbox0\hbox{.}\overset{\box0}{\raisebox{0pt}[1.0pt]{%
            $\scriptscriptstyle-$}}}%
    }\endgroup}
  
  \newcommand{\wort}[1]{%
    \begingroup
    \def\|{\ensuremath{\mathord{\mbox{\kern 1pt\vphantom{t}\vrule width 1pt\kern1pt}}}}%
    \def\blank{\ensuremath{\mathord{\mbox{\rlap{/}b}}}}%
    \text{\upshape\ttfamily#1}%
    \endgroup
    }
  \newcommand{\1}{\wort{1}}
  \newcommand{\0}{\wort{0}}
  \newcommand{\bel}[1]{\mathcal{#1}}
  
  \AtBeginDocument{\def\ttdefault{cmvtt}}
  }


% Die Optionen für das Aushang-Package durchschleifen
\DeclareOption{noprof}{\PassOptionsToPackage{\CurrentOption}{aushang}}
\DeclareOption{nodate}{\PassOptionsToPackage{\CurrentOption}{aushang}}
\DeclareOption{nohead}{\PassOptionsToPackage{\CurrentOption}{aushang}}
\DeclareOption{philipp}{\PassOptionsToPackage{\CurrentOption}{aushang}}
\DeclareOption{moritz}{\PassOptionsToPackage{\CurrentOption}{aushang}}

% Lösungen am Ende des Übungsblattes (ist der default vom answer-Package)
\DeclareOption{endsolutions}{%
  \PackageWarning{uebunghcw}{obsolete option `endsolutions'. Replace 
     by `end'.}
  \uebung@usesolutionstrue
  \uebung@endsolutionstrue
  }

% Lösungen direkt nach den Aufgaben
\DeclareOption{inlinesolutions}{%
  \PackageWarning{uebunghcw}{obsolete option `inlinesolutions'.  Replace
     by `inline'.}
  \uebung@usesolutionstrue
  \uebung@endsolutionsfalse
  }

% braucht man nicht.
\DeclareOption{onlysolutions}{%
  \PackageWarning{uebunghcw}{obsolete option `onlysolutions' ... IGNORED.}}

%\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{aushang}}

\ProcessOptions

% Auswerten der Optionen

\ifuebung@autoinline
  \ifuebung@usesolutions
    \uebung@endsolutionsfalse
  \else
    \uebung@endsolutionstrue
  \fi
\fi
\ifuebung@autonewpage
  \ifuebung@usesolutions
    \uebung@newpagetrue
  \else
    \uebung@newpagefalse
  \fi
\fi

\ifuebung@usesolutions
  \AtBeginDocument{%
    \let\uebung@heading\heading
    \def\heading#1{\uebung@heading{#1\\-- mit L\"osungen --%
        \aftergroup\uebung@smyPrint}}%
    }
  \ifuebung@endsolutions
  \else
    \PassOptionsToPackage{nosolutionfiles}{answers}%
  \fi
\else
  \AtEndDocument{\answerfilesfalse}%
\fi




% Das Aushang-Package formatiert den Übungsblattkopf und lädt einige
% Standardpackages (babel, palatino, euler, inputenc, fontenc,
% typearea)
% Die Optionen philipp, moritz usw. können ebenfalls benutzt werden
\RequirePackage{aushang}

% Die Standard-AMS-Mathepackages laden
\RequirePackage{amsmath,amsfonts,amssymb,latexsym}

% Einbinden von PostScript- und XFig-Bildern (außerdem wird
% \SetFigFont so umdefiniert, daß die Zeichensatzgröße von XFig nicht
% verwendet wird)
\usepackage{color}

% Seit tetex 3 funktioniert der alte Hack mit pdfoutput nicht mehr.
% empfohlen wird das Paket ifpdf
\usepackage{ifpdf}

% Für Symbole
\RequirePackage{marvosym}
%\newif\ifpdf
%\ifx\pdfoutput\undefined\pdffalse\else\pdfoutput=1\pdftrue\fi
%\ifpdf
    %\RequirePackage[pdftex]{graphicx}
    %\pdfcompresslevel=9
    %\RequirePackage[pdftex]{epsfig}
    %\graphicspath{{./Fig_pdf/}{./Eps_pdf/}{./Ipe_pdf/}{./Pdf/}}
    %\DeclareGraphicsExtensions{.pdf}
%\else
    %\RequirePackage[dvips,final]{graphicx}
    %\RequirePackage[dvips,final]{epsfig}
    %\graphicspath{{./Fig_eps/}{./Eps/}{./Ipe/}}
    %\DeclareGraphicsExtensions{.ps,.eps}
%\fi
\begingroup\makeatletter%
\gdef\SetFigFont#1#2#3#4#5{%
%  \reset@font\fontsize{#1}{#2pt}% Parameter #1 und #2 verwerfen
  \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
  \selectfont}%
\endgroup%

% Andere (schönere?) Captions
\RequirePackage[hang,sc,small]{caption}

% Environment für die Lösungen mittels des Answer-Packages
% Die Option nosolutionfiles kann ebenfalls verwendet werden
\RequirePackage{answers}
\Newassociation{loesung}{LSG}{lsg}
\def\Currentlabel{\arabic{aufgabe}}
\renewenvironment{LSG}[1]{%
%  \ifuebung@newpage \newpage\fi
  \subsubsection*{Lösung zu Aufgabe #1}
  \setcounter{teilaufgabe}\z@\relax
  \let\uebung@smyRequirePointsUnset\relax
  \let\uebung@smyRequirePointsSet\relax
  \let\uebung@smyUnsetPoints\relax
  \let\uebung@smyAux\@gobble
  }{%
  }

% Schönere Trennungen und Zeilenumbrüche
\tolerance=2000
\emergencystretch20pt


\AtBeginDocument{\Opensolutionfile{lsg}}
\AtEndDocument{\ifx\empty\uebung@foot\else%
  \vfill\hrule\medskip\uebung@foot\fi
  \clearpage
  \Closesolutionfile{lsg}
  \Readsolutionfile{lsg}}

%%%
%%% Neue Befehle
%%%

% Befehle für VPL-Kennzeichnung
\newcommand{\nextaufgabevpl}{\uebung@nextvpltrue}
% can be used to refer to vpllogo in text
\newcommand{\vpllogo}{\framebox{\Keyboard}\xspace}
\newcommand{\uebung@vpllogo}{%
  \marginpar{\hfill\vpllogo}%
}
\reversemarginpar % links statt rechts anzeigen

% Umgebungen zum Setzen von Aufgaben und Teilaufgaben
\newcounter{aufgabe}
\newcounter{teilaufgabe}[aufgabe]
\newenvironment{aufgabe}[1][]{%
  \stepcounter{aufgabe}
  \ifuebung@firstaufgabe 
  \else
    \ifuebung@newpage \clearpage\fi
  \fi
  \subsubsection*{Aufgabe \theaufgabe{}%
    \ifx\empty#1\else\ -- #1\fi%
    \ifuebung@nextvpl \uebung@vpllogo\fi}
  % reset vpl bool (logo was printed before)
  \global\uebung@nextvplfalse%
  \edef\@currentlabel{\arabic{aufgabe}}%
  \ifuebung@firstaufgabe \else
    \uebung@smyAux{\string\uebung@smyWriteNoPoints{\quad}}%
  \fi
  \uebung@smyAux{\string\uebung@smyWriteAufgabe{\arabic{aufgabe}}}%
  \uebung@smyRequirePointsUnset  
  \global\let\uebung@smyCheckPoints\uebung@smyRequirePointsSet
  \global\uebung@firstaufgabefalse
  }{%
    \uebung@smyCheckPoints
    \uebung@smyUnsetPoints
  }
\newenvironment{exercise}[1][]{%
  \stepcounter{aufgabe}
  \ifuebung@firstaufgabe 
  \else
    \ifuebung@newpage \clearpage\fi
  \fi
  \subsubsection*{Exercise \theaufgabe{}%
    \ifx\empty#1\else\ -- #1\fi}
  \edef\@currentlabel{\arabic{aufgabe}}%
  \ifuebung@firstaufgabe \else
    \uebung@smyAux{\string\uebung@smyWriteNoPoints{\quad}}%
  \fi
  \uebung@smyAux{\string\uebung@smyWriteAufgabe{\arabic{aufgabe}}}%
  \uebung@smyRequirePointsUnset  
  \global\let\uebung@smyCheckPoints\uebung@smyRequirePointsSet
  \global\uebung@firstaufgabefalse
  }{%
    \uebung@smyCheckPoints
    \uebung@smyUnsetPoints
  }
\newenvironment{teilaufgabe}[1][]{%
  \global\let\uebung@smyCheckPoints\uebung@smyRequirePointsUnset
  \def\teilaufgabe@tmp{#1}%
  \begin{list}{%
      \alph{teilaufgabe})%
      \xdef\@currentlabel{\alph{teilaufgabe})}%
      \uebung@smyAux{\string\uebung@smyWriteAufgabe{\alph{teilaufgabe}}}%
      \uebung@smyCheckPoints
      \uebung@smyUnsetPoints
      \global\let\uebung@smyCheckPoints=\uebung@smyRequirePointsSet
      }{%
      \leftmargin=1.4em%
      \@nmbrlisttrue\def\@listctr{teilaufgabe}%
      \ifx\empty\teilaufgabe@tmp%
      \else\setcounter{teilaufgabe}\teilaufgabe@tmp\fi}%
      % redefine item to allow VPL logo
      \let\uebung@olditem=\item%
      \def\item{\uebung@olditem%
        \ifuebung@nextvpl\leavevmode\uebung@vpllogo\fi%
        % reset vpl bool (logo was printed before)
        \global\uebung@nextvplfalse%
      }%
  }{\uebung@smyCheckPoints\end{list}}
\newenvironment{subexercise}[1][]{%
  \global\let\uebung@smyCheckPoints\uebung@smyRequirePointsUnset
  \def\teilaufgabe@tmp{#1}%
  \begin{list}{%
      \alph{teilaufgabe})%
      \xdef\@currentlabel{\alph{teilaufgabe})}%
      \uebung@smyAux{\string\uebung@smyWriteAufgabe{\alph{teilaufgabe}}}%
      \uebung@smyCheckPoints
      \uebung@smyUnsetPoints
      \global\let\uebung@smyCheckPoints=\uebung@smyRequirePointsSet
      }{%
      \@nmbrlisttrue\def\@listctr{teilaufgabe}%
      \ifx\empty\teilaufgabe@tmp%
      \else\setcounter{teilaufgabe}\teilaufgabe@tmp\fi}%
  }{\uebung@smyCheckPoints\end{list}}

% Punkte, Sonderpunkte und Schwierigkeitsgrad (Level)
\newcommand{\punkte}[1]{\begingroup
  \nobreak\hfill\penalty150\hskip2em\null\nobreak\hfill
  \mbox{\textbf{#1 Punkt\def\pts{#1}\def\one{1}%
      \ifx\pts\one\else e\fi}}%
  \endgroup
  \uebung@smyRequirePointsUnset
  \uebung@smyAux{\string\uebung@smyWritePoints{#1}}%
  \global\uebung@smyPointsSettrue
  \ignorespaces}
\newcommand{\points}[1]{\begingroup
  \nobreak\hfill\penalty150\hskip2em\null\nobreak\hfill
  \mbox{\textbf{[#1 point\def\pts{#1}\def\one{1}%
      \ifx\pts\one\else s\fi]}}%
  \endgroup
  \uebung@smyRequirePointsUnset
  \uebung@smyAux{\string\uebung@smyWritePoints{#1}}%
  \global\uebung@smyPointsSettrue
  \ignorespaces}
\newcommand{\sonderpunkte}[1]{\begingroup
  \nobreak\hfill\penalty150\hskip2em\null\nobreak\hfill
  \mbox{\textbf{#1 Zusatzpunkt\def\pts{#1}\def\one{1}%
      \ifx\pts\one\else e\fi}}%
  \endgroup
  \uebung@smyRequirePointsUnset
  \uebung@smyAux{\string\uebung@smyWriteSPoints{#1}}%
  \global\uebung@smyPointsSettrue
  \ignorespaces}
\newcommand{\extrapoints}[1]{\begingroup
  \nobreak\hfill\penalty150\hskip2em\null\nobreak\hfill
  \mbox{\textbf{[#1 extrapoint\def\pts{#1}\def\one{1}%
      \ifx\pts\one\else s\fi]}}%
  \endgroup
  \uebung@smyRequirePointsUnset
  \uebung@smyAux{\string\uebung@smyWriteSPoints{#1}}%
  \global\uebung@smyPointsSettrue
  \ignorespaces}
\newcommand{\onestar}{\raise0.08ex\hbox{$\ast$}}
\newcommand{\level}[2][\onestar]{{%
    \newcount\lev\lev=#2\advance\lev by -1%
    \hfill\penalty-4\null\hfill\hskip2em
    \mbox{\textbf{(%
        \loop #1\advance\lev by -1\ifnum\lev>0\repeat%
        )}}}\ignorespaces}

% Befehle im aux-File zur automatischen Generierung der Punkteübersicht

\newcommand{\uebung@smyAux}[1]{%
  \protected@write\@auxout{}{#1}}
\newcount\uebung@countPoints
\newcount\uebung@countSPoints
\newif\ifuebung@smyPointsSet \uebung@smyPointsSetfalse
\newcommand{\uebung@smyAlist}{}
\newcommand{\uebung@smyPlist}{}

\newcommand{\uebung@smyRequirePointsUnset}{%
  \ifuebung@smyPointsSet
    \PackageWarningNoLine{uebunghcw}{\string\punkte\space in Zeile
    \the\inputlineno\space nicht erlaubt}%
  \fi
}

\newcommand{\uebung@smyRequirePointsSet}{%
  \ifuebung@smyPointsSet
  \else
    \PackageWarningNoLine{uebunghcw}{\string\punkte\space in Zeile
    \the\inputlineno\space fehlen}%
    \uebung@smyAux{\string\uebung@smyWriteNoPoints{??}}%
  \fi
}
\newcommand{\uebung@smyUnsetPoints}{%
  \global\uebung@smyPointsSetfalse
}
\newcommand{\uebung@smyWriteAufgabe}[1]{%
  \xdef\uebung@smyAlist{\uebung@smyAlist#1}%
}
\newcommand{\uebung@smyWritePoints}[1]{%
  \xdef\uebung@smyAlist{\uebung@smyAlist&}%
  \xdef\uebung@smyPlist{\uebung@smyPlist#1&}%
  \global\advance\uebung@countPoints#1\relax
}
\newcommand{\uebung@smyWriteSPoints}[1]{%
  \xdef\uebung@smyAlist{\uebung@smyAlist&}%
  \xdef\uebung@smyPlist{\uebung@smyPlist#1s&}%
  \global\advance\uebung@countSPoints#1\relax
}
\newcommand{\uebung@smyWriteNoPoints}[1]{%
  \xdef\uebung@smyAlist{\uebung@smyAlist&}%
  \xdef\uebung@smyPlist{\uebung@smyPlist#1&}%
}

\newcommand{\uebung@smyPrint}{%
  \hfill\vbox{\halign{&\enspace\hfil##\hfil\cr
    \uebung@smyAlist\quad& Summe\cr
    \noalign{\kern0.3\baselineskip\hrule\kern0.3\baselineskip}
    \uebung@smyPlist& 
    \the\uebung@countPoints
    \ifnum\uebung@countSPoints>0+\the\uebung@countSPoints s\fi\cr}}%
}



%   \gdef\uebung@inputlineno{#2}%
%   \uebung@smyrequirep
%   \xdef\uebung@smyalist{\uebung@smyalist.#1}%
%   \global\uebung@smyteilfalse
%   \global\uebung@smyresetp
% }
% \newcommand{\uebung@smyaddteilaufgabe}[2]{%
%   \gdef\uebung@inputlineno{#2}%
%   \ifuebung@smyteil
%     \uebung@smyrequirep
%     \xdef\uebung@smyalist{\uebung@smyalist.#1}%
%   \else
%     \uebung@smydenyp
%     \xdef\uebung@smyalist{\uebung@smyalist#1}%
%     \global\uebung@smyteiltrue
%   \fi
%   \uebung@smyresetp
% }
% \newcommand{\uebung@smyaddpunkte}[2]{%
%   \gdef\uebung@inputlineno{#2}%
%   \uebung@smydenyp
%   \xdef\uebung@smyplist{\uebung@smyplist.#1}%
%   \global\uebung@smypunktesettrue
% }
% \newcommand{\uebung@smyaddsonderpunkte}[1]{}
% \newcommand{\uebung@smyresetp}{%
%   \global\uebung@smypunktesetfalse
% }
% \newcommand{\uebung@smyrequirep}{%
%   \ifuebung@smypunkteset
%   \else
%   \PackageWarningNoLine{uebunghcw}{Keine Punkte angegeben in 
%     Zeile \uebung@inputlineno.}%
%   \fi
% }
% \newcommand{\uebung@smydenyp}{%
%   \ifuebung@smypunkteset
%   \PackageWarningNoLine{uebunghcw}{Zu oft Punkte angegeben in Zeile
%     \uebung@inputlineno.}%
%   \fi
% }

% Setzen des Footers
\def\uebung@foot{}
\long\def\footer#1{\long\def\uebung@foot{#1}}

%%% Private Makros
% \newcommand{\NN}{\mathbb{N}}
% \newcommand{\ZZ}{\mathbb{Z}}
% \newcommand{\RR}{\mathbb{R}}
% \def\diam{\mathop{\textrm{diam}}}
\def\dist{\mathop{\textrm{dist}}\nolimits}
\def\Span{\mathop{\textrm{span}}\nolimits}
% \def\dir{\mathop{\mathit{dir}}}
\def\partcup{\stackrel.\cup} 
% \let\epsilon\varepsilon
% \usepackage{mdwlist,booktabs}
% \usepackage[noend]{algorithmic_ok}
% \def\symdiff{\mathop\triangle}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "nil"
%%% End: 
