summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/interactiveworkbook/samplefiles/check.tex
blob: 66e354440410ebd8bdb7557ed2c1c49adaf03cb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  CHECK BOX LATEX FILE EXAMPLE: USES QUESTIONANDRESPONSES COMMAND, 7 ARGUMENTS
%       1ST ARGUMENT INDICATES THIS IS "CHECK" TYPE QUESTION
%       2ND, 3RD, 4TH ARGUMENTS GIVE NAMES OF PREVIOUS, INDEX, NEXT LINKING FILES
%       5TH ARGUMENT GIVES QUESTION, WITH UP TO 5 CHECK BOXES, AND
%           WHETHER OR NOT THESE CHECK BOXES ARE "ON" OR "OFF"
%           ANY WHERE FROM NONE TO FIVE CHECK BOXES ARE 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}

% question and responses has *seven* arguments
\questionandresponses{check} % check box kind of question
{ndex.pdf}{ndex.pdf}{popup.pdf} % previous, index and next files are 2nd, 3rd, 4th arguments
{Question 1. $\;$ A multiple check box question. \\ \\ % question is 5th argument
    % "checkbox..." is for question taker, "answercheck..." is for question giver
    % "checkbox..." appears on screen; "answercheck..." does not appear on screen
    % up to five check boxes can be "X"ed
    \noindent
    \checkone  Off \answercheckone{Off} \\
    % correct answer, next, has check box "On" ("X"ed)
    \checktwo On \answerchecktwo{On} \\
    % correct answer, next, "Off" (un"X"ed)
    \checkthree  {\it no} X  \answercheckthree{Off} \\
    \checkfour  X \answercheckfour{On} \\
    \checkfive  {\it do not} click \answercheckfive{Off}
} % end of 5th argument
{Yes, correct.} % correct response hint is 6th argument
{No, try again.} % incorrect response hint is 7th argument

\end{document}