Debian Codegraph @

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

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 % TEXT FIELD LATEX FILE EXAMPLE: USES QUESTIONANDRESPONSES COMMAND, 7 ARGUMENTS
4 % 1ST ARGUMENT INDICATES THIS IS "FIELD" TYPE QUESTION
5 % 2ND, 3RD, 4TH ARGUMENTS GIVE NAMES OF PREVIOUS, INDEX, NEXT LINKING FILES
6 % 5TH ARGUMENT GIVES QUESTION, WITH UP TO 5
7 % BLANK TEXT FIELDS FOR QUESTION TAKER (USER); APPEAR ON SCREEN
8 % ANSWER TEXT FIELDS FOR QUESTION GIVER; DO NOT APPEAR ON SCREEN
9 % 6TH, 7TH ARGUMENTS GIVE RESPONSES IF USER ANSWER CORRECT OR INCORRECT
10 %
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \documentclass[dvips]{article}
13 \usepackage{interactiveworkbook} % put in style directory; cannot appear in any other directory
14
15 \begin{document}
16
17 \questionandresponses{field} % tells style file choose fieldclear, fieldsubmit buttons
18 {popup.pdf}{ndex.pdf}{radio.pdf} % previous, index and next files are 2nd, 3rd, 4th arguments
19 { % question and responses has *seven* arguments
20 Question 3. $\;$ A multiple text field question.
21 % question is 5th argument
22 \begin{center}
23 % "field..." shows blank text fields on screen; "answerfield..." not shown on screen
24 % question taker (user) types answer in "field..."; question giver uses "answer..."
25 % question taker types answer text "one" into argument of \answerfieldone{}
26 one \fieldone \answerfieldone{one} \\
27 two \fieldtwo \answerfieldtwo{two} \\ % question giver gives answer "two" in this case
28 three \fieldthree \answerfieldthree{three} \\
29 four \fieldfour \answerfieldfour{four} \\
30 five \fieldfive \answerfieldfive{five} % all five text fields do not have to be used
31 \end{center}
32 } % end of first argument; "}" *must* appear after last line of question, with no blank lines
33 {Yes, correct.} % correct response hint is 6th argument of questionandresponses command
34 {No, at least one of the answers you typed in is not exactly the same
35 as the preset question giver answers.} % incorrect response hint is 7th argument
36
37
38
39 \end{document}