% 
%%%%%%%%%%%%%%%%%%%%%% 
% Style-Datei fuer die Schule
% Xenia Rendtel
% Letzte Aenderung: 19.01.2009
%%%%%%%%%%%%%%%%%%%%%% 


\NeedsTeXFormat{LaTeX2e}[1996/06/01]
\ProvidesPackage{schule}

\usepackage{ntheorem}
\usepackage{amsmath,amssymb,amscd}
\usepackage{shadethm,ziffer,gauss,polynom,moreverb}
\usepackage[loose,nice]{units} % Einheiten
\usepackage{array,longtable,colortbl,multirow,hhline,tabularx,multicol,xcolor}
\usepackage[german]{rccol}
\usepackage{lscape,ulem,calc,rotating,eso-pic}
\usepackage[all]{xy} % xy-pic Umgebung fuer einfache Bilder
\usepackage{color,wasysym}

\usepackage[bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,
colorlinks=true,filecolor=black,linkcolor=black,urlcolor=black,
citecolor=black,hypertexnames=false]{hyperref}
\graphicspath{{/home/xenia/Schule/}{/home/xenia/Schule/Bilder/}}


\newcommand{\schuleloesungbegin}{\comment}
\newcommand{\schuleloesungend}{\endcomment}
\newcommand{\bilderbegin}{\comment}
\newcommand{\bilderend}{\endcomment}
\newcommand{\schuleveroffenbegin}{\comment}
\newcommand{\schuleveroffenend}{\endcomment}
\newcommand{\druckbegin}{\comment}
\newcommand{\druckend}{\endcomment}
\newcommand{\duplexbegin}{\comment}
\newcommand{\duplexend}{\endcomment}

\renewcommand{\normalfont}{\sffamily}

%% neue Zaehler
\newcounter{klausur}
\newcounter{wievieleseiten}
\newcounter{notiz}
\newcounter{merkblatt}
\newcounter{arbeit}
\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}
\newcounter{blatt}
\newcounter{nummer}
\newcommand{\klasse}{}
\newcommand{\thema}{}
\newcommand{\fach}{}
\newcommand{\stunde}{}

\newif\ifnetzv
\netzvfalse


\newif\ifdruck
\druckfalse
\newif\ifduplex
\duplexfalse

\newif\ifplanung
\planungfalse


\newcounter{seite}

\newcommand{\eintrag}[2][section]{\addcontentsline{toc}{#1}{#2}}
\DeclareOption{loesungen}{ \renewcommand{\schuleloesungbegin}{}
  \renewcommand{\schuleloesungend}{} }

\DeclareOption{bilder}{ \renewcommand{\bilderbegin}{}
  \renewcommand{\bilderend}{} }

\DeclareOption{druck}{ \drucktrue \renewcommand{\druckbegin}{}
  \renewcommand{\druckend}{} }

\DeclareOption{duplex}{ \duplextrue \renewcommand{\duplexbegin}{}
  \renewcommand{\duplexend}{} }

\DeclareOption{nichtoffen} { \netzvtrue \renewcommand{\schuleveroffenbegin}{}
  \renewcommand{\schuleveroffenend}{} } \ProcessOptions

\ifdruck\newcommand{\drucken}[1]{#1} \else\newcommand{\drucken}[1]{} \fi
\ifduplex\newcommand{\duplex}[1]{#1} \else\newcommand{\duplex}[1]{} \fi
\ifdruck\newcommand{\inhalt}[1]{} \else\newcommand{\inhalt}[1]{#1} \fi

\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{aufgabez}{0}
  \setcounter{beispielz}{0} \setcounter{defiz}{0} \setcounter{lsgz}{0}
  \setcounter{satzz}{0} \setcounter{nr}{1} \setcounter{equation}{0}
  \setcounter{punkte}{0} \setcounter{versuchz}{0} \setcounter{aufgabenpkt}{1}
  \setcounter{versuchz}{0} \setcounter{geraetez}{0}
  \setcounter{durchfuehrungz}{0} \setcounter{auswertungz}{0}
  \setcounter{table}{0} \setcounter{figure}{0} \setcounter{wievieleseiten}{1}
}

\newcommand{\nomc}[1][]{ \stepcounter{nrmc}\textbf{\thenrmc.}  }
\newenvironment{nichtoffen}[1]{ \schuleveroffenbegin}{ \schuleveroffenend }
\newenvironment{loesung}[1]{ \schuleloesungbegin}{ \schuleloesungend }

%% Die Generalumgebung fuer meine Arbeitsblaetter

\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 \hfill \klasse \quad ~}}}

      \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 \hfill \klasse \quad ~}}}
      \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 }

