From 7dd57cf20865906cdeb390110bd8c9d61ed0016a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 29 Nov 2022 21:08:17 +0000 Subject: bangorexam (29nov22) git-svn-id: svn://tug.org/texlive/trunk@65140 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bangorexam/README.txt | 2 +- .../texmf-dist/doc/latex/bangorexam/bangorexam.pdf | Bin 182901 -> 298037 bytes .../source/latex/bangorexam/bangorexam.dtx | 31 +++++++++++++++------ .../texmf-dist/tex/latex/bangorexam/bangorexam.cls | 24 ++++++++++++---- 4 files changed, 41 insertions(+), 16 deletions(-) diff --git a/Master/texmf-dist/doc/latex/bangorexam/README.txt b/Master/texmf-dist/doc/latex/bangorexam/README.txt index a3fa385c48a..59ad31160b7 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 -November 21, 2017 +November 28, 2022 Abstract Starting with the 2016/17 academic year, the Computer Science department at diff --git a/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf b/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf index c7e7d8abafb..b0676925999 100644 Binary files a/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf and b/Master/texmf-dist/doc/latex/bangorexam/bangorexam.pdf differ diff --git a/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx b/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx index 61a4a4f0b51..71f43141bf6 100644 --- a/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx +++ b/Master/texmf-dist/source/latex/bangorexam/bangorexam.dtx @@ -19,7 +19,7 @@ %\fi % \iffalse % Doc-Source file to use with LaTeX2e -% Copyright (C) 2016-17 Cameron Gray , all rights reserved. +% Copyright (C) 2016-22 Cameron Gray , all rights reserved. % \fi % \iffalse %<*driver> @@ -40,7 +40,7 @@ \end{document} % %\fi -%\CheckSum{668} +%\CheckSum{696} %\RecordChanges %\changes{v1.0}{2016/09/26}{Initial version.} %\changes{v1.1}{2016/10/17}{Added two from four exam mode.} @@ -54,10 +54,11 @@ %\changes{v1.2.2}{2017/06/26}{Changed resit description to 'Summer' due to change in regulations.} %\changes{v1.3.0}{2017/10/06}{Replaced exam types with generalised n-from forms, with or without a compulsory Section A.} %\changes{v1.4.0}{2017/11/21}{Updated coversheet to adhere to changed regulations.} +%\changes{v1.5.0}{2022/11/28}{Updated coversheet to adhere to changed regulations.} %\pagestyle{fancy} %\title{Bangor University Computer Science Department\\ Exam Document Class} %\author{Cameron Gray \texttt{}} -%\date{November 21, 2017} +%\date{November 28, 2022} %\maketitle % %\begin{abstract} @@ -297,11 +298,11 @@ %\end{macrocode} %\fi %\begin{macrocode} -\def\version{1.4.0 } +\def\version{1.5.0 } \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{bangorexam}[2017/11/21 \version C. Gray] +\ProvidesClass{bangorexam}[2022/11/28 \version C. Gray] % Based on the Exam document class by Philip S. Hirschhorn % Developed/Adapted for Bangor University by C. Gray @@ -330,7 +331,9 @@ % ******************************************************************* \newcommand{\engATypeText}{Answer {\bf Section A} (compulsory) and {\bf any \arabic{qN}} questions from {\bf Section B}.}% +\newcommand{\engATypeTextSingle}{Answer {\bf Section A} (compulsory) and {\bf one} question from {\bf Section B} only.}% \newcommand{\welATypeText}{Atebwch {\bf Adran A} (gorfodol) ac {\bf unrhyw \arabic{qN}} gwestiwn o {\bf Adran B}.}% +\newcommand{\welATypeTextSingle}{Atebwch {\bf Adran A} (gorfodol) ac {\bf un} cwestiwn yn unig o {\bf Adran B}.}% \newcommand{\engBTypeText}{Answer any \textbf{\arabic{qN}} questions.}% \newcommand{\welBTypeText}{Atebwch unrhyw \textbf{\arabic{qN}} o'r pedwar cwestiwn.}% \newcommand{\engCTypeText}{Answer all questions.}% @@ -338,6 +341,7 @@ \newcommand{\sectionAHeader}{\textbf{SECTION A} --- Answer \textbf{ALL} questions (Total marks \total{sectiona})}% \newcommand{\sectionBHeader}{\textbf{SECTION B} --- Answer any \textbf{\arabic{qN}} questions (\total{sectionb} marks each)}% \newcommand{\sectionAOnlyHeader}{Answer \textbf{ALL} questions (Total marks \total{sectiona})}% +\newcommand{\sectionBHeaderSingle}{{\textbf{SECTION B} --- Answer one question only (\total{sectionb} marks each)}}% % ******************************************************************* % Class Level Options @@ -348,19 +352,28 @@ \DeclareOption{welsh}{% \newcommand{\welsh}{true}% \renewcommand{\sectionAHeader}{\textbf{ADRAN A} --- Atebwch BOB cwestiwn (Cyfanswm marciau \total{sectiona})}% - \renewcommand{\sectionBHeader}{\textbf{ADRAN B} --- Atebwch unrhyw \textbf{\arabic{qN}} chwestiwn (\total{sectionb} marc yr un)}% + v% \renewcommand{\sectionAOnlyHeader}{Atebwch \textbf{BOB} cwestiwn (Cyfanswm marciau \total{sectiona})}% }% % Exam Type % ------------------------------------------------------------------- \newcounter{qN} -\newcommand{\nfrom}[1]{\setcounter{qN}{#1}} +\newcommand{\nfrom}[1]{% + \setcounter{qN}{#1}% + \ifnum \value{qN}=1% + \renewcommand{\engTypeText}{\engATypeTextSingle}% + \renewcommand{\welTypeText}{\welATypeTextSingle}% + \ifthenelse{\isundefined{\welsh}}{\renewcommand{\sectionBHeader}{{\textbf{SECTION B} --- Answer one question only (\total{sectionb} marks each)}}}% + {\renewcommand{\sectionBHeader}{\textbf{ADRAN B} --- Atebwch un cwestiwn yn unig (\total{sectionb} marc yr un)}}% + \else% + \renewcommand{\engTypeText}{\engATypeText}% + \renewcommand{\welTypeText}{\welATypeText}% + \fi% +} \newcommand{\engTypeText}{} \newcommand{\welTypeText}{} \DeclareOption{ab}{% \newcommand{\examtype}{ab}% - \renewcommand{\engTypeText}{\engATypeText}% - \renewcommand{\welTypeText}{\welATypeText}% \nfrom{2}% }% \DeclareOption{aonly}{% diff --git a/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls b/Master/texmf-dist/tex/latex/bangorexam/bangorexam.cls index 386456e85c3..db36cf7a54e 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.4.0 } +\def\version{1.5.0 } \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{bangorexam}[2017/11/21 \version C. Gray] +\ProvidesClass{bangorexam}[2022/11/28 \version C. Gray] \RequirePackage[dvipsnames]{xcolor} @@ -67,7 +67,9 @@ \newcommand{\engATypeText}{Answer {\bf Section A} (compulsory) and {\bf any \arabic{qN}} questions from {\bf Section B}.}% +\newcommand{\engATypeTextSingle}{Answer {\bf Section A} (compulsory) and {\bf one} question from {\bf Section B} only.}% \newcommand{\welATypeText}{Atebwch {\bf Adran A} (gorfodol) ac {\bf unrhyw \arabic{qN}} gwestiwn o {\bf Adran B}.}% +\newcommand{\welATypeTextSingle}{Atebwch {\bf Adran A} (gorfodol) ac {\bf un} cwestiwn yn unig o {\bf Adran B}.}% \newcommand{\engBTypeText}{Answer any \textbf{\arabic{qN}} questions.}% \newcommand{\welBTypeText}{Atebwch unrhyw \textbf{\arabic{qN}} o'r pedwar cwestiwn.}% \newcommand{\engCTypeText}{Answer all questions.}% @@ -75,22 +77,32 @@ \newcommand{\sectionAHeader}{\textbf{SECTION A} --- Answer \textbf{ALL} questions (Total marks \total{sectiona})}% \newcommand{\sectionBHeader}{\textbf{SECTION B} --- Answer any \textbf{\arabic{qN}} questions (\total{sectionb} marks each)}% \newcommand{\sectionAOnlyHeader}{Answer \textbf{ALL} questions (Total marks \total{sectiona})}% +\newcommand{\sectionBHeaderSingle}{{\textbf{SECTION B} --- Answer one question only (\total{sectionb} marks each)}}% \DeclareOption{welsh}{% \newcommand{\welsh}{true}% \renewcommand{\sectionAHeader}{\textbf{ADRAN A} --- Atebwch BOB cwestiwn (Cyfanswm marciau \total{sectiona})}% -\renewcommand{\sectionBHeader}{\textbf{ADRAN B} --- Atebwch unrhyw \textbf{\arabic{qN}} chwestiwn (\total{sectionb} marc yr un)}% +v% \renewcommand{\sectionAOnlyHeader}{Atebwch \textbf{BOB} cwestiwn (Cyfanswm marciau \total{sectiona})}% }% \newcounter{qN} -\newcommand{\nfrom}[1]{\setcounter{qN}{#1}} +\newcommand{\nfrom}[1]{% + \setcounter{qN}{#1}% + \ifnum \value{qN}=1% + \renewcommand{\engTypeText}{\engATypeTextSingle}% + \renewcommand{\welTypeText}{\welATypeTextSingle}% + \ifthenelse{\isundefined{\welsh}}{\renewcommand{\sectionBHeader}{{\textbf{SECTION B} --- Answer one question only (\total{sectionb} marks each)}}}% + {\renewcommand{\sectionBHeader}{\textbf{ADRAN B} --- Atebwch un cwestiwn yn unig (\total{sectionb} marc yr un)}}% + \else% + \renewcommand{\engTypeText}{\engATypeText}% + \renewcommand{\welTypeText}{\welATypeText}% + \fi% +} \newcommand{\engTypeText}{} \newcommand{\welTypeText}{} \DeclareOption{ab}{% \newcommand{\examtype}{ab}% -\renewcommand{\engTypeText}{\engATypeText}% -\renewcommand{\welTypeText}{\welATypeText}% \nfrom{2}% }% \DeclareOption{aonly}{% -- cgit v1.2.3