Debian Codegraph @

texmf-dist/doc/latex/ran_toks/examples/nested-matching.tex

raw
1 \documentclass{article}
2 \usepackage{amstext}
3 \usepackage[forcolorpaper]{web}
4 \usepackage[usesumrytbls,allowrandomize]{exerquiz}[2021/05/29]
5 \usepackage{ran_toks}[2021/05/29]
6 \usepackage{multicol}
7
8 \DeclareQuiz{Qz1}
9
10 \useRandomSeed{1294278923}
11 %\useLastAsSeed
12
13 \hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks
14 \hypersetup{pdfpagelayout=OneColumn}
15 \reversemarginpar
16 \showCreditMarkup
17
18 %\previewOn\pmpvOn
19
20 \useBeginQuizButton[\CA{Begin}]
21 \useEndQuizButton[\CA{End}]
22 \PTsHook{($\eqPTs^{\text{pts}}$)}
23 \useMCCircles
24
25 \newcommand{\presetMatch}{\Q{1}\AddAAKeystroke{event.change=event.change.toUpperCase();}\rectW{\widthof{AA}}}
26
27 \begin{document}
28
29 \bRTVToks{\currQuiz}
30
31 \begin{quiz*}{\currQuiz}
32 Solve each of these problems, passing is 100\%.
33 \begin{questions}
34 \begin{rtVW}
35 \item\PTs{2} $9+8=\RespBoxMath{17}*{1}{.0001}{[0,1]}\cgBdry[1bp]
36 \CorrAnsButton{17}$
37 \begin{solution}
38 Blimey! Everyone knows that $ 9 + 8 = 17$, why don't you ? BTW, $17$ is my formerly favorite number.
39 \end{solution}
40 \end{rtVW}
41
42 \begin{rtVW}
43 \item\PTs{3} Which of the following are numbers?
44 \begin{manswers}*{6}
45 \bChoices[random=true]
46 \Ans[-1]{0}D\eAns
47 \Ans[1]{1}17\eAns
48 \Ans[-1]{0}P\eAns
49 \Ans[1]{1}88\eAns
50 \Ans[-1]{0}S\eAns
51 \Ans[1]{1}105\eAns
52 \eChoices
53 \end{manswers}
54 \begin{solution}
55 Which are numbers? 17, 88, and 105, silly
56 \end{solution}
57 \end{rtVW}
58
59 \begin{rtVW}
60 \item\PTs{3} $ \cos(\pi) = \RespBoxMath{-1}*{1}{.0001}{[0,1]}\cgBdry[1bp]
61 \CorrAnsButton{-1} $
62 \begin{solution}
63 $ \cos(\pi) = -1 $
64 \end{solution}
65 \end{rtVW}
66
67 \begin{rtVW}
68 \item\PTs{4} $\displaystyle\frac{d}{dx}{\sin(x)}=\RespBoxMath{cos(x)}*{4}{.0001}{[0,1]}\cgBdry[1bp]
69 \CorrAnsButton{cos(x)} $
70 \begin{solution}
71 $\displaystyle\frac{d}{dx}{\sin(x)}= \cos(x) $
72 \end{solution}
73 \end{rtVW}
74
75 \begin{rtVW}
76 \hideCreditMarkup
77 \item\PTs{3} Match the last name of the U.S. President with his first
78 name in the right most two columns. Each problem is worth 1 point.
79
80 \bRTVToks{RandomQzQuesB}
81 \begin{rtVWi}
82 \PTs*{1}\RespBoxTxt[\presets{\presetMatch}\rectW{5mm}\MaxLen{1}]{0}{0}*{1}{\txtRef{willy}} Brandt
83 \begin{solution}
84 \underbar{Willy} Brandt
85 \end{solution}
86 \end{rtVWi}
87 \begin{rtVWi}
88 \PTs*{1}\RespBoxTxt[\presets{\presetMatch}\rectW{5mm}\MaxLen{1}]{0}{0}*{1}{\txtRef{roman}} Herzog
89 \begin{solution}
90 \underbar{Roman} Herzog
91 \end{solution}
92 \end{rtVWi}
93 \begin{rtVWi}
94 \PTs*{1}\RespBoxTxt[\presets{\presetMatch}\rectW{5mm}\MaxLen{1}]{0}{0}*{1}{\txtRef{konrad}} Adenauer
95 \begin{solution}
96 \underbar{Konrad} Adenauer
97 \end{solution}
98 \end{rtVWi}
99 \eRTVToks
100 \bRTVToks{RandomQzAltsB}
101 \begin{rtVWi}
102 Gustav
103 \end{rtVWi}
104 \begin{rtVWi}
105 \label{konrad} Konrad
106 \end{rtVWi}
107 \begin{rtVWi}
108 \label{willy} Willy
109 \end{rtVWi}
110 \begin{rtVWi}
111 \label{roman} Roman
112 \end{rtVWi}
113 \begin{rtVWi}
114 Ludwig
115 \end{rtVWi}
116 \begin{rtVWi}
117 Hermann
118 \end{rtVWi}
119 \begin{rtVWi}
120 Karl
121 \end{rtVWi}
122 \begin{rtVWi}
123 J\"{u}rgen
124 \end{rtVWi}
125 \eRTVToks
126 \begin{multicols}{4}
127 \begin{questions}[labelwidthTo={\textbf{A}}]
128 \hideCreditMarkup
129 \renewcommand{\theeqquestionnoii}{\Alph{eqquestionnoii}}
130 \displayListRandomly[\item]{RandomQzAltsB}
131 \showCreditMarkup
132 \end{questions}
133 \end{multicols}
134 \begin{questions}
135 \showCreditMarkup
136 \displayListRandomly[\item]{RandomQzQuesB}
137 \end{questions}
138 \end{rtVW}
139 \eRTVToks
140 \displayListRandomly{\thisQuiz}
141 \end{questions}
142 %\writeProListAux
143 \end{quiz*}\cgBdry[1em]\ScoreField{\currQuiz}\olBdry\CorrButton{\currQuiz}\vcgBdry[6pt]
144
145 Answers: \AnswerField\currQuiz
146
147 \begin{center}
148 \displaySumryTbl[showmarkup]{\currQuiz}
149 \end{center}
150 \end{document}