diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/bangorexam/README.txt | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf | bin | 181972 -> 181694 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx | 66 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls | 47 |
4 files changed, 77 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/latex/bangorexam/README.txt b/Master/texmf-dist/doc/latex/bangorexam/README.txt index 1cfe1775f7c..ee47d8fa417 100644 --- a/Master/texmf-dist/doc/latex/bangorexam/README.txt +++ b/Master/texmf-dist/doc/latex/bangorexam/README.txt @@ -1,7 +1,7 @@ Bangor University Computer Science Department Exam Document Class Cameron Gray <c.gray@bangor.ac.uk> -September 26, 2016 +March 14, 2017 Abstract Starting with the 2016/17 academic year, the Computer Science department at @@ -17,6 +17,7 @@ The document class is activated (or loaded) using the usual LATEX command \documentclass{bangorexam}. The class requires one of the following options to control which ‘style’ of exam paper is produced. [ab] - produces a compulsory Section A and a ‘two from three’ Section B exam. +[aonly] - produces a single section, all questions compulsory exam. [twofour] - produces a single part ‘two from four’ exam. The ‘answers’ option controls the inclusion of solutions as part of the output. diff --git a/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf b/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf Binary files differindex 162fb03a640..08a76116bd1 100644 --- a/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf +++ b/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf diff --git a/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx b/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx index 0f49fa33c05..570be45c7da 100644 --- a/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx +++ b/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx @@ -40,7 +40,7 @@ \end{document} %</driver> %\fi -%\CheckSum{553} +%\CheckSum{589} %\RecordChanges %\changes{v1.0}{2016/09/26}{Initial version.} %\changes{v1.1}{2016/10/17}{Added two from four exam mode.} @@ -49,10 +49,11 @@ %\changes{v1.1.2}{2016/10/29}{Add page numbers and multiple choice elements.} %\changes{v1.1.3}{2016/11/15}{Fixed question totals when using sub/subsubparts.} %\changes{v1.1.4}{2016/11/21}{Fixed turn-over prompts given page numbering change.} +%\changes{v1.2.0}{2017/03/14}{Added A-Only Exam Type.} %\pagestyle{fancy} %\title{Bangor University Computer Science Department\\ Exam Document Class} %\author{Cameron Gray \texttt{<c.gray@bangor.ac.uk>}} -%\date{November 15, 2016} +%\date{March 14, 2017} %\maketitle % %\begin{abstract} @@ -73,6 +74,9 @@ % %\oarg{ab} - produces a compulsory Section A and a `two from three' Section B %exam. +% +%\oarg{aonly} - produces a single section, all questions compulsory exam. +% %\oarg{twofour} - produces a single part `two from four' exam. % %The `answers' option controls the inclusion of solutions as part of the @@ -81,6 +85,9 @@ %|\documentclass[ab]{bangorexam}| - produces the student form of a Section A/B %exam paper. % +%|\documentclass[aonly]{bangorexam}| - produces the student form of an exam +%paper where all questions are compulsory. +% %|\documentclass[ab,answers]{bangorexam}| - produces the examiner form of the %paper. % @@ -278,11 +285,11 @@ %\end{macrocode} %\fi %\begin{macrocode} -\def\version{1.1.4 } +\def\version{1.2.0 } \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{bangorexam}[2016/10/29 \version C. Gray] +\ProvidesClass{bangorexam}[2017/03/14 \version C. Gray] % Based on the Exam document class by Philip S. Hirschhorn % Developed/Adapted for Bangor University by C. Gray @@ -312,8 +319,11 @@ \newcommand{\welATypeText}{Atebwch {\bf Adran A} (gorfodol) ac {\bf unrhyw ddau} gwestiwn o {\bf Adran B}.}% \newcommand{\engBTypeText}{Answer \textbf{two} out of four questions.}% \newcommand{\welBTypeText}{Atebwch \textbf{ddau} o'r pedwar cwestiwn.}% +\newcommand{\engCTypeText}{Answer all questions.}% +\newcommand{\welCTypeText}{Atebwch bob cwstiwn.}% \newcommand{\sectionAHeader}{\textbf{SECTION A} --- Answer \textbf{ALL} questions (Total marks \total{sectiona})}% \newcommand{\sectionBHeader}{\textbf{SECTION B} --- Answer any \textbf{TWO} questions (\total{sectionb} marks each)}% +\newcommand{\sectionAOnlyHeader}{Answer \textbf{ALL} questions (Total marks \total{sectiona})}% % ******************************************************************* % Class Level Options @@ -325,6 +335,7 @@ \newcommand{\welsh}{true}% \renewcommand{\sectionAHeader}{\textbf{ADRAN A} --- Atebwch BOB cwestiwn (Cyfanswm marciau \total{sectiona})}% \renewcommand{\sectionBHeader}{\textbf{ADRAN B} --- Atebwch unrhyw DDAU chwestiwn (\total{sectionb} marc yr un)}% + \renewcommand{\sectionAOnlyHeader}{Atebwch \textbf{BOB} cwestiwn (Cyfanswm marciau \total{sectiona})}% }% % Exam Type % ------------------------------------------------------------------- @@ -332,20 +343,26 @@ \newcommand{\welTypeText}{} \DeclareOption{ab}{% \newcommand{\examtype}{ab}% - \renewcommand{\engTypeText}{\engATypeText} - \renewcommand{\welTypeText}{\welATypeText} + \renewcommand{\engTypeText}{\engATypeText}% + \renewcommand{\welTypeText}{\welATypeText}% +}% +\DeclareOption{aonly}{% + \newcommand{\examtype}{aonly}% + \renewcommand{\engTypeText}{\engCTypeText}% + \renewcommand{\welTypeText}{\welCTypeText}% + \renewcommand{\sectionAHeader}{\sectionAOnlyHeader} }% \DeclareOption{twofour}{% \newcommand{\examtype}{twofour}% - \renewcommand{\engTypeText}{\engBTypeText} - \renewcommand{\welTypeText}{\welBTypeText} + \renewcommand{\engTypeText}{\engBTypeText}% + \renewcommand{\welTypeText}{\welBTypeText}% }% \DeclareOption{answers}{\PassOptionsToClass{\CurrentOption}{exam}}% \DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{exam}}% \ProcessOptions\relax% \ifx\examtype\undefined% - \ClassError{bangorexam}{An exam type option has not been defined; use ab or twofour in the class options}% + \ClassError{bangorexam}{An exam type option has not been defined; use ab, aonly, or twofour in the class options.}% \fi% \LoadClass[a4paper,twoside,11pt,addpoints]{exam}% @@ -518,6 +535,7 @@ } \vspace*{8mm} }{}% + \ifthenelse{\equal{\examtype}{aonly}}{\sectiona}{}% } % ******************************************************************* @@ -527,10 +545,10 @@ \newcounter{secb} \newcommand{\inDoc}{none}% \newcommand{\sectiona} {% - \ifthenelse{\equal{\examtype}{twofour}}{\ClassError{bangorexam}{Section A defined in a 'two from four' exam}\relax}{}% + \ifthenelse{\equal{\examtype}{twofour}}{\ClassError{bangorexam}{Section A defined in a 'two from four' exam.}\relax}{}% \ifnumcomp{\value{seca}}{>}{0} { - \ClassError{bangorexam}{There is already a Section A in this exam}\relax% + \ClassError{bangorexam}{There is already a Section A in this exam.}\relax% } { \stepcounter{seca}\relax% @@ -550,10 +568,11 @@ } \newcommand{\sectionb}{% -\ifthenelse{\equal{\examtype}{twofour}}{\ClassError{bangorexam}{Section B defined in a 'two from four' exam}\relax}{} +\ifthenelse{\equal{\examtype}{twofour}}{\ClassError{bangorexam}{Section B defined in a 'two from four' exam.}\relax}{} +\ifthenelse{\equal{\examtype}{aonly}}{\ClassError{bangorexam}{Section B defined in an 'A only' exam.}\relax}{} \ifnumcomp{\value{secb}}{>}{0} { - \ClassError{bangorexam}{There is already a Section B in this exam}\relax% + \ClassError{bangorexam}{There is already a Section B in this exam.}\relax% } { \stepcounter{secb}\relax% @@ -628,7 +647,7 @@ \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% + \ClassError{bangorexam}{Section B question \arabic{tmp} does not have an equal number of points (Existing Section B question worth \arabic{sectionb}).}\relax% }% }% {}% @@ -644,7 +663,7 @@ \ifnumcomp{\value{tf}}{=}{#1}% {}% {% - \ClassError{bangorexam}{Question \arabic{question} does not have an equal number of points (Existing question(s) worth \arabic{tf})}\relax% + \ClassError{bangorexam}{Question \arabic{question} does not have an equal number of points (Existing question(s) worth \arabic{tf}).}\relax% }% }% {}% @@ -680,19 +699,22 @@ \expandafter\ifstrequal\mytmp{4}% {\relax}% {% - \ClassError{bangorexam}{There is/are only (\numquestions) question(s) defined, there should be four}\relax% + \ClassError{bangorexam}{There is/are only (\numquestions) question(s) defined, there should be four.}\relax% }% }{% \ifnumcomp{\value{seca}}{=}{0}% {% - \ClassError{bangorexam}{There is no Section A defined in this exam}\relax% - }% - {\relax}% - \ifnumcomp{\value{secb}}{=}{0}% - {% - \ClassError{bangorexam}{There is no Section B defined in this exam}\relax% + \ClassError{bangorexam}{There is no Section A defined in this exam.}\relax% }% {\relax}% + \expandafter\ifstrequal\mytemp{ab} + {% + \ifnumcomp{\value{secb}}{=}{0}% + {% + \ClassError{bangorexam}{There is no Section B defined in this exam.}\relax% + }% + {\relax}% + }{}% }% } diff --git a/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls b/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls index 15aae01ffb5..f15114cb42e 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.4 } +\def\version{1.2.0 } \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{bangorexam}[2016/10/29 \version C. Gray] +\ProvidesClass{bangorexam}[2017/03/14 \version C. Gray] \RequirePackage[dvipsnames]{xcolor} @@ -68,33 +68,43 @@ \newcommand{\welATypeText}{Atebwch {\bf Adran A} (gorfodol) ac {\bf unrhyw ddau} gwestiwn o {\bf Adran B}.}% \newcommand{\engBTypeText}{Answer \textbf{two} out of four questions.}% \newcommand{\welBTypeText}{Atebwch \textbf{ddau} o'r pedwar cwestiwn.}% +\newcommand{\engCTypeText}{Answer all questions.}% +\newcommand{\welCTypeText}{Atebwch bob cwstiwn.}% \newcommand{\sectionAHeader}{\textbf{SECTION A} --- Answer \textbf{ALL} questions (Total marks \total{sectiona})}% \newcommand{\sectionBHeader}{\textbf{SECTION B} --- Answer any \textbf{TWO} questions (\total{sectionb} marks each)}% +\newcommand{\sectionAOnlyHeader}{Answer \textbf{ALL} questions (Total marks \total{sectiona})}% \DeclareOption{welsh}{% \newcommand{\welsh}{true}% \renewcommand{\sectionAHeader}{\textbf{ADRAN A} --- Atebwch BOB cwestiwn (Cyfanswm marciau \total{sectiona})}% \renewcommand{\sectionBHeader}{\textbf{ADRAN B} --- Atebwch unrhyw DDAU chwestiwn (\total{sectionb} marc yr un)}% +\renewcommand{\sectionAOnlyHeader}{Atebwch \textbf{BOB} cwestiwn (Cyfanswm marciau \total{sectiona})}% }% \newcommand{\engTypeText}{} \newcommand{\welTypeText}{} \DeclareOption{ab}{% \newcommand{\examtype}{ab}% -\renewcommand{\engTypeText}{\engATypeText} -\renewcommand{\welTypeText}{\welATypeText} +\renewcommand{\engTypeText}{\engATypeText}% +\renewcommand{\welTypeText}{\welATypeText}% +}% +\DeclareOption{aonly}{% +\newcommand{\examtype}{aonly}% +\renewcommand{\engTypeText}{\engCTypeText}% +\renewcommand{\welTypeText}{\welCTypeText}% +\renewcommand{\sectionAHeader}{\sectionAOnlyHeader} }% \DeclareOption{twofour}{% \newcommand{\examtype}{twofour}% -\renewcommand{\engTypeText}{\engBTypeText} -\renewcommand{\welTypeText}{\welBTypeText} +\renewcommand{\engTypeText}{\engBTypeText}% +\renewcommand{\welTypeText}{\welBTypeText}% }% \DeclareOption{answers}{\PassOptionsToClass{\CurrentOption}{exam}}% \DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{exam}}% \ProcessOptions\relax% \ifx\examtype\undefined% -\ClassError{bangorexam}{An exam type option has not been defined; use ab or twofour in the class options}% +\ClassError{bangorexam}{An exam type option has not been defined; use ab, aonly, or twofour in the class options.}% \fi% \LoadClass[a4paper,twoside,11pt,addpoints]{exam}% @@ -255,16 +265,17 @@ Time allowed:~\timeAllowed~hours } \vspace*{8mm} }{}% +\ifthenelse{\equal{\examtype}{aonly}}{\sectiona}{}% } \newcounter{seca} \newcounter{secb} \newcommand{\inDoc}{none}% \newcommand{\sectiona} {% -\ifthenelse{\equal{\examtype}{twofour}}{\ClassError{bangorexam}{Section A defined in a 'two from four' exam}\relax}{}% +\ifthenelse{\equal{\examtype}{twofour}}{\ClassError{bangorexam}{Section A defined in a 'two from four' exam.}\relax}{}% \ifnumcomp{\value{seca}}{>}{0} { -\ClassError{bangorexam}{There is already a Section A in this exam}\relax% +\ClassError{bangorexam}{There is already a Section A in this exam.}\relax% } { \stepcounter{seca}\relax% @@ -284,10 +295,11 @@ Time allowed:~\timeAllowed~hours } \newcommand{\sectionb}{% -\ifthenelse{\equal{\examtype}{twofour}}{\ClassError{bangorexam}{Section B defined in a 'two from four' exam}\relax}{} +\ifthenelse{\equal{\examtype}{twofour}}{\ClassError{bangorexam}{Section B defined in a 'two from four' exam.}\relax}{} +\ifthenelse{\equal{\examtype}{aonly}}{\ClassError{bangorexam}{Section B defined in an 'A only' exam.}\relax}{} \ifnumcomp{\value{secb}}{>}{0} { -\ClassError{bangorexam}{There is already a Section B in this exam}\relax% +\ClassError{bangorexam}{There is already a Section B in this exam.}\relax% } { \stepcounter{secb}\relax% @@ -359,7 +371,7 @@ Time allowed:~\timeAllowed~hours \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% + \ClassError{bangorexam}{Section B question \arabic{tmp} does not have an equal number of points (Existing Section B question worth \arabic{sectionb}).}\relax% }% }% {}% @@ -375,7 +387,7 @@ Time allowed:~\timeAllowed~hours \ifnumcomp{\value{tf}}{=}{#1}% {}% {% - \ClassError{bangorexam}{Question \arabic{question} does not have an equal number of points (Existing question(s) worth \arabic{tf})}\relax% + \ClassError{bangorexam}{Question \arabic{question} does not have an equal number of points (Existing question(s) worth \arabic{tf}).}\relax% }% }% {}% @@ -405,19 +417,22 @@ Time allowed:~\timeAllowed~hours \expandafter\ifstrequal\mytmp{4}% {\relax}% {% -\ClassError{bangorexam}{There is/are only (\numquestions) question(s) defined, there should be four}\relax% +\ClassError{bangorexam}{There is/are only (\numquestions) question(s) defined, there should be four.}\relax% }% }{% \ifnumcomp{\value{seca}}{=}{0}% {% -\ClassError{bangorexam}{There is no Section A defined in this exam}\relax% +\ClassError{bangorexam}{There is no Section A defined in this exam.}\relax% }% {\relax}% + \expandafter\ifstrequal\mytemp{ab} + {% \ifnumcomp{\value{secb}}{=}{0}% {% -\ClassError{bangorexam}{There is no Section B defined in this exam}\relax% +\ClassError{bangorexam}{There is no Section B defined in this exam.}\relax% }% {\relax}% + }{}% }% } |