Debian Codegraph @

texmf-dist/doc/latex/chemexec/chemexec_en.tex

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % ------------------------------------------------------------------------------------- %
3 % - chemexec - chemexec_en.tex -------------------------------------------------------- %
4 % - creating (chemical) exercise sheets, chemical macros ------------------------------ %
5 % ------------------------------------------------------------------------------------- %
6 % - Clemens Niederberger -------------------------------------------------------------- %
7 % - 2011/03/06 ------------------------------------------------------------------------ %
8 % ------------------------------------------------------------------------------------- %
9 % - http://www.niederberger-berlin.net/2010/08/latex-chemische-formeln-erstellen-iiv/ - %
10 % - [email protected] --------------------------------------------------- %
11 % ------------------------------------------------------------------------------------- %
12 % - If you have any ideas, questions, suggestions or bugs to report, please feel free - %
13 % - to contact me. -------------------------------------------------------------------- %
14 % ------------------------------------------------------------------------------------- %
15 % Copyright 2011 Clemens Niederberger %
16 % %
17 % This work may be distributed and/or modified under the %
18 % conditions of the LaTeX Project Public License, either version 1.3 %
19 % of this license or (at your option) any later version. %
20 % The latest version of this license is in %
21 % http://www.latex-project.org/lppl.txt %
22 % and version 1.3 or later is part of all distributions of LaTeX %
23 % version 2005/12/01 or later. %
24 % %
25 % This work has the LPPL maintenance status `maintained'. %
26 % %
27 % The Current Maintainer of this work is Clemens Niederberger. %
28 % %
29 % This work consists of the files chemexec.sty, chemexec_de.tex %
30 % and chemexec_en.tex %
31 % ------------------------------------------------------------------------------------- %
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33 \documentclass[DIV10]{scrartcl}
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 % = PAKETE/EINSTELLUNGEN ============================================================== %
36 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 \usepackage[english]{babel}
38 \usepackage[utf8x]{inputenc}
39 \usepackage[T1]{fontenc}
40 \usepackage{listings}
41 \usepackage{array,slashbox}
42 \setlength\extrarowheight{7pt}
43 \usepackage{graphicx}
44 \usepackage[exercise,exersize=large,english]{chemexec}
45 \usetikzlibrary{fadings,patterns}
46 \usepackage{xcolor,wrapfig}
47 \definecolor{dunkelblau}{rgb}{0,0.33,0.62}
48 \definecolor{dunkelrot}{rgb}{0.4392,0.0627,0.0627}
49 \usepackage{url,paralist}
50 \usepackage[perpage,multiple]{footmisc} % Fußnoten
51 \usepackage[english]{varioref} % flexibles Referenzieren
52 \labelformat{section}{section #1}
53 \labelformat{subsection}{section #1}
54 \labelformat{subsubsection}{section #1}
55 % = Hyperlinks ======================================================================== %
56 \usepackage{hyperref}
57 \hypersetup{colorlinks=true, % Setup der Hyperlinks und des pdf
58 linkcolor=black,
59 urlcolor=blue!70,
60 citecolor=black,
61 plainpages=false,
62 bookmarksopen=true,
63 bookmarksopenlevel=1,
64 bookmarksnumbered=true,
65 pdfstartview=FitH,,
66 pdfauthor={Clemens Niederberger},
67 pdftitle={chemexec},
68 pdfsubject={customizing you (chemical) exercise sheets},
69 pdfkeywords={chemexec},
70 pdfcreator={LaTeX}
71 }
72 \usepackage{times,amssymb,chemfig,xspace}
73 % = Listings einstellen =============================================================== %
74 \lstset{
75 basicstyle={\ttfamily\footnotesize}, % Grundstil
76 extendedchars=true,
77 numbers=left, % Zeilennummern
78 numberstyle=\tiny, % Größe des Zeilennummern
79 numberblanklines=true, % Leerzeilen nummerieren
80 gobble=1, % das erste Leerzeichen abschneiden
81 xleftmargin=20pt, % Einrückung links
82 breaklines=true, % Zeilenumbruch
83 moredelim=[is][\color{red}]{||}{||} % Hervorhebung
84 }
85
86 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87 % - Kopf- und Fußzeile ---------------------------------------------------------------- %
88 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
89 \usepackage{scrpage2}
90 \pagestyle{scrheadings}
91 \setheadwidth{textwithmarginpar}
92 \automark{section}
93 \ihead{\CEx \CEversion}
94 \ifoot{\small\color{gray}-~page~\thepage~-}
95 \cfoot{}
96 \ofoot{}
97
98 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
99 % - Komascript ------------------------------------------------------------------------ %
100 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
101 \setkomafont{disposition}{\rmfamily\bfseries} % Gewicht fett und Schriftart roman
102
103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
104 % - neue Befehle ---------------------------------------------------------------------- %
105 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
106 \newcommand{\option}[1]{`\texttt{#1}'\xspace}
107 \newcommand{\TikZ}{\mbox{Ti{\bfseries\itshape k}Z}\xspace}
108 \newcommand{\eg}{\mbox{e.\,g.}\xspace}
109 %\newcommand{\zB}{\mbox{z.\,B.}\xspace}
110 \newlength{\chemx}
111 \newlength{\chemy}
112 \newcommand{\CEx}[1][8]{%
113 {\color{dunkelrot}\fontfamily{pag}\fontsize{#1}{#1}\selectfont chemexec}\xspace
114 }
115 \let\saveversion\CEversion
116 \def\CEversion{\saveversion\xspace}
117
118 \begin{document}
119 \begin{titlepage}
120 % inspired by the titlepage of chemfig's documentation
121 \begin{tikzpicture}[remember picture,overlay]
122 \shade [color=dunkelrot,right color=white](current page.south west) rectangle ([yshift=3cm,xshift=-3cm]current page.center);
123 \shade[top color=black,bottom color=dunkelrot]([yshift=7cm]current page.east)rectangle([yshift=2.5cm]current page.west);
124 \end{tikzpicture}
125 \begin{center}
126 \vspace*{-1.5cm}
127 \CEx[45]\par
128 \Large\CEversion\par\bigskip
129 \footnotesize\CEdate{en}\par
130 \normalsize Clemens Niederberger\par\vskip1.5cm
131 \color{white}\huge creating (chemical) exercise sheets%
132 \end{center}
133 \vskip3cm
134
135 \end{titlepage}
136
137 \tableofcontents
138
139 \section{Licence}
140 \CEx \CEversion underlies the LaTeX Project Public License Version 1.3 or any later version.\newline(\url{http://www.latex-project.org/lppl.txt})
141
142 \section{About}
143 The \CEx package provides some environments and commands I needed when I created exercise sheets and other teaching material. There is a \verb=definition= environment, the \verb=beispiel= environment for examples (`beispiel' is german for example) and lots of other little commands I found useful.\\
144 For the exercise sheets I especially wanted an easy way to create numbered exercises and a flexible way to print out the corresponding solutions (see \ref{sec:aufgaben}).\\
145 \CEx also replaces \verb=echem.sty= for OCHEM\footnote{by Ingo Kl\"ockl \url{http://tug.ctan.org/tex-archive/support/ochem/}}.
146
147 \section{New in version \CEversion}
148 \CEx lost the commands \verb=\lw=, \verb=\lwbar=, \verb=\atomconnect= and the \verb=Schema= environment, because Lewis formul\ae\ can more easily be created with the `ChemFig' package and several other packages (\eg myChemistry) also provide reaction scheme environments.\\
149 \CEx now nicely works with \verb=pdflatex=, since there are no more commands using pstricks. I used \TikZ instead.
150
151 \section{Package options}
152 You can load \CEx with different options:
153 \begin{itemize}
154 \item The \verb=chapter= option changes the counter of the exercises and solutions (see \ref{sec:aufgaben}) and of the \verb=beispiel= environment (see \ref{ssec:beispiele}).
155 \item The \verb+color=<color>+ changes the color of the numbers with which the exercises ans solutions are numbered. It also changes the color of the lines bordering the \verb=beispiel= environments and the color of the title of the \verb=definition= environment.\\
156 Default color is \verb=dunkelblau= defined by\\
157 \verb=\xdefinecolor{dunkelblau}{rgb}{0,0.33,0.62}=.
158 \item The \verb=english= option changes the german titles into english ones: "Aufgabe" $\leftrightarrow$ "Exercise", "L\"osung" $\leftrightarrow$ "Solution", "Beispiel" $\leftrightarrow$ "Example" and "Exkurs" $\leftrightarrow$ "Excursus".
159 \item The \verb=exercise= option activates the commands for creating exercises and the corresponding solutions.
160 \item The \verb+exersize=<fontsize>+ changes the fontsize of the titles of the exercises and their solutions.
161 %\item Die Option \option{here} legt f"ur die \texttt{Schema}-Gleitumgebung als Positionierung \texttt{H} (genau hier) fest.
162 \item The \verb+shade=<boolean>+ changes the layout of the \verb=definition= environment. Default is \verb=false=.
163 \item The option \verb+shadecolor=<color>+ changes the background color of the\\ \verb=definition= environment if the option \verb+shade=true+ is used. Default is \verb=pink!50=.
164 \item The \verb+numcolor=<color>+ changes the color of the numbers numbering the exercises and solutions.
165 \end{itemize}
166
167 \section{New commands}
168 \subsection{Maths}
169 Just some small macros I found useful:
170 \begin{itemize}
171 \item \verb=\vek{}= writing vectors with an arrow: \verb=\vek{a}, \vek{A}= \vek{a}, \vek{A}.
172 \item \verb=$\abs{}$= absolute value: \verb=\abs{\vek{a}}, \abs{-\frac{i}{2}}= \abs{\vek{a}}, \abs{-\frac{i}{2}}.
173 \end{itemize}
174 These commands can be used both in math mode and in text mode.
175
176 \subsection{Chemistry}
177 More macros I found useful. All chemistry commands can be used both in math mode and in text mode.
178 \subsubsection{Particles ans charges}
179 \begin{itemize}
180 \item \verb=\el= electron: \el
181 \item \verb=\prt= proton: \prt
182 \item \verb=\ntr= neutron: \ntr
183 \item \verb=\Hpl= proton: \Hpl
184 \item \verb=\Hyd= hydroxide: \Hyd
185 \item \verb=\ox{}{}= oxidation states\\
186 \verb=Ca\ox{-1}{F}$_2$= Ca\ox{-1}{F}$_2$;\\
187 the first argument is the oxidation state, the second one the element.
188 \item \verb=\om= and \verb=\op= charges \om\ und \op.\\
189 These commands have an optional argument for the number of charges:\\\verb=Ca\op[2]= Ca\op[2], \verb=\phosphat\om[3]= \phosphat\om[3].
190 \end{itemize}
191
192 \subsubsection{Stereo descriptors}\label{sssec:stereo}
193 Some descriptors to make it easier writing the correct IUPAC name:
194 \begin{itemize}
195 \item \verb=\Rcip= and \verb=\Scip=, rectus and sinister: \Rcip\ \Scip
196 \item \verb=\Dfi= and \verb=\Lfi=, dexter and laevus: \Dfi\ \Lfi
197 \item \verb=\E= and \verb=\Z=, opposite (german: entgegen) and together (german: zusammen): \E\ \Z
198 \item \verb=\rconf= and \verb=\sconf= R/S configuration: \rconf\ and \sconf. Both commands have an optional argument changing the letter: \verb=\rconf[] \sconf[A]= \rconf[] \sconf[A]
199 \end{itemize}
200 \subsubsection{Anions}
201 I don't use them anymore since I found the `mhchem' package, but they're defined anyway:
202 \begin{itemize}
203 \item \verb=\nitrat= : \nitrat
204 \item \verb=\nitrit= : \nitrit
205 \item \verb=\sulfat= : \sulfat
206 \item \verb=\sulfit= : \sulfit
207 \item \verb=\phosphat= : \phosphat
208 \item \verb=\phosphit= : \phosphit
209 \item \verb=\carbonat= : \carbonat
210 \end{itemize}
211
212 \subsubsection{Compatibility with `mhchem'}
213 You can use all chemistry commands in the formula commands of the `mhchem' package\footnote{by Martin Hensel \url{http://www.ctan.org/tex-archive/macros/latex/contrib/mhchem/}} like \verb=\ce{}=. `mhchem' is loaded automatically by \CEx if it is installed. If you want to load `mhchem' with other options than \verb+version=3+ you need to load it seperately \emph{before} loading \CEx.
214 \begin{lstlisting}[numbers=none,basicstyle=\normalsize\ttfamily,showspaces=true]
215 \ce{2|| ||\ox{0}{Ca} +|| ||\ox{0}{O}_2 ->T[{~~~REDOX~~~}] 2Ca|| ||\op[2] + 2O|| ||\om[2]}
216 \end{lstlisting}
217 \ce{ 2 \ox{0}{Ca} + \ox{0}{O}_2 ->T[{~~~REDOX~~~}] 2Ca \op[2] + 2O \om[2] }\\
218 Please keep in mind that you need to leave the blanks before \verb=\om=, \verb=\op=, \verb=\ox{}{}=. Else you might get unexpected results:\verb=\ce{Ca\op[2]}= \ce{ Ca\op[2] }.
219
220 \noindent Some more examples:
221 \begin{lstlisting}[numbers=none,basicstyle=\normalsize\ttfamily]
222 \begin{align*}
223 \cee{Na &->T[ox] Na\op||{}|| + \el}\\
224 \cee{HCl_{aq} &<=>> H\op_{aq} + Cl\om_{aq}}\\
225 \cee{H2O &<<=> \Hpl + \Hyd}\\
226 \cee{CaCl2 + H2\sulfat||{}|| &-> Ca\sulfat||{}|| v + 2 HCl}
227 \end{align*}
228 \end{lstlisting}
229 \begin{align*}
230 \cee{Na &->T[ox] Na\op{} + \el}\\
231 \cee{HCl_{aq} &<=>> H\op_{aq} + Cl\om_{aq}}\\
232 \cee{H2O &<<=> \Hpl + \Hyd}\\
233 \cee{CaCl2 + H2\sulfat{} &-> Ca\sulfat{} v + 2 HCl}
234 \end{align*}
235
236 \subsubsection{Commands for `mhchem'}
237 \CEx also provides some commands for numbered and centered reactions created by `mh\-chem'.
238 \begin{lstlisting}
239 Reaction with a number:
240 \reaction{2 H2 + O2 -> 2 H2O}%
241 Reaction without a number:
242 \reaction*{2 CO + O2 -> 2 CO2}
243 More reactions at once, aligned:
244 \reactions{Cl_2 ||&||-> 2 Cl. ||\\|| Cl. + CH4 ||&||-> HCl + {}.CH3}
245 \end{lstlisting}
246 Reaction with a number:
247 \reaction{2 H2 + O2 -> 2 H2O}%
248 Reaction without a number:
249 \reaction*{2 CO + O2 -> 2 CO2}
250 More reactions at once, aligned:
251 \reactions{Cl2 &-> 2 Cl. \\ Cl. + CH4 &-> HCl + {}.CH3}
252
253 \section{New environments}
254 \subsection{The {\ttfamily beispiel} environment - creating examples}\label{ssec:beispiele}
255 The \verb=beispiel= environment is an environment for examples. Examples automatically are numbered and placed between two lines. The fontsize of the examples is \verb=\small=.
256 \begin{lstlisting}
257 ||\begin{beispiel}||
258 an example
259 ||\end{beispiel}||
260 \end{lstlisting}
261 \begin{beispiel}
262 an example
263 \end{beispiel}
264 \noindent If you want to give two or more examples in between the same two lines, you can use \verb=\bsp=:
265 \begin{lstlisting}
266 \begin{beispiel}
267 first example
268 ||\bsp||
269 second one
270 \end{beispiel}
271 \end{lstlisting}
272 \begin{beispiel}
273 first example
274 \bsp
275 second one
276 \end{beispiel}
277
278 \subsubsection{The options \texttt{color}, \texttt{linecolor} \&\ \texttt{english}}
279 The \verb+linecolor=<color>+ option changes the color of the lines:
280 \begin{lstlisting}
281 % preamble:
282 \usepackage||[linecolor={rgb:red,4;green,6}]||{chemexec}
283 % in the document:
284 \begin{beispiel}
285 green lines through package option
286 \end{beispiel}
287 \end{lstlisting}
288 folgenden Output:
289 \begin{beispiel}[linecolor={rgb:red,4;green,6}]
290 green lines through package option
291 \end{beispiel}
292 \noindent The option \verb+color=<color>+ also changes the color of the lines (but also changes the color of other things,too).\\
293 By using the key \verb+linecolor=<color>+ you can change the color of a single example:
294 \begin{lstlisting}
295 \begin{beispiel}||[linecolor=purple]||
296 the lonely purple one
297 \end{beispiel}
298 \end{lstlisting}
299 folgenden Output:
300 \begin{beispiel}[linecolor=purple]
301 the lonely purple one
302 \end{beispiel}
303 \noindent The \verb=english= option translates "Beispiel" into "Example".
304
305 \subsubsection{Not numbered examples}
306 If you don't like the numbering you can redefine the counter as usual.
307 \begin{lstlisting}
308 \renewcommand{\thebeispiel}{}
309 \begin{beispiel}
310 now without counter
311 \end{beispiel}
312 \end{lstlisting}
313 \renewcommand{\thebeispiel}{}
314 \begin{beispiel}
315 now without counter
316 \end{beispiel}
317 \begin{lstlisting}
318 \renewcommand{\thebeispiel}{\alph{beispiel})}
319 \begin{beispiel}
320 or alphabetically \ldots
321 \end{beispiel}
322 \end{lstlisting}
323 \renewcommand{\thebeispiel}{\alph{beispiel})}
324 \begin{beispiel}
325 or alphabetically \ldots
326 \end{beispiel}
327
328 \subsection{The {\ttfamily definition} environment}\label{sec:definition}
329 The \verb=definition= environment creates a box with a colored title:
330 \begin{lstlisting}
331 ||\begin{definition}||
332 The absolut value of a vector in $\mathbb{R}^3$ is
333 \begin{equation}
334 ||\abs{\vek{||a||}}||=\sqrt{a_x^2+a_y^2+a_z^2}
335 \end{equation}
336 ||\end{definition}||
337 \end{lstlisting}
338 \begin{definition}
339 The absolut value of a vector in $\mathbb{R}^3$ is
340 \begin{equation}
341 \abs{\vek{a}}=\sqrt{a_x^2+a_y^2+a_z^2}
342 \end{equation}
343 \end{definition}
344
345 \subsubsection{The options \texttt{shade}, \texttt{shadecolor} \& \texttt{color}}
346 With the key \verb+shade=<boolean>+ you can change the layout:
347 \begin{lstlisting}
348 \begin{definition}||[shade=true]||
349 The absolut value of a vector in $\mathbb{R}^3$ is
350 \begin{equation}
351 \abs{\vek{a}}=\sqrt{a_x^2+a_y^2+a_z^2}
352 \end{equation}
353 \end{definition}
354 \end{lstlisting}
355 \begin{definition}[shade=true]
356 The absolut value of a vector in $\mathbb{R}^3$ is:
357 \begin{equation}
358 \abs{\vek{a}}=\sqrt{a_x^2+a_y^2+a_z^2}
359 \end{equation}
360 \end{definition}
361 By using the keys \verb+shadecolor=<color>+ und \verb+color=<color>+ you can customize the environment:
362 \begin{lstlisting}
363 \begin{definition}||[shade=true,shadecolor=green!15,color=black]||
364 The absolut value of a vector in $\mathbb{R}^3$ is
365 \begin{equation}
366 \abs{\vek{a}}=\sqrt{a_x^2+a_y^2+a_z^2}
367 \end{equation}
368 \end{definition}
369 \end{lstlisting}
370 \begin{definition}[shade=true,shadecolor=green!15,color=black]
371 The absolut value of a vector in $\mathbb{R}^3$ is:
372 \begin{equation}
373 \abs{\vek{a}}=\sqrt{a_x^2+a_y^2+a_z^2}
374 \end{equation}
375 \end{definition}
376 You can use all of these keys as package options as well. This way, you can change the layout of every \verb=definition= environment at once. Please keep in mind, that in this case \verb+color=<color>+ also has effects on other commands and environments.
377 \begin{lstlisting}
378 % preamble:
379 \usepackage||[shade=true,shadecolor=yellow!15]||{chemexec}
380 % in the document:
381 \begin{definition}
382 The absolut value of a vector in $\mathbb{R}^3$ is
383 \begin{equation}
384 \abs{\vek{a}}=\sqrt{a_x^2+a_y^2+a_z^2}
385 \end{equation}
386 \end{definition}
387 \end{lstlisting}
388 \begin{definition}[shade=true,shadecolor=yellow!15]
389 The absolut value of a vector in $\mathbb{R}^3$ is:
390 \begin{equation}
391 \abs{\vek{a}}=\sqrt{a_x^2+a_y^2+a_z^2}
392 \end{equation}
393 \end{definition}
394
395 \subsubsection{The \texttt{defformel} environment}
396 There is an additional environment, which only creates a white box. It has an optional argument for the width of the box.
397 \begin{lstlisting}
398 \begin{definition}[shade=true]
399 A carbon atom with four different substituents is called \textbf{asymmetric}. Asymmetric carbon atoms often are labelled with a \textasteriskcentered.
400 ||\begin{defformel}[.5\textwidth]||
401 \setatomsep{1.8em}
402 \chemfig{R_1-[:30](-[2]R|_2)(-[6]R|_3)(-[:30,.15,,,white]{\text{\textasteriskcentered}})-[:-30]R_4}
403 ||\end{defformel}||
404 \end{definition}
405 \end{lstlisting}
406
407 \begin{definition}[shade=true]
408 A carbon atom with four different substituents is called \textbf{asymmetric}. Asymmetric carbon atoms often are labelled with a \textasteriskcentered.
409 \begin{defformel}[.5\textwidth]
410 \setatomsep{1.8em}
411 \chemfig{R_1-[:30](-[2]R|_2)(-[6]R|_3)(-[:30,.15,,,white]{\text{\stec}})-[:-30]R_4}
412 \end{defformel}
413 \end{definition}
414
415 \subsection{The \texttt{exkurs} environment}
416 The \verb=exkurs= environment is used to visually highlight an excursus (in a book or longer text) and produce an entry in the table of contents.
417 \begin{lstlisting}[numbers=none,basicstyle=\normalsize\ttfamily]
418 \begin{exkurs}[options]{title}
419 ...
420 \end{exkurs}
421 \end{lstlisting}
422 You have two options: the \verb+toc=<toclevel>+ option with \verb=section= as default and the\linebreak\verb+color=<color>+ option.
423 \begin{lstlisting}
424 ||\begin{exkurs}[color=-yellow]{Lorem ipsum}||
425 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. ...
426 ||\end{exkurs}||
427 \end{lstlisting}
428 \begin{exkurs}[color=-yellow,toc=paragraph]{Lorem ipsum}
429 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zuril delenit augue duis dolore te feugait nulla facilisi.
430 \end{exkurs}
431 If you use \verb+color=<color>+ it also chages the color in other environments. The package option \verb=english= changes the german caption "Exkurs" into "Excursus".
432
433 \section[Exercises/solutions]{The option \texttt{exercise}: numbered exercises/solutions}\label{sec:aufgaben}
434 The main part of \CEx provides the commands for exercises and their solutions, which can be activated by the package option \verb=exercise=. Exercises have "Aufgabe" or "Exercise", respectively, as default title, which can be changed with the argument.
435 \begin{lstlisting}[numbers=none,basicstyle=\normalsize\ttfamily]
436 \aufgabe{<title>}
437 \end{lstlisting}
438 For creating the solutions to the exercises, there are three commands:
439 \begin{lstlisting}[numbers=none,basicstyle=\normalsize\ttfamily]
440 \loesung[<title>]{<solution>} % remember the solution
441 \doloesung % writing the solutions sectionwise
442 \makeloesung % writing all solutions
443 \end{lstlisting}
444 The first command \verb=\loesung{}= is used, to write the solution of an exercise \emph{directly after the exercise}. The second command \verb=\doloesung= writes all the solutions gathered in the actual \verb=section= by the \verb=\loesung{}= commands. Since sections reset the counter of the exercises and \verb=\doloesung= resets gathering of the solutions, you should use \verb=\doloesung= at the end of a section. Otherwise, the numbers of the solutions might not be the numbers of the corresponding exercises anymore. If you're creating a document which has chapters, you should keep in mind, that \verb=\doloesung= should be used at the end of a chapter, if you had exercises in that chapter.\\
445 Instead of \verb=\doloesung=, you can use \verb=\makeloesung= once after \emph{all} exercises and solutions are set to write all the solutions.
446
447 \subsection{Options}
448 With the \verb+exersize=<fontsize>+ option you can change the fontsize of the exercises' and solutions' titles. Possible values are the usual ones: \verb=tiny=, \verb=scriptsize=, \verb=footnotesize=, \verb=small=, \verb=normalsize=, \verb=large=, \verb=Large=, \verb=LARGE=, \verb=huge= and \verb=Huge=.\\
449 Default font size is \verb=normalsize=.\\
450 The \verb+numcolor=<color>+ package option changes the color of the numbers with which the exercises are numbered. The \verb=english= package option translates "Aufgabe" into "Exercise" and "L\"osung" into "Solution".\\
451 In the default behaviour \CEx resets the numbers of the exercises with each new \verb=\section=. If you use the \verb=chapter= package option, the counter is reset with each new \verb=\chapter=.
452
453 \subsection{The {\ttfamily alphlist} environment}
454 The \texttt{alphlist} environment creates a list similar to the \verb=enumerate= environment, but counts the items with a), b) etc.
455 \begin{lstlisting}
456 \begin{alphlist}
457 \item first item
458 \item second item
459 \end{alphlist}
460 \end{lstlisting}
461 \begin{alphlist}
462 \item first item
463 \item second item
464 \end{alphlist}
465
466 \subsection{Example}
467 In the following example you see the \verb=\aufgabe=, \verb=\loesung= and \verb=doloesung= commands in action.
468 \begin{lstlisting}
469 % preamble:
470 \usepackage||[exercise,exersize=large]||{chemexec}
471 % Im Dokument:
472 \par{\Large\bfseries\noindent Exercises}
473 ||\aufgabe{}||
474 Write down the protolysis reactions of phosphoric acid.||\loesung{||\ce{H3PO4 <=> \Hpl{} + H2PO4\om{} <=> 2\Hpl{} + HPO4 \om[2]{} <=> 3\Hpl{} + PO4 \om[3]}||}||
475 ||\aufgabe{||Oxidation states||}||
476 Which oxidation state has nitrogen in thze following compounds: ammonia, nitric oxide, nitrogen dioxide, nitric acid?||\loesung[||Oxidation states||]{||
477 \ce{ \ox{-3}{N} H3}, \ce{ \ox{+2}{N} O}, \ce{ \ox{+4}{N} O2}, \ce{H \ox{+5}{N} O3}||}||
478 ||\aufgabe{||Nomenclature||}||
479 Name the molecules:\\\setatomsep{1.4em}
480 \begin{inparaenum}[a)]
481 \item\chemfig{-[::30](=[::60]O)-[::-60]OH}
482 \item\chemfig{-[::30](=[::60]O)-[::-60]O-[::60]-[::-60]}
483 \item\chemfig{HO-[::-30](=[::-60]O)-[::60]-[::-60]-[::60](=[::60]O)-[::-60]OH}
484 \end{inparaenum}
485 ||\loesung[||Nomenclature||]{||
486 \begin{inparaenum}[a)]
487 \item ethanoic acid
488 \item ethyl ethanoate
489 \item butanedioic acid
490 \end{inparaenum}
491 ||}||
492 ||\aufgabe{}||
493 Sketch the skeletal formula of glycerol. Also give the IUPAC name.
494 ||\loesung{\chemname{\chemfig{HO-[::-30]-[::60](-[::60]OH)-[::-60]-[::60]OH}}{1,2,3-Propantriol}}||
495 \vspace{\baselineskip}
496 \par{\Large\bfseries\noindent Solutions}
497 ||\doloesung||
498 \end{lstlisting}
499 \newpage
500 \par{\Large\bfseries\noindent Exercises}
501 \aufgabe{}
502 Write down the protolysis reactions of phosphoric acid.\loesung{\ce{H3PO4 <=> \Hpl{} + H2PO4\om{} <=> 2\Hpl{} + HPO4 \om[2]{} <=> 3\Hpl{} + PO4 \om[3]}}
503 \aufgabe{Oxidation states}
504 Which oxidation state has nitrogen in thze following compounds: ammonia, nitric oxide, nitrogen dioxide, nitric acid?\loesung[Oxidation states]{\ce{ \ox{-3}{N} H3}, \ce{ \ox{+2}{N} O}, \ce{ \ox{+4}{N} O2}, \ce{H \ox{+5}{N} O3}}
505 \aufgabe{Nomenclature}
506 Name the molecules:\\\setatomsep{1.4em}
507 \begin{inparaenum}[a)]
508 \item\chemfig{-[::30](=[::60]O)-[::-60]OH} \item \chemfig{-[::30](=[::60]O)-[::-60]O-[::60]-[::-60]} \item \chemfig{HO-[::-30](=[::-60]O)-[::60]-[::-60]-[::60](=[::60]O)-[::-60]OH}
509 \end{inparaenum}
510 \loesung[Nomenclature]{
511 \begin{inparaenum}[a)]
512 \item ethanoic acid
513 \item ethyl ethanoate
514 \item butanedioic acid
515 \end{inparaenum}
516 }
517 \aufgabe{}
518 Sketch the skeletal formula of glycerol. Also give the IUPAC name.
519 \loesung{\chemname{\chemfig{HO-[::-30]-[::60](-[::60]OH)-[::-60]-[::60]OH}}{propan-1,2,3-triol}}
520 \vspace{\baselineskip}
521 \par{\Large\bfseries\noindent Solutions}
522 \doloesung
523
524 \subsection{Bugs?}
525 It is very likely, that either \verb=\doloesung= or \verb=\makeloesung= or both have bugs. If you detect any, please let me know.
526
527 \section{Replacement for \texttt{echem.sty}}
528 The \verb=echem.sty= is part of Ingo Kl\"ockls OCHEM\footnote{\url{http://tug.ctan.org/tex-archive/support/ochem/}}. It enables the lewis representation of electrons. Additionally \verb=echem.sty= provides the commands \verb=\sbond= und \verb=\dbond= with which you can typeset a single or a double bond in normal text. Both commands are defined in the `mhchem' package as well-
529 \begin{itemize}
530 \item `mhchem':
531 \begin{itemize}
532 \item\texttt{\textbackslash ce\{F\textbackslash sbond F\}}: \ce{F\sbond F}
533 \item\texttt{\textbackslash ce\{O\textbackslash dbond O\}}: \ce{O\dbond O}
534 \end{itemize}
535 \item\newcommand{\sibond}{\,\ensuremath{\cdot}\,}\newcommand{\dobond}{\,=\,} `echem':
536 \begin{itemize}
537 \item\texttt{F\textbackslash sbond F}: F\sibond F
538 \item\texttt{O\textbackslash dbond O}: O\dobond O
539 \end{itemize}
540 \end{itemize}
541 To avoid conflicts with `mhchem' besides these two commands and the commands \verb=\2= and \verb=\3= \CEx has the same functionality as \verb=echem.sty=. So it can be used instead of \verb=echem.sty= in OCHEM's \verb=chemspecial= environment.
542 \begin{lstlisting}
543 % preamble
544 \usepackage{ochem,chemexec}
545 % in the document:
546 \begin{chemspecial}
547 ||package("chemexec")||
548 \end{chemspecial}
549 \begin{chemistry}
550 formula(L,R){
551 bond(30;-30;30)
552 branch { bond(90,=C)
553 atom("||\vdd{||O||}||O\vdd{O}");
554 }
555 bond(-30;30;-30)
556 atom("||\hdl[\echhbar]{||O||}\hdu||[\echhbar]||{||O||}||O",L,R)
557 bond(30;-30)
558 }
559 \end{chemistry}
560 \end{lstlisting}
561 \includegraphics{./formel.jpg}%\\% formel.jpg: 131x44 pixel, 100dpi, 3.33x1.12 cm, bb=0 0 94 32
562
563 \section{Epilogue}
564 I tried using real chemical reactions but I didn't make sure, that they all make sense chemically. So you shouldn't trust the examples in respect to chemistry but rather take a look into a real chemistry teaching book.\\
565 I apologize for any bad or wrong English. I hope you understood the documention anyway.
566 \end{document}