Dr Nicola Talbot | School of Computing Sciences | University of East Anglia

ueatest.cls v 1.01 : LaTeX2e class file for typesetting course tests

Introduction

This is the documentation for ueatest.cls, a class file for typesetting course tests.

Available Commands

The following commands are supplied with this class file:
\university
To specify the name of the university, do \university{university name}. By default this is: University of East Anglia.

\school
To specify the name of the school, do \school{school name}. By default this is: School of Computing Sciences.

\semester
To specify the semester, do \semester{semester}. By default this is the current semester. (The Autumn semester is considered to be from August to January (inc), and the Spring semester is considered to be the remainder of the year.)

\theyear
To specify the year (that appears in the footer) do \theyear{year}. By default this is the current year.

\course
The course code and course name are specified using the command: \course{code}{name}. For example:
\course{CMP-1A4Y}{Programming --- Languages and Software Construction}

\lecturer
The course lecturer(s) can be specified using the command: \lecturer{name}

\marks
The command \marks{num} will print [num marks] (or [num mark] if num is 1) in the margin (The right margin, irrespective of one- or two-sided printing). If the text is too wide it will overlap the main text, so you may want to put it on a following blank line.

\marklabel
The mark style can be modified by changing the definition of \marklabel By default it is defined to be:

[\themark\ \markname]

where \themark is the number num passed as the argument to \marks and \markname is either mark or marks depending on whether \themark is 1 or greater than 1, respectively. So to change the marks to be displayed, say, in round brackets instead of square brackets, you would need to do:

\renewcommand{\marklabel}{(\themark\ \markname)}

To change it so that the marks are percentages, you can do:

\renewcommand{\marklabel}{[\themark\%]}

\markformat
The mark label is formatted according to the command \markformat. By default, \markformat is defined to be

\marginpar{\makebox[\marginparwidth][r]{\marklabel}}

but can be redefined. For example, instead of placing the marks in the margin, you might want them flushright instead, in which case you could redefine \markformat as follows:

\renewcommand{\markformat}{\hfill\marklabel}

\markscale
You can rescale your marks by changing the value of \markscale. For example, if all your marks are out of 10, but you then decide to make them out of 100, you would need to multiply all current marks by 10:

\renewcommand{\markscale}{10}

\markfrac
You can also divide the marks by changing the value of \markfrac. Both \markscale and \markfrac must be integers.

\date
The date is the current date by default, but can be changed using the command: \date{date}

Example Documents

  1. This example changes the marks so that they are displayed in sans-serif and aligns them flushright instead of in the margin.
    \documentclass{ueatest}
    
    \course{CMPS-MC22}{Mathematics and Algorithms for Bioinformatics}
    \lecturer{SJH/GCC}
    
    \renewcommand{\markformat}{\hfill\textsf{\marklabel}}
    
    \begin{document}
    
    \begin{enumerate}
    \item First question.\marks{10}
    
    \item Second question.
       \begin{enumerate}
          \item First part.\marks{5}
          \item Second part.\marks{5}
       \end{enumerate}
    \end{enumerate}
    
    \end{document}
    
  2. In this example, the marks were originally out of 20, but it was then decided to change them to percentages. This is easily done by setting \markscale to 5, and redefining \marklabel
    \documentclass{ueatest}
    
    \course{CMPS-MC22}{Mathematics and Algorithms for Bioinformatics}
    \lecturer{SJH/GCC}
    
    \renewcommand{\marklabel}{[\themark\%]}
    \renewcommand{\markscale}{5}
    
    \begin{document}
    
    \begin{enumerate}
    \item First question.\marks{20}
    
    \item Second question.
       \begin{enumerate}
          \item First part.\marks{10}
          \item Second part.\marks{5}
          \item Third part.\marks{5}
       \end{enumerate}
    \end{enumerate}
    
    \end{document}
    
  3. In this example, the marks were originally out of 75. To turn the marks into a percentage, they need to be multiplied by 4 and divided by 3. (This isn't guaranteed to work as integer division can cause rounding errors.)
    \documentclass{ueatest}
    
    \course{CMPS-MC22}{Mathematics and Algorithms for Bioinformatics}
    \lecturer{SJH/GCC}
    
    \renewcommand{\marklabel}{[\themark\%]}
    \renewcommand{\markscale}{4}
    \renewcommand{\markfrac}{3}
    
    \begin{document}
    
    \begin{enumerate}
    \item First question.\marks{75}
    
    \item Second question.
       \begin{enumerate}
          \item First part.\marks{51}
          \item Second part.\marks{18}
          \item Third part.\marks{6}
       \end{enumerate}
    \end{enumerate}
    
    \end{document}
    
Dr Nicola Talbot | School of Computing Sciences | University of East Anglia
N.L.C. Talbot. School of Computing Sciences. University of East Anglia. Last Modified: 19 Feb 2004