% ictlab.cls % For my ICT lab sheets. % 25 Sep 2000 Nick Urbanik % How to use this: % 1. put this at the beginning: %\documentclass{ictlab} % 2. Put this next (not with a comment character, though): % \RCS $Revision$ % 3. Finally define a lab title: % \newcommand*{\labTitle}{Partitioning the hard disk} % That's it! Simple as 123. \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ictlab}[2003/12/03 For IVE ICT lab sheets] \DeclareOption{solutions}{% \AtEndOfClass% {% \setboolean{Solutions}{true}% \renewcommand{\s}[1]{#1}% \includeversion{Solutions}% \includeversion{solution}% }% } \DeclareOption{numPara}{% \AtEndOfClass% {% % I copied this from lect.cls %\setcounter{secnumdepth}{5} % Number all headings. %\setcounter{tocdepth}{5} % All headings go into table of contents. % \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% % {-3.25ex\@plus -1ex \@minus -.2ex}% % {1.5ex \@plus .2ex}% % {\reset@font\normalsize\bfseries}} \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% %{-1em}% {0.75ex \@plus .2ex}% {\reset@font\normalsize\bfseries}} \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% %{-1em}% {0.5ex \@plus .2ex}% {\reset@font\normalsize\bfseries}} }% } \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} % Execution of options \ProcessOptions % Special class file commands \LoadClass[% a4paper,% %twoside,% 12pt]% {article} % Package loading %% \@ifpackagelater{geometry}{2000/01/01}{% %% \RequirePackage[compat2]{geometry}% %% }{% %% \RequirePackage{geometry}% %% } \RequirePackage{% nick,% acro,% booktabs,% varioref,% result3,% mdwlist,% fancyhdr,% geometry,% graphicx,% version,% cols,% calc,% rcs% } % See %http://groups.google.com/groups?q=ton+lam+url.sty&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3F9581A7.50402%40hp.com&rnum=1 \usepackage[obeyspaces,spaces]{url} %% \geometry{% %% \@ifpackagelater{geometry}{2000/01/01}{compat2,}{} %% a4paper, left=25mm, right=25mm, top=8mm, bottom=10mm} \@ifpackagelater{geometry}{2000/01/01}{% \geometry{compat2, a4paper, left=25mm, right=25mm, top=8mm, bottom=10mm}% }{% \geometry{a4paper, left=25mm, right=25mm, top=8mm, bottom=10mm}% } \renewcommand*{\bottomfraction}{.6} % default is 0.3 \renewcommand*{\topfraction}{.9} % default is 0.7 \renewcommand*{\textfraction}{0.05} % default is 0.2 % These two lines fix up the overwritten page number problem in the % table of contents: Nick, 6-12-94. \renewcommand\@pnumwidth{3.55em}% \renewcommand\@tocrmarg {4.55em} \newboolean{Solutions}% \setboolean{Solutions}{false}% \excludeversion{Solutions}% \excludeversion{solution}% \newcommand{\s}[1]{}% Solution; not shown by default. \newcommand*{\college}{Institute of Vocational Education (Tsing YI)}% %\newcommand*{\labTitle}{Partitioning the hard disk} %\newcommand*{\subject}{Operating Systems and Systems Integration} \newcommand*{\subject}{Systems and Network Management} \newcommand*{\subjectNumber}{}% \newcommand*{\solutionsText}{Solutions}% \newcommand*{\department}{Department of Information \& Communications Technology}% % To be able to refer to the linux_training materials from % www.linuxtraining.co.uk: \newcommand*{\linuxTrainingNotes}% {\url{http://ictlab.tyict.vtc.edu.hk/ossi/linux_training-ossi/workshop-notes.pdf}} % See fancyheadings.tex: \def\iffloatpage#1#2{\if@fcolmade #1\else #2\fi} \pagestyle{fancyplain} \fancypagestyle{plain}{% \fancyhead{}% %\setlength{\headrulewidth}{0pt}% \renewcommand*{\headrulewidth}{0pt}% \fancyfoot[LE,RO]{\tiny ver. \RCSRevision}% \fancyfoot[LO,RE]{\tiny Nick Urbanik \url{}}% \fancyfoot[C]{}% } \newcommand*{\headerfont}{\rmfamily\footnotesize\bfseries} \fancyfoot[C]{}% \fancyfoot[LE,RO]{\tiny ver. \RCSRevision}% \fancyfoot[LO,RE]{\tiny Nick Urbanik \url{}}% \fancyhead[LO,RE]{\headerfont\labTitle\\\subject} \fancyhead[LE,RO]{\headerfont\thepage} %\fancyhead[C]{\headerfont\subject} \fancyhead[C]% {% \headerfont% \ifthenelse{\boolean{Solutions}}% {\solutionsText\\\mbox{}\\}% %else {}% } \newcommand*{\ictlogo}{% \includegraphics[width=\ictlogowidth,clip]{ict-logo-smaller}% }% %% \newcommand*{\ictlogo}{% %% \includegraphics[width=\ictlogowidth]{ICT_LOGO}% %% }% % Put this straight after \begin{document}. %\newcommand{\labHeadLogo}% \AtBeginDocument% {% % See chapterbib.sty by David Arseneau in the cite distribution for % ideas on finding out what has been defined. \@ifundefined{labTitle}{\typeout{^^J*********************^^JPlease set LabTitle in the preamble.^^J*********************^^J}}% \thispagestyle{plain} % The amount that rabbit droppings protrude into left margin: \newlength{\rabbitDroppingWidth} \setlength{\rabbitDroppingWidth}{24.7mm} \newlength{\rabbitDroppingHeight} \setlength{\rabbitDroppingHeight}{20mm} \newlength{\ictlogowidth} \setlength{\ictlogowidth}{70mm} \newlength{\subjectNameWidth} \setlength{\subjectNameWidth}{\textwidth} %\settowidth{\ictlogowidth}{\ictlogo} \addtolength{\subjectNameWidth}{-\ictlogowidth} \addtolength{\subjectNameWidth}{0.6356\rabbitDroppingWidth} %{\setlength{\fboxsep}{0pt} \thispagestyle{plain} \vspace*{-\rabbitDroppingHeight} \hspace*{-\rabbitDroppingWidth} %\fbox{% \begin{minipage}[b]{\ictlogowidth} \ictlogo% \vspace*{0pt} \end{minipage}% %}% %\fbox{% \begin{minipage}[b]{\subjectNameWidth} \centering% \textsc{\subject} \vspace*{2.3pt} \end{minipage}% %} %} \vspace{1.5ex} \begin{center} \Large\textbf{\labTitle% \ifthenelse{\boolean{Solutions}}% { --- \solutionsText}% %else {}% } \end{center} }% End of labHeadLogo command. % See page 71 of the LaTeX Companion: \renewcommand*{\thefootnote}{\fnsymbol{footnote}} % A utility environment, indented and smaller in size. \newenvironment{explanation}% {% \begin{list}{}% {% \setlength\parindent{1.5em}% \setlength{\parskip}{0.6em}% \rightmargin \leftmargin \topsep 0pt% }% \small\item[]% }% {\end{list}}