diff options
Diffstat (limited to 'macros/latex/contrib/ran_toks/examples/nested-matching.tex')
-rw-r--r-- | macros/latex/contrib/ran_toks/examples/nested-matching.tex | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/macros/latex/contrib/ran_toks/examples/nested-matching.tex b/macros/latex/contrib/ran_toks/examples/nested-matching.tex new file mode 100644 index 0000000000..c6886e2def --- /dev/null +++ b/macros/latex/contrib/ran_toks/examples/nested-matching.tex @@ -0,0 +1,150 @@ +\documentclass{article} +\usepackage{amstext} +\usepackage[forcolorpaper]{web} +\usepackage[usesumrytbls,allowrandomize]{exerquiz}[2021/05/29] +\usepackage{ran_toks}[2021/05/29] +\usepackage{multicol} + +\DeclareQuiz{Qz1} + +\useRandomSeed{1294278923} +%\useLastAsSeed + +\hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks +\hypersetup{pdfpagelayout=OneColumn} +\reversemarginpar +\showCreditMarkup + +%\previewOn\pmpvOn + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{End}] +\PTsHook{($\eqPTs^{\text{pts}}$)} +\useMCCircles + +\newcommand{\presetMatch}{\Q{1}\AddAAKeystroke{event.change=event.change.toUpperCase();}\rectW{\widthof{AA}}} + +\begin{document} + +\bRTVToks{\currQuiz} + +\begin{quiz*}{\currQuiz} +Solve each of these problems, passing is 100\%. +\begin{questions} + \begin{rtVW} + \item\PTs{2} $9+8=\RespBoxMath{17}*{1}{.0001}{[0,1]}\cgBdry[1bp] + \CorrAnsButton{17}$ + \begin{solution} + Blimey! Everyone knows that $ 9 + 8 = 17$, why don't you ? BTW, $17$ is my formerly favorite number. +\end{solution} +\end{rtVW} + + \begin{rtVW} + \item\PTs{3} Which of the following are numbers? + \begin{manswers}*{6} + \bChoices[random=true] + \Ans[-1]{0}D\eAns + \Ans[1]{1}17\eAns + \Ans[-1]{0}P\eAns + \Ans[1]{1}88\eAns + \Ans[-1]{0}S\eAns + \Ans[1]{1}105\eAns + \eChoices + \end{manswers} + \begin{solution} + Which are numbers? 17, 88, and 105, silly +\end{solution} +\end{rtVW} + + \begin{rtVW} + \item\PTs{3} $ \cos(\pi) = \RespBoxMath{-1}*{1}{.0001}{[0,1]}\cgBdry[1bp] + \CorrAnsButton{-1} $ +\begin{solution} +$ \cos(\pi) = -1 $ +\end{solution} +\end{rtVW} + + \begin{rtVW} +\item\PTs{4} $\displaystyle\frac{d}{dx}{\sin(x)}=\RespBoxMath{cos(x)}*{4}{.0001}{[0,1]}\cgBdry[1bp] + \CorrAnsButton{cos(x)} $ +\begin{solution} + $\displaystyle\frac{d}{dx}{\sin(x)}= \cos(x) $ +\end{solution} +\end{rtVW} + + \begin{rtVW} +\hideCreditMarkup + \item\PTs{3} Match the last name of the U.S. President with his first + name in the right most two columns. Each problem is worth 1 point. + +\bRTVToks{RandomQzQuesB} +\begin{rtVWi} + \PTs*{1}\RespBoxTxt[\presets{\presetMatch}\rectW{5mm}\MaxLen{1}]{0}{0}*{1}{\txtRef{willy}} Brandt + \begin{solution} + \underbar{Willy} Brandt +\end{solution} +\end{rtVWi} +\begin{rtVWi} + \PTs*{1}\RespBoxTxt[\presets{\presetMatch}\rectW{5mm}\MaxLen{1}]{0}{0}*{1}{\txtRef{roman}} Herzog + \begin{solution} + \underbar{Roman} Herzog +\end{solution} +\end{rtVWi} +\begin{rtVWi} + \PTs*{1}\RespBoxTxt[\presets{\presetMatch}\rectW{5mm}\MaxLen{1}]{0}{0}*{1}{\txtRef{konrad}} Adenauer + \begin{solution} + \underbar{Konrad} Adenauer +\end{solution} +\end{rtVWi} +\eRTVToks +\bRTVToks{RandomQzAltsB} +\begin{rtVWi} + Gustav +\end{rtVWi} +\begin{rtVWi} + \label{konrad} Konrad +\end{rtVWi} +\begin{rtVWi} + \label{willy} Willy +\end{rtVWi} +\begin{rtVWi} + \label{roman} Roman +\end{rtVWi} +\begin{rtVWi} + Ludwig +\end{rtVWi} +\begin{rtVWi} + Hermann +\end{rtVWi} +\begin{rtVWi} + Karl +\end{rtVWi} +\begin{rtVWi} + J\"{u}rgen +\end{rtVWi} +\eRTVToks + \begin{multicols}{4} + \begin{questions}[labelwidthTo={\textbf{A}}] + \hideCreditMarkup + \renewcommand{\theeqquestionnoii}{\Alph{eqquestionnoii}} + \displayListRandomly[\item]{RandomQzAltsB} + \showCreditMarkup + \end{questions} + \end{multicols} + \begin{questions} + \showCreditMarkup + \displayListRandomly[\item]{RandomQzQuesB} + \end{questions} +\end{rtVW} + \eRTVToks + \displayListRandomly{\thisQuiz} +\end{questions} +%\writeProListAux +\end{quiz*}\cgBdry[1em]\ScoreField{\currQuiz}\olBdry\CorrButton{\currQuiz}\vcgBdry[6pt] + +Answers: \AnswerField\currQuiz + +\begin{center} +\displaySumryTbl[showmarkup]{\currQuiz} +\end{center} +\end{document} |