summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/interactiveworkbook/samplefiles/field.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/interactiveworkbook/samplefiles/field.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/interactiveworkbook/samplefiles/field.tex')
-rw-r--r--macros/latex/contrib/interactiveworkbook/samplefiles/field.tex39
1 files changed, 39 insertions, 0 deletions
diff --git a/macros/latex/contrib/interactiveworkbook/samplefiles/field.tex b/macros/latex/contrib/interactiveworkbook/samplefiles/field.tex
new file mode 100644
index 0000000000..99dbd57be0
--- /dev/null
+++ b/macros/latex/contrib/interactiveworkbook/samplefiles/field.tex
@@ -0,0 +1,39 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% TEXT FIELD LATEX FILE EXAMPLE: USES QUESTIONANDRESPONSES COMMAND, 7 ARGUMENTS
+% 1ST ARGUMENT INDICATES THIS IS "FIELD" TYPE QUESTION
+% 2ND, 3RD, 4TH ARGUMENTS GIVE NAMES OF PREVIOUS, INDEX, NEXT LINKING FILES
+% 5TH ARGUMENT GIVES QUESTION, WITH UP TO 5
+% BLANK TEXT FIELDS FOR QUESTION TAKER (USER); APPEAR ON SCREEN
+% ANSWER TEXT FIELDS FOR QUESTION GIVER; DO NOT APPEAR ON SCREEN
+% 6TH, 7TH ARGUMENTS GIVE RESPONSES IF USER ANSWER CORRECT OR INCORRECT
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[dvips]{article}
+\usepackage{interactiveworkbook} % put in style directory; cannot appear in any other directory
+
+\begin{document}
+
+\questionandresponses{field} % tells style file choose fieldclear, fieldsubmit buttons
+{popup.pdf}{ndex.pdf}{radio.pdf} % previous, index and next files are 2nd, 3rd, 4th arguments
+{ % question and responses has *seven* arguments
+ Question 3. $\;$ A multiple text field question.
+ % question is 5th argument
+ \begin{center}
+ % "field..." shows blank text fields on screen; "answerfield..." not shown on screen
+ % question taker (user) types answer in "field..."; question giver uses "answer..."
+ % question taker types answer text "one" into argument of \answerfieldone{}
+ one \fieldone \answerfieldone{one} \\
+ two \fieldtwo \answerfieldtwo{two} \\ % question giver gives answer "two" in this case
+ three \fieldthree \answerfieldthree{three} \\
+ four \fieldfour \answerfieldfour{four} \\
+ five \fieldfive \answerfieldfive{five} % all five text fields do not have to be used
+ \end{center}
+} % end of first argument; "}" *must* appear after last line of question, with no blank lines
+{Yes, correct.} % correct response hint is 6th argument of questionandresponses command
+{No, at least one of the answers you typed in is not exactly the same
+as the preset question giver answers.} % incorrect response hint is 7th argument
+
+
+
+\end{document}