diff options
author | Karl Berry <karl@freefriends.org> | 2011-03-08 00:11:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-03-08 00:11:38 +0000 |
commit | ed900ce8ac18744db138244ca39fb4d74a170623 (patch) | |
tree | 17d2d7104736969ffb33b9ed0b570d11f2269a64 /Master/texmf-dist/tex/latex/chemexec/chemexec.sty | |
parent | eb3fd6ab5a28e450849c8278bb2d81d6ec3d5cda (diff) |
chemexec (7mar11)
git-svn-id: svn://tug.org/texlive/trunk@21632 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemexec/chemexec.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/chemexec/chemexec.sty | 1033 |
1 files changed, 1033 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/chemexec/chemexec.sty b/Master/texmf-dist/tex/latex/chemexec/chemexec.sty new file mode 100644 index 00000000000..9780a97847b --- /dev/null +++ b/Master/texmf-dist/tex/latex/chemexec/chemexec.sty @@ -0,0 +1,1033 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ------------------------------------------------------------------------------------- % +% - chemexec - chemexec.sty ----------------------------------------------------------- % +% - creating (chemical) exercise sheets, chemical macros ------------------------------ % +% ------------------------------------------------------------------------------------- % +% - Clemens Niederberger -------------------------------------------------------------- % +% - 2011/03/06 ------------------------------------------------------------------------ % +% ------------------------------------------------------------------------------------- % +% - http://www.niederberger-berlin.net/2010/08/latex-chemische-formeln-erstellen-iiv/ - % +% - kontakt@niederberger-berlin.net --------------------------------------------------- % +% ------------------------------------------------------------------------------------- % +% - If you have any ideas, questions, suggestions or bugs to report, please feel free - % +% - to contact me. -------------------------------------------------------------------- % +% ------------------------------------------------------------------------------------- % +% Copyright 2011 Clemens Niederberger % +% % +% This work may be distributed and/or modified under the % +% conditions of the LaTeX Project Public License, either version 1.3 % +% of this license or (at your option) any later version. % +% The latest version of this license is in % +% http://www.latex-project.org/lppl.txt % +% and version 1.3 or later is part of all distributions of LaTeX % +% version 2005/12/01 or later. % +% % +% This work has the LPPL maintenance status `maintained'. % +% % +% The Current Maintainer of this work is Clemens Niederberger. % +% % +% This work consists of the files chemexec.sty, chemexec_de.tex % +% and chemexec_en.tex % +% ------------------------------------------------------------------------------------- % +% 27. April 2009 Version 0.1 +% `chemexec' ist zun"achst als eine lose Makrosammlung entstanden +% und stellt einige kleinere Umgebungen und Befehle zur Verf"ugung, +% die das Arbeiten mit Chemischen und mathematischen Formeln +% erleichtern sollen. +% Zentrales anliegen war ein komfortabler Umgang mit Aufgaben +% und L"osungen vor allem f"ur das Erstellen von "Ubungsbl"attern +% und den Einsatz in Lehrb"uchern u."a. +% +% 29. Oktober 2009 Version 0.2 +% `chemexec' hat viele neue Optionen erhalten, einige Makros sind +% hinzugekommen. Ausserdem wurden einige Fehler berichtigt und der +% Code vereinheitlicht. +% +% "Anderungen: +% 19. Oktober 2009 Version 0.3 +% - Inkonsistenzen bei Aufgaben/L"osungen/Schemas bereinigt. +% - definition-Umgebung neu definiert, dass das Leerzeichen hinter der Umgebung +% verschwindet und sie flexibel gestalte werden kann (s.u.). +% Neue Features: +% - Option `chapter': +% Aufgaben, L"osungen und Schema-Umgebung werden damit chapter-weise +% statt section-weise durchnummeriert. +% - Option `shade': +% definition-Umgebung wird damit nicht umrahmt, sondern hellrosa +% unterlegt. +% -> neue Umgebung `defformula' +% - Option `here': +% Schema-Umgebung wird mit `H' positioniert. +% - chem. Kleinigkeiten: +% Stereo-Deskriptoren +% - Extras f"ur `ochem': +% verschiedene Makros durch package("chemexec") f"ur `ochem' (bzw. `ochemcol') +% verf"ugbar machen +% 24. Oktober 2009 Version 0.4 +% - Paketoptionen "uberarbeit, Optionen mit xkeyval setzen, eine Reihe +% weiterer Optionen: +% flexible Gestaltung der Definition- und Beispiel-Umgebung, der Aufgaben/ +% L"osungen +% 25. Oktober 2009 Version 0.4b +% - Bugfix: Option shade hat framed-Umgebung umdefiniert -- gel"ost +% - Bugfix: wenn die Klasse report o. book gew"ahlt war, konnte \makeloesung +% nur zusammen mit der Option `chapter' verwendet werden -- gel"ost +% - Kleinere "Anderungen an \makeloesung +% - NEU: \lewisbar{}{} und die Exkurs-Umgebung +% 27. Oktober 2009 Version 0.4c +% - Bugfix: fehlerhafter Hyperlink bei Exkurs-Umgebung wenn hyperref- +% Paket verwendet wird -- gel"ost. +% - L"ange der Exkurs-Linien an \textwidth anpassen +% - Benennung interner Makros und Zaehler vereinheitlicht, durch @-Character +% interne Verwendung sichergestellt +% 28. Oktober 2009 Version 0.4d +% - Kompatibilit"at der lewis, lewisbar und ox-Befehle mit Martin Hensels `mhchem' +% Paket. Befehle sind nun innerhalb \ce{} einsetzbar. +% - Befehle \om und \op hinzugef"ugt. +% - Befehle \ronf und \sconf f"ur Einatz im Fließtext verbessert. Um optionales +% Argument erweitert. +% - Erscheinungsbild der lewis-Befehle verbessert. +% - Kleinigkeiten am Erscheinungsbild der Beispiele ge"andert. +% 29. Oktober 2009 Version 0.4e +% - S"aurereste `mhchem'-tauglich gemacht +% - atomconnect modifiziert +% 24. Januar 2010 Version 0.5 +% - Listenumgebung `alphlist' hinzugef"ugt +% 11. Februar 2010 Version 0.5a +% - Die Befehle lewis u. lewisbar flexibilisiert. +% 18. Februar 2010 Version 0.5b +% - \reaction und \reactions hinzugef"ugt +% 09. September 2010 Version 0.5c +% - Befehle \lewis und \lewisbar in \lw und \lwbar umbenannt, um Kompatibilit"at mit +% `chemfig' zu gewährleisten +% 01. M"arz 2011 Version 0.6 +% - Bugfix in der Beispiel-Umgebung +% 06. M"arz 2011 Version 1.0 +% - atomconnect entfernt +% - exkurs-Umgebung auf tikz umgestellt +% - \rconf u. \sconf auf tikz umgestellt +% - \auge auf tikz umgestellt +% - lw/lwbar entfernt (Lewisformeln k"onnen mit ChemFig realisiert werden.) +% - Schema-Umgebung entfernt +% - Option `here' entfernt +% ------------------------------------------------------------------------------------- % +% TODO: +% - bug bei \reaction: whitespace nach nummerierter Reaktion +% - doloesung Option für section-weises bzw. chapter-weises sammeln geben +% - doloesung und makeloesung nochmal auf Herz und Nieren pr"ufen +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e} +\def\ce@version{v1.0} +\def\ce@date@de{06. M\"arz 2011} +\def\ce@date@en{March 06. 2011} +\providecommand{\CEversion}{\ce@version} +\providecommand{\CEdate}[1]{ + \ifthenelse{\equal{#1}{de}}{\ce@date@de}{} + \ifthenelse{\equal{#1}{en}}{\ce@date@en}{} +} +\ProvidesPackage{chemexec}[2011/03/01] +\typeout{CHEMEXEC \ce@version} +\typeout{2011/03/01 Clemens Niederberger} +\typeout{Customizing your (chemical) exercise sheets.} +\typeout{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Optionen -------------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Pakete ---------------------------------------------------------------------------- % +\RequirePackage{calc} +\RequirePackage{amsmath} +\RequirePackage{ifthen} +\RequirePackage{accents} +\RequirePackage{framed} +\RequirePackage{xcolor} +\RequirePackage{xkeyval} +\RequirePackage{tikz} + \usetikzlibrary{calc} +% - interne Befehle --------------------------------------------------------- % +\newcommand{\@aufgabe@name}{Aufgabe} +\newcommand{\@aufgabe@groesse}{normalsize} +\newcommand{\@loesung@titel}{L\"osung} +\newcommand{\@beispiel@name}{Beispiel} +\newcommand{\@exkurs@name}{EXKURS} +\newcommand{\@exkurs@toc}{section} +\newcommand{\@exkurs@currenttoc}{\@exkurs@toc} +\newcommand{\@exkurs@color}{dunkelblau} +\newcommand{\@exkurs@currentcolor}{\@exkurs@color} +\xdefinecolor{dunkelblau}{rgb}{0,0.33,0.62} +\xdefinecolor{dunkelrot}{rgb}{0.4392,0.0627,0.0627} +\newcommand{\@definition@shadecolor}{pink!50} +\newcommand{\@definition@color}{dunkelblau} +\newcommand{\@definition@currentshadecolor}{\@definition@shadecolor}% +\newcommand{\@definition@currentcolor}{}% +\newcommand{\@bsprule@linecolor}{dunkelblau} +\newcommand{\@numbers@numcolor}{dunkelblau} +% - Bedingungen ------------------------------------------------------------ % +\newif\if@useaufg\@useaufgfalse +\newif\if@usechapter\@usechapterfalse +%\newif\if@usehere\@useherefalse +\newif\if@shaded +% - Optionen --------------------------------------------------------------- % +\DeclareOptionX[CE]{exercise}{\@useaufgtrue} +\DeclareOptionX[CE]{chapter}{\@usechaptertrue} +%\DeclareOptionX[CE]{here}{\@useheretrue} +\DeclareOptionX[CE]{english}{ + \renewcommand\@aufgabe@name{Exercise} + \renewcommand\@loesung@titel{Solution} + \renewcommand{\@beispiel@name}{Example} + \renewcommand{\@exkurs@name}{EXCURSUS} +} +\define@key[CE]{chemexec.sty}% + {color}{ + \renewcommand{\@bsprule@linecolor}{#1} + \renewcommand{\@definition@color}{#1} + \renewcommand{\@numbers@numcolor}{#1} + \renewcommand{\@exkurs@color}{#1} + } +\define@key[CE]{chemexec.sty}% + {exersize}{ + \renewcommand{\@aufgabe@groesse}{#1} + } +\define@key[CE]{chemexec.sty}% + {numcolor}{ + \renewcommand{\@numbers@numcolor}{#1} + } +\define@key[CE]{chemexec.sty}% + {shadecolor}{ + \renewcommand{\@definition@shadecolor}{#1} + } +\define@key[CE]{chemexec.sty}% + {linecolor}{ + \renewcommand{\@bsprule@linecolor}{#1} + } +\define@boolkey+[CE]{chemexec.sty}[CE@]{shade}{% + \ifCE@shade + \@shadedtrue + \else + \@shadedfalse + \fi +}{ + \PackageWarning{chemexec}{Option `shade' is not boolean!}% +} + +\ProcessOptionsX[CE] + +\IfFileExists{ulem.sty}{% + \RequirePackage[normalem]{ulem} + \providecommand*{\unterstr}[1]{\uline{##1}}% +}{% + \providecommand*{\unterstr}[1]{##1}% +} +\IfFileExists{mhchem.sty}{% + \RequirePackage[version=3]{mhchem} +}{% + \typeout{`mhchem' ist nicht installiert. Manche Befehle werden nicht definiert.} +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Vektoren & math. Kleinigkeiten ---------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Vektoren +\providecommand{\vek}[1]{ \ensuremath{ \accentset{\rightarrow}{#1} } } % Pfeildarstellung +\providecommand{\vekzw}[2]{ \ensuremath{ \begin{pmatrix}#1\\#2\end{pmatrix} } } % 2er Spaltenvektor +\providecommand{\vekdr}[3]{ \ensuremath{ \begin{pmatrix}#1\\#2\\#3\end{pmatrix} } } % 3er Spaltenvektor +\providecommand\abs[1]{\ensuremath{\left\lvert#1\right\rvert}} % Betrag +% Operatoren +\DeclareMathOperator\arccot{arccot} % Arcuscotangens +\DeclareMathOperator\arsinh{arsinh} % area sinus hyperbolicus +\DeclareMathOperator\arcosh{arcosh} % area cosinus hyperbolicus +\DeclareMathOperator\artanh{artanh} % area tangengs hyperbolicus +\DeclareMathOperator\arcoth{arcoth} % area cotangens hyperbolicus + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - chem. Kleinigkeiten --------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\providecommand\el{\ensuremath{e^\ominus}} % Elektronen +\providecommand\prt{\ensuremath{p^\oplus}} % Protonen +\providecommand\ntr{\ensuremath{n^0}} % Neutronen +\providecommand{\om}[1][]{\ensuremath{{}^{#1\ominus}}} % negative Ladung +\providecommand{\op}[1][]{\ensuremath{{}^{#1\oplus}}} % positive Ladung +\providecommand\Rcip{\textit{(R)}} % stereo-Deskriptor +\providecommand\Scip{\textit{(S)}} % " +\providecommand\E{\textit{(E)}} % " +\providecommand\Z{\textit{(Z)}} % " +\providecommand\Dfi{\textsc{d}} % " +\providecommand\Lfi{\textsc{l}} % " + +\providecommand\sconf[1][S]{% % S-Konfiguration + \tikz[baseline=(a.base),text height=1.5ex,text depth=.25ex]{\draw node(a) at (0,0) {#1};\draw[->,thick,rotate=90] (20:.3cm) arc (20:340:.3cm);} +} +\providecommand\rconf[1][R]{% % R-Konfiguration + \tikz[baseline=(a.base),text height=1.5ex,text depth=.25ex]{\draw node(a) at (0,0) {#1};\draw[<-,thick,rotate=90] (20:.3cm) arc (20:340:.3cm);} +} + +\IfFileExists{mhchem.sty}{% +\newcounter{save}% +\if@usechapter% +\newcounter{reaction}[chapter]% +\renewcommand\thereaction{R\,\thechapter.\arabic{equation}}% +\else% +\newcounter{reaction}% +\renewcommand\thereaction{R\,\arabic{equation}}% +\fi + +\long\def\react@##1{% +\setcounter{save}{\value{equation}}\setcounter{equation}{\value{reaction}}\def\theequation{\thereaction}% +\begin{equation}\ce{##1}\end{equation}% +\setcounter{reaction}{\value{equation}}\setcounter{equation}{\value{save}}\def\theequation{\arabic{equation}}% +} + +\long\def\react@nonumber##1{\begin{equation*}\ce{##1}\end{equation*}} + +\providecommand\reaction{\@ifstar{\react@nonumber}{\react@}} + +\long\def\rctns@##1{% +\setcounter{save}{\value{equation}}\setcounter{equation}{\value{reaction}}\def\theequation{\thereaction}% +\begin{align}\cee{##1}\end{align}% +\setcounter{reaction}{\value{equation}}\setcounter{equation}{\value{save}}\def\theequation{\arabic{equation}}% +} +\long\def\rctns@nonumber##1{% +\begin{align*}\cee{##1}\end{align*}% +} +\providecommand\reactions{\@ifstar{\rctns@nonumber}{\rctns@}} +}{} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - extras f"ur `ochem' --------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\providecommand\stec{\textasteriskcentered} % opt. aktives Zentrum (f"ur ochem) +\providecommand{\auge}{% % Bild eines Auges (f"ur ochem) +\tikz{\draw (0,0)--(20:7mm);\draw (0,0)--(-20:7mm);\fill (0,0) -- (-20:2.5mm) arc (-20:20:2.5mm);\draw (-20:6.5mm) arc (-20:20:6.5mm);} +} + +%% FOLGENDER CODE WURDE AUS ECHEM.STY VON INGO KL"OCKL "UBERNOMMEN UND TEILWEISE +%% ANGEPASST +% Symbol fuer einzelnes Elektron +\newcommand{\@el} +{{\unitlength=.12\baselineskip% + \begin{picture}(0,0) + \put(0,0){\circle*{1.2}} + \end{picture}}} +% liegender Balken fuer Elektronenpaar +\newcommand{\@elpairh} +{{\unitlength=.07\baselineskip% + \linethickness{0.5\unitlength}% + \begin{picture}(0,0) + \put(-3,0){\line(1,0){6}} + \end{picture}}} +% aufrechter Balken fuer Elektronenpaar +\newcommand{\@elpairv} +{{\unitlength=.07\baselineskip% + \linethickness{0.5\unitlength}% + \begin{picture}(2,0)(-1,0) + \put(0,-3){\line(0,1){6}} + \end{picture}}} + +\providecommand{\echhbar}{\@elpairh} +\providecommand{\echvbar}{\@elpairv} + +% die horizontalen Symbole (upper und lower) +\newsavebox{\cbox} + +\providecommand{\hdu}[2][\@el] +{\sbox{\cbox}{#2}% + \makebox[0pt][l]{\raisebox{1.35\ht\cbox} + {\makebox[\wd\cbox]{#1}}}% +} +\providecommand{\hddu}[1] +{\sbox{\cbox}{#1}% + \makebox[0pt][l]{\raisebox{1.3\ht\cbox} + {\makebox[\wd\cbox] + {\@el\hspace*{0.6\ht\cbox}\@el}}}% +} +\providecommand{\hdl}[2][\@el] +{\sbox{\cbox}{#2}% + \makebox[0pt][l]{\raisebox{-\dp\cbox-0.3\ht\cbox} + {\makebox[\wd\cbox]{#1}}}% +} +\providecommand{\hddl}[1] +{\sbox{\cbox}{#1}% + \makebox[0pt][l]{\raisebox{-\dp\cbox-0.3\ht\cbox} + {\makebox[\wd\cbox] + {\@el\hspace*{0.6\ht\cbox}\@el}}}% +} + +% die vertikalen Symbole +\providecommand{\vd}[2][\@el] +{\sbox{\cbox}{#2}\hspace*{0.1\ht\cbox}% + \raisebox{0.5\ht\cbox}{#1}% + \hspace*{0.1\ht\cbox}% +} +\providecommand{\vdd}[1] +{\sbox{\cbox}{#1}\hspace*{0.2\ht\cbox}% + \makebox[0pt][l]{\raisebox{0.2\ht\cbox}{\@el}}% + \raisebox{0.8\ht\cbox}{\@el}% + \hspace*{0.23\ht\cbox}% +} +%% OBIGER CODE WURDE AUS ECHEM.STY VON INGO KL"OCKL "UBERNOMMEN UND TEILWEISE +%% ANGEPASST. + +\IfFileExists{mhchem.sty}{ +\DeclareRobustCommand\Hpl{\cf{H$^\oplus$}} % Protonen +\DeclareRobustCommand\Hyd{\cf{OH$^\ominus$}} % Hydroxid +\DeclareRobustCommand\ox[2]{\ensuremath{\accentset{##1}{\cf{##2}}}} +%\DeclareRobustCommand\lw[3][0]{ +%\ensuremath{ +%\ifcase ##3 +%\or%1 +% \ifcase ##1 +% \vd{##2}\cf{##2} +% \or +% \hdu{##2}\cf{##2} +% \or +% \cf{##2}\vd{##2} +% \or +% \hdl{##2}\cf{##2} +% \else +% \fi +%\or%2 +% \ifcase ##1 +% \vd{##2}\hdu{##2}\cf{##2} +% \or +% \hdu{##2}\cf{##2}\vd{##2} +% \or +% \hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdl{##2}\cf{##2} +% \or +% \vd{##2}\cf{##2}\vd{##2} +% \or +% \hdu{##2}\hdl{##2}\cf{##2} +% \else +% \fi +%\or%3 +% \ifcase ##1 +% \vd{##2}\hdu{##2}\cf{##2}\vd{##2} +% \or +% \hdu{##2}\hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdu{##2}\hdl{##2}\cf{##2} +% \else +% \fi +%\or%4 +% \vd{##2}\hdu{##2}\hdl{##2}\cf{##2}\vd{##2} +%\or%5 +% \ifcase ##1 +% \vd{##2}\hddu{##2}\hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdu{##2}\hdl{##2}\cf{##2}\vdd{##2} +% \or +% \vd{##2}\hddl{##2}\hdu{##2}\cf{##2}\vd{##2} +% \or +% \vdd{##2}\hdu{##2}\hdl{##2}\cf{##2}\vd{##2} +% \else +% \fi +%\or%6 +% \ifcase ##1 +% \vdd{##2}\hddu{##2}\hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hddu{##2}\hdl{##2}\cf{##2}\vdd{##2} +% \or +% \vd{##2}\hddl{##2}\hdu{##2}\cf{##2}\vdd{##2} +% \or +% \vdd{##2}\hddl{##2}\hdu{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hddu{##2}\hddl{##2}\cf{##2}\vd{##2} +% \or +% \vdd{##2}\hdu{##2}\hdl{##2}\cf{##2}\vdd{##2} +% \else +% \fi +%\or%7 +% \ifcase ##1 +% \vdd{##2}\hddu{##2}\hddl{##2}\cf{##2}\vd{##2} +% \or +% \vdd{##2}\hddu{##2}\hdl{##2}\cf{##2}\vdd{##2} +% \or +% \vd{##2}\hddl{##2}\hddu{##2}\cf{##2}\vdd{##2} +% \or +% \vdd{##2}\hdu{##2}\hddl{##2}\cf{##2}\vdd{##2} +% \else +% \fi +%\or%8 +% \vdd{##2}\hddu{##2}\hddl{##2}\cf{##2}\vdd{##2} +%\else +% \PackageError{chemexec}{Wrong argument in lw} +%\fi +%}} + +%\DeclareRobustCommand\lwbar[3][0]{ +%\ensuremath{ +%\ifcase ##3 +%\or%1 +% \ifcase ##1 +% \vd{##2}\cf{##2} +% \or +% \hdu{##2}\cf{##2} +% \or +% \cf{##2}\vd{##2} +% \or +% \hdl{##2}\cf{##2} +% \else +% \fi +%\or%2 +% \ifcase ##1 +% \vd{##2}\hdu{##2}\cf{##2} +% \or +% \hdu{##2}\cf{##2}\vd{##2} +% \or +% \hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdl{##2}\cf{##2} +% \or +% \vd{##2}\cf{##2}\vd{##2} +% \or +% \hdu{##2}\hdl{##2}\cf{##2} +% \else +% \fi +%\or%3 +% \ifcase ##1 +% \vd{##2}\hdu{##2}\cf{##2}\vd{##2} +% \or +% \hdu{##2}\hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdu{##2}\hdl{##2}\cf{##2} +% \else +% \fi +%\or%4 +% \vd{##2}\hdu{##2}\hdl{##2}\cf{##2}\vd{##2} +%\or%5 +% \ifcase ##1 +% \vd{##2}\hdu[\@elpairh]{##2}\hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdu{##2}\hdl{##2}\cf{##2}\vd[\@elpairv]{##2} +% \or +% \vd{##2}\hdl[\@elpairh]{##2}\hdu{##2}\cf{##2}\vd{##2} +% \or +% \vd[\@elpairv]{##2}\hdu{##2}\hdl{##2}\cf{##2}\vd{##2} +% \else +% \fi +%\or%6 +% \ifcase ##1 +% \vd[\@elpairv]{##2}\hdu[\@elpairh]{##2}\hdl{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdu[\@elpairh]{##2}\hdl{##2}\cf{##2}\vd[\@elpairv]{##2} +% \or +% \vd{##2}\hdl[\@elpairh]{##2}\hdu{##2}\cf{##2}\vd[\@elpairv]{##2} +% \or +% \vd[\@elpairv]{##2}\hdl[\@elpairh]{##2}\hdu{##2}\cf{##2}\vd{##2} +% \or +% \vd{##2}\hdu[\@elpairh]{##2}\hdl[\@elpairh]{##2}\cf{##2}\vd{##2} +% \or +% \vd[\@elpairv]{##2}\hdu{##2}\hdl{##2}\cf{##2}\vd[\@elpairv]{##2} +% \else +% \fi +%\or%7 +% \ifcase ##1 +% \vd[\@elpairv]{##2}\hdu[\@elpairh]{##2}\hdl[\@elpairh]{##2}\cf{##2}\vd{##2} +% \or +% \vd[\@elpairv]{##2}\hdu[\@elpairh]{##2}\hdl{##2}\cf{##2}\vd[\@elpairv]{##2} +% \or +% \vd{##2}\hdl[\@elpairh]{##2}\hdu[\@elpairh]{##2}\cf{##2}\vd[\@elpairv]{##2} +% \or +% \vd[\@elpairv]{##2}\hdu{##2}\hdl[\@elpairh]{##2}\cf{##2}\vd[\@elpairv]{##2} +% \else +% \fi +%\or%8 +% \vd[\@elpairv]{##2}\hdu[\@elpairh]{##2}\hdl[\@elpairh]{##2}\cf{##2}\vd[\@elpairv]{##2} +%\else +% \PackageError{chemexec}{Wrong argument in lwbar} +%\fi +%}} + +%\DeclareRobustCommand\elecpair[3][0]{ +%\ensuremath{ +%\ifcase ##3 +%\or%1 +% \ifcase ##1 +% \vd[\@elpairv]{##2}\cf{##2} +% \or +% \cf{##2}\vd[\@elpairv]{##2} +% \else\fi +%\or%2 +% \hdl[\@elpairh]{##2}\hdu[\@elpairh]{##2}\cf{##2} +%\or%3 +% \ifcase ##1 +% \vd[\@elpairv]{##2}\hdl[\@elpairh]{##2}\hdu[\@elpairh]{##2}\cf{##2} +% \or +% \hdl[\@elpairh]{##2}\hdu[\@elpairh]{##2}\cf{##2}\vd[\@elpairv]{##2} +% \else\fi +%\else +%\fi +%}} + + + +}{ +\providecommand\ox[2]{ \ensuremath{\accentset{\text{#1}}{\text{#2}}} } +\providecommand\Hpl{\ensuremath{\text{H}\op}} % Protonen +\providecommand\Hyd{\ensuremath{\text{OH}\om}} % Hydroxid + +%\providecommand\lw[3][0]{ +%\ensuremath{ +%\ifcase #3 +%\or%1 +% \ifcase #1 +% \vd{#2}\text{#2} +% \or +% \hdu{#2}\text{#2} +% \or +% \text{#2}\vd{#2} +% \or +% \hdl{#2}\text{#2} +% \else +% \fi +%\or%2 +% \ifcase #1 +% \vd{#2}\hdu{#2}\text{#2} +% \or +% \hdu{#2}\text{#2}\vd{#2} +% \or +% \hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdl{#2}\text{#2} +% \or +% \vd{#2}\text{#2}\vd{#2} +% \or +% \hdu{#2}\hdl{#2}\text{#2} +% \else +% \fi +%\or%3 +% \ifcase #1 +% \vd{#2}\hdu{#2}\text{#2}\vd{#2} +% \or +% \hdu{#2}\hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdu{#2}\hdl{#2}\text{#2} +% \else +% \fi +%\or%4 +% \vd{#2}\hdu{#2}\hdl{#2}\text{#2}\vd{#2} +%\or%5 +% \ifcase #1 +% \vd{#2}\hddu{#2}\hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdu{#2}\hdl{#2}\text{#2}\vdd{#2} +% \or +% \vd{#2}\hddl{#2}\hdu{#2}\text{#2}\vd{#2} +% \or +% \vdd{#2}\hdu{#2}\hdl{#2}\text{#2}\vd{#2} +% \else +% \fi +%\or%6 +% \ifcase #1 +% \vdd{#2}\hddu{#2}\hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hddu{#2}\hdl{#2}\text{#2}\vdd{#2} +% \or +% \vd{#2}\hddl{#2}\hdu{#2}\text{#2}\vdd{#2} +% \or +% \vdd{#2}\hddl{#2}\hdu{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hddu{#2}\hddl{#2}\text{#2}\vd{#2} +% \or +% \vdd{#2}\hdu{#2}\hdl{#2}\text{#2}\vdd{#2} +% \else +% \fi +%\or%7 +% \ifcase #1 +% \vdd{#2}\hddu{#2}\hddl{#2}\text{#2}\vd{#2} +% \or +% \vdd{#2}\hddu{#2}\hdl{#2}\text{#2}\vdd{#2} +% \or +% \vd{#2}\hddl{#2}\hddu{#2}\text{#2}\vdd{#2} +% \or +% \vdd{#2}\hdu{#2}\hddl{#2}\text{#2}\vdd{#2} +% \else +% \fi +%\or%8 +% \vdd{#2}\hddu{#2}\hddl{#2}\text{#2}\vdd{#2} +%\else +% \PackageError{chemexec}{Wrong argument in lw} +%\fi +%}} + +%\providecommand\lwbar[3][0]{ +%\ensuremath{ +%\or%1 +% \ifcase #1 +% \vd{#2}\text{#2} +% \or +% \hdu{#2}\text{#2} +% \text{#2}\vd{#2} +% \or +% \hdl{#2}\text{#2} +% \else +% \fi +%\or%2 +% \ifcase #1 +% \vd{#2}\hdu{#2}\text{#2} +% \or +% \hdu{#2}\text{#2}\vd{#2} +% \or +% \hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdl{#2}\text{#2} +% \or +% \vd{#2}\text{#2}\vd{#2} +% \or +% \hdu{#2}\hdl{#2}\text{#2} +% \else +% \fi +%\or%3 +% \ifcase #1 +% \vd{#2}\hdu{#2}\text{#2}\vd{#2} +% \or +% \hdu{#2}\hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdu{#2}\hdl{#2}\text{#2} +% \else +% \fi +%\or%4 +% \vd{#2}\hdu{#2}\hdl{#2}\text{#2}\vd{#2} +%\or%5 +% \ifcase #1 +% \vd{#2}\hdu[\@elpairh]{#2}\hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdu{#2}\hdl{#2}\text{#2}\vd[\@elpairv]{#2} +% \or +% \vd{#2}\hdl[\@elpairh]{#2}\hdu{#2}\text{#2}\vd{#2} +% \or +% \vd[\@elpairv]{#2}\hdu{#2}\hdl{#2}\text{#2}\vd{#2} +% \else +% \fi +%\or%6 +% \ifcase #1 +% \vd[\@elpairv]{#2}\hdu[\@elpairh]{#2}\hdl{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdu[\@elpairh]{#2}\hdl{#2}\text{#2}\vd[\@elpairv]{#2} +% \or +% \vd{#2}\hdl[\@elpairh]{#2}\hdu{#2}\text{#2}\vd[\@elpairv]{#2} +% \or +% \vd[\@elpairv]{#2}\hdl[\@elpairh]{#2}\hdu{#2}\text{#2}\vd{#2} +% \or +% \vd{#2}\hdu[\@elpairh]{#2}\hdl[\@elpairh]{#2}\text{#2}\vd{#2} +% \or +% \vd[\@elpairv]{#2}\hdu{#2}\hdl{#2}\text{#2}\vd[\@elpairv]{#2} +% \else +% \fi +%\or%7 +% \ifcase #1 +% \vd[\@elpairv]{#2}\hdu[\@elpairh]{#2}\hdl[\@elpairh]{#2}\text{#2}\vd{#2} +% \or +% \vd[\@elpairv]{#2}\hdu[\@elpairh]{#2}\hdl{#2}\text{#2}\vd[\@elpairv]{#2} +% \or +% \vd{#2}\hdl[\@elpairh]{#2}\hdu[\@elpairh]{#2}\text{#2}\vd[\@elpairv]{#2} +% \vd[\@elpairv]{#2}\hdu{#2}\hdl[\@elpairh]{#2}\text{#2}\vd[\@elpairv]{#2} +% \else +% \fi +%\or%8 +% \vd[\@elpairv]{#2}\hdu[\@elpairh]{#2}\hdl[\@elpairh]{#2}\text{#2}\vd[\@elpairv]{#2} +%\else +% \PackageError{chemexec}{Wrong argument in lwbar} +%\fi +%}} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Anionen --------------------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\IfFileExists{mhchem.sty}{ + \providecommand\nitrat{\ensuremath{\cf{NO3}}} + \providecommand\nitrit{\ensuremath{\cf{NO2}}} + \providecommand\sulfat{\ensuremath{\cf{SO4}}} + \providecommand\sulfit{\ensuremath{\cf{SO3}}} + \providecommand\phosphat{\ensuremath{\cf{PO4}}} + \providecommand\phosphit{\ensuremath{\cf{PO3}}} + \providecommand\carbonat{\ensuremath{\cf{CO3}}} +}{ + \providecommand\nitrat{\ensuremath{\text{NO}_3}} + \providecommand\nitrit{\ensuremath{\text{NO}_2}} + \providecommand\sulfat{\ensuremath{\text{SO}_4}} + \providecommand\sulfit{\ensuremath{\text{SO}_3}} + \providecommand\phosphat{\ensuremath{\text{PO}_4}} + \providecommand\phosphit{\ensuremath{\text{PO}_3}} + \providecommand\carbonat{\ensuremath{\text{CO}_3}} +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Exkurs-Umgebung definieren -------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\define@key{exkurs}{toc}[\@exkurs@toc]{% + \renewcommand{\@exkurs@currenttoc}{#1}}% +\define@key{exkurs}{color}[\@exkurs@color]{% + \renewcommand{\@exkurs@currentcolor}{#1}}% +\presetkeys% + {exkurs} + {toc=\@exkurs@toc,color=\@exkurs@color} + {} +\def\@kopfrule{% +\tikz{\shade[top color=\@exkurs@currentcolor] (0,0) rectangle ($(\textwidth,-3mm)$);} +} +\def\@fussrule{% +\tikz{\shade[top color=white,bottom color=\@exkurs@currentcolor] (0,0) rectangle ($(\textwidth,-3mm)$);} +} + +\newenvironment{exkurs}[2][]% +{\setkeys{exkurs}{#1}% +\vspace{1.2\baselineskip}\par\noindent\@kopfrule\par\noindent\vspace{.8\baselineskip}% + \parbox[c]{\textwidth}{\centering\bfseries\Large{\color{\@exkurs@currentcolor}\@exkurs@name:~}#2}% + {\addcontentsline{toc}{\@exkurs@currenttoc}{{\textcolor{\@exkurs@currentcolor}{\@exkurs@name}:~}#2}}\\% +}% +{% +\vspace{.8\baselineskip}\par\noindent\@fussrule\vspace{1.2\baselineskip}% + \normalsize\par% +}% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Beispiel-Umgebung ----------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\@bsprule@currentlinecolor}{}% +\define@key{bsprule}{linecolor}[\@bsprule@linecolor]{% + \renewcommand{\@bsprule@currentlinecolor}{#1}}% +\presetkeys% + {bsprule} + {linecolor=\@bsprule@currentlinecolor} + {} + +% Zähler für die Beispiele +\if@usechapter + \newcounter{beispiel}[chapter] + \renewcommand\thebeispiel{\thechapter.\arabic{beispiel}:} +\else + \newcounter{beispiel} + \renewcommand\thebeispiel{\arabic{beispiel}:} +\fi +% Umgebung +\newenvironment{beispiel}[1][linecolor=\@bsprule@linecolor]% + {\setkeys{bsprule}{#1}% + \refstepcounter{beispiel}% + \vspace{1.5\baselineskip}{\color{\@bsprule@currentlinecolor}\hrule}\par\nobreak% + \vspace{3pt}\noindent\small\textbf{\@beispiel@name~\thebeispiel}% + \par\nobreak\@afterheading% + }% + {\par\nobreak\vspace{2pt}{\color{\@bsprule@currentlinecolor}\hrule}\vspace{1.5\baselineskip}\normalsize\ignorespacesafterend\par% + }% + +% zweites, drittes, ... Beispiel +\providecommand\bsp{\refstepcounter{beispiel}\par\noindent\textbf{\@beispiel@name~\thebeispiel}\newline}% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Definitions-Umgebung -------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\define@key{definition}{shadecolor}[\@definition@shadecolor]{% + \renewcommand{\@definition@currentshadecolor}{#1}}% +\define@key{definition}{color}[\@definition@color]{% + \renewcommand{\@definition@currentcolor}{#1}}% +\define@boolkey{definition}{shade}[true]{% + \ifKV@definition@shade + \@shadedtrue + \else + \@shadedfalse + \fi +} + +\presetkeys% + {definition} + {shadecolor=\@definition@shadecolor,color=\@definition@color} + {} + +\newenvironment{definition}[1][] + { \setkeys{definition}{#1}% + \if@shaded + \def\FrameCommand{\fboxsep=\FrameSep \colorbox{\@definition@currentshadecolor}}% + \fi + \MakeFramed{\advance\hsize-\width \FrameRestore}% + \noindent{\large\scshape\color{\@definition@currentcolor}\unterstr{Definition}~}% + } + { \endMakeFramed% + } + +\newenvironment{defformel}[1][\hsize]{% + \def\FrameCommand{\colorbox{white}}% + \MakeFramed {\hsize#1\advance\hsize-\width\FrameRestore}\centering}% + {\endMakeFramed} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Aufgaben, sectionweise gezählt ---------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\if@useaufg + \gdef\@aufgabe@actualgroesse{\csname\@aufgabe@groesse\endcsname} + %\RequirePackage{etex} + %\reserveinserts{32000} + \IfFileExists{ifthen.sty}{% + \RequirePackage{ifthen} + \IfFileExists{calc.sty}{% + \RequirePackage{calc} + \if@usechapter + \newcounter{@aufgabe}[chapter] + \renewcommand{\the@aufgabe}{\thechapter.\arabic{@aufgabe}} + \else + \newcounter{@aufgabe}[section] + \renewcommand{\the@aufgabe}{\arabic{@aufgabe}.} + \fi + \newcounter{@Aufgabe} + \if@usechapter + \newcounter{@zaehler}[chapter] + \else + \newcounter{@zaehler} + \fi + \newcounter{@nummer} + %%% der eigentliche Befehl + \DeclareRobustCommand\aufgabe[1]{% + \refstepcounter{@aufgabe}% + \stepcounter{@Aufgabe}% + \stepcounter{@zaehler}% + \stepcounter{@nummer}% + \bigskip% + \par\noindent{\@aufgabe@actualgroesse\bfseries{\color{\@numbers@numcolor}\the@aufgabe}~% + \ifthenelse{\equal{####1}{}}% + {\@aufgabe@name}{####1}}% + \par\nobreak\@afterheading\normalfont\medskip%\newline% + }% + }{% + \PackageError{chemexec}{% + The `calc' package is apparently unavailable.\MessageBreak + Turn off the `aufgabe' option and come back again.}{% + If you want to use the possibilties of the `aufgabe' option,\MessageBreak + you have to install the `calc' package from CTAN or wherever\MessageBreak + you get your LaTeX packages.}% + }% + }{% + \PackageError{chemexec}{% + The `ifthen' package is apparently unavailable.\MessageBreak + Turn off the `aufgabe' option and come back again.}{% + If you want to use the possibilties of the `aufgabe' option,\MessageBreak + you have to install the `ifthen' package from CTAN or wherever\MessageBreak + you get your LaTeX packages.}% + } + +\makeatletter +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Lösungen eingeben ----------------------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcounter{@loesung} +\newcounter{@Loesung} +%\newcommand{\@loesung@text}{} +\edef\empty#1{#1} +\DeclareRobustCommand\loesung[2][\@loesung@titel]{ + %\renewcommand{\@loesung@text}{#2} + \setcounter{@loesung}{\value{@zaehler}} + \stepcounter{@Loesung} + {% + \csname protected@xdef\expandafter\endcsname\csname @tempa\endcsname{% + \expandafter\gdef\csname @loesung@nr\arabic{@Loesung}\endcsname{\the@loesung}}% + \expandafter\expandafter\expandafter + }\csname @tempa\endcsname + {% + \csname protected@xdef\expandafter\endcsname\csname @tempa\endcsname{% + \if@usechapter + \expandafter\gdef\csname @loesung@kap\arabic{@Loesung}\endcsname{\thechapter} + \else + \expandafter\gdef\csname @loesung@kap\arabic{@Loesung}\endcsname{\arabic{section}} + \fi}% + \expandafter\expandafter\expandafter + }\csname @tempa\endcsname + \expandafter\gdef\csname @loesung@loes\arabic{@Loesung}\endcsname{ #2} + %\savebox{\csname loes\arabic{Loesung}\endcsname}{#2} + \expandafter\gdef\csname @loesung@name\arabic{@Loesung}\endcsname{\noexpand #1} +} + +\newcounter{@mylist} +\renewcommand\the@mylist{\alph{@mylist})} +\newcommand*{\alphlabel}[1][\stepcounter{@mylist}\the@mylist]{\normalfont #1\hfil} +\newenvironment{alphlist}{ +\begin{list}{}% + {\let\makelabel\alphlabel + \setlength\labelwidth{15pt}% + \setlength\leftmargin{\labelwidth+\labelsep+.5em}% + }% +}{ +\setcounter{@mylist}{0} +\end{list} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Alle Lösungen ausgeben ------------------------------------------------------------ % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcounter{@zahl} +\newcounter{@a} +\def\@loesung@altKap{0} +\DeclareRobustCommand\makeloesung{% + \@ifundefined{@ausgabe}{\@ifundefined{dolo}{% + \setcounter{@zahl}{\value{@Loesung}+1}% + \setcounter{@a}{1}% + \whiledo { \value{@a} < \value{@zahl} }{% + \def\@loesung@ausg{\csname @loesung@loes\arabic{@a}\endcsname}% + \edef\@loesung@Name{\csname @loesung@name\arabic{@a}\endcsname}% + \edef\@loesung@Kap{\csname @loesung@kap\arabic{@a}\endcsname}% + \edef\@loesung@Nr{\csname @loesung@nr\arabic{@a}\endcsname}% + \@ifundefined{@loesung@loes\arabic{@a}}% + {}% + {\ifnum \@loesung@Kap=\@loesung@altKap% + \bigskip% + \par\nobreak\@afterheading\noindent% + \else% + \if@usechapter% + {\smallskip% + \par\noindent\hspace*{.1\textwidth}\color{\@numbers@numcolor}{\LARGE\@loesung@Kap. \chaptername{}}}\\% + \par\nobreak\@afterheading\vspace{2pt}{\color{\@numbers@numcolor}\hrule\vspace{4pt}\noindent}% + \else% + \bigskip% + \par\noindent% + \fi% + \fi% + %\medskip% + {\@aufgabe@actualgroesse\bfseries{\color{\@numbers@numcolor}\if@usechapter\@loesung@Kap.\fi\@loesung@Nr\if@usechapter\else.\fi~}\@loesung@Name}\medskip\newline% + \@loesung@ausg% + }% + \let\@loesung@altKap=\@loesung@Kap% + \stepcounter{@a}% + }% + \bigskip\par% + \def\@loesung@ausgabe{voll}% + }{\errmessage{Sie haben schon doloesung verwendet!}}}{\errmessage{Sie haben makeloesung schon vorher verwendet!}}% +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% - Lösungen section-weise ausgeben --------------------------------------------------- % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareRobustCommand\doloesung{% + \@ifundefined{ausgabe}{% + \setcounter{@a}{\value{@nummer}-\value{@zaehler}+1}% + \setcounter{@zahl}{\value{@nummer}+1}% + \whiledo { \value{@a} < \value{@zahl} }{% + \edef\@loesung@Name{\csname @loesung@name\arabic{@a}\endcsname}% + \edef\@loesung@Kap{\csname @loesung@kap\arabic{@a}\endcsname}% + \edef\@loesung@Nr{\csname @loesung@nr\arabic{@a}\endcsname}% + \def\@loesung@ausg{\csname @loesung@loes\arabic{@a}\endcsname}% + \@ifundefined{@loesung@loes\arabic{@a}}% + {}% + {\bigskip + \par\noindent%% + {\@aufgabe@actualgroesse\bfseries{\color{\@numbers@numcolor}\if@usechapter\@loesung@Kap.\fi\@loesung@Nr\if@usechapter\else.\fi~}\@loesung@Name}\par\nobreak\@afterheading\medskip%\newline% + \@loesung@ausg% + }% + \let\@loesung@altKap=\@loesung@Kap% + \stepcounter{@a}% + }% + \bigskip\par% + \setcounter{@zaehler}{0}% + \setcounter{@nummer}{\value{@Loesung}}% + \def\dolo{voll}% + }{\errmessage{Sie haben schon makeloesung verwendet!}}% +} + +\makeatother +\else +\fi
\ No newline at end of file |