Newer
Older
LaTeX / lectures / lectureworksheet.cls
\def\classdate{12 December 2024}
\def\classversion{1.2.1}
\def\classshortdate{2024/12/12}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Document class for lecture/lab worksheets (particularly for fourth year).
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Version History
% v1.0    Initial version.
% v1.1    Added experimental Xe(La)TeX support.
%         Added boxedminipage and siunitx packages.
% v1.1.1  Switched to LoadClassWithOptions instead of the more convoluted method.
% v1.1.2  Pulled global hyperref configuration into the class file.
% v1.1.3  Changed hyperref initialisation order.
% v1.2    Moved Xe(La)TeX support into lecturecommon.sty.
% v1.2.1  Normalised package info messages.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}[2001/06/01]
\ProvidesClass{lectureworksheet}%
         [\classdate\space v\classversion\space Otago lecture worksheet]


\LoadClassWithOptions{article}


% Load required packages.
\RequirePackage{geometry}
\RequirePackage{pifont}
\RequirePackage{parskip}        % Space-separated rather than indented paragraphs.
% DO NOT REMOVE THE NEXT LINE! The lecturecommon package loads a bunch
% of other packages and sets up various counters, etc., several of which
% are used below.
\RequirePackage{lecturecommon}


% Some additional variables.
\newcommand{\WeekNumber}{UNDEFINED}
\newcommand{\SetWeekNumber}[1]{\renewcommand{\WeekNumber}{#1}}


% Package initialisation.

% geometry setup.
\geometry{a4paper,margin={1in,1in}}

% hyperref setup. We can't execute this immediately, because the
% macros referenced here haven't been set yet. All paper and chapter
% variables (where applicable) must therefore be initialised in the
% document preamble.
\AtBeginDocument{%
    \hypersetup{%
        pdftitle={\PaperCode\ class worksheet, week \WeekNumber},%
        pdfsubject={\PaperTitle},%
        pdfauthor={Information Science, University of Otago},%
    }%
}


\endinput