summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/eqexam/examples/selectversion_tst.tex
blob: 9c43ce6e7930c8533574a2c73f7398c2aab3ccc6 (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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
\documentclass{article}
\usepackage[fleqn]{amsmath}
%
% Try these various options.
%
\usepackage[pointsonleft,nototals,forpaper,useforms,
% Select exactly one of the next three options
%    nosolutions,
%    answerkey,
    vspacewithsolns,
    obeylocalversions, % try this in combination with
]{eqexam}

\university
{%
      NORTHWEST FLORIDA STATE COLLEGE\\
          Department of Mathematics
}
\email{storyd@nwfsc.edu}

\examNum{1}\numVersions{5}\forVersion{e}
\subject[CA]{College Algebra}
\longTitleText
    {Test~{\nExam} A}
    {Test~{\nExam} B}
    {Test~{\nExam} C}
    {Test~{\nExam} D}
    {Test~{\nExam} E}
\endlongTitleText
\shortTitleText
    {T\nExam-A}
    {T\nExam-B}
    {T\nExam-C}
    {T\nExam-D}
    {T\nExam-E}
\endshortTitleText
\title[\sExam]{\Exam}
\author{Dr.\ D. P. Story}
\date{\thisterm, \the\year}
\duedate{09/30/09}
\keywords{MAC 1105, Exam \nExam, {\thisterm} semester, \theduedate, at NWFSC}

\newcommand{\cs}[1]{\texttt{\char`\\#1}}
\solAtEndFormatting{\eqequesitemsep{3pt}}
\turnContAnnotOn


\begin{document}

\maketitle

\begin{exam}{T1}

\begin{eqComments}[Instructions:]
This file was used to test the revised definitions of
\cs{longTitleText} \cs{shortTitleText}, and \cs{selectVersion}. This
file has 5 versions, \verb!\numVersions{5}!; however, not every
problem has this number of versions, some have 2, other have 3 or 4.
When you specify a value of \cs{forVersion}, and each problem has a
\cs{selectVersion}, \textsf{eqexam} will perform modular arithmetic
on the number of available versions of a problem, in this way each
problem will be properly posed; consequently, when we say
\verb!\forVersion{e}!, we get version B for the first problem,
version A for 2(a), and so on. Try compiling with other values for
\cs{forVersion} (a--e).

Try compiling the document with the with the \texttt{vspacewithsolns} option
\begin{verbatim}
    \usepackage[vspacewithsolns.pointsonleft,nototals,forpaper,useforms]{eqexam}
\end{verbatim}
The solutions appear at the end of the document, note the solutions
match to the version selected for the question.  This required a
little trick with the solutions file, and requires the exerquiz
package dated 2009/10/05 or later, if one of the pdf options is
used (\texttt{pdf}, \texttt{links}, \texttt{online},
\texttt{email}).

After you have exhausted yourself, try using the \texttt{obeylocalversions} option,
for this to work correctly, you need to comment out the \cs{forVersion} specification
in the preamble.  Go through the file and select one of the versions, by specifying
the first argument of the \cs{selectVersion} command.

Another feature, apropos to the \texttt{obeylocalversions} option is the optional
argument of \cs{longTitleText} and \cs{shortTitleText}. If you say
\cs{longTitleText[b]}, the second title is selected for display in the document;
similarly, for \cs{shortTitleText}. The optional argument can also be used
when \texttt{obeylocalversions}, and the version is set by \cs{forVersion}.
\end{eqComments}

\selectVersion{}{3}
\begin{problem}[5]
\verb!\selectVersion{}{3}! This problem is version \vA{A}\vB{B}\vC{C} of 3.

\begin{solution}
The first problem, version \vA{A}\vB{B}\vC{C} of 3.
\end{solution}
\end{problem}

\begin{problem*}[2ea]
Multi-part question.
    \begin{parts}
\selectVersion{}{4}
    \item \verb!\selectVersion{}{4}! This is problem, version \vA{A}\vB{B}\vC{C}\vD{D} of 4.
\begin{solution}
This is version \vA{A}\vB{B}\vC{C}\vD{D}

The answer is:
\begin{verA}
This is version A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verC}
This is version C
\end{verC}
\begin{verD}
This is version D
\end{verD}
\end{solution}

\selectVersion{}{3}
    \item \verb!\selectVersion{}{3}! This is a problem, version \vA{A}\vB{B}\vC{C} of 3.
\begin{verA}
This is A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verE}
This is version E
\end{verE}

\begin{solution}
This is version \vA{A}\vB{B}\vC{C}\vD{D}

The answer is:
\begin{verA}
This is version A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verC}
This is version C
\end{verC}
\begin{verD}
This is version D
\end{verD}
\end{solution}

\pushProblem
\begin{eqComments}
We insert a new page command so we can see the shortened titles on the next page
to verify that the new system of title management is working correctly.
\end{eqComments}
\emitMessageNearBottom*[.5\textheight]{%
    \vfill\hfill\textbf{Problem~{\eqeCurrProb} continues on next page}}
\popProblem

\selectVersion{}{5}
    \item \verb!\selectVersion{}{5}! This is a problem, version \vA{A}\vB{B}\vC{C}\vD{D}\vE{E} of 5.

\begin{verB}
This is version B
\end{verB}
\begin{verE}
This is version E
\end{verE}

\begin{solution}
This is version \vA{A}\vB{B}\vC{C}\vD{D}\vE{E}

The answer is:
\begin{verB}
This is version B
\end{verB}
\begin{verE}
This is version E
\end{verE}
\end{solution}

\selectVersion{}{4}
    \item \verb!\selectVersion{}{4}! This is a problem, version \vA{A}\vB{B}\vC{C}\vD{D} of 4.
\begin{verA}
This is A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verE}
This is version E
\end{verE}
\begin{solution}
This is version \vA{A}\vB{B}\vC{C}\vD{D}\vE{E}.

The answer is:
\begin{verA}
This is version A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verC}
This is version C
\end{verC}
\begin{verD}
This is version D
\end{verD}
\begin{verE}
This is version E
\end{verE}
\end{solution}

\end{parts}
\end{problem*}


\end{exam}

\end{document}