\ProvidesPackage{result3}% [1997/09/12 Lines for student responses and answers] % file: resultan.sty % The command result will always use the full line width, and will be % indented correctly, even when in a list. % Written by Nick Urbanik. \RequirePackage{ifthen,pifont} \newcounter{numLinesResult}% \reversemarginpar \newcommand{\resultLineSpace}{7mm} % There must be a way to make these declarations local: \newlength{\indentLen}% \newlength{\bigLabelWidth}% \newlength{\outerParIndent}% \newlength{\DingWidth}% \setlength{\DingWidth}{10.5mm}% bigger, moves result{}{} arrow left. %\setlength{\marginparwidth}{30pt} \providecommand*{\writeSymbol}{\ding{48}}% A pencil pointing up, to right. %\providecommand*{\writeSymbol}{\ding{43}}% A hand pointing to the right. %\providecommand*{\writeSymbol}{\ding{45}}% A hand holding a pen %\providecommand*{\writeSymbol}{\ding{253}}% A big fat arrow pointing right % Usage: %\result[bigLabel]{numLines}{theQuestion}{theSolution} \newcommand{\result}[4][Write results:]{{% \settowidth{\bigLabelWidth}{#1} \setlength{\parskip}{0pt}% \outerParIndent=\parindent% %\setlength{\parindent}{0pt}% \par% %\vspace{4ex}% \bigbreak% See page 131 of Wynter Snow (Love her name!) \setlength{\indentLen}{\linewidth}% \addtolength{\indentLen}{-\textwidth}% \addtolength{\indentLen}{-\parindent}% \hspace*{\indentLen}% \noindent\parbox[t]{\textwidth}{% \setlength{\parindent}{\outerParIndent}% \par% \ifthenelse{\lengthtest{\bigLabelWidth > 0pt}}% {\noindent\textbf{\Large #1}\hspace{2em}}% %else {}% \noindent#3% \par% % \vspace{.5ex}% \vspace{0ex}% \par% \noindent\raisebox{0pt}[0pt][0pt]% {% \makebox[0pt][r]% {% \makebox[\DingWidth][l]% {% \raisebox{-\resultLineSpace}[0pt][0pt]{\writeSymbol}% }% }% }% % \mbox{}\marginpar{\raggedleft\makebox[12mm][r]{\writeSymbol}}% \setcounter{numLinesResult}{#2}% \ifthenelse{\boolean{Solutions}}% {\par\vspace{1ex}\par\noindent\textbf{Solution: \ }#4}% %else {% \whiledo{\value{numLinesResult} > 0}% {% \vspace*{\resultLineSpace}% \par% \noindent\hrule% %\noindent\rule{\textwidth}{.4pt}% \addtocounter{numLinesResult}{-1}% }% }% }% \bigbreak% See page 131 of Wynter Snow (Love her name!) %\vspace{4ex}% }} % Usage: % \LinesForWriting{numLines}{A solution to the problem} \newcommand{\LinesForWriting}[2]{{% \setlength{\parskip}{0pt}% %\setlength{\parindent}{0pt}% \par% % \smallbreak% See page 131 of Wynter Snow (Love her name!) % \vspace{1.5ex}% \vspace*{-1ex}% \par% % \noindent\makebox[0pt][r]{\makebox[\DingWidth][l]{\writeSymbol}}% \mbox{}% \marginpar% [{ \raggedright% \protect% \makebox[50pt][r]% {% \raisebox{-\resultLineSpace}[0pt]{\writeSymbol}% }% }]% {% \raggedright% \protect% \makebox[50pt][r]% {% \raisebox{-\resultLineSpace}[0pt]{\writeSymbol}% }% }% \setcounter{numLinesResult}{#1}% \ifthenelse{\boolean{Solutions}}% {\par\vspace{1ex}\par\noindent\textbf{Solution: \ }#2}% %else {% \whiledo{\value{numLinesResult} > 0}% {% \vspace*{\resultLineSpace}% \par% \noindent\hrule% %\noindent\rule{\textwidth}{.4pt}% \addtocounter{numLinesResult}{-1}% }% }% %\vspace{4ex}% \bigbreak% See page 131 of Wynter Snow (Love her name!) }}