diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/ran_toks/examples')
4 files changed, 227 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/latex/ran_toks/examples/mytext.verb b/Master/texmf-dist/doc/latex/ran_toks/examples/mytext.verb new file mode 100644 index 00000000000..82865ace47c --- /dev/null +++ b/Master/texmf-dist/doc/latex/ran_toks/examples/mytext.verb @@ -0,0 +1 @@ +Hello \verb!$%$#$^~_! world! diff --git a/Master/texmf-dist/doc/latex/ran_toks/examples/ran_toks.tex b/Master/texmf-dist/doc/latex/ran_toks/examples/ran_toks.tex index 5136f083717..9bbe5ef985d 100644 --- a/Master/texmf-dist/doc/latex/ran_toks/examples/ran_toks.tex +++ b/Master/texmf-dist/doc/latex/ran_toks/examples/ran_toks.tex @@ -2,7 +2,7 @@ \usepackage{ran_toks} %\useThisSeed{606574325} -%\useLastAsSeed +\useLastAsSeed %\rtdebugtrue %\ranToksOn %\ranToksOff @@ -39,7 +39,7 @@ I've forgotten the rest, have you too? \begin{rtVW} \begin{minipage}[t]{.67\linewidth} I gave up saying bad things like -\verb!$#%%%^*%^&#$@#! when I was just a teenager +\verb!$#%%%^*%^&#$@#! when I was just a teenager. \end{minipage} \end{rtVW} \begin{rtVW} @@ -53,9 +53,9 @@ How did that other stuff get in there? \end{rtVW} \eRTVToks \begin{enumerate} - \item \useRanTok{1} - \item \useRanTok{2} - \item \useRanTok{3} + \item \useRanTok{1} + \item \useRanTok{2} + \item \useRanTok{3} \end{enumerate} Use \verb!\useRTName! command when another list separates the current @@ -64,11 +64,11 @@ position from the list you want to use. Here we want to use the list named \texttt{myThoughts} was declared. \useRTName{myPals} -List of pals: \useRanTok{1}, \useRanTok{2}, \useRanTok{3}, \useRanTok{4}, -\useRanTok{4}, \useRanTok{5}. +List of pals: \useRanTok{1}, \useRanTok{2}, \useRanTok{3}, +\useRanTok{4}, \useRanTok{5}, and \useRanTok{6}. For mixing lists. it might be easier to use the optional parameter: -{\useRanTok[myPals]{1}} and \useRanTok[myThoughts]{1}. +{\useRanTok[myPals]{1}} and \useRanTok[myThoughts]{1} The \verb!\rtTokByNum! can retrieve an item from the list, in its declared order; eg, from the \texttt{myPals} list, the first and last are {\rtTokByNum[myPals]{1}} diff --git a/Master/texmf-dist/doc/latex/ran_toks/examples/random_tst.tex b/Master/texmf-dist/doc/latex/ran_toks/examples/random_tst.tex new file mode 100644 index 00000000000..1f64c79907c --- /dev/null +++ b/Master/texmf-dist/doc/latex/ran_toks/examples/random_tst.tex @@ -0,0 +1,103 @@ +% +% This demo file shows how to randomize the questions of an exam created +% by the eqexam package. +% +\documentclass{article} +\usepackage[allowrandomize,nosolutions, + forpaper,pointsonleft,noparttotals]{eqexam} +\usepackage{ran_toks} + +\useLastAsSeed +%\useThisSeed{452836675} % fi,t,f,s + +\examNum{1} +\title[T\nExam]{Test \nExam} +\author{D. P. Story} +\subject[MC]{My Course} +\date{Spring \the\year} +\keywords{Test~\nExam, Section 001} + +\university +{% + THE UNIVERSITY OF AKRON\\ + Theoretical and Applied Mathematics +} +\email{dpstory@uakron.edu} + +\begin{document} +\maketitle + + +\begin{exam}{Exam\nExam} + +\begin{instructions} +Solve each problem without error. +\end{instructions} + +\bRTVToks{Exam\nExam} + +\begin{rtVW} +\begin{problem}[5] +First: Which is correct? +\begin{answers}{4} +\bChoices[nCols=2,random] + \Ans1 True\eAns + \Ans0 False\eAns + \Ans0 Maybe\eAns + \Ans0 Perhaps\eAns +\eChoices +\end{answers} +\end{problem} +\end{rtVW} + +\begin{rtVW} +\begin{problem}[5] +Second: Which is correct? +\begin{answers}{4} +\bChoices[nCols=2,random] + \Ans1 True\eAns + \Ans0 False\eAns + \Ans0 Maybe\eAns + \Ans0 Perhaps\eAns +\eChoices +\end{answers} +\end{problem} +\end{rtVW} + +\begin{rtVW} +\begin{problem}[5] +Third: Which is correct? +\begin{answers}{4} +\bChoices[nCols=2,random] + \Ans1 True\eAns + \Ans0 False\eAns + \Ans0 Maybe\eAns + \Ans0 Perhaps\eAns +\eChoices +\end{answers} +\end{problem} +\end{rtVW} + +\begin{rtVW} +\begin{problem}[5] +Fourth: Which is correct? +\begin{answers}{4} +\bChoices[nCols=2,random] + \Ans1 True\eAns + \Ans0 False\eAns + \Ans0 Maybe\eAns + \Ans0 Perhaps\eAns +\eChoices +\end{answers} +\end{problem} +\end{rtVW} + +\eRTVToks + +% Ok, now display this questions in a random order. +\displayListRandomly{Exam\nExam} + + +\end{exam} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/ran_toks/examples/random_tst_qz.tex b/Master/texmf-dist/doc/latex/ran_toks/examples/random_tst_qz.tex new file mode 100644 index 00000000000..3ca3c4043ef --- /dev/null +++ b/Master/texmf-dist/doc/latex/ran_toks/examples/random_tst_qz.tex @@ -0,0 +1,115 @@ +% +% This demo file shows how to randomize the choices of a quiz created +% by the exerquiz package, where the choices have verbatim text. +% +% The questions themselves are not randomized, but they can be, see random_tst.tex +% to see how to do this. +% +\documentclass{article} +\usepackage[designiv]{web} +\usepackage[allowrandomize,showgrayletters]{exerquiz} +\usepackage{ran_toks} + +% When using cross-referencing and \useLastAsSeed, the cross-references are never up to date. +% Once you randomize, read the auxiliary file (\jobname_rt.save), copy the first seed listed +% and paste in as the argument of \useThisSeed. Compile a few more times to bring cross-refereces +% up to date. +%\useLastAsSeed +\useThisSeed{1327548830} + +\rowsepDefault{3pt} + + +\begin{document} + +\begin{quiz*}{myRandomQuiz} + Riddle me this. +\begin{questions} + \item Try to guess the correct answer. + \begin{answers}{2} + \bChoices[random] + \Ans0 1 a choice\eAns + \Ans1\label{eq} 2 another choice\eAns + \Ans0 3 still another choice\eAns + \Ans0 4 another\eAns + \Ans0 5 incoming\eAns + \Ans0 6 more choices\eAns + \Ans0 7 another still\eAns + \Ans0 8 too many\eAns + \Ans0 9 choices\eAns + \Ans0 10 \input{mytext.verb}\eAns + \eFreeze + \Ans0 10 None of these\eAns + \eChoices + \end{answers} +\end{questions} +\end{quiz*}\quad\ScoreField\currQuiz\CorrButton\currQuiz + + +\newpage + +\bRTVToks{myChoices} +\begin{rtVW} +\verb!$ true $! +\end{rtVW} +\begin{rtVW} +\verb!~ false %! +\end{rtVW} +\begin{rtVW} +\verb!% maybe ^! +\end{rtVW} +\begin{rtVW} +\verb!$& perhaps #$! +\end{rtVW} +\eRTVToks + +\begin{quiz*}{myQuiz} +Solve each. +\begin{questions} + + \item Which is true? (Answer: \hyperref[rtAns3]{(\REF*{rtAns3})}) +\useRTName{myChoices} +\begin{manswers}*{1} +\bChoices[random=true,label=rtAns] + \Ans{1}\label{rtAns3}\rtTokByNum{1}\eAns + \Ans{0} Wow, \rtTokByNum{2}, this is great!\eAns + \Ans{0}\rtTokByNum{3}\eAns + \Ans{0}\rtTokByNum{4}\eAns +\eFreeze + \Ans{1} Hello mom!\eAns +\eChoices +\end{manswers} +\begin{solution} +The answer is \useSavedAlts{rtAns}, or to be more precise, +\useSavedAltsAns{rtAns}. \hyperref[rtAns3]{(\REF*{rtAns3})} +\end{solution} + + \item Which is true? (Ans: \hyperref[rtAns1]{(\REF*{rtAns1})}) +\useRTName{myChoices} +\begin{answers}*{3} + \bChoices[random,nCols=2] + \Ans{1}\label{rtAns1} \rtTokByNum{1}\eAns + \Ans{0} \rtTokByNum{2}\eAns + \Ans{0} \rtTokByNum{3}\eAns + \Ans{0} \rtTokByNum{4}\eAns + \eChoices +\end{answers} +\begin{solution} +The answer is \hyperref[rtAns1]{(\REF*{rtAns1})} found in the +\nameref{rtAns1} on page~\pageref{rtAns1}. +\end{solution} + + \item Which is true? +\useRTName{myChoices} +\begin{answers}{3} + \bChoices[random] + \Ans{1} \rtTokByNum{1}\eAns + \Ans{0} \rtTokByNum{2}\eAns + \Ans{0} \rtTokByNum{3}\eAns + \Ans{0} \rtTokByNum{4}\eAns + \eChoices +\end{answers} +\end{questions} +\end{quiz*} + +\end{document} |