%
% This is a modified version of selectversion_tst.tex, which is distributed with eqexam
%
\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage[pointsonleft,nototals,forcolorpaper,
% Select exactly one of the next three options
%    nosolutions,
%    answerkey,
    vspacewithsolns,
    obeylocalversions
]{eqexam}

\usepackage{mi-solns}

\university
{%
      NORTHWEST FLORIDA STATE COLLEGE\\
          Department of Mathematics
}
\email{storyd@nwfsc.edu}

\examNum{1}\numVersions{5}\forVersion{e}
\subject[CA]{College Algebra}
\longTitleText
    {Test~{\nExam} A}
    {Test~{\nExam} B}
    {Test~{\nExam} C}
    {Test~{\nExam} D}
    {Test~{\nExam} E}
\endlongTitleText
\shortTitleText
    {T\nExam-A}
    {T\nExam-B}
    {T\nExam-C}
    {T\nExam-D}
    {T\nExam-E}
\endshortTitleText
\title[\sExam]{\Exam}
\author{Dr.\ D. P. Story}
\date{\thisterm, \the\year}
\duedate{09/30/09}
\keywords{MAC 1105, Exam \nExam, {\thisterm} semester, \theduedate, at NWFSC}

\newcommand{\cs}[1]{\texttt{\char`\\#1}}
\solAtEndFormatting{\eqequesitemsep{3pt}}
\turnContAnnotOn

%\copySolnsOff

\begin{document}

\maketitle

\medskip\noindent
This is a modified version of \texttt{selectversion\_tst.tex}, which is
distributed with \textsf{eqexam}, see that file for more details on producing
a document with multiple versions.

\ifanswerkey When \texttt{answerkey} option is taken, the SOL file is not
written to include the solutions to the problem, as a result, the solutions
not available; however, by saying \cs{SolutionsAtEnd} you can locally turn on
writing the solutions and off writing with \cs{SolutionsAfter}.\fi
\par\medskip\noindent
dps: \textsl{\insExSoln[\ignoreterminex]{dps}}\medskip\par\noindent
kaf: \textsl{\insExSoln[\ignoreterminex]{kaf}}

\begin{exam}[Part 1]{P1}

\writeToSolnFile{\par\medskip
  This comment is written to the solution file, but it should appear
  when a solution is input using \protect\cs{insExSoln}, at least I hope so.\par\medskip}

\selectVersion{}{3}
\begin{problem}\relax
\verb!\selectVersion{}{3}! \begin{cq}This problem is version \vA{A}\vB{B}\vC{C} of 3.\end{cq}

\mrkForIns{dps}
\begin{solution}
The first problem, version \vA{A}\vB{B}\vC{C} of 3.
\end{solution}
\end{problem}

\begin{problem*}[2ea]
Multi-part question.
    \begin{parts}
\selectVersion{}{4}
    \item \verb!\selectVersion{}{4}! This is problem, version \vA{A}\vB{B}\vC{C}\vD{D} of 4.
\begin{solution}
This is version \vA{A}\vB{B}\vC{C}\vD{D}

The answer is:
\begin{verA}
This is version A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verC}
This is version C
\end{verC}
\begin{verD}
This is version D
\end{verD}
\end{solution}

\selectVersion{}{3}
    \item \verb!\selectVersion{}{3}! This is a problem, version \vA{A}\vB{B}\vC{C} of 3.
\begin{verA}
This is A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verE}
This is version E
\end{verE}

\mrkForIns{kaf}
\begin{solution}
This is version \vA{A}\vB{B}\vC{C}\vD{D}

The answer is:
\begin{verA}
This is version A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verC}
This is version C
\end{verC}
\begin{verD}
This is version D
\end{verD}
\end{solution}

\pushProblem % this closes the group
\begin{eqComments}
We insert a new page command so we can see the shortened titles on the next page
to verify that the new system of title management is working correctly.
\end{eqComments}
\emitMessageNearBottom*[.75\textheight]{%
    \vfill\hfill\textbf{Problem~{\eqeCurrProb} continues on next page}}
\popProblem % this begins a group

\selectVersion{}{5}
    \item \verb!\selectVersion{}{5}! This is a problem, version \vA{A}\vB{B}\vC{C}\vD{D}\vE{E} of 5.
\begin{verB}
This is version B
\end{verB}
\begin{verE}
This is version E
\end{verE}
\begin{solution}
This is version \vA{A}\vB{B}\vC{C}\vD{D}\vE{E}

The answer is:
\begin{verB}
This is version B
\end{verB}
\begin{verE}
This is version E
\end{verE}
\end{solution}

\selectVersion{}{4}
    \item \verb!\selectVersion{}{4}! This is a problem, version \vA{A}\vB{B}\vC{C}\vD{D} of 4.
\begin{verA}
This is A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verE}
This is version E
\end{verE}
\begin{solution}
This is version \vA{A}\vB{B}\vC{C}\vD{D}\vE{E}.

The answer is:
\begin{verA}
This is version A
\end{verA}
\begin{verB}
This is version B
\end{verB}
\begin{verC}
This is version C
\end{verC}
\begin{verD}
This is version D
\end{verD}
\begin{verE}
This is version E
\end{verE}
\end{solution}
\end{parts}
\end{problem*}

\end{exam}
\end{document}