%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
%%% File: FYM2.sty, January 2007, updated by I. Fulman from the
%%%       original file FYM.sty of November 2002, by B. Welfert
%%%                                               
%%% ================================================================
%%% Copyright (c) 2002 by Bruno Welfert. All rights reserved.
%%% This file is free and can be modified or distributed as long as
%%% you meet the following conditions:
%%%
%%% (1) This copyright notice is kept intact on all modified copies.
%%% (2) If you modify this file, you MUST NOT use the original file name.
%%%
%%% Usage:
%%% ======
%%%
%%% To use this file with LaTeX2e, keep it with the rest of your tex
%%% files or make sure your TEXINPUTS environment variable contains the
%%% directory in which this file is located. Include this file as a
%%% package in the preamble:
%%%
%%% \documentclass[...]{report}
%%% \usepackage{FYM2}
%%%
%%% A template for an exam is provided in the file "test2.tex", available
%%% from the same place where you obtained this file.
%%%
%%% Command Names:
%%% ==============
%%%
%%% The following is a list of all variables the user needs to redefine
%%% using \renewcommand, e.g.,
%%%
%%% \renewcommand{\instructor}{First M. Last}
%%%
%%% after loading the package in LaTeX2e.
%%%
%%% \instructor    %% Instructor's name; defaults to "INSTRUCTOR'S NAME".
%%% \course        %% Course notation; defaults to "MAT ???".
%%% \coursetitle   %% Course title; defaults to "Course Title".
%%% \examnumber    %% Exam type and number; defaults to "Test ??".
%%% \examform      %% Exam form; defaults to "Form ??".
%%% \examsemester  %% Semester exam is taken; defaults to "???".
%%% \examyear      %% Year exam is taken; defaults to "????".
%%% \directions    %% Directions for students. Long! For the defalt see below.
%%% \calcpolicy    %% Calculatoir policy; for the default see below.
%%% \addpolicy     %% Additional policy, e.g. index cards; defaults to "-".
%%%  
%%% In addition to the above variables, the following commands are provided:
%%%
%%% \exampage      %% Generates the front page for an exam (test or final).
%%% \spot          %% Prints an underline blank for answers and signature.
%%%
%%% Finally, there are three new values used here. They may be calculated 
%%% AUTOMATICALLY in the latex file invoking this style file:
%%%
%%% \pages         %% Total number of pages
%%% \problems      %% Total number of problems
%%% \lastproblem   %% The number of the last problem (for example 10b).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\typeout{*********************************************************************}
\typeout{** Department of Mathematics & Statistics, Arizona State University} 
\typeout{** Exam style file version 2.0, January 2007.}
\typeout{** Written by B. Welfert, updated by I. Fulman.}
\typeout{*********************************************************************}

%%%
%%% Set up page layout parameters.
%%%
\setlength{\textheight}{9in} \setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in} \setlength{\textwidth}{6.55in}
\setlength{\voffset}{-.5in}


%%%
%%% Set up default values.
%%%
\newcommand{\instructor}{INSTRUCTOR'S NAME}
\newcommand{\course}{MAT ???}
\newcommand{\coursetitle}{Course Title}
\newcommand{\examnumber}{Test ??}
\newcommand{\examform}{Form ??}
\newcommand{\examsemester}{???}
\newcommand{\examyear}{????}

\newcommand{\pages}{??}
\newcommand{\problems}{??}
\newcommand{\lastproblem}{??}

\newcommand{\calcpolicy}{No calculators with QWERTY keyboards or ones like the 
Casio FX-2, TI-89 or TI-92 that do symbolic algebra may be used.}
\newcommand{\addpolicy}{-}


%%%
%%% Generate cover page.
%%%

\newcommand\spot[1]{\rule[-3pt]{#1}{.5pt}}%
\renewcommand\headheight{45pt}
\renewcommand{\ps@myheadings}{%
    \renewcommand{\@oddhead}{
    \scriptsize\hfil\parbox[b]{0.9\textwidth}{\begin{center}
    \course, \examsemester\hspace*{2pt}\examyear, \examnumber, \examform \ -- 
    \instructor \\
    \copyright\hspace*{2pt}\examyear\hspace*{2pt}
    Arizona State University Department of Mathematics \& Statistics 
    \end{center}}\hfil\vspace*{-20pt}}
    \renewcommand{\@oddfoot}{\hfil\thepage\hfil}
}

\newcommand{\exampage}{
    \pagestyle{myheadings}
    \noindent\hspace*{10pt}
    \fbox{\parbox[t]{0.95\textwidth}{
         \vspace*{10pt}
         \textbf{\Large \hspace*{\parindent} \course}\\[5pt]
         \textrm{\Large \hspace*{\parindent} \coursetitle}\\[5pt]
         \textbf{\Large \hspace*{\parindent} \instructor}\\[15pt]
         \textbf{\Large \hspace*{\parindent} \examnumber}\\[15pt]
         \textbf{\Large \hspace*{\parindent} \examform \vspace*{5pt}}}}

\vspace*{20pt}

{\bf \underline{Instructions:}
\begin{itemize}
\item The exam consists of \problems\ problems on \pages\ pages. Most problems
are subdivided into sections like 1(a), 1(b), etc. The last problem is 
\lastproblem.  Make sure your exam is complete before you begin. \vspace{-5pt}
\item Show all work in detail or your answer will not receive any credit.  All
answers without supporting work receive ZERO credit. \vspace{-5pt}
\item Write neatly and box all answers. \vspace{-5pt}
\item Include appropriate units on all questions that apply. \vspace{-5pt}
\item When drawing graphs, make sure to clearly label axes, scale, and
curves. \vspace{-5pt}
\item Do not use your own scratch paper.  You may ask for
scratch paper at the front desk of the Testing Center. \vspace{-5pt}
\item \calcpolicy
\if -\addpolicy \else \vspace{-5pt} \item \addpolicy \fi
\end{itemize}}

\vspace{20pt}

\noindent {\bf Honor Statement:} \\
{\rm By signing below you confirm that you have neither given nor received 
any unauthorized assistance on this exam. This includes any use of a 
graphing calculator beyond those uses specifically authorized by the 
Mathematics Department and your instructor.  Furthermore, you agree not to 
discuss this exam with anyone until the exam testing period is over.  In 
addition, your calculator’s program memory and menus may be checked at any 
time and cleared by any testing center proctor or Mathematics Department
instructor.} 

\vspace{30pt}

\begin{center}\spot{3in} \hfil \spot{2 in}\end{center}
\vspace*{-20pt}
\begin{center}Signature \hspace{200pt} Date \end{center}

\newpage
}
