From 01c9ee84c09adfc3efe1cd93191a9c0473f985fe Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 12 Jul 2017 23:26:39 +0900 Subject: add acrotex --- texmf-dist/doc/latex/acrotex/examples/README.md | 27 ++ texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf | Bin 0 -> 108684 bytes texmf-dist/doc/latex/acrotex/examples/jquiztst.tex | 284 +++++++++++++ texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf | Bin 0 -> 99808 bytes texmf-dist/doc/latex/acrotex/examples/jtxttst.tex | 237 +++++++++++ .../doc/latex/acrotex/examples/test_install.pdf | Bin 0 -> 21312 bytes .../doc/latex/acrotex/examples/test_install.tex | 38 ++ texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf | Bin 0 -> 204281 bytes texmf-dist/doc/latex/acrotex/examples/webeqtst.tex | 472 +++++++++++++++++++++ 9 files changed, 1058 insertions(+) create mode 100644 texmf-dist/doc/latex/acrotex/examples/README.md create mode 100644 texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf create mode 100644 texmf-dist/doc/latex/acrotex/examples/jquiztst.tex create mode 100644 texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf create mode 100644 texmf-dist/doc/latex/acrotex/examples/jtxttst.tex create mode 100644 texmf-dist/doc/latex/acrotex/examples/test_install.pdf create mode 100644 texmf-dist/doc/latex/acrotex/examples/test_install.tex create mode 100644 texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf create mode 100644 texmf-dist/doc/latex/acrotex/examples/webeqtst.tex (limited to 'texmf-dist/doc/latex/acrotex/examples') diff --git a/texmf-dist/doc/latex/acrotex/examples/README.md b/texmf-dist/doc/latex/acrotex/examples/README.md new file mode 100644 index 00000000..357ccb88 --- /dev/null +++ b/texmf-dist/doc/latex/acrotex/examples/README.md @@ -0,0 +1,27 @@ +AeB Examples folder + +Contents: + 1. test_install.pdf : To verify that you correctly installed aeb.js, for + Distiller users only, open this file in Acrobat and follow the directions. + 2. webeqtst.tex : Basic file highlighting feature of web and exerquiz + (exercises and multiple choice quizzes). + 3. jquiztst.tex : Features math fill-in quizzes of exerquiz. + 4. jtxttst.tex : Features text fill-in question of exerquiz. + +There are numerous other examples available, the resources are + 1. The full collection of AeB distribution files are located at + http://www.acrotex.net/blog/?cat=89 + 2. Demo files whose focus is the web package are + http://www.acrotex.net/blog/?tag=web-package + 3. Demo file whose focus is the exerquiz package are + http://www.acrotex.net/blog/?tag=exerquiz + 4. Demo files for the dljslib package are + http://www.acrotex.net/blog/?tag=dljslib + 5. Demo files with focus on the extended or pro option of web are here: + http://www.acrotex.net/blog/?tag=extended-option + +The AcroTeX Blog (http://www.acrotex.net/blog/) is a great resource for all things +AeB and PDF. + +Don Story +2016/01/29 diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf new file mode 100644 index 00000000..71cc9934 Binary files /dev/null and b/texmf-dist/doc/latex/acrotex/examples/jquiztst.pdf differ diff --git a/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex new file mode 100644 index 00000000..097882db --- /dev/null +++ b/texmf-dist/doc/latex/acrotex/examples/jquiztst.tex @@ -0,0 +1,284 @@ +\documentclass{article} +\usepackage[fleqn]{amsmath} +\usepackage{graphicx} +\usepackage + [tight, +% dvips, % <- replace with any supported driver + designi,%forpaper, + navibar + ]{web} +\usepackage{exerquiz} +\usepackage[ImplMulti]{dljslib} +\usepackage{pifont} + +\title{Extending the Exerquiz Package Math Fillin Questions} +\author{D. P. Story} +\subject{Sample file} +\keywords{LaTeX, PDF, derivative, calculus, JavaScript} +\university{NORTHWEST FLORIDA STATE COLLEGE\\ +Department of Mathematics} +\email{dpstory@acrotex.net} +\version{3.0} +\copyrightyears{1999-\the\year} +\norevisionLabel + +% Uncomment the lines below to create buttons +% for "Begin Quiz", "End Quiz" instead of links +%\useBeginQuizButton[\textColor{blue}] +\useEndQuizButton[\textColor{blue}] + + +% Uncomment this line to require the student +% to answer all questions in the quiz before +% the quiz is evaluated. +%\renewcommand\minQuizResp{highThreshold} + +\font\hv=cmtt10 \def\hvperk{\char`^} +%\font\hv=hv at 9pt \def\hvperk{\char142 } +{\catcode`\^=\active +\gdef\js{\bgroup\hv\catcode`\^=\active \let^=\hvperk \jsi} +}\def\jsi#1{#1\egroup} + +\def\hr#1{\textcolor{red}{#1}} +\def\hb#1{\textcolor{blue}{#1}} + +\def\D{\dfrac {\text{d}}{\text{d}x}} +\def\dPose#1{$\D#1=$ } + +\begin{document} + +\maketitle +%\tableofcontents + +\section{Math Fill-In Question} + +The current version of \textsf{exerquiz} included only multiple +choice questions. That's all well and good, but instructors would +occasionally like to ask questions that would require the student +to fill in the answer, whether it be numerical or symbolic. + +This new question type, the Math Fill-in, can be used in either +the \texttt{shortquiz} or \texttt{quiz} environment. In the +former case, there is immediate feedback as to right or wrong; in +the latter case, correction is delayed until the quiz is completed +and the user requests to be corrected. + +In either case, you can choose to include the correct answer, +which can be obtained by the click of a button. + +The next section outlines the syntax for the user to enter the +answer. + +\subsection{Instructions} + +When responding to a Math Fill-in question, you answer by typing +in your answer. Use the following notation to enter your answers. + +\begin{itemize} +\item Use \js{*} to indicate multiplication: Type \js{4*x} for $4x$; + +\item Use \js{^} to indicate powers: Type \js{4*x^3} for +$4x^3$; \js{12*x^-6} for $12x^{-6}$. + +\item Use parentheses to delimit the argument of a function; i.e., type +\js{sin(x)} rather than \js{sin x}. + +\item Use parentheses to define the {\it scope\/} of an operation: For +example, type \js{4*x*(x^2+1)^3} for $4x(x^2+1)^3$; \js{ 4^(2*x+1)} for +$4^{2x+1}$; \js{(sin(x))^2} for $(\sin(x))^2$. {\it Do not\/} type +\js{sin^2(x)} for $\sin^2(x)$, type \js{(sin(x))^2} instead. + +\item You can also use brackets \js{[ ]} or braces \js{\{ \}}, +to delimit a mathematics expression. + +\item Functions you may use: +\begin{itemize} + \item Trig: \js{sin}, \js{cos}, \js{tan}, \js{cot}, \js{sec}, \js{csc}; + \item Inverse Trig: \js{asin}, \js{acos}, \js{atan}; + \item Log: \js{ln} (natural log), or use \js{\tt log}; e.g. \js{ln(x)}; + \item Exponential: The natural exponential function, $e^x$, + can be entered as \js{exp(x)} or as \js{e^x}. + \item The absolute function, \js{abs($\cdot$)} can also be written + in the usual way \js{|$\cdot$|}; thus, you can type either + \js{abs(x)} or \js{|x|}. + \item Misc.: \js{sqrt}, usage \js{sqrt(x)} for $\sqrt{x}$ (or, use + exponential notation: \js{x^(1/2)}). +\end{itemize} +\end{itemize} + +When you enter your response, some attempt will be made to +determine whether the response is a valid mathematical expression. +For example, if you say \js{san(x)}, the function `\js{san}' will +not be recognized as a valid mathematical function; an error +message is generated, and the user is not penalized for a possible +typing error. The JavaScript routines will also check for +unbalanced parentheses; thus, \js{((x^4+1) + sin(x)^2} will be +flagged as a syntax error. + +\medskip\noindent\hr{\textbf{Important:}} When you enter a function +of a single variable---the only type currently supported---use as +the independent variable implied by the statement of the problem. +If the problem statement involves the variable $x$, use \js{x} as +the independent variable; if the problem statement uses $t$, use +\js{t} in your answer. To enter a function of $t$ when a function +of $x$ is expected will, no doubt, result in missed problem. + +\subsection{Answers and Solutions} + +For fill-in questions, if the document author so wishes, answers +and (optionally) solutions can be provided. The author provides +an ``Ans'' button. This button is visible for a \texttt{shortquiz} +and hidden for a \texttt{quiz}. + +For a \texttt{shortquiz}, the ``Ans'' button can be clicked at +anytime. In the case of a \texttt{quiz}, after a \texttt{quiz} has +been completed, the hidden ``Ans'' buttons appear. Click on the +button to get an answer to the problem. + +Concerning solutions. If the ``Ans'' button has a green boundary, +that means that question has a solution. Performing a +\texttt{Shift-Click} on the ``Ans'' button causes the viewer to +jump to the solution. For multiple choice questions, the boundary +for the correct answer is colored green as well. Click on the +answer field to jump to the solution. + +Solutions to a \texttt{quiz} can be protected from prying eyes +with the \texttt{\string\NoPeeking} command. See the +\hyperref[s:quiz] {Section~\ref*{s:quiz}} for an example and a +brief discussion. + +\subsection{Practice Example} + +\noindent\hb{\textbf{Example:}} Consider the following sample question. +Practice by typing in the answer: +\js{2*x^3*(x^4+1)^(-1/2)} + +\medskip +\begin{oQuestion}{example} + +\def\RBW{120pt}\def\DefaultHeightOfWidget{16pt}\def\TBW{18pt} +\edef\STRUT{\noexpand\rule[\ifxetex-1bp\else-5bp\fi]{0pt}{0pt}} + +\noindent$\dfrac{\text{d}}{\text{d}x} {(x^4 + 1)^{1/2}} = +\underset{\text{\rotatebox{-45}{\rlap{The Response Box}}}} + {\underbrace{\STRUT\efKern{1bp}{0bp}\RespBoxMath{2*x^3*(x^4+1)^(-1/2)}{4}{.0001}{[1,2]}\relax\efKern{1bp}{0bp}}}\kern-1bp +\underset{\text{\rotatebox{-45}{\rlap{Answer Button}}}} + {\underbrace{\STRUT\efKern{1bp}{0bp}\CorrAnsButton{2*x^3*(x^4+1)^(-1/2)}\efKern{1bp}{0bp}}}\kern-1bp +\underset{\text{\rotatebox{-45}{\rlap{Num.\ of incorrect tries}}}} + {\underbrace{\STRUT\efKern{1bp}{0bp}\sqTallyBox\relax\efKern{1bp}{0bp}}}\olBdry\efKern{-1bp}{0bp}\sqClearButton$ +\end{oQuestion} + +\vspace{5\bigskipamount} + +When a correct answer is input into the response box, the color of +the border surrounding the response box changes to \textcolor{webgreen}{green}. +The answer can also be expressed correctly using the \js{sqrt} +operator, try modifying the answer using \js{sqrt}. + +\newpage +\subsection{Short Quiz Environment}\label{s:shortquiz} + +%In the following problems, answer by typing in your +%response using the correct syntax. + +Problem \#2 illustrates how to define a problem with a variable +other than the default $x$. Click on the ``Ans'' button to get +answers, shift-click on ``Ans'' buttons that have a green boundary +to get a solution. + +\begin{shortquiz*}[answer] Answer each of the following. Passing is 100\%. + +\answersEndHook{\hfill\makebox[0pt][r]{\sqTallyBox}} + +\begin{questions} + +\item If $f$ is differentiable, then $f$ is continuous. +\begin{answers}[diff]{4} +\Ans1 True & \Ans0 False +\end{answers} +\begin{solution} +Yes, differentiability at a point implies continuity at that point. +\end{solution} + +%If you want another variable other than $x$, then specify the variable immediately +%following the correct answer in the \RespBoxMath command. Following the optional +%variable specification is the optional named destination for the solution the +%the problem. + +\item $\dfrac{\text{d}}{\text{d}t} {4 t^{-1/2}} + = \RespBoxMath{-2*t^(-3/2)}(t)[diffprob]{4}{.0001}{[1,2]}$\hfill +\CorrAnsButton{-2*t^(-3/2)}\cgBdry\sqTallyBox +\begin{solution} +We use the power rule: +\begin{equation*} + 4 t^{-1/2} + = 4(-1/2) t^{-3/2} + = \boxed{-2 t^{-3/2}} +\end{equation*} +Or, in the syntax of this quiz: \js{-2*t^(-3/2)}. +\end{solution} + +\item \dPose{e^{x^2}}\RespBoxMath{2*x*e^(x^2)}{4}{.0001}{[0,1]}\hfill +\CorrAnsButton{2*x*e^(x^2)}\olBdry\sqTallyBox + +\item $\displaystyle\int_0^\pi \sin(x)\,dx + = \RespBoxMath{2}{1}{.0001}{[0,1]}$\hfill\CorrAnsButton{2}\olBdry\sqTallyBox +\end{questions} +\end{shortquiz*} + +\begin{flushright} +\sqClearButton\olBdry\sqTallyTotal +\end{flushright} + +\subsection{Quiz Environment}\label{s:quiz} + +The example below illustrates multiple choice questions +and objective math questions in the \texttt{quiz} environment +and is protected by the \texttt{\string\NoPeeking} +command. First, browse the solutions at the end +of the file, when you encounter a solution protected by +\texttt{\string\NoPeeking}, see what happens. +Click on the ``Ans'' button to get answers, shift-click on ``Ans'' +buttons that have a green boundary to get a solution. + +\NoPeeking % or put in preamble + +\begin{quiz}{mathquiz} Answer each of the following. Passing +is 100\%. + +\begin{questions} + +\item If $\lim_{x\to a} f(x) = f(a)$, then we say that $f$ is\dots +\begin{answers}[cont]{3} +\Ans0 differentiable &\Ans1 continuous &\Ans0 integrable +\end{answers} +\begin{solution} +A function $f$ is said to be continuous at $x=a$ if $x\in\operatorname{Dom}(f)$, +$\lim_{x\to a} f(x) $ exists and $\lim_{x\to a} f(x) = f(a)$. +\end{solution} + +\item $\cos(\pi) = \RespBoxMath{-1}[cospi]{1}{.0001}{[2,4]}\cgBdry\kern1bp\CorrAnsButton{-1}$ +\begin{solution} +Of course, everyone knows that $\cos(\pi) = -1 $. +\end{solution} + +\item \dPose{e^{x^2}}\RespBoxMath{2*x*e^(x^2)}[diffexp]{4}{.0001}{[0,1]}\cgBdry\kern1bp +\CorrAnsButton{2*x*e^(x^2)} +\begin{solution} +First apply the rule for differentiating an the natural exponential, then apply +the power rule: +\begin{align*} + \dfrac d{dx}\,e^{x^2} & + = e^{x^2}\,\dfrac d{dx}\,x^2 \\& + = e^{x^2}\,(2x) \\& + = 2x e^{x^2} +\end{align*} +In the syntax of this document, \js{2*x*e^(x^2)}. +\end{solution} +\end{questions} +\end{quiz}\quad\ScoreField\currQuiz\olBdry\eqButton\currQuiz + +\noindent +Answers: \AnswerField\currQuiz + +\end{document} diff --git a/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf new file mode 100644 index 00000000..3fea2a8c Binary files /dev/null and b/texmf-dist/doc/latex/acrotex/examples/jtxttst.pdf differ diff --git a/texmf-dist/doc/latex/acrotex/examples/jtxttst.tex b/texmf-dist/doc/latex/acrotex/examples/jtxttst.tex new file mode 100644 index 00000000..eb2747e4 --- /dev/null +++ b/texmf-dist/doc/latex/acrotex/examples/jtxttst.tex @@ -0,0 +1,237 @@ +\documentclass{article} +\usepackage{amsmath} +\usepackage + [tight,designi]{web} +\usepackage{exerquiz} +\usepackage[indefIntegral]{dljslib} + +\title{Extending the Exerquiz Package Text Fill-in Questions} +\author{D. P. Story} +\subject{Sample file} +\keywords{LaTeX, PDF, derivative, calculus, JavaScript} + +\university{NORTHWEST FLORIDA STATE COLLEGE\\ +Department of Mathematics} +\email{dpstory@uakron.edu} +\version{2.0} +\copyrightyears{1999-\the\year} + +\nocopyright +\norevisionLabel + +\def\D{\dfrac {\hbox{\text{d}}}{\text{d}x}} +\def\dPose#1{$\D#1=$ } + +\newcommand\redpoint{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi +\vskip\medskipamount\noindent + \makebox[\parindent][l]{\large\color{red}$\blacktriangleright$}} +\newcommand{\cs}[1]{\texttt{\char`\\#1}} + +\useMCCircles + +\begin{document} + +\maketitle + +\section{Text Fill-in Questions} + +\textsf{Exerquiz} can now create text fill-in questions, questions +in which the response is text (as opposed to a mathematical +expression). The underlying JavaScript compares the user's +response against acceptable alternatives, as supplied by the +author of the question. If there is a match, the response is +deemed correct. For example: + +\redpoint\begin{oQuestion}{ex1}% +Who was the first President\footnote{of the United States}?\ +\RespBoxTxt{0}{0}{4}{George Washington}{Washington} + {G. Washington}{Geo. Washington} +\end{oQuestion} + +\medskip\noindent +The command \cs{RespBoxTxt} is the one that creates a text fill-in question. Its +syntax is +\begin{verbatim} +\RespBoxTxt[#1]#2#3[#4]#5 +\end{verbatim} +\noindent\textbf{\hypertarget{paraRespBoxTxt}{Parameters:}} +\begin{enumerate} +\item[\ttfamily\#1:]Optional parameter used to modify the appearance of the + text field. +\item[\ttfamily\#2:]This required parameter is a number that indicates +the filtering method to be used. Permissible values of this parameter are +\begin{enumerate} + \item[\ttfamily-1:] (The default) The author's and user's answers are not filtered + in any way. (Spaces, case, and punctuation are preserved.) + \item[\ttfamily0:] The author's and user's answers are converted to + lower case, any white space and non-word characters are removed. + \item[\ttfamily1:] The author's and user's answers are converted to + lower case, any white space is removed. + \item[\ttfamily2:] The author's and user's answers are stripped of + white space. +\end{enumerate} +See the JavaScript function \texttt{eqFilter} in \texttt{exerquiz.dtx} for +program code details. Additional filtering options may be added. + +\item[\ttfamily\#3:] This parameter is a number that indicates the compare +method to be used. Permissible values of this parameter are +\begin{enumerate} + \item[\ttfamily0:] (The default) The author's and user's answers are + compared for an exact match. (These answers are filtered before they are + compared.) + \item[\ttfamily1:] The user's response is searched in an attempt to + get a substring match with the author's alternatives. Additional comparison + methods may be added. +\end{enumerate} +See the JavaScript function \texttt{compareTxt} in +\texttt{exerquiz.dtx} for the program code details. + +\item[\ttfamily\#4:] Optional, a named destination to the +solution to the question. If this parameter appears, then a +solution must follow the question, enclosed in a \texttt{solution} +environment. If the forth parameter is a `\texttt*', then an automatic +naming scheme is used instead. +\item[\ttfamily\#5:] This required parameter is the +number of alternative answers that are acceptable. The alternative +answers are listed immediately after this parameter. (The example +above specified that $4$ alternatives follow.) +\end{enumerate} + +\makeatletter +% remove label `Quiz' and gobble up the space that follows it. +\renewcommand\sqlabel[1]{\@gobble} +\makeatother +\begin{shortquiz}[comboexamp]% +The following series of examples illustrate different combinations +parameters~\texttt{\#2} and~\texttt{\#3}. All questions are in +response to the question ``Who was the first president of the +United States?'' +\begin{questions} +\item Remove all white space and non-word characters, convert to lower case, +then look for a match. +\RespBoxTxt{0}{0}{4}{George Washington}{Washington} + {G. Washington}{Geo. Washington} +Of course, ``George Washington'' and ``G. Washington'' are correct, but +so too are ``georgewashington''and ``gwashington''. + +\item Remove all white space, convert to lower case, then look for an +exact match. Here we don't remove non-word characters, such as punctuation. +\RespBoxTxt{1}{0}{4}{George Washington}{Washington} + {G. Washington}{Geo. Washington} +For example, answers ``G. Washington'', ``georgewashington'' and +``g. washington'' are correct, but ``gwashington'' is not. + +\item Remove all white space, then look for an exact match. (Here, +we do not remove punctuation and do not convert to lower case.) +\RespBoxTxt{2}{0}{4}{George Washington}{Washington} + {G. Washington}{Geo. Washington} The +response ``G. Washington'' is correct, but ``g. washington'' is not. + +\item Now lets put parameter~\texttt{\#3} equal to \texttt1. Here, we convert +to lower case, remove white space, and look for a substring match. +\RespBoxTxt{1}{1}{4}{George Washington}{Washington} + {G. Washington}{Geo. Washington} Note that ``President Washington'', +``General Geo. Washington'', and ``Washington, George'' are correct. +Also ``Fred Washington'' is correct, since it matches the second +alternative, Washington. (If we eliminate Washington as an +alternative, then ``Fred Washington'' would be judged incorrect, +let's test that theory: +\begin{oQuestion}{wash2}\RespBoxTxt{2}{1}{3}{George Washington} +{G. Washington}{Geo. Washington}\end{oQuestion} +\end{questions} +\end{shortquiz} + +\section{Short Quiz Environment} + +\begin{shortquiz} +Answer each of the following. Passing is 100\%. + +\begin{questions} + +\answersEndHook{\hfill\makebox[0pt][r]{\sqTallyBox}} + +\item Who was the first president of the United States?\par\kern3pt\noindent +\RespBoxTxt{0}{0}[geow]{4}{George Washington}{Washington}{G. Washington}{Geo. Washington}\hfill +\CorrAnsButton{George Washington}\kern1bp\sqTallyBox +\begin{solution} +Yes, George Washington was the first President of the United +States of America. +\end{solution} + +\item Name \emph{one} of the two people recognized as a founder of +Calculus.\par\kern3pt\noindent +\RespBoxTxt{2}{0}{5}{Isaac Newton}{Newton}{I. Newton}{Gottfried Leibniz}{Leibniz}\hfill +\CorrAnsButton{Isaac Newton or Gottfried Leibniz}\kern1bp\sqTallyBox + +\item If $f$ is differentiable, then $f$ is continuous. +\begin{answers}{4} +\Ans1 True & +\Ans0 False +\end{answers} + +\item +\dPose {4 x^{-1/2}}\RespBoxMath{-2*pow(x,-3/2)}{4}{.0001}{[1,2]}\hfill +\CorrAnsButton{-2*x^(-3/2)}\kern1bp\sqTallyBox + +\item +$\displaystyle\int \frac 1x\,dx = $\space +\RespBoxMath{ln(abs(x))}{4}{.0001}{[1,2]}[indefCompare]\hfill +\CorrAnsButton{ln(|x|)}\kern1bp\sqTallyBox + +\end{questions} +\end{shortquiz} +\begin{flushright} +\sqClearButton\kern1bp\sqTallyTotal +\end{flushright} + +\newpage +\section{Quiz Environment} + +Here is a mixture of all types of questions, all with solutions. + +\useBeginQuizButton[\CA{Begin}] +\useEndQuizButton[\CA{Finish}] + +\begin{quiz}*{calcquiz} Answer each of the following. Passing +is 100\%. + +\begin{questions} + +\item If $\lim_{x\to a} f(x) = f(a)$, then we say that $f$ is\dots +\begin{answers}[cont]3 +\Ans0 differentiable &\Ans1 continuous &\Ans0 integrable +\end{answers} +\begin{solution} +A function $f$ is said to be continuous at $x=a$ if $x\in\operatorname{Dom}(f)$, +$\lim_{x\to a} f(x) $ exists and $\lim_{x\to a} f(x) = f(a)$. +\end{solution} + +\item Name \emph{one} of the two people recognized as a founder of +Calculus.\par\kern3pt +\RespBoxTxt{0}{0}[calc]{4}{Isaac Newton}{Newton}{Gottfried Leibniz}{Leibniz}% +\CorrAnsButton{Isaac Newton or Gottfried Leibniz} +\begin{solution} +Isaac Newton and Gottfried Leibniz are the co-creators of Calculus. +\end{solution} + +\item $\cos(\pi) = \RespBoxMath{-1}[cospi]{1}{.0001}{[2,4]}\CorrAnsButton{-1}$ +\begin{solution} +Oh, come on now. You know that $\cos(\pi)=-1$. +\end{solution} + +\item $\displaystyle\int \sin(x)\,dx = +\RespBoxMath{-cos(x)}[intSin]{4}{.0001}{[0,1]}[indefCompare]\CorrAnsButton{-cos(x)}$ +\begin{solution} +\relax\begin{equation*} + \int \sin(x) \,dx = -\cos(x) + C +\end{equation*} +\adjDisplayBelow +\end{solution} + +\end{questions} +\end{quiz}\quad\ScoreField\currQuiz\eqButton\currQuiz + +\noindent +Answers: \AnswerField\currQuiz + +\end{document} diff --git a/texmf-dist/doc/latex/acrotex/examples/test_install.pdf b/texmf-dist/doc/latex/acrotex/examples/test_install.pdf new file mode 100644 index 00000000..c3c5e636 Binary files /dev/null and b/texmf-dist/doc/latex/acrotex/examples/test_install.pdf differ diff --git a/texmf-dist/doc/latex/acrotex/examples/test_install.tex b/texmf-dist/doc/latex/acrotex/examples/test_install.tex new file mode 100644 index 00000000..f804b9c8 --- /dev/null +++ b/texmf-dist/doc/latex/acrotex/examples/test_install.tex @@ -0,0 +1,38 @@ +\documentclass{article} +\usepackage[designiv]{web} +\usepackage{eforms} + +\begin{defineJS}{\isImportAnFDFKnown} +console.clear(); console.show(); +if ( typeof aebImportAnFDF == "function" ) { + app.beep(0); + console.println("aeb.js is successfully installed, congratulations!"); + console.println("\\nYou're ready to Rock with AcroTeX!"); +} else { + app.beep(0); app.beep(0); + console.println("aeb.js is not, repeat NOT, installed correctly!"); +} +\end{defineJS} + +\thispagestyle{empty} +\parindent0pt\parskip6pt + +\begin{document} + +This is a file to test your \textsf{AeB} installation. + +To test the \textsf{AeB} installation, press this button: +\pushButton[\CA{Test AeB}\A{\JS{\isImportAnFDFKnown}}]{btnTest}{}{11bp} + +Upon pressing the button, if you have installed the \texttt{aeb.js} file +correctly, a congratulatory message appears in the console window; if the +installation is not correct, a message informs you so. On failure, did you +close \textsf{Acrobat} before opening this file? (The JS files are only read +once when the \textsf{Acrobat} application is opened.) When all else fails, +try rereading the installation instructions again +(\texttt{install\_jsfiles.pdf}), found in the \texttt{doc} folder, but more +carefully this time. + + + +\end{document} diff --git a/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf new file mode 100644 index 00000000..a82dca64 Binary files /dev/null and b/texmf-dist/doc/latex/acrotex/examples/webeqtst.pdf differ diff --git a/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex b/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex new file mode 100644 index 00000000..0d0634ec --- /dev/null +++ b/texmf-dist/doc/latex/acrotex/examples/webeqtst.tex @@ -0,0 +1,472 @@ +\documentclass{article} +\usepackage{amsmath} +\usepackage[tight,designvi]{web} +\usepackage[nosolutions]{exerquiz} + +\title{\texorpdfstring{Acro\!\TeX}{AcroTeX} eDucation Bundle + \texorpdfstring{\\[1ex]}{:}Exercises and Quizzes} +\author{D. P. Story} +\subject{File to test web and exerquiz packages} +\keywords{LaTeX, hyperref, PDF, exercises, quizzes} +\university{NORTHWEST FLORIDA STATE COLLEGE\\ + Department of Mathematics} +\email{dpstory@acrotex.net} +\version{3.0} +\copyrightyears{1999-\the\year} +\nocopyright +\revisionLabel{} + +\sqTurnOffAlerts + + +% To insert a message on the cover page, uncomment the lines below, +% and insert the 'nodirectory' option into the web package line above. +\usepackage{pifont} +\optionalPageMatter{\par\minimumskip\vspace{\stretch{1}} + \begin{center} + \fcolorbox{blue}{webyellow}{% + \begin{minipage}{.67\linewidth} + \noindent\textcolor{red}{\textbf{Legend:}} In \hyperref[s:corrections] + {Section~\ref*{s:corrections}}, a \textcolor{red}{\ding{52}} + indicates that the student gave the correct response; a + \textcolor{red}{\ding{56}}, indicates an incorrect response, + in this case, the correct answer is marked with a \textcolor{webgreen} + {\ding{108}}. + \end{minipage}} + \end{center} +} + +\newcounter{probno}[section] +\renewcommand{\theprobno}{\thesection.\arabic{probno}} +% +% Define a problem environment with its own counter. +\newenvironment{problem}{% +\renewcommand\exlabel{Problem}% +\renewcommand\exlabelformat{\textbf{\exlabel\ \theprobno.}}% +\renewcommand\exsllabelformat + {\noexpand\textbf{\exlabel\ \theprobno.}}% +\renewcommand\exrtnlabelformat{$\blacktriangleleft$}% +\renewcommand\exsecrunhead{Solutions to Problems}% +\begin{exercise}[probno]} +{\end{exercise}} + + +% Define a example environment with no counter +\newenvironment{example}{% +\renewcommand\exlabel{Example}% +\renewcommand\exlabelformat{\textbf{\exlabel.}}% +\renewcommand\exrtnlabelformat{$\square$}% +\SolutionsAfter +\begin{exercise}[0]}% +{\end{exercise}} + +% Below is a new command to change the page layout for paper +% Useful for documents such as homework assignments and other +% hand-outs to the students. Try it when the forpaper, or +% forcolorpaper is in effect. +% \useFullWidthForPaper + +% Use circles for MC questions in quiz environments. +\useMCCircles + +\begin{document} + +\maketitle + +\tableofcontents + + +\section{Introduction} + +This is a sample file to give templates of the environments +defined in \texttt{exerquiz}. The file illustrates the +\texttt{exercise}, the \texttt{shortquiz} and \texttt{quiz} +environments. + +In the case of the quiz environments, only multiple-choice +questions are illustrated. Open ended, or objective style +questions are demonstrated in other sample files. + +\section{Online Exercises} + +A well-designed sequences of exercises can be of aid to the student. The +\texttt{exercise} environment makes it easy to produce electronic +exercises. By using the \texttt{forpaper} option, you can also make a +paper version of your exercises. See the \texttt{aeb\_man.pdf} reference +manual. + +\begin{exercise} +Evaluate the integral \(\displaystyle\int x^2 e^{2x}\,dx\). +\begin{solution} +We evaluate by \texttt{integration by parts}:\normalsize +\begin{alignat*}{2} + \int x^2 e^{2x}\,dx & + = \tfrac12 x^2 e^{2x} - \int x e^{2x}\,dx &&\quad + \text{$u=x^2$, $dv=e^{2x}\,dx$}\\& + = \tfrac12 x^2 e^{2x} - + \Bigl[\tfrac12 x e^{2x}-\int \tfrac12 e^{2x}\,dx\Bigr] &&\quad + \text{integration by parts}\\& + = \tfrac12 x^2 e^{2x} - \tfrac12 x e^{2x} + \tfrac12\int e^{2x}\,dx &&\quad + \text{$u=x^2$, $dv=e^{2x}\,dx$}\\& + = \tfrac12 x^2 e^{2x} - \tfrac12 x e^{2x} + \tfrac14 e^{2x} &&\quad + \text{integration by parts}\\& + = \tfrac14(2x^2-2x+1)e^{2x} &&\quad + \text{simplify!} +\end{alignat*} +\end{solution} +\end{exercise} + +In the preamble of this document, we defined a \texttt{problem} +environment with its own counter. Here is an example of it. + +\begin{problem} +Is $F(t)=\sin(t)$ an antiderivative of $f(x)=\cos(x)$? Explain +your reasoning. +\begin{solution} +The answer is yes. The definition states that $F$ is an +antiderivative of $f$ if $F'(x)=f(x)$. Note that +$$ + F(t)=\sin(t) \implies F'(t) = \cos(t) +$$ +hence, $F(x) = \cos(x) = f(x)$. +\end{solution} +\end{problem} + +\begin{problem} +Is $F(t)=\sin(t)$ an antiderivative of $f(x)=\cos(x)$? Explain +your reasoning. +\begin{solution} +The answer is yes. The definition states that $F$ is an +antiderivative of $f$ if $F'(x)=f(x)$. Note that +$$ + F(t)=\sin(t) \implies F'(t) = \cos(t) +$$ +hence, $F(x) = \cos(x) = f(x)$. +\end{solution} +\end{problem} + +\noindent By modifying the \texttt{exercise} environment, you can +also create an \texttt{example} environment. The one defined in +the preamble of this document has no associated counter. + +\begin{example} +Give an example of a set that is \textit{clopen}. +\begin{solution} +The real number line is both closed and open in the usual topology of the +real line.% +\end{solution} +\end{example} + +There is an \texttt{exercise*} environment, using it signals the presence +of a multiple part exercise question. The following exercise illustrates +this environment. + +\begin{exercise*}\label{ex:parts} +Suppose a particle is moving along the $s$-axis, and that its position +at any time $t$ is given by $s=t^2 - 5t + 1$. +\begin{parts} +\item[h]\label{item:part} Find the velocity, $v$, of the particle at any time +$t$. +\begin{solution} +Velocity is the rate of change of position with respect to time. In +symbols: +$$ + v = \frac{ds}{dt} +$$ +For our problem, we have +$$ + v = \frac{ds}{dt} =\frac d{dt}(t^2 - 5t + 1) = 2t-5. +$$ +The velocity at time $t$ is given by $\boxed{v=2t-5}$. +\end{solution} + +\item Find the acceleration, $a$, of the particle at any time $t$. +\begin{solution} +Acceleration is the rate of change of velocity with respect to time. +Thus, +$$ + a = \frac{dv}{dt} +$$ +For our problem, we have +$$ + a = \frac{dv}{dt} =\frac d{dt}(2t-5)=2. +$$ +The acceleration at time $t$ is constant: $\boxed{a=2}$. +\end{solution} +\end{parts} +\end{exercise*} + +References can be made to a particular part of an exercise; for example, +``see \hyperref[item:part]{Exercise~\ref*{ex:parts}(\ref*{item:part})}.'' +Part (a) is in \textcolor{webblue}{blue}; the solutions for that part is +``hidden''. This is a new option for the \texttt{exercise} environment. + +There is now an option for listing multi-part question in tabular form. +This problem style does not obey the \texttt{solutions\-after} option. + +\begin{exercise*} +Simplify each of the following expressions in the complex number +system. \textit{Note}: $\bar z$ is the conjugate of $z$; +$\operatorname{Re} z$ is the real part of $z$ and +$\operatorname{Im} z$ is the imaginary part of $z$. +\begin{parts}[2] +\item $i^2$ +\begin{solution}[] +$i^2 = -1$ +\end{solution} +& +\item $i^3$ +\begin{solution}[] +$i^3 = i i^2 = -i$ +\end{solution} +\\ +\item $z+\bar z$ +\begin{solution}[] +$z+\bar z=\operatorname{Re} z$ +\end{solution} +& +\item[h] $1/z$ +\begin{solution}[] +$\displaystyle\frac 1z=\frac 1z\frac{\bar z}{\bar z}=\frac z{z\bar z}=\frac z{|z|^2}$ +\end{solution} +\end{parts} +\end{exercise*} + +\section{Short Quizzes with or without Solutions} + + +Short quizzes are quizzes with immediate response. As soon as the +user enters an answer, that answer is immediately evaluated, the +results of the evaluation are communicated to the user. + +Solutions can optionally be included in each question. Below is a +\texttt{shortquiz} without solution. + +\begin{shortquiz} +Was it in Xanadu did Kubla Kahn a stately pleasure dome +decree? +\begin{answers}{4} +\bChoices + \Ans1 True\eAns + \Ans0 False\eAns +\eChoices +\end{answers} +\end{shortquiz} + +\noindent Below is a \texttt{shortquiz} with a solution. + +\goodbreak + +\begin{shortquiz*}[KublaKhan] +In what year did Columbus sail the ocean blue? +\begin{answers}[qzcolumbus1]{4} +\bChoices + \Ans0 1490\eAns + \Ans0 1491\eAns + \Ans1 1492\eAns + \Ans0 1493\eAns +\eChoices +\end{answers} +\begin{solution} +\begin{quote} + In 1492, \\ + Columbus sailed the ocean blue.\hfill + + Profound was the logic in his quest,\\ + to get to the east, he headed west.\footnote{This poem was obtained by personal + communication from Leonard A. Stefanski, +Department of Statistics, North Carolina State University.} +\end{quote} +\end{solution} +\end{shortquiz*} + +\noindent These two types can be bundled together using the +\texttt{questions} environment. + +\begin{shortquiz} +Answer each of the following. Passing is 100\%. + +\begin{questions} + +\item Was it in Xanadu did Kubla Kahn a stately pleasure dome +decree? +\begin{answers}{4} +\Ans1 True & \Ans0 False \\ +\end{answers} + +\item In what year did Columbus sail the ocean blue? +\begin{answers}[qzcolumbus2]{4} +\Ans0 1490 &\Ans0 1491 &\Ans1 1492 &\Ans0 1493 +\end{answers} +\begin{solution} +\begin{quote} + In 1492, \\ + Columbus sailed the ocean blue. + + Profound was the logic in his quest,\\ + to get to the east, he headed west.\footnote{This poem was obtained by personal + communication from Leonard A. Stefanski, +Department of Statistics, North Carolina State University.} +\end{quote} +\end{solution} +\end{questions} +\end{shortquiz} + +\noindent Try using the \texttt{proofing} option of \textsf{exerquiz}. In +this case, the correct answer is indicated to the side; useful, perhaps, +for proof-reading the document + + +\section{Graded Quizzes with JavaScript} + +\CorrectionsOff % Don't want corrections for these two quizzes. + +You can create graded quizzes using the \texttt{quiz} environment. +Here is a graded quiz using simple links. This might be suitable for a +limited number of questions. + +\begin{quiz}{qzdiscr1} Using the discriminant, $b^2-4ac$, respond to each of the +following questions. + +\begin{questions} +\item Is the quadratic polynomial $x^2-4x + 3$ irreducible? +\begin{answers}{4} +\Ans0 Yes & \Ans1 No +\end{answers} +\item Is the quadratic polynomial $2x^2 - 4x + 3 $ irreducible? +\begin{answers}{4} +\Ans1 Yes &\Ans0 No +\end{answers} +\item How many solutions does the equation $2x^2 - 3x - 2= 0$ have? +\begin{answers}{4} +\Ans0 none &\Ans0 one &\Ans1 two +\end{answers} +\end{questions} +\end{quiz}\qquad\ScoreField{qzdiscr1} + +\noindent By using the \texttt*-option, you can create a multiple choice +set of question using check boxes. + +\begin{quiz*}{qzdiscr2} +Using the discriminant, $b^2-4ac$, respond to each of the +following questions. + +\begin{questions} +\item Is the quadratic polynomial $x^2-4x + 3$ irreducible? +\begin{answers}{4} +\Ans0 Yes &\Ans1 No +\end{answers} +\item Is the quadratic polynomial $2x^2 - 4x + 3 $ irreducible? +\begin{answers}{4} +\Ans1 Yes &\Ans0 No +\end{answers} +\item How many solutions does the equation $2x^2 - 3x - 2= 0$ have? +\begin{answers}{4} +\Ans0 none &\Ans0 one &\Ans1 two +\end{answers} +\end{questions} +\end{quiz*}\quad\ScoreField\currQuiz + +\noindent The \texttt{proofing} option of \textsf{exerquiz} can be used to +mark the correct answer to the side; useful, perhaps, for proof-reading +the document + + +\section{Correcting Quizzes with JavaScript}\label{s:corrections} + +\CorrectionsOn % Now we want corrections + +Beginning with version 1.2 of \textsf{exerquiz}, you can now grade +the quizzes created by the \texttt{quiz} environment. +In this section, we illustrate the \texttt{quiz} environment with +corrections. + +There are two types: link-style and form-style. +This is the link-style format: + + +\begin{quiz}{qzTeXl} Answer each of the following. Passing +is 100\%. +\begin{questions} +\item Who created \TeX? +\begin{answers}4 +\Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz +\end{answers} +\item Who originally wrote \LaTeX? +\begin{answers}{4} +\Ans0 Knuth &\Ans1 Lamport &\Ans0 Carlisle &\Ans0 Rahtz +\end{answers} +\end{questions} +\end{quiz}\quad\ScoreField\currQuiz\eqButton\currQuiz + +\medskip +We can obtain the forms-style quiz simply by inserting an \texttt* +before the quiz field name. +\textcolor{red}{Important!} Be sure to name each quiz field +differently! + +%\previewtrue + +%\useMCRects + + +\begin{quiz*}{qzTeXf} Answer each of the following. Passing +is 100\%. +\begin{questions} +\item Who created \TeX? +\begin{answers}*{4} +\Ans1 Knuth &\Ans0 Lamport &\Ans0 Carlisle &\Ans0 Rahtz +\end{answers} +\begin{solution} +Yes, it was Donald Knuth who first created \TeX. +\end{solution} +\item Who originally wrote \LaTeX? +\begin{answers}*{4} +\Ans0 Knuth &\Ans1 Lamport &\Ans0 Carlisle &\Ans0 Rahtz +\end{answers} +\begin{solution} +Yes, it was Leslie Lamport who first created \TeX. +\end{solution} +\end{questions} +\end{quiz*}\quad\ScoreField\currQuiz\eqButton\currQuiz + +The ``corrections'' button can be modified to fit your needs. The quiz +below queries your knowledge of the people who maintain various freeware +\TeX\ Systems.\footnote{This quiz is a bit out of date.} The corrections +button has been modified to take on a different look. + +\begin{quiz*}{qzTeXc} Answer each of the following. Passing +is 100\%. +\begin{questions} +\item What \TeX\ System does Thomas Esser maintain? +\begin{answers}{4} +\Ans0 Mik\TeX &\Ans0 cs\TeX &\Ans1 te\TeX &\Ans0 fp\TeX +\end{answers} +\item What \TeX\ System does Fabrice Popineau maintain? +\begin{answers}{4} +\Ans0 Mik\TeX &\Ans0 cs\TeX &\Ans0 te\TeX &\Ans1 fp\TeX +\end{answers} +\item What \TeX\ System does Christian Schenk maintain? +\begin{answers}{4} +\Ans1 Mik\TeX &\Ans0 cs\TeX &\Ans0 te\TeX &\Ans0 fp\TeX +\end{answers} +\end{questions} +\end{quiz*}\quad +\ScoreField{qzTeXc}% + \eqButton[\BC{0 0 1} % blue border color + \CA{TeX} % Button text + \RC{Users} % rollover text + \AC{Group} % pushed text + \DA{/TiRo 10 Tf 0 0 1 rg} % times roman, 10 pt, blue text + \W{1}\S{I} % border width 1, inset button + ]{qzTeXc} + +\section{Objective-Style Questions} + +It is possible to pose objective-style questions (fill-in-the-blank). The +demo file for this style question is called +\href{http://www.math.uakron.edu/~dpstory/acrotex/examples/html/jquiztst.pdf}{jquiztst.pdf} +(relative link: \href{jquiztst.pdf}{jquiztst.pdf}). Click on the link to +review this demo file. + +\end{document} -- cgit v1.2.3