Debian Codegraph @

texmf-dist/doc/latex/interactiveworkbook/samplefiles/popup.tex

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 % POPUP MENU LATEX FILE EXAMPLE: USES QUESTIONANDRESPONSES COMMAND, 7 ARGUMENTS
4 % 1ST ARGUMENT INDICATES THIS IS "POPUP" TYPE QUESTION
5 % 2ND, 3RD, 4TH ARGUMENTS GIVE NAMES OF PREVIOUS, INDEX, NEXT LINKING FILES
6 % 5TH ARGUMENT GIVES QUESTION, WITH UP TO 5 MENUS, AND
7 % WHATEVER THESE MENUS ARE SET TO (A,B,C,D,E,F,G,H OR I)
8 % 6TH, 7TH ARGUMENTS GIVE RESPONSES IF USER ANSWER CORRECT OR INCORRECT
9 %
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11 \documentclass[dvips]{article}
12 \usepackage{interactiveworkbook} % put in style directory; cannot appear in any other directory
13
14 \begin{document}
15
16 % questionandresponses command has *seven* arguments
17
18 \questionandresponses{popup} % popup menu kind of question, needed in style file
19 {check.pdf}{ndex.pdf}{field.pdf} % previous, index and next files are 2nd, 3rd, 4th arguments
20 { Question 2. $\;$ A multiple popup question. % question is 5th argument
21 \begin{center}
22 a is correct \popupone \answerpopupone{a} $\quad$ % user gives "a" as the correct answer
23 try b \popuptwo \answerpopuptwo{b} $\quad$ % question giver gives "b" as the correct answer
24 c, not "c" \popupthree \answerpopupthree{c} \\ % "popupthree" is what question taker sees
25 g \popupfour \answerpopupfour{g} $\quad$
26 and i \popupfive \answerpopupfive{i}
27 \end{center}
28 } % end of 5th argument
29 {Yes, correct, because all choices correspond to the preset answers.} % correct response hint
30 {No, try again.} % incorrect response hint is 7th argument
31
32 \end{document}