summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdfbin180654 -> 181692 bytes
-rw-r--r--Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx49
-rw-r--r--Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls41
3 files changed, 74 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf b/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf
index 983dd558e64..0b879af8d16 100644
--- a/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf
+++ b/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx b/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx
index 096d240aa1f..0d45d4074d4 100644
--- a/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx
+++ b/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx
@@ -40,12 +40,13 @@
\end{document}
%</driver>
%\fi
-%\CheckSum{501}
+%\CheckSum{536}
%\RecordChanges
%\changes{v1.0}{2016/09/26}{Initial version.}
%\changes{v1.1}{2016/10/17}{Added two from four exam mode.}
%\changes{v1.1.1}{2016/10/18}{Emergency bugfix for etoolkit interaction on
%new documents.}
+%\changes{v1.1.2}{2016/10/29}{Add page numbers and multiple choice elements.}
%\pagestyle{fancy}
%\title{Bangor University Computer Science Department\\ Exam Document Class}
%\author{Cameron Gray \texttt{<c.gray@bangor.ac.uk>}}
@@ -275,11 +276,11 @@
%\end{macrocode}
%\fi
%\begin{macrocode}
-\def\version{1.1.1}
+\def\version{1.1.2 }
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{bangorexam}[2016/10/18 \version{} C. Gray]
+\ProvidesClass{bangorexam}[2016/10/29 \version C. Gray]
% Based on the Exam document class by Philip S. Hirschhorn
% Developed/Adapted for Bangor University by C. Gray
@@ -357,7 +358,7 @@
% Footer
\pagestyle{headandfoot}%
\coverfooter{}{}{\iflastpage{}{/ troi drosodd\\/ turn over}{}}%
-\footer{}{}{\oddeven{}{\iflastpage{}{/ troi drosodd\\/ turn over}}}%
+\footer{}{\thepage}{\oddeven{}{\iflastpage{}{/ troi drosodd\\/ turn over}}}%
% Cover Column Definition
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
@@ -373,6 +374,9 @@
\newtotcounter{tf}
\newtotcounter{sectiona}
\newtotcounter{sectionb}
+\newcounter{lq}
+\newcounter{lqp}
+\setcounter{lq}{-1}
\newcommand{\school}[2] {%
\def \engSchool {\expandafter\MakeUppercase\expandafter{#1}}%
@@ -498,6 +502,7 @@
\setlength{\marginparwidth}{0pt}
\maketitle
\end{coverpages}
+ \setcounter{page}{2}
\pointsinrightmargin
\ifthenelse{\equal{\examtype}{twofour}}{
\clearpage
@@ -565,6 +570,7 @@
% Patch Questions to make it Section-aware
% *******************************************************************
\renewcommand{\questionshook}{%
+ \setlength{\itemsep}{14pt}%
\edef\mytemp{{\inDoc}}%
\expandafter\ifstrequal\mytemp{secB}{\addtocounter{question}{100}}{}%
}
@@ -576,9 +582,22 @@
\expandafter\ifstrequal\mytemp{secB}{\addtocounter{tmp}{-100}\arabic{tmp}}{\arabic{question}}%
}
-\newcommand{\be@adduppoints}[1]{%
- \edef\mytemp{{\inDoc}}%
- \expandafter\ifstrequal\mytemp{secA}%
+\newcommand{\be@adduppoints}[1]{%
+ \ifnumcomp{\value{question}}{=}{\value{lq}}
+ {% Same question
+ \addtocounter{lqp}{#1}%
+ }
+ {% Moved onto next question
+ \be@addpoints{\totalpoints}%
+ \setcounter{lq}{\value{question}}%
+ \setcounter{lqp}{0}%
+ \addtocounter{lqp}{#1}%
+ }%
+}
+
+\newcommand{\be@addpoints}[1]{%
+ \edef\mytemp{{\inDoc}}%
+ \expandafter\ifstrequal\mytemp{secA}%
{%
\addtocounter{sectiona}{#1}%
\addtocounter{all}{#1}%
@@ -595,7 +614,10 @@
\ifnumcomp{\value{sectionb}}{=}{#1}%
{}%
{%
- \ClassError{bangorexam}{Section B question \arabic{question} does not have an equal number of points (Existing Section B question worth \arabic{sectionb})}\relax%
+ \setcounter{tmp}{0}%
+ \addtocounter{tmp}{\value{question}}%
+ \addtocounter{tmp}{-100}
+ \ClassError{bangorexam}{Section B question \arabic{tmp} does not have an equal number of points (Existing Section B question worth \arabic{sectionb})}\relax%
}%
}%
{}%
@@ -618,7 +640,7 @@
}
\newcommand{\patchqnumaddpoints}{%
-\be@adduppoints{\totalpoints}%
+\be@adduppoints{\@points}%
}
\pointformat{[\thepoints]}
\pointname{\null\patchqnumaddpoints}
@@ -627,6 +649,15 @@
}
% *******************************************************************
+% Multiple Choice commands.
+% *******************************************************************
+
+\let\horizontalchoices\oneparchoices
+\let\endhorizontalchoices\endoneparchoices
+\let\horizontalcheckboxes\oneparcheckboxes
+\let\endhorizontalcheckboxes\endoneparcheckboxes
+
+% *******************************************************************
% End of document validation
% *******************************************************************
diff --git a/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls b/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls
index e7076ac3c7d..f7163b7e76f 100644
--- a/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls
+++ b/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls
@@ -39,11 +39,11 @@
%% Right bracket \] Circumflex\^ Underscore\_
%% Grave accent \` Left brace\{ Vertical bar \|
%% Right brace \} Tilde \~}
-\def\version{1.1.1}
+\def\version{1.1.2 }
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{bangorexam}[2016/10/18 \version{} C. Gray]
+\ProvidesClass{bangorexam}[2016/10/29 \version C. Gray]
\RequirePackage[dvipsnames]{xcolor}
@@ -104,7 +104,7 @@
\pagestyle{headandfoot}%
\coverfooter{}{}{\iflastpage{}{/ troi drosodd\\/ turn over}{}}%
-\footer{}{}{\oddeven{}{\iflastpage{}{/ troi drosodd\\/ turn over}}}%
+\footer{}{\thepage}{\oddeven{}{\iflastpage{}{/ troi drosodd\\/ turn over}}}%
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
@@ -116,6 +116,9 @@
\newtotcounter{tf}
\newtotcounter{sectiona}
\newtotcounter{sectionb}
+\newcounter{lq}
+\newcounter{lqp}
+\setcounter{lq}{-1}
\newcommand{\school}[2] {%
\def \engSchool {\expandafter\MakeUppercase\expandafter{#1}}%
@@ -238,6 +241,7 @@ Time allowed:~\timeAllowed~hours
\setlength{\marginparwidth}{0pt}
\maketitle
\end{coverpages}
+\setcounter{page}{2}
\pointsinrightmargin
\ifthenelse{\equal{\examtype}{twofour}}{
\clearpage
@@ -299,6 +303,7 @@ Time allowed:~\timeAllowed~hours
}
\renewcommand{\questionshook}{%
+\setlength{\itemsep}{14pt}%
\edef\mytemp{{\inDoc}}%
\expandafter\ifstrequal\mytemp{secB}{\addtocounter{question}{100}}{}%
}
@@ -311,8 +316,21 @@ Time allowed:~\timeAllowed~hours
}
\newcommand{\be@adduppoints}[1]{%
- \edef\mytemp{{\inDoc}}%
- \expandafter\ifstrequal\mytemp{secA}%
+ \ifnumcomp{\value{question}}{=}{\value{lq}}
+ {% Same question
+ \addtocounter{lqp}{#1}%
+ }
+ {% Moved onto next question
+ \be@addpoints{\totalpoints}%
+ \setcounter{lq}{\value{question}}%
+ \setcounter{lqp}{0}%
+ \addtocounter{lqp}{#1}%
+ }%
+}
+
+\newcommand{\be@addpoints}[1]{%
+\edef\mytemp{{\inDoc}}%
+\expandafter\ifstrequal\mytemp{secA}%
{%
\addtocounter{sectiona}{#1}%
\addtocounter{all}{#1}%
@@ -329,7 +347,10 @@ Time allowed:~\timeAllowed~hours
\ifnumcomp{\value{sectionb}}{=}{#1}%
{}%
{%
- \ClassError{bangorexam}{Section B question \arabic{question} does not have an equal number of points (Existing Section B question worth \arabic{sectionb})}\relax%
+ \setcounter{tmp}{0}%
+ \addtocounter{tmp}{\value{question}}%
+ \addtocounter{tmp}{-100}
+ \ClassError{bangorexam}{Section B question \arabic{tmp} does not have an equal number of points (Existing Section B question worth \arabic{sectionb})}\relax%
}%
}%
{}%
@@ -352,7 +373,7 @@ Time allowed:~\timeAllowed~hours
}
\newcommand{\patchqnumaddpoints}{%
-\be@adduppoints{\totalpoints}%
+\be@adduppoints{\@points}%
}
\pointformat{[\thepoints]}
\pointname{\null\patchqnumaddpoints}
@@ -361,6 +382,12 @@ Time allowed:~\timeAllowed~hours
}
+\let\horizontalchoices\oneparchoices
+\let\endhorizontalchoices\endoneparchoices
+\let\horizontalcheckboxes\oneparcheckboxes
+\let\endhorizontalcheckboxes\endoneparcheckboxes
+
+
\AfterEndDocument{%
\edef\mytemp{{\examtype}}%
\expandafter\ifstrequal\mytemp{twofour}%