uebungen.sty 1.77 KiB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Definitionen und Einstellungen fuer LaTeX und pdfLaTeX
\RequirePackage{ifthen}
\textwidth=170mm
\textheight=245mm
\headheight0pt
\topmargin-2mm
\headsep=-12mm
\textfloatsep15mm
%\parindent0mm
\parskip11pt
\oddsidemargin-5mm
\evensidemargin-5mm
\pagestyle{plain}
\newcommand{\institute}[1]{\def\@institute{#1}}
\institute{}
\newcommand{\abgabetitle}[1]{\def\@abgabetitle{#1}}
\abgabetitle{Abgabetermin: }
\newcommand{\abgabeinfo}[1]{\def\@abgabeinfo{#1}}
\abgabeinfo{}
\newcommand{\dozent}[1]{\def\@dozent{#1}}
\dozent{Dr. Seltsam}
\newcommand{\semester}[1]{\def\@semester{#1}}
\newcommand{\uebungslabel}[1]{\def\@uebungslabel{#1}}
\uebungslabel{\"{U}bung}
\newcommand{\blattlabel}[1]{\def\@blattlabel{#1}}
\blattlabel{Aufgabenblatt}
\newcounter{blatt}
\setcounter{blatt}{0}
\newcommand{\blatt}[3][auto]{
  \cleardoublepage\setcounter{footnote}{1}
  \ifthenelse{\equal{#1}{auto}}{\stepcounter{blatt}}{\setcounter{blatt}{#1}}
  \noindent \@institute \hfill \@semester \par
  \noindent \@blattlabel \hfill {#2}\par
  \begin{center}
    \@title \par
    \@dozent
  \end{center}
  \noindent
  \@abgabetitle{} {#3}\@abgabeinfo\\
  \rule{\textwidth}{1pt}
  \bigskip
\newcounter{Uctr}
\newsavebox{\Upunkte}
\newenvironment{uebung}[2][0]
  {\stepcounter{Uctr}%
    \sbox{\Upunkte}{%
      \ifthenelse{\not\equal{#1}{0}}{%
        \ifthenelse{\equal{#1}{1}}{%
          \textit{#1~Punkt}}{\textit{#1~Punkte}}%
    \medskip%
    \noindent\textsc{\@uebungslabel~\arabic{Uctr}\hspace{1em}#2\nopagebreak}%
    \nopagebreak\par\nopagebreak\noindent\hspace*{0mm}\nopagebreak}
  {\hspace*{\fill}\nolinebreak\hspace*{\fill}%
    \usebox{\Upunkte}\par}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\parindent0pt