summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/interactiveworkbook/samplefiles/radio.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/interactiveworkbook/samplefiles/radio.tex')
-rw-r--r--macros/latex/contrib/interactiveworkbook/samplefiles/radio.tex31
1 files changed, 31 insertions, 0 deletions
diff --git a/macros/latex/contrib/interactiveworkbook/samplefiles/radio.tex b/macros/latex/contrib/interactiveworkbook/samplefiles/radio.tex
new file mode 100644
index 0000000000..79d2ca1dcc
--- /dev/null
+++ b/macros/latex/contrib/interactiveworkbook/samplefiles/radio.tex
@@ -0,0 +1,31 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% RADIO BUTTON LATEX FILE EXAMPLE: USES QUESTIONANDRESPONSES COMMAND, 7 ARGUMENTS
+% 1ST ARGUMENT INDICATES THIS IS "RADIO" TYPE QUESTION
+% 2ND, 3RD, 4TH ARGUMENTS GIVE NAMES OF PREVIOUS, INDEX, NEXT LINKING FILES
+% 5TH ARGUMENT GIVES QUESTION, WITH UP TO 5 BUTTONS, AND
+% WHETHER OR NOT THESE RADIO BUTTONS ARE "ON" OR "OFF"
+% ONE AND ONLY ONE RADIO BUTTON IS ALLOWED TO BE "ON"
+% 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{radio} % radio button kind of question
+{popup.pdf}{ndex.pdf}{ndex.pdf} % previous, index and next files are 2nd, 3rd, 4th arguments
+{Question 4. $\;$ A multiple radio button question.
+ \begin{center}
+ not the one \radioone{} \answerradioone{Off} $\quad\quad$ % incorrect answer is "Off"
+ nope \radiotwo{} \answerradiotwo{Off} $\quad\quad$ % another incorrect answer
+ not yet \radiothree{} \answerradiothree{Off} \\ % radiothree has no argument {}
+ On \radiofour{} \answerradiofour{On} $\quad\quad$ % *one* of five radio buttons "On"
+ Off \radiofive{} \answerradiofive{Off} % radiofive{} appears on question and response pages
+ \end{center}
+}
+{Yes, correct.} % correct response hint is 6th argument of questionandresponses command
+{No, incorrect.} % incorrect response hint is 7th argument
+
+\end{document}