⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 first_date_g.tex

📁 It uses latex to give question papers
💻 TEX
字号:
\documentclass{article}
\usepackage[%
    web={pro,tight,nodirectory,usetemplates},
    eforms,
    uselayers
]{aeb_pro}
\usepackage[uselayers]{aeb_pro}
\usepackage[lang=custom,nonrandomized]{dps}
\usepackage{graphicx}
\usepackage{pstricks-add}
\usepackage[absolute,overlay]{textpos}

\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, layers, game},
    talksite=http://www.acrotex.net,
    copyrightyears=2006-\the\year,
}
\talkdateLabel{Version}
\version{1.0}\nocopyright

\everyTextField{\textFont{TiRo}}

%
% A command for typesetting content in a layer, using absolute coordinates
% of textblock environment of the texpos package.
%
\def\setTextBlock#1{%
    \par\begin{textblock*}{2\linewidth}[0,0](.33\paperwidth,.3\paperheight)
    \xBld{#1}\psshadowbox[framesep=0pt]{\fcolorbox{red}{cornsilk}{%
    \parbox{\linewidth}{\insertRC{#1}}}}\eBld
    \end{textblock*}
}
% Convenience macro to set the content of the layer.
% #1 = the letter in the puzzle corresponding to the current question
% #2 = the content of the layer
%
\newcommand{\setContent}[2]{\defineRC{#1}{\textbf{Step \theenumi:} #2}\setTextBlock{#1}}

% Command for placing the tiles of the picture. We assume that the pictures are number
% consecutively across rows.
% #1 = optional extension of the image
% #2 = number of rows
% #3 = number of columns
% #4 = base name of picture files
% #5 = parameters for the includegraphics command, used to set the size of the tile
\makeatletter
\newcommand\insertPuzzleImages[5][]{%
    \begingroup\offinterlineskip\count0=0
    \def\dpsExt{#1}\ifx\dpsExt\@empty\else\def\dpsExt{.#1}\fi
    \multido{\iR=1+1}{#2}%
    {%
        \hbox{%
        \multido{\iC=1+1}{#3}%
        {%
            \global\advance\count0by1\relax
            \ifnum\count0<10\relax
                \xBld{pic0\the\count0}\includegraphics[#5]{#40\the\count0\dpsExt}\eBld
            \else
                \xBld{pic0\the\count0}\includegraphics[#5]{#4\the\count0\dpsExt}\eBld
            \fi
        }}%\newline
    }%
    \endgroup
}
\makeatother

\rheader{}

\parindent0pt
\parskip6pt

\DeclarePuzzle
{%
    {F}{F}
    {l}{l}
    {o}{o}
    {w}{w}
    {e}{e}
    {r}{r}
    {s}{s}
}

%\writeComposingEnv
%\begin{document}
%\end{document}

% DSC_0453_01.eps

\begin{Composing}

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

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

\begin{cQ}{o}
Hair\setContent{o}{Part your hair in the
\underbar{\hspace*{\ublength}} of your head before you leave
your flat to pick her up.} %headlein
\end{cQ}
\begin{cA}{o}
middle
\end{cA}

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

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

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

\begin{cQ}{s}
Hand\setContent{s}{When you arrive at her doorstep, you should have \underbar{\hspace*{\ublength}} in
your left hand.}
\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}
hair
\end{cA}

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

\begin{cA}{fake6}
sand
\end{cA}

\begin{cA}{fake7}
dirty
\end{cA}


\end{Composing}

%----------------
%
% The two commands \afterQhookA and \OnFocusQhookAA are hooks onto
% the \dpsQ command of the dps package. This allows us to post process
% the user's choice of a questions, and allows us to execute JS on focus.
% We use these two to call to JS function to support these additional
% features.
%
\def\afterQhookA#1{dpsShowLayer("#1")}
\def\OnFocusQhookAA#1{dpsHidePreviousLayer("#1")}

\begin{insDLJS}[dpsShowLayer]{dpslayer}{Layer Support}
var studentSignedIn = false;
/*
    Create mapping from letters to pictures
*/
var pic = new Array();
pic["F"]="pic01";
pic["l"]="pic02";
pic["o"]="pic03";
pic["w"]="pic04";
pic["e"]="pic05";
pic["r"]="pic06";
pic["s"]= null;
function dpsShowLayer(name)
{
    if ( studentSignedIn ) {
        var o = getxBld(name);
        if ( o != null  ) o.state = true;
    } else {
        var f = this.getField("dpsSignInName");
        if ( f == null ) {
            studentSignedIn = true;
            dpsShowLayer(name);
        }
        else event.target.value = "Off";
    }
}
function dpsHidePreviousLayer(name)
{
//    console.println("dpsShowLayer: activeQuestion = " + activeQuestion);
    if (!studentSignedIn) {
        var f = this.getField("dpsSignInName");
        if ( f != null ) {
            var nameField = f.value;
            if ( nameField.replace(/\s*/g,"") == "" )
                app.alert("You must enter your name in the field at the top of the page to get credit for this assignment.");
            else
                studentSignedIn = true;
        }
    } else studentSignedIn = true;
    if ( activeQuestion != "" ) {
        var activename = activeQuestion.replace(/ckbxQ\./,"");
        dpsHideLayer(activename);
    }
}
function dpsHideLayer(name)
{
    var o = getxBld(name);
    if ( o != null  ) o.state = false;
}
function afterCorrectChoiceHook()
{
    var name = activeQuestion.replace(/ckbxQ\./,"");
//    console.println( "afterCorrectChoiceHook(): name = " + name);
    try { if (pic[name] != null ) dpsShowLayer(pic[name]); } catch(e) {};
    dpsHideLayer(name);
}
/*
    When the puzzle is complete, there is an option to show an additional
    layer, here, we do nothing. This can be changed to fit
    your needs. See stat_match1.tex and stat_match1_g.tex.
*/
function dpsFinishedHook()
{
    return;
}
\end{insDLJS}

\template{Puzzle_BG}

\begin{document}

\def\answidth{1.7in}
\def\queswidth{2in}

{\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.


\def\answidth{1.7in}
\def\queswidth{2in}
\def\ublength{.5in}

\fbox{\begin{minipage}[t][5in][t]{\queswidth-2\fboxsep-2\fboxrule}\raggedright
\makebox[\linewidth]{\centering\textbf{Questions}}
\begin{enumerate}
\displayRandomizedQuestions
\end{enumerate}

\end{minipage}}%
%
\fbox{\begin{minipage}[t][5in][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}}

\hspace*{-\fboxsep}\rule{\linewidth+2\fboxsep}{.4pt}

\vspace{2.65cm}

\leavevmode\kern3pt\parbox{\linewidth}{\insertPuzzleImages{2}{3}{flowers2/rose_}{width=.24\linewidth}}

\end{center}

\vspace{0.95cm}
\placeMessageField[\Ff\FfReadOnly\BC{}]{\linewidth}{10\baselineskip}
\end{minipage}}%
%
\fbox{\begin{minipage}[t][5in][t]{\answidth-2\fboxsep-2\fboxrule}\raggedright
\makebox[\linewidth]{\textbf{Answers}}
\begin{itemize}
\displayRandomizedAnswers
\end{itemize}
\par\smallskip
\end{minipage}}%

\clearpage

\end{document}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -