%% %% This is file `exercise.sty' generated %% on <1991/12/4> with the docstrip utility (v1.1l test). %% %% The original source file was `exercise.doc'. %% %% %% Copyright (C) 1991 by Anselm Lingnau. All rights reserved. %% %% IMPORTANT NOTICE: %% %% You are not allowed to change this file. You may however copy this file %% to a different name and then change this copy. %% %% You are allowed to distribute this file under the condition that it is %% distributed together with all files mentioned in the appropriate README %% file. If you received only some of these files from someone, complain! %% %% You are NOT ALLOWED to distribute this file alone. You are NOT ALLOWED %% to take money for the distribution or use of this file (or a changed %% version) except for some nominal charge for copying etc. %% %% Error Reports in case of UNCHANGED versions to %% %% Anselm Lingnau %% Buchenweg 1 %% D-6239 Eppstein 2 %% Federal Republic of Germany %% Internet: %% \def\fileversion{v1.0c} \def\filedate{91/10/08} \def\docdate{91/10/08} %% \CheckSum{139} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% %% Style-option `exercise' to use with LaTeX v2.09 %% Copyright (C) 1991 by Anselm Lingnau, all rights reserved. \@ifundefined{exercise}{}{\endinput} \wlog{Style-Option: `exercise' \fileversion \space <\filedate> (AL)} \wlog{English Documentation \@spaces \@spaces \space <\docdate> (AL)} \newcounter{exercise} \newif\if@exnofixed \def\numberexercises#1{% \if@exnofixed\@warning{Exercise numbering already fixed} \else\@addtoreset{exercise}{#1}% \renewcommand{\theexercise}{\csname the#1\endcsname--\arabic{exercise}}\fi \@exnofixedtrue} \def\exercisehead#1#2{\def\exercise@head{#1{\theexercise}#2}} \exercisehead{\bf}{} \def\exenvname{exercise} \def\exercise{\medbreak\@exnofixedtrue \refstepcounter{exercise}\trivlist\item[]{\exercise@head}} \def\endexercise{\endtrivlist} \def\answer{% \ifx\@currenvir\exenvname\let\next\@answer \else\let\next\@answererr\fi\next} \def\@answererr{\errhelp{There may be no unmatched `\begin' between the^^J`\begin{exercise}' and `\answer'.}% \errmessage{LaTeX error: Wrong \string\answer\space (current environment is `\@currenvir')}% \edef\@tempa{{\@currenvir}} \expandafter\end\@tempa \answer} \def\@answer{% \immediate\write\ans{\string\ansno{\theexercise}} \let\do\@makeother\dospecials \catcode`\^^M\active \let\verbatim@processline=\answer@processline \verbatim@start} \def\answer@processline{\immediate\write\ans{\the\verbatim@line}} \def\exercisetitle{Exercises} \@ifundefined{chapter}{\let\exsection\subsection}% {\let\exsection\section} \newenvironment{exercises}{\exsection*{\exercisetitle}}{} \newwrite\ans \immediate\openout\ans=\jobname.ans \typeout{Writing answers to \jobname.ans.} \def\listanswers{\immediate\closeout\ans \input\jobname.ans\relax} \def\ansno#1{\par{\def\theexercise{#1}\exercise@head}} \endinput %% %% End of file `exercise.sty'.