% Fuer DIN-A5
\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
            \hfill \klasse \quad ~}}}
      \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
            \hfill \klasse \quad ~}}}

      \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{\heftumgebungkaro}[8][\today]{ \countersetzen \pagestyle{plain} #8
  \ClearShipoutPicture \AddToShipoutPicture{
    \put(54,50){\includegraphics[height=25cm]{Bilder/karo.png}} \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{\heftumgebungweiss}[8][\today]{
  \countersetzen \pagestyle{plain} #8 \ClearShipoutPicture
  \AddToShipoutPicture{
    \thicklines
    \put(55,760){{\makebox(485,22)[#4]{ \sffamily\bfseries #3 }}}
    \put(46,52){\rotatebox{90}{\makebox(100,7)[l]{\sffamily \tiny }}}
    \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 }


\newcommand{\heftumgebungkleinweiss}[8][\today]{

  \countersetzen \pagestyle{plain} #8 \ClearShipoutPicture
  \AddToShipoutPicture{

    \thicklines

    \put(55,52){\makebox(485,330){}} \put(55,360){{\makebox(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{arbeitsblattalt}[4][\today] { \addtocounter{ab}{1}
  \eintrag{Arbeitsblatt #4: #3}

  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{
    \normalsize{AB}}{ \Large{A}}{edit.png}{\normalsize}
  \setcounter{section}{#4} \setcounter{blatt}{#4} \setcounter{subsection}{0} }
{

  \clearpage \ClearShipoutPicture \duplex{\cleardoublepage} \normalsize }


\newenvironment{arbeitsblatt}[4][\today] { 
  \addtocounter{ab}{1}
  \eintrag{Arbeitsblatt: #3}
  \heftumgebung[#1]{ \normalsize{#2}}{\large{#3}}{c}{
    \normalsize{Arbeitsblatt} \quad S. \thepage}{}{edit.png}{\normalsize} } { \thispagestyle{empty}
  \clearpage \ClearShipoutPicture }

\newenvironment{arbeitsblattloesung}[4][\today] { \heftumgebung[#1]{
    \normalsize{#2}}{\large{#3 - L\"osung}}{c}{
    \normalsize{Arbeitsblattl\"osung} \quad
    S. \thepage}{}{edit.png}{\normalsize} \schuleloesungbegin } {
  \thispagestyle{empty} \clearpage \schuleloesungend \ClearShipoutPicture }


\newenvironment{versuch}[4][\today] { \addtocounter{ab}{1} \eintrag{Experiment: #3}
  \heftumgebung[#1]{ \normalsize{#2}}{\large{#3}}{c}{
    \normalsize{Experiment} \quad S. \thepage}{}{edit.png}{\normalsize} } { \thispagestyle{empty}
  \clearpage \ClearShipoutPicture }




%%%%%%%%%%%%%%%%%%%%%% 
% Ein kleines
% Arbeitsblatt (A5 quer) mit Loesung
%%%%%%%%%%%%%%%%%%%%% 


\newenvironment{arbeitsblattklein}[4][\today] { \addtocounter{ab}{1}
  \heftumgebungklein[#1]{ \normalsize{#2}}{\large{#3}}{c}{
    \normalsize{Arbeitsblatt}}{}{edit.png}{\normalsize} } {
  \thispagestyle{empty} \clearpage \ClearShipoutPicture }




\newenvironment{arbeitsblattkleinloesung}[4][\today] { \addtocounter{ab}{1}
  \heftumgebungklein[#1]{ \normalsize{#2}}{\large{#3 - L\"osung}}{c}{
    \normalsize{Arbeitsblattl\"osung}}{}{edit.png}{\normalsize}
  \schuleloesungbegin } { \thispagestyle{empty} \clearpage \schuleloesungend
  \ClearShipoutPicture }

%%%%%%%%%%%%%%%%%%%%%% 
% Ein Merkblatt in
% A4 und A5 quer
%%%%%%%%%%%%%%%%%%%%% 




\newenvironment{merkblatt}[4][\today] { \addtocounter{mb}{1} \eintrag{Merkblatt: #3}
  \heftumgebung[#1]{ \normalsize{#2}}{\large{#3}}{c}{
    \normalsize{Merkblatt} \quad S. \thepage}{}{merk.pdf}{\normalsize} } { \thispagestyle{empty}
  \clearpage \ClearShipoutPicture }



\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} \setcounter{section}{#4}
  \setcounter{subsection}{0} } { \thispagestyle{empty} \clearpage
  \ClearShipoutPicture \duplex{\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 eingefuegt
%%%%%%%%%%%%%%%%%%%%% 

\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 eingefuegt
%%%%%%%%%%%%%%%%%%%%% 

\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 Arbeitsblaetter eingefuegt
%%%%%%%%%%%%%%%%%%%%% 

\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 \duplex{\cleardoublepage} }

%%%%%%%%%%%%%%%%%%%%% 
% Stationenarbeit mit L\"osungen
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{station}[4][\today] { 
  \addtocounter{ab}{1}
  \eintrag{Arbeitsblatt: #3}
  \heftumgebung[#1]{ \normalsize{#2}}{\large{#4 \quad #3}}{c}{
    \normalsize{Arbeitsblatt} \quad S. \thepage}{}{edit.png}{\normalsize} } { \thispagestyle{empty}
  \clearpage \ClearShipoutPicture }

\newenvironment{stationloesung}[4][\today] { \heftumgebung[#1]{
    \normalsize{#2}}{\large{#4 \quad #3 - L\"osung}}{c}{
    \normalsize{Arbeitsblattl\"osung} \quad
    S. \thepage}{}{edit.png}{\normalsize} \schuleloesungbegin } {
  \thispagestyle{empty} \clearpage \schuleloesungend \ClearShipoutPicture }


\newenvironment{stationalt}[4][\today] { \addtocounter{st}{1}
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{
    \normalsize{Station}}{ \Large{S}}{station.png}{\normalsize} } {
  \thispagestyle{empty} \clearpage \ClearShipoutPicture
  \duplex{\cleardoublepage} \normalsize }

\newenvironment{stationloesungalt}[4][\today] { \countersetzen
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{
    \normalsize{Stationl\"osung}}{ \Large{S}}{station.png}{\normalsize}

  \schuleloesungbegin }{ \clearpage \ClearShipoutPicture
  \duplex{\cleardoublepage} \normalsize }

%%%%%%%%%%%%%%%%%%%%% 
% Gruppenarbeit in A4 und A5
%%%%%%%%%%%%%%%%%%%%% 

\newenvironment{gruppenarbeit}[4][\today]
{
  \addtocounter{ga}{1}
  \eintrag{Gruppenarbeit #4: #3}
  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{}{ \normalsize{GA}}{ \Large{#4}}{station.png}{\normalsize}

}{
  \newpage
  \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \duplex{\cleardoublepage}
  \pagestyle{fancyplain}
}

\newenvironment{gruppenarbeitloesung}[4][\today]
{

  \arbeitsblattumgebung[#1]{ \normalsize{#2}}{ \large{#3}}{ }{
    \normalsize{Gruppenarbeit L\"osung}}{
    \Large{#4}}{station.png}{\normalsize}

  \schuleloesungbegin }{ \newpage \schuleloesungend
  \setcounter{seite}{\thesavepagenum} \ClearShipoutPicture
  \duplex{\cleardoublepage} \thispagestyle{empty} }

\newenvironment{gruppenarbeitklein}[4][\today]
{

  \addtocounter{ga}{1} \arbeitsblattumgebungklein[#1]{ \normalsize{#2}}{
    \large{#3}}{\Large{#4}}{ \normalsize{GA}}{ }{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
  \ClearShipoutPicture \duplex{\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 \ClearShipoutPicture \cleardoublepage
  \pagestyle{fancyplain} }

%%%%%%%%%%%%%%%%%%%%%% 
% Arbeiten, Klausuren, Asas,...
%%%%%%%%%%%%%%%%%%%%%% 

%%%%%%%%%%%%%%%%%%%%% 
% Klausur, Klausurloesung und
% zwei Gruppen
%%%%%%%%%%%%%%%%%%%%% 


\newenvironment{klausur}[4][\today] { 
  \setcounter{section}{0}
  \setlength\leftmargini{0.5cm}
  \addtocounter{kl}{1} \eintrag{Klausur:
    #3} \heftumgebung[#1]{ \normalsize{}}{\large{#2, #3 \hfill
      Name:\hspace{5cm}}}{l}{ \normalsize{Seite \thewievieleseiten}
    \addtocounter{wievieleseiten}{1} }{}{weiss.png}{\normalsize}
  \setcounter{subsection}{0} 

} { \clearpage

  \ClearShipoutPicture \duplex{\cleardoublepage} \normalsize }


\newenvironment{klausurkaro}[4][\today] { 
  \addtocounter{kl}{1} \eintrag{Klausur:
    #3} \heftumgebungkaro[#1]{ \normalsize{}}{\large{#2, #3 \hfill
      Name:\hspace{5cm}}}{l}{ \normalsize{Seite \thewievieleseiten}
    \addtocounter{wievieleseiten}{1} }{}{weiss.png}{\normalsize}
  \setcounter{section}{\thekl} \setcounter{subsection}{0} 

} { \clearpage

  \ClearShipoutPicture \duplex{\cleardoublepage} \normalsize }


\newenvironment{klausurloesung}[4][\today] { \addtocounter{kl}{1}
  \eintrag{Klausur: #3} \heftumgebung[#1]{ \normalsize{}}{\large{#2, #3 \hfill
      Name:\hspace{5cm}}}{l}{ \normalsize{L\"osung, Seite \thewievieleseiten}
    \addtocounter{wievieleseiten}{1} }{}{weiss.png}{\normalsize}
  \setcounter{section}{\thekl} \setcounter{subsection}{0} \schuleloesungbegin
}{ \newpage \schuleloesungend \setcounter{seite}{\thesavepagenum}
  \ClearShipoutPicture \duplex{\cleardoublepage}

}

\newenvironment{klausura}[4][\today] { \addtocounter{kl}{1} \eintrag{Klausur:
    #3} \heftumgebung[#1]{ \normalsize{}}{\large{A \quad #2, #3 \hfill
      Name:\hspace{5cm}}}{l}{ \normalsize{Seite \thewievieleseiten}
    \addtocounter{wievieleseiten}{1} }{}{weiss.png}{\normalsize}
  \setcounter{section}{\thekl} \setcounter{subsection}{0} } { \clearpage
  \ClearShipoutPicture \duplex{\cleardoublepage} \normalsize }

\newenvironment{klausuraloesung}[4][\today] { \addtocounter{kl}{1}
  \eintrag{Klausur: #3} \heftumgebung[#1]{ \normalsize{}}{\large{A \quad #2,
      #3 \hfill Name:\hspace{5cm}}}{l}{ \normalsize{L\"osung, Seite
      \thewievieleseiten} \addtocounter{wievieleseiten}{1}
  }{}{weiss.png}{\normalsize} \setcounter{section}{\thekl}
  \setcounter{subsection}{0} \schuleloesungbegin }{ \newpage \schuleloesungend
  \setcounter{seite}{\thesavepagenum} \ClearShipoutPicture
  \duplex{\cleardoublepage}

}



\newenvironment{klausurb}[4][\today] { \addtocounter{kl}{1} \eintrag{Klausur:
    #3} \heftumgebung[#1]{ \normalsize{}}{\large{B \quad #2, #3 \hfill
      Name:\hspace{5cm}}}{l}{ \normalsize{Seite \thewievieleseiten}
    \addtocounter{wievieleseiten}{1} }{}{weiss.png}{\normalsize}
  \setcounter{section}{\thekl} \setcounter{subsection}{0} } { \clearpage
  \ClearShipoutPicture \duplex{\cleardoublepage} \normalsize }

\newenvironment{klausurbloesung}[4][\today] { \addtocounter{kl}{1}
  \eintrag{Klausur: #3} \heftumgebung[#1]{ \normalsize{}}{\large{B \quad #2,
      #3 \hfill Name:\hspace{5cm}}}{l}{ \normalsize{L\"osung, Seite
      \thewievieleseiten} \addtocounter{wievieleseiten}{1}
  }{}{weiss.png}{\normalsize} \setcounter{section}{\thekl}
  \setcounter{subsection}{0} \schuleloesungbegin }{ \newpage \schuleloesungend
  \setcounter{seite}{\thesavepagenum} \ClearShipoutPicture
  \duplex{\cleardoublepage}

}


%%%%%%%%%%%%%%%%%%%%% 
% Mdl und schriftliche Pruefungen
%%%%%%%%%%%%%%%%%%%%% 

\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}

  }

}{ \clearpage \setcounter{seite}{\thesavepagenum} \ClearShipoutPicture
  \duplex{\cleardoublepage} \normalsize \pagestyle{fancyplain} }

%%%%%%%%%%%%%%%%%%%%% 
% Pruefung fuer meine Schule
%%%%%%%%%%%%%%%%%%%%% 

\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){\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(42,757){\rotatebox{0}{\framebox(512,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}}
    \put(50,754){\includegraphics[height=1cm]{Bilder/mrg-neu.png}}
    \addtocounter{seite}{1}

  }

}{ \clearpage \setcounter{seite}{\thesavepagenum} \ClearShipoutPicture
  \duplex{\cleardoublepage} \normalsize \pagestyle{fancyplain} }


%%% Tabellen fuer Pruefungen mit Anforderungsbereichen

\newenvironment{prtabelle}[1]{

  \begin{center}
    \begin{longtable}
      {|p{0.4cm}|p{0.75\linewidth}|p{0.1cm}|p{0.1cm}|p{0.1cm}|} \hline
      \multicolumn{1}{|C|}{} & \multicolumn{1}{C|}{} &
      \multicolumn{3}{C|}{\tiny \textbf{Zuordnungen}} \\
      \multicolumn{1}{|C|}{\small \textbf{Nr.}} & \multicolumn{1}{C|}{\small
        \textbf{Anmerkungen}} & \multicolumn{3}{C|}{ \tiny \textbf{zu den AB}}
      \\ \cline{3-5} \multicolumn{1}{|C|}{} & \multicolumn{1}{C|}{} &
      \multicolumn{1}{C|}{\small \textbf{I}} & \multicolumn{1}{C|}{\small
        \textbf{II}} &
      \multicolumn{1}{C|}{\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}} \\
}


%%% Tabelle fuer eine Klausur

\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}
}

\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 }


%%% Tabelle fuer MC-Aufgaben

\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 }


%%% Punktberechnungen

\newcommand{\summe}[1][]{ \thepunkte }
\newcommand{\addpkt}[1][]{\addtocounter{punkte}{#1} #1  }
\newcommand{\subpkt}[1][]{ \addtocounter{punkte}{-#1} }
\newcommand{\pkt}[1][]{ #1 }

\newcounter{aufgabenpkt}

% \setleftmargin{0cm}
\newcommand{\itempkt}[2][\theaufgabenpkt. Aufgabe \stepcounter{aufgabenpkt}]{
  \medskip
\item[\textbf{#1:}] \hfill {\large{\textbf{\addpkt[#2] P. \newline }}}}


\newcommand{\itempkte}[2][0]{
\item #2 \hfill {\large{\textbf{\addpkt[#1] P. \newline }}}}


\newcommand{\zusatz}[2][Zusatzaufgabe]{
  \medskip
  \setlength{\parindent}{0pt}
\item[\textbf{#1:}] \hfill {\large{\textbf{ / #2 \newline }}}}


\newcommand{\gesamt}[1][Gesamtpunktzahl:]{
  \smallskip
  
  \hfill \large{\textbf{
      #1  \hspace{3cm} \summe[] P.} \newline}
}




\newcommand{\form}[2][Form:]{
  \hfill \large{\textbf{#1 \hspace{3cm} \addpkt[#2] P.}} \newline}

%% Platz zum Schreiben

\newcommand{\platz}[1]{
  ~
  \vspace{#1}
  
  ~
}



%%% Verschiedenes fuer Pruefungen

\newcommand{\hilfe}[1][]{
  \vfill

  \begin{tabular}{lr}
    \textbf{Hilfsmittel:} & Taschenrechner und Formelblatt \\
    \textbf{Vorbereitungszeit:} & 30 Minuten
  \end{tabular}
  
  \newpage
}


\newcommand{\hilfeabi}[1][]{
  \vfill

  \begin{tabular}{lr}
    \textbf{Hilfsmittel:} & Taschenrechner und 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
  \includegraphics[#1]{#2} \textbf{Viel Erfolg!}
  \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{Viel Erfolg!}}
    \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
}



%%%%%%%%%%%%%%%%%%%%%% 
% 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 }


%%% Bilder einfuegen ueber eine ganze Seite

\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 \duplex{\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 \duplex{\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 \duplex{\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 \duplex{\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
            \"Ubersicht}}}
      \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
            \"Ubersicht}}}
      \put(30,76){\includegraphics[height=20pt]{Bilder/info.png}} } } } {
  \clearpage \ClearShipoutPicture \duplex{\cleardoublepage} \normalsize

}

\newenvironment{tafel}[1][Rendtel] {\newpage \setcounter{figure}{0}q
  \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
  \duplex{\cleardoublepage} \normalsize

}

\newenvironment{stationkarte}[4][\today] {

  \arbeitsblattumgebungklein[#1]{ \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{
    \normalsize{Station}}{ \Large{S}}{station.png}{\normalsize} } {
  \thispagestyle{empty} \clearpage \ClearShipoutPicture \duplex{\cleardoublepage} \normalsize

}

\newenvironment{stationkarteloesung}[4][\today] { \arbeitsblattumgebungklein[#1]{
    \normalsize{#2}}{ \large{#3}}{ \Large{#4}}{ \normalsize{Stationl\"osung}}{
    \Large{S}}{station.png}{\normalsize}

  \schuleloesungbegin } { \thispagestyle{empty} \clearpage \schuleloesungend

  \ClearShipoutPicture \clearpage

}


%%% Planungshilfen

\newenvironment{planungkaro}[6][\today]{ \addtocounter{stunde}{1}


  \addtocounter{secnumdepth}{1} \eintrag{\thestunde \quad  #5}
  \setcounter{section}{\thestunde} \setcounter{subsection}{0}
  \ClearShipoutPicture \AddToShipoutPicture{

    \put(55,50){\includegraphics[height=25cm]{Bilder/karo.png}}
    \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,50){\framebox(485,710){}}    



    \put(206,781){\framebox(334,40)[l]{ \hspace{0.2cm}
        
        \begin{tabular}{rlrl}
          \sffamily {\bfseries Oberthema:} & \multicolumn{3}{l}{\sffamily {\bfseries #4}} \\
          
          \sffamily {\bfseries Stunde:} & \sffamily {\bfseries \thestunde} &
          \sffamily {\bfseries Datum:} & \sffamily {\bfseries #1}

        \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,38){\texttt{\theplanung}}
    
    
    
    \thispagestyle{empty}
    
  }
} { \thispagestyle{empty} \clearpage \ClearShipoutPicture
  \duplex{\cleardoublepage}
  
}

\newenvironment{planung}[6][\today]{ 
  \section{#5}
  \label{sec:#5}
  \renewcommand{\stunde}{#5} } { \clearpage

}





%% Tabellen fuer eine Unterrichtsplanung

\newenvironment{ptabelle}[1]{ \setlength{\extrarowheight}{0.2cm}
  \renewcommand{\arraystretch}{1.1}
    
  \begin{longtable}{|>{\footnotesize}p{0.11\linewidth}|p{0.65\linewidth}|>{\tiny}p{0.065\linewidth}|>{\tiny}p{0.05\linewidth}|}
    \hline

    \rowcolor{grau} \textbf{\footnotesize Phase} & \textbf{\footnotesize
      Beschreibung} & \textbf{\footnotesize Me-thode} &
    \textbf{\footnotesize Me-dien} \\
    \hline
    \endhead
    \hline
    \endfoot
    #1
  }
  {

  \end{longtable}
}

\newcommand{\ptabeintrag}[4]{ #1 & #2 & #3 & #4 \\ \hline }

\newcommand{\merke}[2][Merksatz]{
  \subsection{#1} #2}

\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

}


%%% Umgebungen fuer Hefte

\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{heftohne}[2][\today] { \addtocounter{heft}{1}
  \eintrag{\theheft \quad #2} \heftumgebung[#1]{\normalsize{}}{\large{
      #2}}{c}{ \normalsize{}}{}{weiss.png}{} } { \thispagestyle{empty}
  \clearpage \ClearShipoutPicture

}

\newenvironment{heftohneweiss}[2][\today] { \addtocounter{heft}{1}
  \eintrag{\theheft \quad #2} \heftumgebungweiss[#1]{\normalsize{}}{\large{
      #2}}{c}{ \normalsize{}}{}{weiss.png}{} } { \thispagestyle{empty}
  \clearpage \ClearShipoutPicture

}

\newenvironment{heftohneklein}[2][\today] { \addtocounter{heft}{1}
  \eintrag{\theheft \quad #2} \heftumgebungklein[#1]{\normalsize{}}{\large{
      #2}}{c}{ \normalsize{}}{}{weiss.png}{} } { \thispagestyle{empty}
  \clearpage \ClearShipoutPicture

}

\newenvironment{heftohnekleinweiss}[2][\today] { \addtocounter{heft}{1}
  \eintrag{\theheft \quad #2}
  \heftumgebungkleinweiss[#1]{\normalsize{}}{\large{ #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

}


%%%%%%%%%%%%%%%%%% 
%%% Kaesten etc
%%% 

%% Farben werden definiert


\definecolor{dunkelgrau}{gray}{0.75}
\definecolor{hellgrau}{gray}{0.9}
\definecolor{grau}{gray}{0.85}
\definecolor{structureshaded}{gray}{0.75}
\definecolor{gelb}{rgb}{1.0,1.0,0.7}
\definecolor{dunkelgelb}{rgb}{1.0,0.9,0.2}
\definecolor{hellgelb}{rgb}{1.0,1.0,0.9}
\definecolor{alert}{rgb}{1,0,0}
\definecolor{darkgreen}{rgb}{0.15,0.6,0.15}
\definecolor{shaded}{gray}{0.6}
\definecolor{blockstructure}{rgb}{0.2,0.2,0.7}
\definecolor{lightgray}{gray}{0.9}
\definecolor{anders}{rgb}{1.0,1.0,1.0}

%% Ein Kasten mit einem schattierten Rahmen

\newcommand{\kasten}[2][0.9\linewidth]{
  \begin{center}
    \vspace{3pt}
    \shadowbox{\colorbox{white}{\parbox[t]{#1-2\fboxsep-2\fboxrule-\shadowsize}{#2}}}
    \vspace{3pt}
  \end{center}
}

%% Ein einfacher Kasten

\newcommand{\kasteneinfach}[2][0.9\linewidth]{
  \begin{center}
    \fbox{\parbox[t]{#1-2\fboxsep-2\fboxrule}{#2}}
  \end{center}
}

\newcommand{\bbox}[1]{ \definecolor{anders}{rgb}{1.0,1.0,1.0}
  \fcolorbox{structureshaded}{anders}{ #1} }

\newcommand{\cbox}[2][anders]{ \definecolor{anders}{rgb}{0.9,0.9,0.9}
  \begin{center}
    \fcolorbox{structureshaded}{#1}{\parbox[t]{1\linewidth}{
        #2}}
  \end{center}
}
% \usepackage{thmbox}
\theoremstyle{nonumberbreak}
\theoremstyle{break}
\theorembodyfont{\upshape}

\theorempreskipamount0.5cm
% \theorempostskipamount0.5cm


\newcounter{auftragz}
\newcounter{aufgabez}
\newcounter{uebungz}
\newcounter{beispielz}
\newcounter{defiz}
\newcounter{satzz}
\newcounter{versuchz}
\newcounter{geraetez}
\newcounter{durchfuehrungz}
\newcounter{auswertungz}
\newcounter{lsgz}
\newcommand{\code}[1]{ {\footnotesize \texttt{#1}} }



\newtheorem{satz}[satzz]{Satz}
\newtheorem{defi}[defiz]{Definition}
\newtheorem{definition}[defiz]{Definition}
\newtheorem*{beispiel}[beispielz]{Beispiel}
\newtheorem*{lsg}[lsgz]{L\"osung}
\newtheorem{uebung}[uebungz]{\"Ubung}
\newtheorem{auftrag}[auftragz]{Arbeitsauftrag}

\newtheorem*{aufgabe}[aufgabez]{Aufgabe}
\newtheorem*{geraet}[geraetez]{Ger\"ate}
\newtheorem*{durchfuehrung}[durchfuehrungz]{Durchf\"uhrung}
\newtheorem*{auswertung}[auswertungz]{Auswertung}
\newtheorem*{experiment}[versuchz]{Experiment}

\newcommand{\kastenfarbe}[2][white]{
  \begin{center}
    \vspace{3pt}
    \shadowbox{\colorbox{#1}{\parbox[t]{0.95\linewidth-2\fboxsep-2\fboxrule-\shadowsize}{#2}}}
    \vspace{5pt}
  \end{center}
}


\newcommand{\kastenbild}[3][white]{
  \begin{minipage}[t]{0.1\linewidth}
    \vspace{1cm}
    ~

    \begin{center}
      \includegraphics[width=1\linewidth]{#2}
    \end{center}
  \end{minipage} \hfill
  \begin{minipage}[t]{0.85\linewidth}
    ~

    \begin{center}

      \shadowbox{\colorbox{#1}{\parbox[t]{1\linewidth-2\fboxsep-2\fboxrule-\shadowsize}{#3}}}

    \end{center}
  \end{minipage}
}

\newcommand{\kastenbildeinfach}[3][white]{
  \begin{minipage}[t]{0.085\linewidth}
    ~
    \begin{center}
      \includegraphics[width=1\linewidth]{#2}
    \end{center}
  \end{minipage} \hfill
  \begin{minipage}[t]{0.9\linewidth}

    ~
    \begin{center}
      \fcolorbox{#1}{white}{
        \begin{minipage}{0.95\linewidth}
          #3
        \end{minipage}
      }
    \end{center}
  \end{minipage}
\medskip
}

\newcommand{\kastenbildweiss}[3][white]{
  \begin{minipage}[t]{0.085\linewidth}
    ~

    \begin{center}
      \includegraphics[width=1\linewidth]{#2}
    \end{center}
  \end{minipage} \hfill
  \begin{minipage}[t]{0.9\linewidth}
    \begin{center}
      \fcolorbox{white}{#1}{
        \begin{minipage}{1\linewidth}
          #3
        \end{minipage}
      }
    \end{center}
  \end{minipage}
  
  
}

\setlength{\fboxrule}{0.1em} \newcommand{\pcode}[2]{
  \begin{center}
    \fcolorbox{structureshaded}{gelb}{
      \begin{minipage}{#1}
        #2
      \end{minipage}
    }
  \end{center}

}

\newcommand{\acode}[2]{ \definecolor{anders}{rgb}{1.0,1.0,1.0}
  \fcolorbox{structureshaded}{anders}{
    \begin{minipage}{#1}
      #2
    \end{minipage}
  }
}

\newcommand{\mpage}[3][c]{
  \begin{minipage}[#1]{#2}
    #3
  \end{minipage}
}




\def\dotuline{\bgroup
  \ifdim\ULdepth=\maxdimen % Set depth based on font, if not set already
  \settodepth\ULdepth{(j}\advance\ULdepth.4pt\fi \markoverwith{\begingroup
    \advance\ULdepth0.08ex \lower\ULdepth\hbox{\kern.15em .\kern.1em}%
    \endgroup}\ULon}

\def\dashuline{\bgroup
  \ifdim\ULdepth=\maxdimen % Set depth based on font, if not set already
  \settodepth\ULdepth{(j}\advance\ULdepth.4pt\fi \markoverwith{\kern.15em
    \vtop{\kern\ULdepth \hrule width .3em}%
    \kern.15em}\ULon}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%% Mathematische und physikalische Definitionen
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

\newcommand{\same}{\ensuremath{\Leftrightarrow}}
\newcommand{\qsame}{\quad\same\quad}
\newcommand{\lsame}{\ensuremath{\Longleftrightarrow}}
\newcommand{\qlsame}{\quad\lsame\quad}
\newcommand{\dsame}{\ensuremath{:\Leftrightarrow}}
\newcommand{\qdsame}{\quad\dsame\quad}
\newcommand{\ldsame}{\ensuremath{:\Longleftrightarrow}}
\newcommand{\qldsame}{\quad\ldsame\quad}
\newcommand{\samedef}{\ensuremath{\us {\text{def}} \Leftrightarrow}}
\newcommand{\qsamedef}{\quad\samedef\quad}
\newcommand{\lsamedef}{\ensuremath{\us {\text{def}} \Longleftrightarrow}}
\newcommand{\qlsamedef}{\quad\lsamedef\quad}
\newcommand{\lto}{\longrightarrow}
\newcommand{\qTo}{\quad\To\quad}
\newcommand{\sTo}{\ \To\ }
\newcommand{\To}{\ensuremath{\Rightarrow}}

% Mengendefinitionen

\newcommand{\N}{\ensuremath{\mathbb {N}}}
\newcommand{\Z}{\ensuremath{\mathbb {Z}}}
\newcommand{\Q}{\ensuremath{\mathbb {Q}}}
\newcommand{\R}{\ensuremath{\mathbb {R}}}
\newcommand{\C}{\ensuremath{\mathbb {C}}}
\renewcommand{\S}{\ensuremath{\mathbb {S}}}
\newcommand{\Prim}{\ensuremath{{\mathbb P}}}
\newcommand{\0}{\ensuremath{\emptyset}}
\renewcommand{\Re}{\ensuremath{\operatorname{Re}}}
\renewcommand{\Im}{\ensuremath{\operatorname{Im}}}

%% 
% Logisches Und und Oder
%% 

\renewcommand{\*}{\ensuremath{\cdot}}

%% 
% nicht Element von
%% 

\newcommand{\nin}{\not\in}

%% 
% Bei Integral, Summe,... die Grenzen ueber bzw.
% unter das Zeichen
%% 

\newcommand{\I}{\int\limits}
\newcommand{\Sum}{\sum\limits}
\newcommand{\Prod}{\prod\limits}
\newcommand{\Min}{\min\limits}
\newcommand{\Max}{\max\limits}
\newcommand{\Lim}{\lim\limits}
\newcommand{\Inf}{\inf\limits}
\newcommand{\Sup}{\sup\limits}
\newcommand{\Liminf}{\liminf\limits}
\newcommand{\Limsup}{\limsup\limits}
\renewcommand{\Cup}{\bigcup\limits}
\renewcommand{\Cap}{\bigcap\limits}
\newcommand{\Otimes}{\bigotimes\limits}
\newcommand{\Oplus}{\bigoplus\limits}


%% 
% Arcus Cotangens, Logarithmus
%% 

\newcommand{\arcsinh}{\operatorname{arcsinh}}
\newcommand{\arccosh}{\operatorname{arccosh}}
\newcommand{\arctanh}{\operatorname{arctanh}}
\newcommand{\arccot}{\operatorname{arccot}}
\newcommand{\arccoth}{\operatorname{arccoth}}
\newcommand{\Log}{\operatorname{Log}}


%% 
% Bezeichnungen
%% 

\newcommand{\Rgn}{\R_{>0}} % R groesster Null
\newcommand{\Rad}{\operatorname{Rad}}   % Radikal
\newcommand{\KGV}{\operatorname{KGV}}   % Kleinster gemeinsame Vielfache
\newcommand{\kgV}{\operatorname{kgV}}   % Kleinster gemeinsame Vielfache
\newcommand{\GGT}{\operatorname{GGT}}   % Groesster gemeinsame Teiler
\newcommand{\ggT}{\operatorname{ggT}}   % Groester gemeinsame Teiler
\newcommand{\winkel}{\sphericalangle}          % Winkelsymbol
\newcommand{\dt}{\operatorname{dt}}   % Determinante
\newcommand{\dx}{\operatorname{dx}}   % Determinante
\newcommand{\dy}{\operatorname{dy}}   % Determinante
\newcommand{\dz}{\operatorname{dz}}   % Determinante
\newcommand{\vek}[1]{\overrightarrow{#1}}
\newcommand{\arc}{\operatorname{arc}}   % Determinante
\newcommand{\grad}{\operatorname{grad}}   % Determinante

%% 
% Abkuerzungen fuer die Physik
%% 

\newcommand{\mV}{\operatorname{mV}}          
\newcommand{\kV}{\operatorname{kV}}          
\newcommand{\A}{\operatorname{A}}            
\newcommand{\muA}{\operatorname{\mu A}}      
\newcommand{\mA}{\operatorname{mA}}          
\newcommand{\Hz}{\operatorname{Hz}}          
\newcommand{\GHz}{\operatorname{GHz}}        
\newcommand{\kHz}{\operatorname{kHz}}        
\newcommand{\MHz}{\operatorname{MHz}}        
\newcommand{\cm}{\operatorname{cm}}          
\newcommand{\kg}{\operatorname{kg}}          
\newcommand{\g}{\operatorname{g}}            
\newcommand{\mm}{\operatorname{mm}}          
\newcommand{\dm}{\operatorname{dm}}          
\newcommand{\km}{\operatorname{km}}          
\newcommand{\kmh}{\frac{\text{km}}{\text{h}}}
\newcommand{\ms}{\frac{\text{m}}{\text{s}}}  
\newcommand{\m}{\operatorname{m}}            
\newcommand{\W}{\operatorname{W}}            
\newcommand{\V}{\operatorname{V}}            
\newcommand{\mW}{\operatorname{mW}}          
\newcommand{\Ohm}{\Omega}                    
\newcommand{\Cel}{\operatorname{C}}          
\newcommand{\Coul}{\operatorname{C}}         
\newcommand{\muCoul}{\operatorname{\mu C}}   
\newcommand{\mCoul}{\operatorname{mC}}       
\newcommand{\nCoul}{\operatorname{nC}}       
\newcommand{\kOhm}{\text{k}\Omega}           
\newcommand{\MOhm}{\text{M}\Omega}           
\newcommand{\muF}{\mu\operatorname{F}}       
\newcommand{\s}{\operatorname{s}}            
\renewcommand{\sec}{\operatorname{s}}        
\newcommand{\mus}{\operatorname{\mu s}}      
\newcommand{\tmin}{\operatorname{min}}       
\newcommand{\h}{\operatorname{h}}            
\newcommand{\liter}{\operatorname{l}}        
\newcommand{\td}{\operatorname{d}}           
\newcommand{\ta}{\operatorname{ta}}          
\newcommand{\New}{\operatorname{N}}          
\newcommand{\kNew}{\operatorname{kN}}        
\newcommand{\mNew}{\operatorname{mN}}        
\newcommand{\muN}{\operatorname{\mu N}}      
\newcommand{\mN}{\operatorname{mN}}      
\newcommand{\Nm}{\operatorname{Nm}}      
\newcommand{\KN}{\operatorname{kN}}      
\newcommand{\J}{\operatorname{J}}        
\newcommand{\Cassy}{CASSY$^\text{\textregistered}\,$}       
\newcommand{\GC}{^{\circ}}    

\newcolumntype{C}{>{\columncolor{grau}}c}
\newcolumntype{R}{>{\columncolor{grau}}r}
\newcolumntype{L}{>{\columncolor{grau}}l}

\newcommand{\ankreuz}{\enspace\square\hspace{5mm}}


