%%%%%%%%%%%%%%%%%%%%%% 
% Xenia Rendtel
% Letzte Aenderung: 19.01.2009
%%%%%%%%%%%%%%%%%%%%%% 

\newcommand{\schuleloesungbegin}{\comment}
\newcommand{\schuleloesungend}{\endcomment}

\newcommand{\bilderbegin}{\comment}
\newcommand{\bilderend}{\endcomment}
\newcommand{\schuleveroffenbegin}{\comment}
\newcommand{\schuleveroffenend}{\endcomment}

\newcommand{\druckbegin}{\comment}
\newcommand{\druckend}{\endcomment}

\renewcommand{\normalfont}{\sffamily}
\newcounter{klausur}
\newcounter{blatt}
\newcounter{notiz}
\newcounter{merkblatt}
\newcounter{arbeit}
\newcounter{test}
\newcounter{asa}
\newcounter{folien}
\newcounter{savepagenum}
\newcounter{planung}
\newcounter{nr}
\newcounter{stunde}
\newcounter{ab}
\newcounter{mb}
\newcounter{fo}
\newcounter{ga}
\newcounter{st}
\newcounter{kl}
\newcounter{punkte}
\newcounter{nrmc}
\newcounter{heft}
\newif\ifnetzv
\netzvfalse

\newif\ifdruck
\druckfalse

\newcounter{seite}

\DeclareOption{loesungen}{
  \renewcommand{\schuleloesungbegin}{}
  \renewcommand{\schuleloesungend}{}
}

\DeclareOption{bilder}{
  \renewcommand{\bilderbegin}{}
  \renewcommand{\bilderend}{}
}

\DeclareOption{druck}{
  \drucktrue
  \renewcommand{\druckbegin}{}
  \renewcommand{\druckend}{}
}
\DeclareOption{nichtoffen}
{
  \netzvtrue
  \renewcommand{\schuleveroffenbegin}{}
  \renewcommand{\schuleveroffenend}{}
}
\ProcessOptions

