\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}