summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/dps/examples/advanced/usebtnappr/sideshow/first_date.tex
blob: 0498b57ab9542e1255e685f5d83445136c529bb3 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
\documentclass{article}
\usepackage[%
    web={extended},
    eforms,useacrobat
]{aeb_pro}
\usepackage[%
  usebtnappr,
  lang=custom,
  nonrandomized,
  !showletters,
  !viewmode,
  !showanswerkey,
  savedata]{dps}
\usepackage{graphicx}
\usepackage[absolute]{textpos}

%\previewOn\pmpvOn
%\useRandomSeed{number}
\inputRandomSeed
%\useLastSeed

\margins{.5in}{.5in}{.5in}{.5in} % left,right,top, bottom
\screensize{8in}{8.5in} % height, width

\DeclareDocInfo
{
    title=A Rookie's Big Night Out,
    author=D. P. Story,
    university=Acro\negthinspace\TeX.Net,
    email=dpstory@acrotex.net,
    subject=A Rookie's Big Night Out,
    keywords={matching, icons, game},
    talksite=http://www.acrotex.net,
    copyrightyears=2006-\the\year,
}
\talkdateLabel{Version}
\version{1.0}\nocopyright

\everyTextField{\textFont{TiRo}}

\begin{embedding}
\dpsEmbedIcons
\embedIcon[name=Emoji,placement=btnEmoji]{MyEmoji.pdf}
\sideshowPackaged
\dpsEmbedSideShow{6}{flowers1/flowers}
\end{embedding}

\randomizePicMappings
%\sortPicMappings


% Through the \dpsFinishedEvent command, we can execute script when the puzzle is completed
% (the last question is answered). Here, we display the btnEmoji
\dpsFinishedEvent{dpsShowFld("btnEmoji");}

\dpsResetHook{dpsHideFld("btnEmoji");}

\rheader{}

\parindent0pt
\parskip6pt

\DeclarePuzzle
{%
    {F}{F}
    {l}{l}
    {\tops{\protect\"{o}}{\ifxetex ö\else\string\366\fi}}{oul}
    {w}{w}
    {e}{e}
    {r}{r}
    {s}{s}
}

%\writeComposingEnv

\begin{Composing}

\begin{cQ}{F}
Clothes\begin{setContent}{F}
You wear your \underbar{\hspace*{.5in}} clothes when you pick her up.
\end{setContent}
\end{cQ}
\begin{cA}{F}
best
\end{cA}

\begin{cQ}{l}
Shoes\begin{setContent}{l}
You should \underbar{\hspace*{.5in}} your shoes before you put them on, and before
you pick her up.
\end{setContent}
\end{cQ}
\begin{cA}{l}
shine
\end{cA}

\begin{cQ}{oul}
Hair\begin{setContent}{oul}
Part your hair in the
\underbar{\hspace*{.5in}} of your head before you leave
your flat to pick her up.
\end{setContent}
\end{cQ}
\begin{cA}[\"{o}]{oul}
middle
\end{cA}

\begin{cQ}{w}
Socks\begin{setContent}{w}
Your socks should have no \underbar{\hspace*{.5in}} in them.
\end{setContent}
\end{cQ}
\begin{cA}{w}
holes
\end{cA}

\begin{cQ}{e}
Shirt\begin{setContent}{e}
\raggedright Your shirt should be clean and \underbar{\hspace*{.5in}} the day before you
pick her up.
\end{setContent}
\end{cQ}
\begin{cA}{e}
pressed (ironed)
\end{cA}

\begin{cQ}{r}
Sideburns\begin{setContent}{r}
Your sideburns should be \underbar{\hspace*{.5in}} below your waist.
\end{setContent}
\end{cQ}
\begin{cA}{r}
trimmed
\end{cA}

\begin{cQ}{s}
Hand\begin{setContent}{s}
When you arrive at her doorstep, you should have \underbar{\hspace*{.5in}} in
your left hand.
\end{setContent}
\end{cQ}
\begin{cA}{s}
flowers
\end{cA}

%---------- distractions ----------

\begin{cA}{fake1}
worst
\end{cA}

\begin{cA}{fake2}
scuffed
\end{cA}

\begin{cA}{fake3}
in the back
\end{cA}

\begin{cA}{fake4}
sand
\end{cA}

\begin{cA}{fake5}
wrinkled
\end{cA}

\begin{cA}{fake6}
long and hairy
\end{cA}

\begin{cA}{fake7}
sauerkraut
\end{cA}
\end{Composing}

\begin{document}

\ifxetex
\null\vfil
\begin{center}\Large
\fbox{\begin{minipage}{.67\linewidth} When using
\textsf{xelatex} and \textsf{textpos}, the puzzle needs to be on
the second page. Perhaps this is naturally so if
{\ttfamily\string\maketitle} is employed instead of this message
box.
\end{minipage}}
\end{center}
\newpage
\fi


% these are placed on the page where they are to appear
\placeQuesIcon{%
  \begin{textblock*}{2.25in}[0,0](2.5in+.725in,3in)
  \dpsQuesIcon{#1}{2.25in}{9\baselineskip}
  \end{textblock*}%
}
\placeOtherIcon{%
  \begin{textblock*}{2.25in}[0,0](2.5in+.725in,3in)\centering
  \dpsOtherIcon[\I{\csOf{Emoji}}]{btnEmoji}{2.25in}{9\baselineskip}
  \end{textblock*}%
}

\def\answidth{1.7in}
\def\queswidth{2in}
\def\commondepth{5.5in+6pt}

{\bfseries\noindent
\makebox[\textwidth]{\rlap{\webauthor}\hfill\textcolor{blue}{\webtitle}\hfill\llap{Acro\negthinspace\TeX.Net}}}

\textcolor{red}{\textbf{Instructions:}} Select a question from
the left panel by clicking its checkbox. Select your answer from
the right panel.  No guessing! A maximum of $\dsthreshold$ tries
on any problem before you get $\dspenaltypoints$ penalty points!
Passing is to complete the puzzle with only $\dspassing$
incorrect answers.


\fbox{\begin{minipage}[t][\commondepth][t]{\queswidth-2\fboxsep-2\fboxrule}\raggedright
\makebox[\linewidth]{\centering\textbf{Questions}}
\begin{enumerate}
\displayRandomizedQuestions
\end{enumerate}
\vfill
\insertSideshow{3}{2}{.5\linewidth}{.5\linewidth*\ratio{18.67pt}{15.75pt}}
\end{minipage}}%
%
\fbox{\begin{minipage}[t][\commondepth][t]{\linewidth-\answidth-\queswidth-2\fboxsep-2\fboxrule}
When you have a date with a young lady, rookie, what do you take with you?\par\smallskip
\begin{center}
\parbox{2.6in}{\insertPuzzle{7}}
\end{center}
\makebox[0pt][s]{\hspace*{-\fboxsep}\rule{\linewidth+2\fboxsep}{.4pt}\hss}
\vfill
\placeMessageField{\linewidth}{10\baselineskip}
\end{minipage}}%
%
\fbox{\begin{minipage}[t][\commondepth][t]{\answidth-2\fboxsep-2\fboxrule}\raggedright
\makebox[\linewidth]{\textbf{Answers}}
\begin{itemize}
\displayRandomizedAnswers
\end{itemize}
\par\smallskip
\end{minipage}}

Print this page: \printDPS{}{11bp}\cgBdry[1ex]
Try again: \resetDPS{}{11bp}

\end{document}