% % this is a style file for generating worksheets for mathematics % workshops. % % % creation: 01 may 1995 % small revision: 03 sep 1995 % small revision: 30 sep 2000 [added header macro] % % maintained by: randall j pruim % (escholar@archives.math.utk.edu, rpruim@calvin.edu) % % please send comments, suggests, etc to one of the addresses above. % % please do NOT modify this file. % if you should wish to add or modify functionality of this style, % this file can be input as-is into a local style. % % % \input environ \makeatletter \newcounter{probnum} \newcounter{subprobnum} \newcount\temp@count \newcount\col@num \newcount\max@col \def\resetprobnum{ \setcounter{probnum}{0} } \def\thesubprobnum{\mbox{\alph{subprobnum})}} \def\theprobnum{\mbox{\arabic{probnum}}} \newif\if@showSolSubProb \gdef\solsUseSubProbs{\@showSolSubProbtrue} \gdef\solsDontUseSubProbs{\@showSolSubProbfalse} \newif\if@showid \def\showIDs{\@showidtrue} \def\hideIDs{\@showidfalse} \hideIDs \def\probid#1{\if@showid [#1]\else \relax \fi} \newif\if@showtopics \def\showtopics{\@showtopicstrue} \def\hidetopics{\@showtopicsfalse} \hidetopics \def\topic#1{\if@showtopics {\it[#1]}\else \relax \fi} \newenvironment{sbprobs}% { \renewcommand{\labelenumii}{\alph{enumii})}% \begin{enumerate}% \temp@count=\value{subprobnum}% \setcounter{enumii}{\temp@count}% }% { \temp@count=\value{enumii}% \setcounter{subprobnum}{\temp@count}% \end{enumerate}% } \def\beginsubprobs{\begin{sbprobs}}% \def\endsubprobs{\end{sbprobs}}% \def\endsubprobtab{\\ \end{tabular}\end{center}} \def\subprob{\refstepcounter{subprobnum}\mbox{\alph{subprobnum})}~}% % the macro \subhang is really obsolete. it was used in some onlder files, % but should be avoided now. \def\subhang{\hangindent\labelwidth\advance\hangindent\labelsep}% \def\beginprob{% \begingroup \renewcommand{\labelenumi}{\large\bf\arabic{enumi}.} \begin{enumerate}% \setcounter{subprobnum}{0} \temp@count=\value{probnum}% \setcounter{enumi}{\temp@count}% \item } \def\endprob{\end{enumerate}% \temp@count=\value{enumi}% \setcounter{probnum}{\temp@count}% \endgroup} % to import encapsulated postscript figures: % \def\figpath#1{\def\fig@path{#1}} \figpath{} \def\epsfig#1#2{% \epsfxsize=#1\epsfbox{\fig@path #2}% \typeout{PostScript Figure: {#2}. Use a PostScript Driver.}} % for definitions by case. \def\cases#1{\left\{\mbox{% \begin{tabular}{@{$}l@{$\qquad}l} #1 \end{tabular}% }\right.} % these can be used to group problems which belong together. % currently there is no official support for this. but these % macros could be modified to do something. in house, at the % University of Wisconsin, they are used to bind problems together % in software which generates worksheets. % \def\beginprobseq{\relax} \def\endprobseq{\relax} % smaller margins than laTeX uses for its article style. \setlength{\textwidth}{7 in} \setlength{\oddsidemargin}{0pt} \hoffset=-.3in \setlength{\textheight}{9.0in} \setlength{\topmargin}{-.2in} \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Solutions stuff %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newtoks\tempTok \newwrite\solFile% \immediate\openout\solFile=\jobname.sol \long\def\saveSolution#1{% \immediate\write\solFile{\string\begingroup\string\bf }% \immediate\write\solFile{\expandafter\arabic{enumi}}% %\if@showSolSubProb\immediate\write\solFile{\expandafter\alph{enumii}}\fi% %\immediate\write\solFile{\expandafter\alph{enumii}}% \immediate\write\solFile{\string\endgroup}% \tempTok={#1}% \immediate\write\solFile{\the\tempTok}% \immediate\write\solFile{}% } \long\def\writeToSolFile#1{% \immediate\write\solFile{#1}% %\immediate\write\solFile{}% } \long\def\tokWriteToSolFile#1{% \tempTok={#1} \immediate\write\solFile{\the\tempTok}% %\immediate\write\solFile{}% } \long\def\sol#1{\saveSolution{#1}} \long\def\solpage#1{% \immediate\write\solFile{\string\pagebreak}% \saveSolution{#1}% } \def\solutions{% \begingroup \section*{Solutions} \immediate\closeout\solFile \parindent=0pt \input \jobname.sol \endgroup } \def\nameBlank{Name \rule{2.5in}{.5pt}} \def\header#1#2{% course, term \noindent #1 \noindent #2 \hfill \nameBlank } \def\bp{\beginprob} \def\ep{\endprob} \def\bsp{\beginsubprobs} \def\esp{\endsubprobs}