summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/interactiveworkbook/documentation/interactiveworkbookmanual.tex
blob: 9e94e90eeef2fbf88668417f07246630a1406425 (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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
\documentclass[12pt]{article}
\usepackage{epsf}
\oddsidemargin=0in \evensidemargin=0in \textwidth=6in \topmargin=0.5in \headheight=0in
\headsep=0in
\textheight=8.5in                  % better for US Letter paper

\font\bigbf=cmbx10 scaled \magstep5

\sloppy \raggedbottom

\begin{document}

\noindent
{\LARGE\bf Interactiveworkbook Software Package} \\ \\
{J.R.D. Kuhn}, \\
{6 June 1999}, \\
{revised 18 July 2002}, \\
{Mathematics and Physics Section}, {jkuhn@purduenc.edu} \\
{Purdue University North Central, Westville, IN 46391--4197}


\section{Introduction}

\noindent The interactiveworkbook software package, along with
other packages (dvips, epsfig, color, xspace, ifthen and a pstopdf
converter), gives the user the ability to write \LaTeX\,\,
documents which, ultimately, create interactive
question--and--answer PDF--based tutorials. Interactiveworkbook is
a major revision of the software package called pdfflash, written
by Aaron Montgomery.  The main advantage this package has over
other similar packages is the ability to {\it easily} employ
mathematical symbols in an automated interactive question and
answer tutorial package.  An earlier version of this package has
been used in an Introductory Statistics course, given over the
Internet and taught at Purdue University North Central.  On the
Internet, go to:
\begin{center}
    http://faculty.purduenc.edu/jkuhn/courses/previous/workbooks/301i/301i.html
\end{center}
Interactiveworkbook was created with the assistance of IHETS grant
652 9395-2956 and so portions are copyrighted by Purdue University
North Central.

\section{What Is In The Interactiveworkbook Software Package}

The interactiveworkbook software package consists of one style
file, interactiveworkbook.sty, and eighty--six EPS files,
including:
\begin{itemize}
    \item one big buttonappearance.eps file, written in Postscript, and
    used to draw the outlines of the various buttons,
    \item forty--five small ``button'' files, written with a kind of
    Postscript called PDF and, more particularly, an set
    of PDF commands which make the language ``interactive'', called PDFmarks, and include
    \begin{itemize}
        \item fifteen files related to different {\it check} box buttons
        (each question can have up to five check boxes, where each check
        box must appear on three pages--question page, correct response page and
        incorrect response page), including
        pageonecheckone.eps, pagetwocheckone.eps, pagethreecheckone.eps, \ldots
        pageonecheckfive.eps, pagetwocheckfive.eps, pagethreecheckfive.eps,
        \item fifteen files related to different text {\it field} buttons, including
        pageonefieldone.eps, \ldots, pagethreefieldfive.eps,
        \item fifteen files related to different {\it popup} menu buttons, including
        pageonepopupone.eps, \ldots, pagethreepopupfive.eps,
        \item fifteen files related to different {\it radio} buttons, including
        pageoneradioone.eps, \ldots, pagethreeradiofive.eps,
    \end{itemize}
    \item three files related to the previous (question in the exercise),
    index (of all questions in the exercise) and next (question in the exercise) buttons;
    namely, prev.eps, ndex.eps, and next.eps, respectively, all of which use PDFmark
    commands and Javascript (and which is also true of all the remaining files described
    below),
    \item twenty buttons related to the buttons which appear on the index
    page and which link the index page of an
    exercise to all of the questions in the exercise: exerques1.eps, \ldots, exerques20.eps
    \item four submit (to see if correct or not) buttons:
    checksubmit.eps, fieldsubmit.eps, popupsubmit.eps, radiosubmit.eps,
    \item eight ``give--the--correct--answer'' (whether on the correct or incorrect
    response page) buttons:
    rightcheckcorrect.eps, wrongcheckcorrect.eps, and similar
    files for ``field'', ``popup''  and ``radio'',
    \item four ``clear--the--answer'' buttons:
    checkclear.eps, fieldclear.eps, popupclear.eps, radioclear.eps,
    \item and one return (from correct or incorrect response page to question
    page) button, return.eps.
\end{itemize}

In addition to the files in interactiveworkbook software package
and this \LaTeX\, Readme file with corresponding PDF file, there
are five \LaTeX\, files, along with their corresponding
interactive question--and--answer PDF files, including:
\begin{itemize}
    \item a sample index \LaTeX\, file, ndex.tex, and corresponding PDF
    file, ndex.pdf,
    \item \LaTeX\, and PDF files which demonstrate the use of interactive check boxes:
    check.tex and check.pdf,
    \item \LaTeX\, and PDF files which demonstrate the use of the interactive text fields:
    field.tex and field.pdf,
    \item \LaTeX\, and PDF files which demonstrate the use of the interactive popup menus:
    popup.tex and popup.pdf
    \item \LaTeX\, and PDF files which demonstrate the use of the interactive radio buttons:
    radio.tex and radio.pdf.
\end{itemize}
The five PDF files are been tied together with the ndex.pdf file
as a sample exercise.


\section{Installation Of Interactiveworkbook Software Package}

To {\it create} an interactive exercise, you must save the
interactiveworkbook style file, interactiveworkbook.sty, in the
style file location.  For WinEdt 5.3, this is in the folder
C:/texmf/tex/latex/graphics.  Also, the eighty--size EPS files are
located in the same directory as the five \LaTeX\, files listed
previously.

\section{Using The Sample Interactive PDF Exercise}

To {\it run} (as opposed to create) the sample interactive PDF
exercise, you will need to have Adobe Acrobat Reader version 4.0.
Acrobat Reader is free and available to download at Adobe's
web-site:
\begin{center}
    http://www.adobe.com
\end{center}
Click on any one of the five sample PDF files, ndex.pdf,
check.pdf, popup.pdf, field. pdf or radio.pdf, to start.

\section{Using Interactiveworkbook To Create Interactive Question--and--Answer PDF Exercises}

The interactive question--and--answer PDF {\it sample} exercise
was created running the five sample \LaTeX\, files, ndex.tex,
check.tex, popup.tex, field.tex and radio.tex, using the MiKTeX
version of \LaTeX2e on a Pentium II 16 Meg Ram, 6 Gig Hard disk,
266 MHz Aptiva PC. One style file, interactiveworkbook.sty, is
located in the /tex/latex/graphics directory and eighty--size EPS
files are located in the same directory as the five \LaTeX\, files
listed previously.

The four \LaTeX\, files, check.tex, popup.tex, field.tex and radio.tex, are all very
similar to one another.  Consequently, only one, check.tex, will be discussed in
detail here.  Documentation included in the other three files will be assumed to
suffice as enough explanation for these files.  After discussing check.tex, the index
file, ndex.tex, will be briefly described afterwards.

\subsection{check.tex}

The entire (short) check.tex program is given below.
\begin{verbatim}
    \documentclass[dvips]{article}
    \usepackage{interactiveworkbook}

    \begin{document}

    \questionandresponses{check}
    {ndex.pdf}{ndex.pdf}{popup.pdf}
    {Question 1. $\;$ A multiple check box question. \\ \\
        \noindent
        \checkone  Off \answercheckone{Off} \\
        \checktwo On \answerchecktwo{On} \\
        \checkthree  {\it no} X  \answercheckthree{Off} \\
        \checkfour  X \answercheckfour{On} \\
        \checkfive  {\it do not} click \answercheckfive{Off}
    }
    {Yes, correct.}
    {No, try again.}

    \end{document}
\end{verbatim}

The first thing to notice is that this program requires the use
of the style file, interactiveworkbook, as given in the command
``\verb+\+usepackage\{interactiveworkbook\}'', otherwise the special
commands, described below, will not function.

The command ``\verb+\+questionandresponses'' has {\it seven} arguments.
(Notice that all seven arguments are enclosed with brackets, ``\{\}''.)
\begin{itemize}
    \item The first argument, ``check'', tells interactiveworkbook that the type
    of question being asked in this case will involve check boxes.  This first argument
    may take on one of following four values:
    \begin{center}
        check, popup, field or radio
    \end{center}
    \item The second, third and fourth arguments, give the name of the PDF files
    that a user jumps to when clicking on the Previous, Index and Next buttons,
    respectively.  In this case, a user jumps back to the Index file, ndex.pdf, when
    clicking on either the Previous or Index buttons, but jumps to the popup.pdf
    file, when clicking on the Next button.
    \item The question asked is given in the fifth argument.  In this case, it
    is question 1, a check box question which uses five check boxes.

    The five check boxes are called ``\verb+\+checkone'', through to ``\verb+\+checkfive''.
    The twenty possible commands are:
    \begin{itemize}
        \item \verb+\+checkone, ...,  \verb+\+checkfive, {\it or}
        \item \verb+\+popupone, ...,  \verb+\+popupfive, {\it or}
        \item \verb+\+fieldone, ...,  \verb+\+fieldfive, {\it or}
        \item \verb+\+radioone, ...,  \verb+\+radiofive.
    \end{itemize}
    There can only be five possible answers, all of one type for a
    single question.  This command {\it must} match up with the first argument of
    ``\verb+\+questionandresponses''.  For example, although it is possible to use
    ``\verb+\+popupone'' in a ``popup'' type of question, it is not possible to use
    this command, here, in a ``check'' type of question.

    In addition to the check boxes, the question giver also provides the correct
    answers to the check boxes. The five answers to the check boxes are called
    ``\verb+\+answercheckone'', through to ``\verb+\+answercheckfive''. The twenty
    possible commands are:
    \begin{itemize}
        \item \verb+\+answercheckone, ...,  \verb+\+answercheckfive,
        \item \verb+\+answerpopupone, ...,  \verb+\+answerpopupfive,
        \item \verb+\+answerfieldone, ...,  \verb+\+answerfieldfive,
        \item \verb+\+answerradioone, ...,  \verb+\+answerradiofive.
    \end{itemize}
    In this case, the correct answer has check boxes two
    and four ``On'' (or Xed), and check boxes one, three and five ``Off''.  These
    answers do not appear on the question page.  They appear on either the correct
    response page or incorrect response pages, if requested by the question taker.
    \item Correct response and incorrect response comments are given in the sixth
    and seventh arguments.  The correct response comment, in this case is ``Yes, correct.'',
    whereas the incorrect response comment is ``No, try again.''.  These comments
    appear below the question on the correct and incorrect pages of the interactive
    PDF file.
\end{itemize}

\subsection{ndex.tex}

The entire (short) check.tex program is given below.
\begin{verbatim}
    \documentclass[dvips]{article}
    \usepackage{interactiveworkbook}

    \begin{document}

    \exerciseintroduction{Index. $\;$ This is an index of, at most, twenty questions:
    a multiple check box question, a multiple popup question, a multiple text
    field question and a radio button question.
    }

    \vspace{.2in}
    \exerquessetupone{check.pdf}
    \exerquessetuptwo{popup.pdf}
    \exerquessetupthree{field.pdf}
    \exerquessetupfour{radio.pdf}
    \vdots
    \exerquessetuptwenty{radio.pdf}

    \begin{center}
    \begin{tabular}{||lc|lc||} \hline
        Q1. Check & \exerquesone   & Q11. Field & \exerqueseleven \\ \hline
        Q2. Popup & \exerquestwo   & Q12. Radio & \exerquestwelve\\ \hline
        Q3. Field & \exerquesthree & Q13. Check & \exerquesthirteen\\ \hline
        Q4. Radio & \exerquesfour  & Q14. Popup & \exerquesfourteen\\ \hline
        Q5. Check & \exerquesfive   & Q15. Field & \exerquesfifteen \\ \hline
        Q6. Popup & \exerquessix   & Q16. Radio & \exerquessixteen\\ \hline
        Q7. Field & \exerquesseven & Q17. Check & \exerquesseventeen\\ \hline
        Q8. Radio & \exerqueseight  & Q18. Popup & \exerqueseighteen\\ \hline
        Q9. Check & \exerquesnine & Q19. Field & \exerquesnineteen\\ \hline
        Q10. Popup & \exerquesten  & Q20. Radio & \exerquestwenty\\ \hline
    \end{tabular}
    \end{center}
\end{verbatim}

The introductory blurb to this sample PDF exercise is given in the argument
of the command ``\verb+\+exerciseintroduction''.  In this case, it starts,
``Index.  This is \ldots.''.
The ``\verb+\+exerquessetupone'', through to ``\verb+\+exerquessetuptwenty'',
give the names of the four (there can be as many as twenty) PDF questions in this exercise.
The ``\verb+\+exerquesone'', through to ``\verb+\+exerquestwenty'' commands
creates twenty (but can be fewer) index buttons.

\section{What is an Interactive Question--and--Answer PDF Exercise?}

A user (or question taker) submits an answer to an interactive PDF
question and the computer responds as to whether or not the given
answer is correct (matches a preset answer). An interactive index
is a PDF file which not only lists all of the questions in the
exercise, but also allows the question taker to jump from this
index to any particular question on the list.  An interactive
question--and--answer PDF exercise is a series of interactive PDF
questions tied together by an interactive index.

A sample interactive question--and--answer PDF exercise has been
included with this interactive software package.  In addition to
the PDF index, called ndex.pdf, there are four interactive PDF
question--and--answer files, which demonstrate the four basic
different question types, in this sample exercise.  The four
interactive PDF files are given below.
\begin{itemize}
    \item {\it check.pdf}.  In this type of question, five (although less can be used)
    check boxes are displayed as part of the question.  The question taker answers the
    question by choosing none, one or more of these check boxes.
    \item {\it field.pdf}.  Five (although less can be used)
    text fields are displayed.  The question taker answers this fill--in--the--blank
    kind of question by typing answers into these text fields.
    \item {\it popup.pdf} Five (although less can be used) popup menus are displayed.
    Each of the five popup menu provides the question taker with nine choices, ``a'', ``b'',
    \ldots, ``i''.
    \item {\it radio.pdf}. Five (although less can be used) radio buttons are displayed.
    The question taker answers the question by choosing one (and {\it only} one) of
    these radio buttons.
\end{itemize}
Although these four button types have been positioned in a
particular way for this sample exercise, they can, in fact, be
positioned {\it anywhere} on the question page.

Whether a check, field, popup or radio type of question, all
interactive PDF files have three pages.  The first page of the
file displays the question, the second page displays information
if the question taker gives a correct response to the question and
the third page displays information if the question taker gives an
{\it in}correct response to the question.

The question page of each interactive PDF file has a number of
different components. In addition to the question (check, field,
popup or radio), there are five {\it navigational} buttons located
at the bottom of this page.
\begin{itemize}
    \item {\it Clear}.  This button, on the lower left of the question page, clears
    the question page of any answers.
    \item {\it Submit}. Clicking on this button on the lower right of the question
    page both determines whether the given answer is correct or not and then jumps
    to either to the correct response page or incorrect response page.
    \item {\it Previous.} By clicking on this lower middle button, a jump is made
    {\it outside} the present question to the previous question in the interactive
    {\it exercise}.
    \item {\it Index.} By clicking on this lower middle button, a jump is made
    outside the present question to the index PDF file in the interactive
    exercise.
    \item {\it Next.} By clicking on this lower middle button, a jump is made
    outside the present question to the {\it next} question in the interactive
    exercise.
\end{itemize}
The position of the navigational buttons cannot be altered from
the positions displayed in the sample interactive PDF exercise.

The correct response and incorrect response pages of each
interactive PDF file have a number of different components.
First, a {\it blank} version of the question (check, field, popup
or radio), given on the first page, is displayed on both of these
two pages.  Second, either a (blue colored) correct response
comment or a (red colored) incorrect response comment are shown
just below the (black colored) question.  Third, there are five
{\it navigational} buttons located at the bottom of this page. As
on the question page, the Previous, Index and Next buttons are
given in the lower middle of both the correct and incorrect
response pages.  In addition to these three buttons, there are two
other buttons.
\begin{itemize}
    \item {\it Answer}.  This button, on the lower left of the question page, fills
    the blank question page with correct answers.
    \item {\it Return}. Clicking on this button on the lower right of the question
    page returns the user from either the correct response page or incorrect response
    page back to the first (question) page of the current interactive
    PDF question.
\end{itemize}

The sample interactive index PDF file, unlike the interactive
question--and--answer PDF file, consists of one page.  This page
has two components.  The first component consists of introductory
remarks on the questions which make up the exercise.  The second
component consists of a list of twenty (although less can be used)
buttons.  Each of these buttons links to one of the four (although
there could be as many as twenty) questions which make up this
sample exercise.  The index buttons can be positioned anywhere on
the index page.

\end{document}