%%
%% This is file `examheader.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% examheader.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% 
%% Copyright (C) 2004 by Steven M. McKay
%% 
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.2 of this license or (at your option) any later
%% version.  The latest version of this license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[2001/06/01]
\ProvidesPackage{examheader}[2014/05/05 .dtx examheader file]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Set the Options to pass through to automultiplechoice
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareOption*{%
\PassOptionsToPackage{\CurrentOption}{automultiplechoice}%
}
\ProcessOptions\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Load Necessary Packages  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{automultiplechoice}
\RequirePackage{tikz} %needed for the \foreach command
\RequirePackage{pst-barcode}
\RequirePackage[crop=off]{auto-pst-pdf} %needed to recreate the testing center barcode
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Front Page Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\newcommand{\examnumber}{\the\AMCid@etud}
\makeatother
\newcommand{\threedigit}[1]{
  \ifnum#1<100 0\fi%
  \ifnum#1<10 0\fi%
  \number#1%
}
\newcommand{\testingcode}[1]{\begin{pspicture}(1.5,0.5in)
\psbarcode[scalex=0.67,scaley=0.67]{#1}{includetext height=0.4}{code39}
\end{pspicture}}

\newcommand{\frontpage}{
\testingcode{30311986}\hfill\bfseries{\LARGE\threedigit{\examnumber}}}

\AtEndDocument{
}
\endinput
%%
%% End of file `examheader.sty'.
