Skip to content
Snippets Groups Projects
Commit 77a52e83 authored by William Bell's avatar William Bell
Browse files

Adding files

parent 12f44e98
No related branches found
No related tags found
No related merge requests found
\documentclass[12pt]{article}
%\usepackage{verbatim}
\usepackage{fancyvrb}
\usepackage{tikz}
\usepackage{exam}
\usepackage{times}
\usepackage{stmaryrd}
\usepackage{mathpartir}
\usepackage{alltt}
\usepackage{enumerate}
\usepackage{xcomment}
\usepackage{algorithm,algorithmic}
% Only needed for demonstration.
\usepackage{lipsum}
\newenvironment{soltt}{\begin{xcomment}{document}}{\end{xcomment}}
\renewcommand{\familydefault}{\sfdefault}
\begin{document}
% When the paper has been written, the number of pages needs to be
% provided, instead of 11. (It should be possible to solve this
% properly with lastpage.)
\pagetot{CSxyz}{11}
\vspace*{-0.3cm}
\newcommand{\solflag}{1} %%% remove %%% from start of line to make answers
\ifx\solflag\undefined
\newcommand{\sol}[1]{}
\newcommand{\solonly}[1]{}
\else
\newcommand{\sol}[1]{\vspace*{-0.05in}\textit{#1}\vspace*{-0.2in}}
\newcommand{\solonly}[1]{#1}
\fi
% ---------------------------------------------------
%%% Preamble information.
\class{CSxyz\quad Anti-Engineering Methods \\ SPECIMEN SOLUTION}
\vspace*{-0.2cm}
\examdate{XX XXXX 2021} {XX:XX\,-\,XX:XX}{3 hours}
\vspace*{-0.5cm}
\preamble{Attempt THREE questions.}
\input{exam-questions}
\sig{Prof. E.~X.~A.~M. Setter}
\end{document}
File added
\documentclass[12pt]{article}
\usepackage[usenames]{color}
\usepackage{fancyvrb}
\usepackage{colordvi}
\usepackage{epic, eepic}
\usepackage{tikz}
\usepackage{exam}
\usepackage{times}
\usepackage{alltt}
\usepackage{enumerate}
\usepackage{xcomment}
\usepackage{mathpartir}
\usepackage{setspace}
\usepackage{algorithm,algorithmic}
% Only needed for demonstration.
\usepackage{lipsum}
\newenvironment{soltt}{\begin{xcomment}{document}}{\end{xcomment}}
\renewcommand{\familydefault}{\sfdefault}
\begin{document}
% When the paper has been written, the number of pages needs to be
% provided, instead of 11. (It should be possible to solve this
% properly with lastpage.)
\pagetot{CSxyz}{11}
\vspace*{-0.3cm}
%%%\newcommand{\solflag}{1} %%% remove %%% from start of line to make answers
\ifx\solflag\undefined
\newcommand{\sol}[1]{}
\newcommand{\solonly}[1]{}
\else
\newcommand{\sol}[1]{\vspace*{-0.05in}\textit{#1}\vspace*{-0.2in}}
\newcommand{\solonly}[1]{#1}
\fi
% ---------------------------------------------------
%%% Preamble information.
\class{CSxyz\quad Anti-Engineeering Methods}
\vspace*{-0.2cm}
\examdate{19th April 2021}{09:30\,-\,12:30}{3 hours}
\vspace*{-0.5cm}
\preamble{Attempt THREE questions.}
% ---------------------------------------------------
%%% Set the line spacing.
\setstretch{1.5}
% Some students require linespacing of 1.5 or 2.0. By default,
% the setstretch can be 1.0.
\input{exam-questions}
\sig{Prof. E.~X.~A.~M. Setter}
\end{document}
%% Commands that others have found useful.
\newcommand{\true}{\mbox{TRUE}}
\newcommand{\zero}{\mbox{ZERO}}
\newcommand{\one}{\mbox{ONE}}
\newcommand{\two}{\mbox{TWO}}
\newcommand{\false}{\mbox{FALSE}}
\newcommand{\bred}{\;\beta\hspace*{-1.5mm} \rightarrow\;}
\newcommand{\ared}{\;\alpha\hspace*{-1.5mm} \rightarrow\;}
\newcommand{\zxz}{\; \leftarrow\;}
\newcommand{\Oh}{\mathcal{O}}
\newcommand{\lar}{$ \quad \leftarrow \quad $}
\newcommand\GETOUT[1]{}
% ---------------------------------------------------
%%% Exam questions.
\newcommand{\True}{\mathsf{T}}
\newcommand{\False}{\mathsf{F}}
\newcommand{\sem}[1]{\llbracket #1 \rrbracket}
% Question 1
\begin{examqu}
\begin{examsubq}
\item Questions are a burden to others.
\mrks{6}
\sol{LEARNING OUTCOMES: \\ Answers are a prison for oneself}
\ssplit
\item Question everything.
\begin{examsubsubq}
\item Why?
\mrks{3}
\sol{LEARNING OUTCOMES: \\ See (ii).}
\item Why not?
\mrks{3}
\sol{LEARNING OUTCOMES: \\ See (i).}
\end{examsubsubq}
\end{examsubq}
\end{examqu}
\ssplit
% Question 2
\begin{examqu}
\begin{examsubq}
\item \lipsum[3]
\mrks{5}
\end{examsubq}
\end{examqu}
%%% End of questions.
% ---------------------------------------------------
\endinput
\ No newline at end of file
exam.sty 0 → 100644
\usepackage{ifthen,graphicx}
\usepackage[cmex10]{amsmath}
\usepackage{amssymb}
\usepackage{babel}
%--------------------------------
% pagesize and layout
%--------------------------------
\usepackage[a4paper,margin=12mm,top=40mm,bottom=40mm,headsep=10pt,headheight=123pt]{geometry}
\parskip=.55cm
%--------------------------------
% Font
%--------------------------------
% helvet is similar to Arial and is part of TexLive.
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
%-------------------------------------------
% University Crest
%-------------------------------------------
\usepackage{fancyhdr}
\rhead{\includegraphics[width=37mm]{images/strath_main.jpg}}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}
%------------------------------------------------
% Class name, exam date and preamble
%------------------------------------------------
\newcommand{\class}[1]{\vspace*{-2mm}\begin{center} \textsf{\textbf{\large{#1}}}
\end{center}}
\newcommand{\examdate}[3]{\textsf{{\textbf{#1}\hfill \textbf{#2}}\\
\mbox{\ }\hfill \textbf{Duration: #3}}}
\newcommand{\preamble}[1]{\begin{center} \textsf{\textbf{#1}}
\end{center}\vspace*{.2cm}}
%-----------------------------------------
% End of Paper and Signature
%-----------------------------------------
\newcommand{\sig}[1]{\vfill\begin{center}\large \textsf{\textbf{END OF PAPER}}
\end{center}
\begin{center}\textsf{\textbf{({#1})}}\end{center}\vfill}
%---------------------------------------------
% Page numbering
%---------------------------------------------
%%\newcommand{\pagetot}[2]{\renewcommand{\thepage}{\small{\textsf{\textbf{#1\hfill
%%Page \arabic{page} of\,\ {#2}}}}}}
\newcommand{\pagetot}[2]{\renewcommand{\thepage}{\small{\textsf{\textbf{#1\hfill\ {\ifthenelse{\equal{\value{page}}{#2}}{}{\textsf{\textbf{PLEASE TURN OVER}}}}
\hfill\ Page \arabic{page} of\,\ {#2}}}}}}
%---------------------------------------------
% Number of marks or one mark
%---------------------------------------------
\newcommand{\mrks}[1]{\nopagebreak\vspace*{-3mm}\begin{flushright}
\textsf{\textbf{(#1 marks)}}\end{flushright}}
\newcommand{\onemark}{\nopagebreak\begin{flushright} \textsf{\textbf{(1
mark)}}\end{flushright}}
%--------------------------------------------
% Exam Question Environment
%--------------------------------------------
\newboolean{qu}
\newcounter{examquestion}
\newenvironment{examqu}{\setboolean{qu}{true}
\addtocounter{examquestion}{1}
\begin{tabbing}\setlength{\tabbingsep}{0pt}
10.\=x\= x\+ \kill
\textbf{\theexamquestion.}\'\>\begin{minipage}[t]{6.4in} } {
\end{minipage}
\end{tabbing}\setboolean{qu}{false}}
%-------------------------------------------
% Exam Subquestion environment
%-------------------------------------------
\newboolean{sub}
\newcounter{exsubq}
\newenvironment{examsubq}{\setboolean{sub}{true}
\begin{list}{\textbf{(\alph{exsubq})}}{\usecounter{exsubq}
\setlength{\parsep}{0cm}\setlength{\itemindent}{0pt}
\setlength{\labelwidth}{6mm}\setlength{\itemsep}{1cm}\setlength{\labelsep}{2mm}\setlength{\leftmargin}
{\leftmarginiv} }} {\end{list}\setboolean{sub}{false}}
%-------------------------------------------
% Exam Sub-subquestion environment
%-------------------------------------------
\newcounter{exsubsubq}
\newenvironment{examsubsubq}{
\begin{list}{\textbf{(\roman{exsubsubq})}}{\usecounter{exsubsubq}
\setlength{\parsep}{0cm}\setlength{\itemindent}{0pt}
\setlength{\labelwidth}{6mm}\setlength{\itemsep}{1cm}\setlength{\labelsep}{2mm}\setlength{\leftmargin}
{\leftmarginiv}}} {\end{list}}
%-------------------------------------------
% Please turn over
%-------------------------------------------
\newboolean{early}
\setboolean{early}{false}
\newcommand{\overleaf}{\nopagebreak\vspace*{-3mm}\vfill
\begin{center}
\ifthenelse{\boolean{early}}{
\textsf{\textbf{Question\,\theexamquestion~CONTINUED ON NEXT SHEET}}}
{\addtocounter{examquestion}{1}
\ifthenelse{\isodd{\value{page}}}{
\textsf{\textbf{Qu.\,\theexamquestion~ON NEXT SHEET}}}{\textsf{\textbf{Qu.\,\theexamquestion~ON NEXT SHEET}}}\addtocounter{examquestion}{-1}}
\end{center}\vfill}
%--------------------------------------------
% Split a page during or in between Exam questions
%--------------------------------------------
\newcounter{exq}
\newcommand{\ssplit}{\ifthenelse{\boolean{sub}}{\setcounter{exq}{\value{exsubq}}
\end{examsubq}\end{examqu}\setboolean{early}{true}\overleaf\addtocounter{examquestion}{-1}\setboolean{early}{false}\newpage
\begin{examqu}\begin{examsubq} \setcounter{exsubq}{\value{exq}}}{
\ifthenelse{\boolean{qu}}{
\end{examqu}\setboolean{early}{true}\overleaf\addtocounter{examquestion}{-1}\newpage\setboolean{early}{false}\begin{examqu}}{\overleaf\newpage}}}
\newcommand{\sssplit}{\ifthenelse{\boolean{sub}}{\setcounter{exq}{\value{exsubq}}
\end{examsubq}\end{examqu}\setboolean{early}{true}\overleaf\addtocounter{examquestion}{-1}\setboolean{early}{false}\newpage
\begin{examqu}\begin{examsubq} \setcounter{exsubq}{\value{exq}}}{
\ifthenelse{\boolean{qu}}{
\end{examqu}\setboolean{early}{true}\overleaf\addtocounter{examquestion}{-1}\newpage\setboolean{early}{false}\begin{examqu}}{\overleaf\newpage}}}
images/strath_main.jpg

107 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment