\documentclass{article}
\usepackage{amsmath}
\usepackage
    [tight,
     dvipsone,
     designi,
     nodirectory,
    ]{web}  % dvipsone, dvips, pdftex, dvipdfm
\usepackage{exerquiz}
\usepackage[indefIntegral]{dljslib}

\title{Illustrating the \texttt{dljslib} Package}
\author{D. P. Story}
\subject{Sample file}
\keywords{LaTeX, PDF, derivative, calculus, JavaScript}

\university{THE UNIVERSITY OF AKRON\\
Theoretical and Applied Mathematics}
\email{dpstory@uakron.edu}
\version{1.0} \copyrightyears{1999-2002}

\makeatletter
\let\web@copyright=\@gobble
\makeatother

\newcommand\redpoint{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
\vskip\medskipamount\noindent
  \makebox[\parindent][l]{\large\color{red}$\blacktriangleright$}}

\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}

\begin{document}

\maketitle

\noindent The \texttt{dljslib} Package, a companion of the
\texttt{insdljs} package, is a library of JavaScripts. By
specifying the options of the package, the JavaScripts to which
that option corresponds is extracted from the library and input
into the document using the syntax of the \texttt{insdljs}
Package, at which point the \texttt{insdljs} package takes over
and inserts these JavaScripts into the document level of your
final output PDF document.

The following example is an indefinite integral, which requires
special \textit{compare function} that the standard routines in \texttt{exerquiz}
do not provide. So, in the preamble, we said
\begin{verbatim}
\usepackage[indefIntegral]{dljslib}
\end{verbatim}
\noindent after we input \texttt{exerquiz}. This introduces the JavaScript function
\texttt{indefCompare()} into the document level. We are now free to refer to
this function, as in the following example.  If desired, use the letter `\texttt{C}' to denote
an ``arbitrary constant''.

\begin{oQuestion}{indefInt}
\redpoint$\displaystyle\int \sin(x)\,dx =
\RespBox{-cos(x)}[intSin]{4}{.0001}01[indefCompare]\kern1bp
\CorrAnsButton{-cos(x)}\kern1bp\sqTallyBox\kern1bp\sqClearButton$
\begin{solution}
\begin{equation*}
        \int \sin(x) \,dx = -\cos(x) + C
\end{equation*}
\end{solution}
\end{oQuestion}
See also the file \texttt{jqzequat.tex} for additional examples of the
library.

\end{document}
