summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ran_toks/examples/nested-matching.tex
blob: c6886e2def1b6d48e99b8dafaf01e86235f3f733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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}