\ifdruck\newcommand{\drucken}[1]{#1}
\else\newcommand{\drucken}[1]{}
\fi

\ifdruck\newcommand{\inhalt}[1]{}
\else\newcommand{\inhalt}[1]{#1}
\fi

\newcommand{\eintrag}[2][section]{\addcontentsline{toc}{#1}{#2}}

\ifnetzv\newcommand{\offen}[1]{#1}
\else\newcommand{\offen}[1]{}
\fi

\newcommand{\bild}[2][]{
  \offen{
    \includegraphics[#1]{#2}}
}

\newcommand{\nr}[1][]{
  \thenr\stepcounter{nr}
}

\newcommand{\no}[1][]{
  \textbf{\nr.}
}

\newcommand{\countersetzen}[1][]{
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1}
  \setcounter{equation}{0}
  \setcounter{figure}{0}
  \setcounter{section}{0}
  \setcounter{auftragz}{0}
  \setcounter{uebungz}{0}
  \setcounter{beispielz}{0}
  \setcounter{defiz}{0}
  \setcounter{satzz}{0}
  \setcounter{nr}{1}
  \setcounter{equation}{0}
  \setcounter{punkte}{0}
  \setcounter{versuchz}{0}
  \setcounter{aufgabenpkt}{1}

  \setcounter{auftragz}{0}
  \setcounter{aufgabez}{0}
  \setcounter{uebungz}{0}
  \setcounter{beispielz}{0}
  \setcounter{defiz}{0}
  \setcounter{satzz}{0}
  \setcounter{versuchz}{0}
  \setcounter{geraetez}{0}
  \setcounter{durchfuehrungz}{0}
  \setcounter{auswertungz}{0}

}

\newcommand{\nomc}[1][]{
  \stepcounter{nrmc}\textbf{\thenrmc.}
}

\newenvironment{nichtoffen}[1]{
  \schuleveroffenbegin}{
  \schuleveroffenend
}

\newenvironment{loesung}[1]{
  \schuleloesungbegin}{
  \schuleloesungend
}

%%%%%%%%%%%%%%%%%%%%%% 
% Neue Umgebungen für die Schule
%%%%%%%%%%%%%%%%%%%%%% 

%%%%%%%%%%%%%%%%%%%%%% 
% Arbeitsblätter, Merkblätter, Folien
%%%%%%%%%%%%%%%%%%%%% 

%%%%%%%%%%%%%%%%%%%%%% 
% Ein normales
% Arbeitsblatt mit L\"osung
%%%%%%%%%%%%%%%%%%%%% 

\newcommand{\arbeitsblattumgebung}[8][\today]{

  \countersetzen
  \pagestyle{plain}
  #8
  \ClearShipoutPicture \AddToShipoutPicture{
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(345,22)[l]{ \sffamily\bfseries
            #3
          }}}
      \put(401,760){{\framebox(139,22)[l]{  \sffamily\bfseries
            \Large #4 #6 }}}

      \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}
      \put(545,540){\rotatebox{90}{\makebox(184,22)[r]{\sffamily\bfseries #2}}}

      \put(545,104){\rotatebox{90}{\makebox(100,22)[l]{\sffamily\bfseries
            #5 \quad S. \theseite}}} \addtocounter{seite}{1}
      \put(545,76){\includegraphics[height=20pt]{Bilder/#7}} }
    {
      \thicklines \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(345,22)[l]{ \sffamily\bfseries  #3
          }}}
      \put(401,760){{\framebox(139,22)[l]{

            \sffamily\bfseries \Large #4 #6 }}}

      \put(542,152){\rotatebox{270}{\makebox(100,7)[r]{\sffamily \tiny
            Rendtel, #1}}}
      \put(30,729){\rotatebox{270}{\makebox(184,22)[l]{\sffamily\bfseries #2}}}
      \put(30,204){\rotatebox{270}{\makebox(100,22)[r]{\sffamily\bfseries
            #5 \quad S. \theseite}}} \addtocounter{seite}{1}
      \put(30,76){\includegraphics[height=20pt]{Bilder/#7}} }
    \inhalt{\put(55,29){{\makebox(485,22)[c]{ \normalsize \thepage }}}}
  }
  #8
}

\newcommand{\arbeitsblattumgebungklein}[8][\today]{
  \newpage

  \countersetzen
  \pagestyle{plain}
  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines

      \put(55,52){\framebox(485,330){}}
      \put(55,360){{\framebox(345,22)[l]{ \sffamily\bfseries \normalsize
            #3 }}}
      \put(401,360){{\framebox(139,22)[l]{  \sffamily\bfseries
            \Large #4 #6
          }}}

      \put(47,62){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}

      \put(545,94){\rotatebox{90}{\makebox(100,22)[l]{\sffamily\bfseries
            \normalsize #5}}}
      \put(545,162){\rotatebox{90}{\makebox(184,22)[r]{\sffamily\bfseries \small
            #2}}}
      \put(545,72){\includegraphics[height=20pt]{Bilder/#7}}
    }
    {
      \put(55,52){\framebox(485,330){}}
      \put(55,360){{\framebox(345,22)[l]{ \sffamily\bfseries \normalsize
            #3 }}}
      \put(401,360){{\framebox(139,22)[l]{  \sffamily\bfseries
            \Large #4 #6
          }}}

      \put(47,62){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}
      \put(545,94){\rotatebox{90}{\makebox(100,22)[l]{\sffamily\bfseries
            \normalsize
            #5}}}
      \put(545,162){\rotatebox{90}{\makebox(184,22)[r]{\sffamily\bfseries
            \small #2}}}
      \put(545,72){\includegraphics[height=20pt]{Bilder/#7}} }
    #8
  }
}

\newcommand{\heftumgebung}[8][\today]{

  \countersetzen
  \pagestyle{plain}
  #8
  \ClearShipoutPicture \AddToShipoutPicture{

    \thicklines
    \put(55,52){\framebox(485,707){}}
    \put(55,760){{\framebox(485,22)[#4]{ \sffamily\bfseries
          #3
        }}}

    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}
    \put(545,540){\rotatebox{90}{\makebox(184,22)[r]{\sffamily\bfseries #2}}}

    \put(545,104){\rotatebox{90}{\makebox(100,22)[l]{\sffamily\bfseries
          #5 }}} \addtocounter{seite}{1}
    \put(545,76){\includegraphics[height=20pt]{Bilder/#7}}

    \inhalt{\put(55,29){{\makebox(485,22)[c]{ \normalsize \thepage }}}}
  }
  #8
}

\newcommand{\heftumgebungklein}[8][\today]{

  \countersetzen
  \pagestyle{plain}
  #8
  \ClearShipoutPicture \AddToShipoutPicture{

    \thicklines

    \put(55,52){\framebox(485,330){}}
    \put(55,360){{\framebox(485,22)[#4]{ \sffamily\bfseries
          #3
        }}}

    \put(47,62){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}

    \put(545,94){\rotatebox{90}{\makebox(100,22)[l]{\sffamily\bfseries
          \normalsize #5}}}
    \put(545,162){\rotatebox{90}{\makebox(184,22)[r]{\sffamily\bfseries \small
          #2}}}
    \put(545,72){\includegraphics[height=20pt]{Bilder/#7}}
  }
  #8
}

\newenvironment{arbeitsblatt}[4][\today]
{
  \addtocounter{ab}{1}
  \eintrag{Arbeitsblatt #4: #3}
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Arbeitsblatt}}{ \Large{A}}{edit.png}{\normalsize}
}
{
  \clearpage
  \ClearShipoutPicture
  \drucken{\cleardoublepage}
  \normalsize
}

\newenvironment{arbeitsblattloesung}[4][\today]
{
  \eintrag{Arbeitsblattl\"osung #4: #3}
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{L\"osung}}{ \Large{AL}}{edit.png}{\normalsize}

  \schuleloesungbegin
}{
  \newpage
  \schuleloesungend
  \ClearShipoutPicture
  \drucken{\cleardoublepage}
}

%%%%%%%%%%%%%%%%%%%%%% 
% Ein kleines
% Arbeitsblatt (A5 quer) mit L\"osung
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{arbeitsblattklein}[4][\today]
{

  \addtocounter{ab}{1}
  \eintrag{Arbeitsblatt #4: #3}
  \arbeitsblattumgebungklein[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Arbeitsblatt}}{ \Large{A}}{edit.png}{\normalsize}
}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture \drucken{\cleardoublepage}
}

\newenvironment{arbeitsblattkleinloesung}[4][\today]
{
  \eintrag{Arbeitsblattl\"osung #4: #3}
  \arbeitsblattumgebungklein[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{L\"osung}}{ \Large{AL}}{edit.png}{\normalsize}
  \schuleloesungbegin
}
{
  \thispagestyle{empty}
  \clearpage
  \schuleloesungend
  \ClearShipoutPicture \cleardoublepage
}

%%%%%%%%%%%%%%%%%%%%%% 
% Ein Merkblatt in
% A4 und A5 quer
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{merkblatt}[4][\today]
{
  \addtocounter{mb}{1}
  \eintrag{Merkblatt #4: #3}
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Merkblatt}}{ \Large{M}}{merk.pdf}{\normalsize}

}{ \newpage

  \ClearShipoutPicture \drucken{\cleardoublepage}
  \pagestyle{fancyplain} }

\newenvironment{merkblattklein}[4][\today]
{
  \addtocounter{mb}{1}
  \eintrag{Merkblatt #4: #3}
  \arbeitsblattumgebungklein[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Merkblatt}}{ \Large{M}}{merk.pdf}{\normalsize}
}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture \drucken{\cleardoublepage}
}

%%%%%%%%%%%%%%%%%%%%% 
% Folien in A4 und
% A5 quer
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{folie}[4][\today]
{
  \addtocounter{fo}{1}
  \eintrag{Folie: #3}
  \heftumgebung[#1]{ \normalsize{#2}}{\large{#3}}{c}{ \normalsize{Folie}}{}{folie.png}{\LARGE}
}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture
}

\newenvironment{folieloesung}[4][\today]
{
  \eintrag{Foliel\"osung: #3}
  \heftumgebung[#1]{ \normalsize{#2}}{\large{#3}}{c}{ \normalsize{Foliel\"osung}}{}{folie.png}{\LARGE}
  \schuleloesungbegin
}
{
  \thispagestyle{empty}
  \clearpage
  \schuleloesungend
  \ClearShipoutPicture

}

\newenvironment{folieklein}[4][\today]
{
  \addtocounter{fo}{1}
  \heftumgebungklein[#1]{ \normalsize{#2}}{\large{#3}}{c}{ \normalsize{Folie}}{}{folie.png}{\LARGE}
}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture
}

%%%%%%%%%%%%%%%%%%%%%% Auf ein A4 Blatt
% wird eine A5 Folie eingefügt
%%%%%%%%%%%%%%%%%%%%% 

\newcommand{\foliebildein}[2]{
  \newpage
  \thispagestyle{empty}
  \mbox{}
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(0,421){\includegraphics[page=#2,scale=1]{#1}}
    \inhalt{\put(55,29){{\makebox(485,22)[c]{ \thepage }}}}
  }
  \newpage
  \ClearShipoutPicture

}

%%%%%%%%%%%%%%%%%%%%% 
% Auf ein A4 Blatt
% werden zwei A5 Folie eingefügt
%%%%%%%%%%%%%%%%%%%%% 

\newcommand{\foliebildzwei}[4]{
  \newpage
  \thispagestyle{empty}
  \mbox{}
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(0,421){\includegraphics[page=#2,scale=1]{#1}}
    \put(0,0){\includegraphics[page=#4,scale=1]{#3}}
    \inhalt{\put(55,29){{\makebox(485,22)[c]{ \thepage }}}}
  }
  \newpage
  \ClearShipoutPicture
}

%%%%%%%%%%%%%%%%%%%%% 
% Auf ein A4 Blatt
% werden zwei A5 Arbeitsblätter eingefügt
%%%%%%%%%%%%%%%%%%%%% 

\newcommand{\abklein}[2]{
  \newpage
  \setcounter{section}{0}
  \thispagestyle{empty}
  \mbox{}
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(0,421){\includegraphics[page=#2,scale=1]{#1}}
    \put(0,0){\includegraphics[page=#2,scale=1]{#1}}
    \inhalt{\put(55,29){{\makebox(485,22)[c]{ \thepage }}}}
  }
  \newpage
  \ClearShipoutPicture \drucken{\cleardoublepage}

}

%%%%%%%%%%%%%%%%%%%%% 
% Stationenarbeit mit L\"osungen
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{station}[4][\today]
{
  \addtocounter{st}{1}
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Station}}{ \Large{S}}{station.png}{\normalsize}
}
{
  \thispagestyle{empty}
  \clearpage

  \ClearShipoutPicture \cleardoublepage

}

\newenvironment{stationloesung}[4][\today]
{
  \countersetzen
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Stationl\"osung}}{ \Large{S}}{station.png}{\normalsize}

  \schuleloesungbegin
}{
  \newpage
  \schuleloesungend
  \ClearShipoutPicture \cleardoublepage
  \thispagestyle{empty}
}

%%%%%%%%%%%%%%%%%%%%% 
% Gruppenarbeit in A4 und A5
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{gruppenarbeit}[4][\today]
{
  \addtocounter{ga}{1}
  \eintrag{Gruppenarbeit: #4}
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{\Large{Gruppe}}{ \normalsize{Gruppenarbeit}}{ \Large{#4}}{station.png}{\normalsize}

}{
  \newpage
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \drucken{\cleardoublepage}
  \pagestyle{fancyplain}
}

\newenvironment{gruppenarbeitloesung}[4][\today]
{

  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{Gruppe}}{ \normalsize{Gruppenarbeit L\"osung}}{ \Large{#4}}{station.png}{\normalsize}

  \schuleloesungbegin
}{
  \newpage
  \schuleloesungend
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \drucken{\cleardoublepage}
  \thispagestyle{empty}
}

\newenvironment{gruppenarbeitklein}[4][\today]
{

  \addtocounter{ga}{1}
  \arbeitsblattumgebungklein[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Gruppenarbeit}}{ \Large{Gruppe}}{station.png}{\normalsize}

}
{
  \thispagestyle{empty}
  \clearpage

  \ClearShipoutPicture

}

%%%%%%%%%%%%%%%%%%%%% 
% Informationsblatt
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{info}[4][\today]
{

  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Info}}{ \Large{I}}{info.png}{\normalsize}
}{
  \newpage
  % \setcounter{page}{\thesavepagenum}
  \ClearShipoutPicture \drucken{\cleardoublepage}
  \pagestyle{fancyplain}
}

%%%%%%%%%%%%%%%%%%%%% 
% Weitere Notizen
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{notiz}[4][\today]
{
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Notiz}}{ \Large{N}}{info.png}{\normalsize}
  \schuleloesungbegin
}{
  \newpage
  \schuleloesungend
  % \setcounter{page}{\thesavepagenum}
  \ClearShipoutPicture \cleardoublepage
  \pagestyle{fancyplain}
}

%%%%%%%%%%%%%%%%%%%%%% 
% Arbeiten, Klausuren, Asas,...
%%%%%%%%%%%%%%%%%%%%%% 

%%%%%%%%%%%%%%%%%%%%% 
% Klausur, Klausurl\"osung und
% zwei Gruppen
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{klausur}[4][\today]
{
  \addtocounter{kl}{1}
  \setcounter{punkte}{0}
  \countersetzen

  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}
  \ClearShipoutPicture
  \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \thicklines
    \put(55,52){\framebox(485,707){}}
    \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
          #2 \hfill #3 \quad }}}
    \put(355,760){{\framebox(185,22)[l]{  \sffamily\bfseries
          Name:
        }}}
    \eintrag{#2}
    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}
    \put(55,29){{\makebox(485,22)[c]{ \theseite }}} \addtocounter{seite}{1}

  }

}{
  \newpage
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \drucken{\cleardoublepage}
}

\newenvironment{klausurloesung}[4][\today]
{

  \countersetzen
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}

  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \thicklines
    \put(55,52){\framebox(485,707){}}
    \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
          #2 \hfill #3 \quad }}}
    \put(355,760){{\framebox(185,22)[l]{  \sffamily\bfseries
          L\"osung
        }}}
    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}

    \put(55,29){{\makebox(485,22)[c]{ \theseite }}} \addtocounter{seite}{1}

  }
  \schuleloesungbegin
}{
  \newpage
  \schuleloesungend
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \drucken{\cleardoublepage}

}

\newenvironment{klausura}[4][\today]
{
  \addtocounter{kl}{1}

  \countersetzen

  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}
  \ClearShipoutPicture
  \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \thicklines
    \put(55,52){\framebox(485,707){}}
    \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
          A \quad #2 \hfill #3 \quad }}}
    \eintrag{#2}
    \put(355,760){{\framebox(185,22)[l]{  \sffamily\bfseries
          Name:
        }}}

    \put(55,29){{\makebox(485,22)[c]{ \theseite }}} \addtocounter{seite}{1}

    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}

  }

}{
  \newpage
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \drucken{\cleardoublepage}
  \pagestyle{fancyplain}
}

\newenvironment{klausuraloesung}[4][\today]
{
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}

  \countersetzen

  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \thicklines
    \put(55,52){\framebox(485,707){}}
    \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
          A \quad #2 \hfill #3 \quad }}}
    \put(355,760){{\framebox(185,22)[l]{  \sffamily\bfseries
          L\"osung
        }}}
    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}
    \put(55,29){{\makebox(485,22)[c]{ \theseite }}} \addtocounter{seite}{1}
  }
  \schuleloesungbegin
}{
  \newpage
  \schuleloesungend
  \ClearShipoutPicture \drucken{\cleardoublepage}
}

\newenvironment{klausurb}[4][\today]
{
  \addtocounter{kl}{1}

  \countersetzen

  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}
  \ClearShipoutPicture
  \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \thicklines
    \put(55,52){\framebox(485,707){}}
    \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
          B \quad #2 \hfill #3 \quad }}}
    \eintrag{#2}
    \put(355,760){{\framebox(185,22)[l]{  \sffamily\bfseries
          Name:
        }}}

    \put(55,29){{\makebox(485,22)[c]{ \theseite }}} \addtocounter{seite}{1}
    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}

  }

}{
  \newpage
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \drucken{\cleardoublepage}
  \pagestyle{fancyplain}
}

\newenvironment{klausurbloesung}[4][\today]
{

  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}

  \countersetzen

  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \thicklines
    \put(55,52){\framebox(485,707){}}
    \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
          B \quad #2 \hfill #3 \quad }}}
    \put(355,760){{\framebox(185,22)[l]{  \sffamily\bfseries
          L\"osung
        }}}
    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}

    \put(55,29){{\makebox(485,22)[c]{ \theseite }}} \addtocounter{seite}{1}

  }
  \schuleloesungbegin
}{
  \newpage
  \schuleloesungend
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \drucken{\cleardoublepage}
  \thispagestyle{empty}

}

\newenvironment{pruefung}[4][\today]
{
  \addtocounter{kl}{1}

  \countersetzen
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}
  \ClearShipoutPicture
  \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \thicklines
    \linethickness{1.5pt}
    \put(55,760){\line(1,0){485}}

    \put(55,760){\rotatebox{0}{\makebox(485,15)[l]{\sffamily \footnotesize
          #2 \hfill #4}}}
    \eintrag{#4}
    \put(55,760){\rotatebox{0}{\makebox(485,15)[c]{\sffamily\footnotesize
          #3}}}
    \addtocounter{seite}{1}

  }

}{
  \newpage
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \cleardoublepage
  \pagestyle{fancyplain}
}

\newenvironment{pruefungmrg}[4][\today]
{
  \addtocounter{kl}{1}

  \countersetzen

  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}
  \ClearShipoutPicture
  \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \thicklines
    \linethickness{1pt}
    % \put(55,760){\line(1,0){485}}

    % \put(55,52){\framebox(485,707){}}
    \put(55,760){\rotatebox{0}{\makebox(485,15)[l]{\sffamily \large
          \hfill #4}}}
    \eintrag{#2}
    \put(90,760){\rotatebox{0}{\makebox(485,15)[l]{\sffamily \large
          #3}}}

    \put(54,757){\rotatebox{0}{\framebox(487,21)[l]{}}}
    % \put(55,760){\rotatebox{0}{\framebox(485,15)[l]{}}}
    \put(55,760){\rotatebox{0}{\makebox(485,15)[c]{\sffamily\large
          #2}}}
    \put(58,755){\includegraphics[height=1cm]{Bilder/mrg.png}}
    \addtocounter{seite}{1}

  }

}{
  \newpage
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \cleardoublepage
  \pagestyle{fancyplain}
}

\newenvironment{prtabelle}[1]{
  \newcolumntype{A}{>{\columncolor{hellgrau}}c}
  \begin{center}
    \begin{longtable}
      {|p{0.4cm}|p{0.81\linewidth}|p{0.1cm}|p{0.1cm}|p{0.1cm}|}
      \hline
      \multicolumn{1}{|A|}{} &
      \multicolumn{1}{A|}{} &
      \multicolumn{3}{A|}{\tiny \textbf{Zuordnungen}} \\
      \multicolumn{1}{|A|}{\small \textbf{Nr.}} &
      \multicolumn{1}{A|}{\small \textbf{Anmerkungen}} &
      \multicolumn{3}{A|}{ \tiny \textbf{zu den AB}} \\ \cline{3-5}
      \multicolumn{1}{|A|}{} &
      \multicolumn{1}{A|}{} &
      \multicolumn{1}{A|}{\small \textbf{I}} &
      \multicolumn{1}{A|}{\small \textbf{II}} &
      \multicolumn{1}{A|}{\small \textbf{III}} \\
      \hline
      \endhead

      \endfoot
      #1
    }
    {
    \end{longtable}

  \end{center}
}

\newcommand{\prtabeintrag}[5]{
  \small{#1} & #5 &
  \multicolumn{1}{c|}{\small{#2}} &
  \multicolumn{1}{c|}{\small{#3}} &
  \multicolumn{1}{c|}{\small{#4}} \\
  \hline
}

\newcommand{\prtabeintragr}[5]{
  \small{#1} & \multicolumn{1}{r|}{\textbf{#5}} &
  \multicolumn{1}{c|}{\small{\textbf{#2}}} &
  \multicolumn{1}{c|}{\small{\textbf{#3}}} &
  \multicolumn{1}{c|}{\small{\textbf{#4}}} \\
  \hline
}

\newcommand{\prtabeintragol}[5]{
  \small{#1} & #5 &
  \multicolumn{1}{c|}{\small{#2}} &
  \multicolumn{1}{c|}{\small{#3}} &
  \multicolumn{1}{c|}{\small{#4}} \\
}

\newenvironment{ktabelle}[1]{
  \begin{center}
    \setlength{\extrarowheight}{0.15cm}
    \begin{longtable}{|lp{0.83\linewidth}|p{0.06\linewidth}|}
      \hline
      \endhead
      \hline
      \endfoot
      #1
    }
    {
    \end{longtable}
  \end{center}
}

\newenvironment{mctabelle}[1]{
  \setcounter{nrmc}{0}
  \begin{center}

    \setlength{\extrarowheight}{0.2cm}
    \begin{longtable}{|c|p{0.27\linewidth}|p{0.1\linewidth}|p{0.1\linewidth}|p{0.1\linewidth}|p{0.08\linewidth}|c|}
      \hline
      & {\small \textbf{Aufgabe}} & {\small \textbf{A}} & {\small \textbf{B}} &
      {\small \textbf{C}} & {\small \textbf{D}} & {\footnotesize \textbf{L\"osung}}
      \\
      \hline
      \endhead
      \hline
      \endfoot
      #1
    }
    {
    \end{longtable}
  \end{center}
}

\newcommand{\mceintrag}[6][\nomc]{
  \small{#1} & \small{#2} & \small{#3} & \small{#4} & \small{#5} & \small{#6} & \\ \hline
}

\newcommand{\summe}[1][]{
  \thepunkte
}
\newcommand{\addpkt}[1][]{
  \addtocounter{punkte}{#1}
  #1
}

\newcommand{\subpkt}[1][]{
  \addtocounter{punkte}{-#1}
  #1
}

\newcommand{\pkt}[1][]{
  #1
}

\newcounter{aufgabenpkt}
\newcommand{\itempkt}[1][]{
  \bigskip

\item[\textbf{\theaufgabenpkt.  Aufgabe: }] \stepcounter{aufgabenpkt} \hfill {\textbf{\addpkt[#1] Punkte}} \newline
}

\newcommand{\ktabeintrag}[3][\no]{
  \textbf{#1} & #3 & \hfill{\textbf{\Large{#2}}} \\ \hline
}

\newcommand{\ktabeintragol}[3][\no]{
  \textbf{#1} & #3 & \hfill{\textbf{\Large{#2}}} \\
}

\newcommand{\ktabeintragr}[3]{
  \textbf{#1} & \multicolumn{1}{r|}{#3} &
  \hfill{\textbf{\Large{#2}}} \\ \hline
}

\newcommand{\ktab}[1]{
  \multicolumn{3}{|p{0.95\linewidth}|}{#1} \\ \hline
}

\newcommand{\platz}[1]{
  ~
  \vspace{#1}

  ~
}

%%%%%%%%%%%%%%%%%%%%% 
% Ein Test
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{test}[4][\today]
{
  \countersetzen

  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}

  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
            #2 \hfill #3 \quad }}}
      \put(371,743){{\framebox(169,22)[l]{  \sffamily\bfseries
            Name:
          }}}
      \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}

    }
    {
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
            #2 \hfill #3 \quad }}}
      \put(371,743){{\framebox(169,22)[l]{  \sffamily\bfseries
            Name:
          }}}
      \put(542,152){\rotatebox{270}{\makebox(100,7)[r]{\sffamily \tiny
            Rendtel, #1}}}

    }
  }

}{
  \newpage
  % \setcounter{page}{\thesavepagenum}
  \ClearShipoutPicture \cleardoublepage
  \pagestyle{fancyplain}
}

\newenvironment{testloesung}[4][\today]
{
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}

  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
            #2 \hfill #3 \quad }}}
      \put(371,743){{\framebox(169,22)[l]{  \sffamily\bfseries
            L\"osung
          }}}
      \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}

    }
    {
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
            #2 \hfill #3 \quad }}}
      \put(371,743){{\framebox(169,22)[l]{  \sffamily\bfseries
            L\"osung
          }}}
      \put(542,152){\rotatebox{270}{\makebox(100,7)[r]{\sffamily \tiny
            Rendtel, #1}}}

    }
  }
  \schuleloesungbegin
}
{
  \newpage
  \schuleloesungend
  % \setcounter{page}{\thesavepagenum}
  \ClearShipoutPicture \cleardoublepage
  \pagestyle{fancyplain}
}

%%%%%%%%%%%%%%%%%%%%% 
% Asa
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{asa}[4][\today]
{
  \countersetzen

  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}

  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
            #2 \hfill #3 \quad }}}
      \put(371,743){{\framebox(169,22)[l]{  \sffamily\bfseries
            Name:
          }}}
      \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}

    }
    {
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
            #2 \hfill #3 \quad }}}
      \put(371,743){{\framebox(169,22)[l]{  \sffamily\bfseries
            Name:
          }}}
      \put(542,152){\rotatebox{270}{\makebox(100,7)[r]{\sffamily \tiny
            Rendtel, #1}}}

    }
  }

}
{
  \thispagestyle{empty}

  \clearpage
  \ClearShipoutPicture \cleardoublepage

}

\newenvironment{asaloesung}[4][\today]
{
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}

  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
            #2 \hfill #3 \quad }}}
      \put(371,743){{\framebox(169,22)[l]{  \sffamily\bfseries
            L\"osung
          }}}
      \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}

    }
    {
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(300,22)[l]{ \sffamily\bfseries \normalsize
            #2 \hfill #3 \quad }}}
      \put(371,743){{\framebox(169,22)[l]{  \sffamily\bfseries
            L\"osung
          }}}
      \put(542,152){\rotatebox{270}{\makebox(100,7)[r]{\sffamily \tiny
            Rendtel, #1}}}

    }
  }
  \schuleloesungbegin
}{
  \newpage
  \schuleloesungend
  % \setcounter{page}{\thesavepagenum}
  \ClearShipoutPicture \cleardoublepage
  \thispagestyle{empty}
}

%%%%%%%%%%%%%%%%%%%%%% 
% Verschiedenes
%%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{fragebogen}[4][\today]
{
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}
  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(345,22)[l]{ \sffamily\bfseries  #3
          }}}
      \put(401,760){{\framebox(139,22)[l]{  \sffamily\bfseries
            \Large #4
          }}}
      \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}

      \put(545,540){\rotatebox{90}{\makebox(184,22)[r]{\sffamily\bfseries
            #2}}}
      \put(545,104){\rotatebox{90}{\makebox(100,22)[l]{\sffamily\bfseries
            Fragebogen}}}
      \put(545,76){\includegraphics[height=20pt]{Bilder/frage.png}}

    }
    {
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(345,22)[l]{ \sffamily\bfseries  #3
          }}}
      \put(401,760){{\framebox(139,22)[l]{  \sffamily\bfseries
            \Large #4
          }}}
      \put(542,152){\rotatebox{270}{\makebox(100,7)[r]{\sffamily \tiny
            Rendtel, #1}}}

      \put(30,729){\rotatebox{270}{\makebox(184,22)[l]{\sffamily\bfseries
            #2}}}
      \put(30,204){\rotatebox{270}{\makebox(100,22)[r]{\sffamily\bfseries
            Fragebogen}}}
      \put(30,76){\includegraphics[height=20pt]{Bilder/frage.png}}

    }
  }

}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture \cleardoublepage

}

\newenvironment{fragen}[3][Rendtel]
{\newpage
  \setcounter{figure}{0}
  \setcounter{savepagenum}{\theseite}
  \pagestyle{plain}
  \small{Stunde {#2}
    \hspace{1cm} {#1} \hspace{1cm} Datum: {#3}}
  \LARGE
  \vspace{0.1cm}
}{\newpage
  \normalsize
  % \setcounter{page}{\thesavepagenum}
}

\newcommand{\bildchen}[2][]{
  \bilderbegin
  \begin{center}
    \includegraphics[#1]{#2}
  \end{center}
  \bilderend
}

\newcommand{\bildchenarbeit}[2][]{
  \bilderbegin
  \vfill

  \begin{center}
    \offen{\includegraphics[#1]{#2}}  \textbf{Viel Erfolg!}
  \end{center}
  \bilderend
}

\newcommand{\bw}[1][]{
  \vfill
  \hfill {\footnotesize \shadowbox{\colorbox{white}{Bitte wenden...}} }
  \newpage
}

\newcommand{\hilfe}[1][]{
  \vfill

  \begin{tabular}{lr}
    \textbf{Hilfsmittel:} & Taschenrechner; Formelsammlung \\
    \textbf{Vorbereitungszeit:} & 30 Minuten
  \end{tabular}

  \newpage
}

\newcommand{\hilfeof}[1][]{
  \vfill

  \paragraph{Hilfsmittel:}
  Taschenrechner

  \paragraph{Vorbereitungszeit:}

  30 Minuten
  \newpage
}

\newcommand{\hilfeohne}[1][]{
  \vfill

  \paragraph{Hilfsmittel:}
  Taschenrechner; Formelsammlung
  \newpage
}

\newcommand{\aus}[1][]{
  \vfill
  { \tiny \hfill Aus: \tiny{#1}}

}

\newcommand{\nach}[1][]{
  \vfill
  { \tiny \hfill Nach: \tiny{#1}}

}

\newcommand{\bildchenarbeitnote}[2][]{
  \bilderbegin
  \vfill
  \begin{figure}[H]
    \centering
    \includegraphics[#1]{#2}  \textbf{Viel Erfolg!}
  \end{figure}\hfill \begin{tabular}{l|p{1.5cm}|}
    \cline{2-2}
    \textbf{Note:} & \\
    & \\ \cline{2-2}
  \end{tabular}
  \bilderend
}

\newcommand{\bildchenarbeitnoter}[2][width=0.25\linewidth]{
  \bilderbegin
  \vfill
  \centering
  \includegraphics[#1]{#2}  \textbf{\textsl{}}
  \hfill \begin{tabular}{l|p{1.5cm}|}
    \cline{2-2}
    \textbf{Note:} & \\
    & \\ \cline{2-2}
  \end{tabular}
  \bilderend
}

\newcommand{\notearbeit}[1][Viel Erfolg!]{
  \bilderbegin
  \vfill

  \begin{minipage}[c]{0.3\linewidth}
    \textbf{#1}
  \end{minipage} \hfill
  \begin{minipage}[c]{0.2\linewidth}
    \begin{tabular}{l|p{1.5cm}|}
      \cline{2-2}
      \textbf{Note:} & \\
      & \\ \cline{2-2}
    \end{tabular}
  \end{minipage}

  \bilderend
}

\newcommand{\insertpdf}[2]{
  \newpage
  \thispagestyle{empty}
  \mbox{}
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(0,420){
      \parbox[c][\paperheight]{\paperwidth}{
        \vfill
        \centering
        \includegraphics[page=#2,scale=1]{#1}
      }
    }
  }
  \newpage
  \ClearShipoutPicture \cleardoublepage
}

\newcommand{\insertpng}[2][width=20cm]{
  \newpage
  \thispagestyle{empty}
  \mbox{}
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(0,420){
      \parbox[c][\paperheight]{\paperwidth}{
        \vfill
        \centering
        \includegraphics[#1]{#2}
      }
    }
  }
  \newpage
  \ClearShipoutPicture
}

\newcommand{\insertpdfgedreht}[2]{
  \newpage
  \thispagestyle{empty}
  \mbox{}
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(0,0){
      \parbox[b][\paperheight]{\paperwidth}{
        \vfill
        \centering
        \includegraphics[page=#2,scale=1,angle=90]{#1}
      }
    }
  }
  \newpage
  \ClearShipoutPicture \cleardoublepage
}

\newcommand{\insertpdfrot}[3]{
  \newpage
  \thispagestyle{empty}
  \mbox{}
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(0,0){
      \parbox[b][\paperheight]{\paperwidth}{
        \vfill
        \centering
        \includegraphics[page=#2,scale=1,angle=#3]{#1}
      }
    }
  }
  \newpage
  \ClearShipoutPicture \cleardoublepage
}

\newcommand{\stationbild}[4]{
  \newpage
  \thispagestyle{empty}
  \mbox{}
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(0,421){\includegraphics[page=#2,scale=1]{#1}}
    \put(0,0){\includegraphics[page=#4,scale=1]{#3}}
  }
  \newpage
  \ClearShipoutPicture \cleardoublepage
}

\newcommand{\insertbild}[2]{
  \newpage
  \thispagestyle{empty}
  \mbox{}
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(0,0){
      \parbox[b][\paperheight]{\paperwidth}{
        \vfill
        \centering
        \includegraphics[width=#2]{#1}
        \vfill
      }
    }
  }
  \newpage
  \ClearShipoutPicture \cleardoublepage
}

\newenvironment{uebersicht}[4][\today]
{
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}
  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(345,22)[l]{ \sffamily\bfseries  #3
          }}}
      \put(401,760){{\framebox(139,22)[l]{  \sffamily\bfseries
            \Large #4
          }}}
      \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}

      \put(545,540){\rotatebox{90}{\makebox(184,22)[r]{\sffamily\bfseries
            #2}}}
      \put(545,104){\rotatebox{90}{\makebox(100,22)[l]{\sffamily\bfseries
            Übersicht}}}
      \put(545,76){\includegraphics[height=20pt]{Bilder/info.png}}

    }
    {
      \thicklines
      \put(55,52){\framebox(485,707){}}
      \put(55,760){{\framebox(345,22)[l]{ \sffamily\bfseries  #3
          }}}
      \put(401,760){{\framebox(139,22)[l]{  \sffamily\bfseries
            \Large #4
          }}}
      \put(542,152){\rotatebox{270}{\makebox(100,7)[r]{\sffamily \tiny
            Rendtel, #1}}}

      \put(30,729){\rotatebox{270}{\makebox(184,22)[l]{\sffamily\bfseries
            #2}}}
      \put(30,204){\rotatebox{270}{\makebox(100,22)[r]{\sffamily\bfseries
            Übersicht}}}
      \put(30,76){\includegraphics[height=20pt]{Bilder/info.png}}

    }
  }

}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture \cleardoublepage

}

\newenvironment{tafel}[1][Rendtel]
{\newpage
  \setcounter{figure}{0}
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}
  \renewcommand{\headrulewidth}{0.0pt}
  \renewcommand{\footrulewidth}{0.0pt}
  \pagestyle{fancyplain}
  \lhead[]{}
  \chead{}
  \rhead[]{}
  \lfoot[]{}
  \cfoot{}
  \rfoot[]{}
}{\newpage
  % \setcounter{page}{\thesavepagenum}
  \pagestyle{plain}
}

\newenvironment{plakat}[5][\today] { \definecolor{ersatz}{rgb}{#5}
  \setcounter{savepagenum}{\theseite} \setcounter{seite}{1} \Huge
  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt} \ifthenelse{\isodd{\value{seite}}}{
      \thicklines \put(55,52){\framebox(485,707){}}
      \put(55,760){{\colorbox{ersatz}{\framebox(345,22)[l]{ \sffamily\bfseries
              \normalsize
              #3 }}}}
      \put(401,760){{\colorbox{ersatz}{\framebox(139,22)[l]{
              \sffamily\bfseries \Large Gruppe #4 }}}}
      \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
            Rendtel, #1}}}
      \put(545,540){\rotatebox{90}{\makebox(184,22)[r]{\sffamily\bfseries
            \normalsize
            #2}}}
      \put(545,104){\rotatebox{90}{\makebox(100,22)[l]{\sffamily\bfseries
            \normalsize
            Plakat}}}
      \put(545,76){\includegraphics[height=20pt]{Bilder/edit.png}} } {
      \thicklines \put(55,52){\framebox(485,707){}}
      \put(55,760){{\colorbox{ersatz}{\framebox(345,22)[l]{ \sffamily\bfseries
              \normalsize
              #3 }}}}
      \put(401,760){{\colorbox{ersatz}{\framebox(139,22)[l]{
              \sffamily\bfseries \Large Gruppe #4 }}}}
      \put(542,152){\rotatebox{270}{\makebox(100,7)[r]{\sffamily \tiny
            Rendtel, #1}}}

      \put(30,729){\rotatebox{270}{\makebox(184,22)[l]{\sffamily\bfseries
            \normalsize #2}}}
      \put(30,204){\rotatebox{270}{\makebox(100,22)[r]{\sffamily\bfseries
            \normalsize
            Plakat}}}
      \put(30,76){\includegraphics[height=20pt]{Bilder/edit.png}} }
    \inhalt{\put(55,29){{\makebox(485,22)[c]{ \normalsize \thepage }}}}
  } } {
  \thispagestyle{empty} \clearpage \ClearShipoutPicture }

\newcommand{\tafelbild}[3]{
  \large
  \fbox{
    \begin{minipage}[t][6cm]{0.23\linewidth}
      #1
    \end{minipage}}
  \fbox{
    \begin{minipage}[t][6cm]{0.5\linewidth}
      #2
    \end{minipage}}
  \fbox{
    \begin{minipage}[t][6cm]{0.23\linewidth}
      #3
    \end{minipage}}

}

\newenvironment{randlos}[4][\today]
{
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}

  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines
    }
    {
      % \thicklines
    }
  }

}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture \cleardoublepage

}

\newenvironment{stationkarte}[4][\today]
{

  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Station}}{ \Large{S}}{station.png}{\normalsize}
}
{
  \thispagestyle{empty}
  \clearpage

  \ClearShipoutPicture \cleardoublepage

}

\newenvironment{stationkarteloesung}[4][\today]
{
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Stationl\"osung}}{ \Large{S}}{station.png}{\normalsize}

  \schuleloesungbegin
}
{
  \thispagestyle{empty}
  \clearpage
  \schuleloesungend

  \ClearShipoutPicture \cleardoublepage

}

\newenvironment{definition}[4][\today]
{
  \setcounter{savepagenum}{\theseite}
  \setcounter{seite}{1} \pagestyle{plain}

  \ClearShipoutPicture \AddToShipoutPicture{
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    \ifthenelse{\isodd{\value{seite}}}{
      \thicklines
    }
    {
      % \thicklines
    }
  }

}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture \cleardoublepage

}

\newenvironment{planung}[6][\today]{
  \addtocounter{stunde}{1}
  \addtocounter{secnumdepth}{1}
  \eintrag{Stunde \thestunde: #5}
  \ClearShipoutPicture \AddToShipoutPicture{

    \setcounter{seite}{1} \pagestyle{plain}
    \addtocounter{planung}{1}
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}

    \thicklines
    \put(55,781){\framebox(150,40)[l]{ \hspace{0.2cm}
        \begin{tabular}{l}
          \sffamily {\bfseries Stundenplanung / Rl} \\
          Fach: #2
        \end{tabular}
      }}
    \put(55,760){\framebox(150,20)[l]{ \hspace{0.2cm}
        \begin{tabular}{l}
          Klasse: #3
        \end{tabular}
      }}
    \put(55,52){\framebox(485,707){}}

    \put(206,781){\framebox(334,40)[l]{ \hspace{0.2cm}

        \begin{tabular}{rl}
          \sffamily {\bfseries Oberthema:} & \sffamily {\bfseries #4} \\

          \sffamily {\bfseries Stunde:} & \sffamily {\bfseries \thestunde}

        \end{tabular}

      }}

    \put(206,760){\framebox(334,20)[l]{ \hspace{0.2cm}
        \sffamily { Thema: #5

        }
      }}
    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}

    \put(297,40){\texttt{\theplanung}}

    \thispagestyle{empty}

  }

}
{
  \thispagestyle{empty}
  \clearpage

  \ClearShipoutPicture
  \drucken{\cleardoublepage}

}

\newenvironment{ptabelle}[1]{
  \setlength{\extrarowheight}{0.2cm}
  \renewcommand{\arraystretch}{1.1}
  \newcolumntype{B}{>{\columncolor{grau}}c}

  \begin{longtable}{|p{0.095\linewidth}|p{0.7\linewidth}|p{0.065\linewidth}|p{
        0.05\linewidth}|}
    \hline
    \multicolumn{1}{|B|}{\textbf{\footnotesize Phase}} &
    \multicolumn{1}{B|}{\textbf{\footnotesize Beschreibung}} &
    \multicolumn{1}{B|}{\textbf{\footnotesize Me-}} &
    \multicolumn{1}{B|}{\textbf{\footnotesize Me-}} \\
    \multicolumn{1}{|B|}{\textbf{\footnotesize}} &
    \multicolumn{1}{B|}{\textbf{\footnotesize}}&
    \multicolumn{1}{B|}{\textbf{\footnotesize thode}} &
    \multicolumn{1}{B|}{\textbf{\footnotesize dien}}\\ \hline
    \endhead
    \hline
    \endfoot
    #1
  }
  {

  \end{longtable}
}

\newcommand{\ptabeintrag}[4]{
  \footnotesize{\footnotesize #1} & #2 & \tiny{#3} & \tiny{#4} \\ \hline
}

\newcommand{\merke}[1]{
  \fontfamily{ptm} \selectfont
  \it
  \parindent=0pt
  #1
}

\newenvironment{planung2}[6][\today]{
  \countersetzen
  \addtocounter{stunde}{1}
  \eintrag{Stunde \thestunde: #5}
  \ClearShipoutPicture \AddToShipoutPicture{
    \setcounter{seite}{1} \pagestyle{plain}
    \addtocounter{planung}{1}
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}

    \thicklines
    \put(55,781){\framebox(150,40)[l]{ \hspace{0.2cm}
        \begin{tabular}{l}
          \sffamily {\bfseries Stundenplanung / Rl} \\
          Fach: #2
        \end{tabular}
      }}
    \put(55,760){\framebox(150,20)[l]{ \hspace{0.2cm}
        \begin{tabular}{l}
          Klasse: #3
        \end{tabular}
      }}
    \put(55,52){\framebox(485,707){}}

    \put(206,781){\framebox(334,40)[l]{ \hspace{0.2cm}

        \begin{tabular}{rl}
          \sffamily {\bfseries Oberthema:} & \sffamily {\bfseries #4} \\

          \sffamily {\bfseries Stunde:} & \sffamily {\bfseries \thestunde}

        \end{tabular}
      }}

    \put(206,760){\framebox(334,20)[l]{ \hspace{0.2cm}
        \sffamily { Thema: #5 } }}
    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny
          Rendtel, #1}}}
    \put(55,740){\framebox(44,19)[c]{
        \scriptsize   \sffamily {\bfseries Phase}
      }}
    \put(100,740){\framebox(349,19)[c]{
        \scriptsize
        \sffamily {\bfseries Beschreibung}
      }}

    \put(450,740){\framebox(90,19)[c]{
        \scriptsize
        \sffamily {\bfseries Methode / Medien}

      }}

    \put(55,52){\framebox(44,687)[c]{
      }}
    \put(100,52){\framebox(349,687)[c]{
      }}

    \put(450,52){\framebox(90,687)[c]{
      }}

    \put(297,40){\texttt{\theseite}}
    \addtocounter{seite}{1}

  }
  \thispagestyle{empty}
}
{
  \thispagestyle{empty}
  \cleardoublepage
  \ClearShipoutPicture \cleardoublepage

}

\newenvironment{heft}[2][\today]
{
  \addtocounter{heft}{1}

  \eintrag{\theheft \quad #2}
  \heftumgebung[#1]{\normalsize{}}{\large{\theheft \quad #2}}{c}{ \normalsize{}}{}{weiss.png}{}
}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture

}

\newenvironment{heftanhang}[2][\today]
{
  \eintrag{\theheft \quad  #2}
  \heftumgebung[#1]{\normalsize{}}{\large{\theheft \quad #2}}{c}{ \normalsize{}}{}{weiss.png}{}

}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture

}

\newenvironment{heftloesung}[2][\today]
{
  \addtocounter{heft}{1}
  \eintrag{\theheft \quad  #2}
  \heftumgebung[#1]{\normalsize{}}{\large{\theheft \quad #2}}{c}{ \normalsize{}}{}{weiss.png}{}

}
{
  \thispagestyle{empty}
  \clearpage
  \ClearShipoutPicture

}


