Newer
Older
LaTeX / lectures / lectureworksheet.cls
Nigel Stanger on 12 Sep 2016 1 KB Merge commit '01b673a' as 'lectures'
\def\filedate{28 January 2014}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% 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.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}[2001/06/01]
\ProvidesClass{lectureworksheet}%
         [2014/01/28 INFO lecture worksheet style, v.1.2]


\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