summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stellenbosch/usthesis.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-17 00:38:15 +0000
committerKarl Berry <karl@freefriends.org>2008-07-17 00:38:15 +0000
commit6364e1a0918bf83c7495a55a6cefc113a66d1ded (patch)
treedfb0a2b40859d663d903bf6662b32c40d1a6bd51 /Master/texmf-dist/tex/latex/stellenbosch/usthesis.cls
parentde88057afe15c3a37d020e41f82a52a302de0775 (diff)
stellenbosch 07 (16jul08)
git-svn-id: svn://tug.org/texlive/trunk@9616 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/stellenbosch/usthesis.cls')
-rw-r--r--Master/texmf-dist/tex/latex/stellenbosch/usthesis.cls322
1 files changed, 122 insertions, 200 deletions
diff --git a/Master/texmf-dist/tex/latex/stellenbosch/usthesis.cls b/Master/texmf-dist/tex/latex/stellenbosch/usthesis.cls
index a2b2b21cb57..0aa09c6db8d 100644
--- a/Master/texmf-dist/tex/latex/stellenbosch/usthesis.cls
+++ b/Master/texmf-dist/tex/latex/stellenbosch/usthesis.cls
@@ -5,35 +5,40 @@
%% The original source files were:
%%
%% usthesis.dtx (with options: `cls')
+%% Copyright (C) 2003--2008 Danie Els
%%
%% -------------------------------------------------------------------
%% University of Stellenbosch Thesis Class
%% -------------------------------------------------------------------
-%%
-%% Author: Danie Els
-%%
-%% Copyright (C) 2003--2007 Danie Els
-%% All rights reserved.
-%%
%% This work may be distributed and/or modified under the conditions
-%% of the LaTeX Project Public License, either version 1.3 of this
-%% license or (at your option) any later version. The latest version
-%% of this license is in: http://www.latex-project.org/lppl.txt and
-%% version 1.3 or later is part of all distributions of LaTeX version
-%% 2003/12/01 or later.
+%% of the LaTeX Project Public License, either version 1.3c of this
+%% license or (at your option) any later version. The latest version
+%% of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
%%
-%% This work has the LPPL maintenance status "maintained".
+%% This work has the LPPL maintenance status 'maintained'.
%%
%% This Current Maintainer of this work is Danie Els (dnjels@sun.ac.za)
%% -------------------------------------------------------------------
%%
-\newcommand{\USfiledate}{2007/04/19}
-\newcommand{\USfileversion}{v3.0}
+\newcommand{\USfileversion}{v4.0}
+\newcommand{\USfiledate}{2008/06/30}
+
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\def\US@basetype{book}
\ProvidesClass{usthesis}[\USfiledate\space
\USfileversion\space
Stellenbosh Thesis class (DNJ ELS)]
+\RequirePackage{calc}
+\RequirePackage{ifpdf}
+\providecommand{\phantomsection}{}
+\AtBeginDocument{%
+ \@ifpackageloaded{graphicx}{}{%
+ \ClassError{usthesis}{You must load the graphicx package}{}%
+ }%
+ }
\edef\US@AFRstr{\string afrikaans}
\newcommand{\AorE}[2]{%
\ifx\US@AFRstr\languagename #1\else #2\fi}
@@ -52,142 +57,40 @@
\fi
\fi}%
{}
-\newcommand\US@degree{%
+\newcommand\DegreeName{%
\ClassWarning{usthesis}{No degree or subject supplied}%
\textfb{[No degree!]}}
-\newcommand\US@degreelong{%
+\newcommand\DegreeNameLong{%
\ClassWarning{usthesis}{No degree or subject supplied}%
\textfb{[No degree!]}}
-\newcommand\USNameAFR{Universiteit van Stellenbosch}
-\newcommand\USNameENG{University of Stellenbosch}
-\newcommand\USName{}
-\newcommand\PhDDescriptAFR{%
- \ThesisType\ ingelewer vir die graad \US@degreelong\ aan die \USName}
-\newcommand\PhDFinalDescriptAFR{%
- \ThesisType\ goedgekeur vir die graad \US@degreelong\ aan die \USName}
-\newcommand\MastersDescriptAFR{%
- \ThesisType\ ingelewer ter gedeeltelike voldoening aan die vereistes vir die
- graad \US@degreelong\ aan die \USName}
-\newcommand\PhDDescriptENG{%
- \ThesisType\ presented for the degree of \US@degreelong\ at the \USName}
-\newcommand\PhDFinalDescriptENG{%
- \ThesisType\ approved for the degree of \US@degreelong\ at the \USName{}}
-\newcommand\MastersDescriptENG{%
- \ThesisType\ presented in partial fulfilment of the requirements for the degree
- of \US@degreelong\ at the \USName}
-\newcommand\MastersDescript{}
-\newcommand\PhDDescript{}
-\newcommand\PhDFinalDescript{}
-\newcommand\StudyLeaderAFR{Studieleier:}
-\newcommand\StudyLeadersAFR{Studieleiers:}
-\newcommand\PromotorAFR{Promotor:}
-\newcommand\PromotorsAFR{Promotors:}
-\newcommand\StudyLeaderENG{Supervisor:}
-\newcommand\StudyLeadersENG{Supervisors:}
-\newcommand\PromotorENG{Promoter:}
-\newcommand\PromotorsENG{Promoters:}
-\newcommand\StudyLeaderType{}
-\newcommand\StudyLeadersType{}
-\newcommand\PromotorType{}
-\newcommand\PromotorsType{}
-\newcommand\TypeReportAFR{Verslag}
-\newcommand\TypeAssignmentAFR{Werkstuk}
-\newcommand\TypeThesisAFR{Tesis}
-\newcommand\TypePhDAFR{Proefskrif}
-\newcommand\TypeReportENG{Report}
-\newcommand\TypeAssignmentENG{Assignment}
-\newcommand\TypeThesisENG{Thesis}
-\newcommand\TypePhDENG{Dissertation}
-\newcommand\TypeReport{}
-\newcommand\TypeAssignment{}
-\newcommand\TypeThesis{}
-\newcommand\TypePhD{}
-\newcommand\MonthAFR[1]{\ifcase#1\or
- Januarie\or Februarie\or Maart\or April\or Mei\or Junie\or
- Julie\or Augustus\or September\or Oktober\or November\or
- Desember\fi}
-\newcommand\MonthENG[1]{\ifcase#1\or
- January\or February\or March\or April\or May\or June\or
- July\or August\or September\or October\or November\or
- December\fi}
-\newcommand\MonthName[1]{}
-\newcommand\CopyrightHolderAFR{\USName}%
-\newcommand\CopyrightTxtAFR{Kopiereg}
-\newcommand\CopyrightAnotAFR{Alle regte voorbehou.}
-\newcommand\CopyrightHolderENG{\USName}
-\newcommand\CopyrightTxtENG{Copyright}
-\newcommand\CopyrightAnotENG{All rights reserved.}
-\newcommand\CopyrightHolder{}
-\newcommand\CopyrightTxt{}
-\newcommand\CopyrightAnot{}
-\newcommand\ThesisDeclareAFR{%
- Ek, die ondergetekende, verklaar hiermee dat die werk in
- hierdie \MakeLowercase{\ThesisType}{} vervat, my eie
- oorspronklike werk is en dat ek dit nie van te vore in
- geheel of gedeeltelik by enige universiteit ter verkryging
- van 'n graad voorgel\^{e} het nie.}
-\newcommand\SignatAFR{Handtekening}
-\newcommand\DateAFR{Datum}
-\newcommand\ThesisDeclareENG{%
- I, the undersigned, hereby declare that the work contained
- in this \MakeLowercase{\ThesisType}{} is my own original
- work and that I have not previously in its entirety or in
- part submitted it at any university for a degree.}
-\newcommand\SignatENG{Signature}
-\newcommand\DateENG{Date}
-\newcommand\ThesisDeclare{}
-\newcommand\Signat{}
-\newcommand\Datetxt{}
-\newcommand{\USextrasafrikaans}{%
- \let\USName =\USNameAFR
- \let\MasterDescript =\MastersDescriptAFR
- \let\PhDDescript =\PhDDescriptAFR
- \let\PhDFinalDescript=\PhDFinalDescriptAFR
- \let\StudyLeaderType =\StudyLeaderAFR
- \let\StudyLeadersType=\StudyLeadersAFR
- \let\PromotorType =\PromotorAFR
- \let\PromotorsType =\PromotorsAFR
- \let\TypeReport =\TypeReportAFR
- \let\TypeAssignment =\TypeAssignmentAFR
- \let\TypeThesis =\TypeThesisAFR
- \let\TypePhD =\TypePhDAFR
- \let\MonthName =\MonthAFR
- \let\CopyrightHolder =\CopyrightHolderAFR
- \let\CopyrightTxt =\CopyrightTxtAFR
- \let\CopyrightAnot =\CopyrightAnotAFR
- \let\ThesisDeclare =\ThesisDeclareAFR
- \let\Signat =\SignatAFR
- \let\Datetxt =\DateAFR
- }
-\newcommand{\UScaptionsafrikaans}{%
- \def\declarationname{Verklaring}%
- \def\abstractname{Uittreksel}%
- }
-\newcommand{\USextrasenglish}{%
- \let\USName =\USNameENG
- \let\MasterDescript =\MastersDescriptENG
- \let\PhDDescript =\PhDDescriptENG
- \let\PhDFinalDescript=\PhDFinalDescriptENG
- \let\StudyLeaderType =\StudyLeaderENG
- \let\StudyLeadersType=\StudyLeadersENG
- \let\PromotorType =\PromotorENG
- \let\PromotorsType =\PromotorsENG
- \let\TypeReport =\TypeReportENG
- \let\TypeAssignment =\TypeAssignmentENG
- \let\TypeThesis =\TypeThesisENG
- \let\TypePhD =\TypePhDENG
- \let\MonthName =\MonthENG
- \let\CopyrightHolder =\CopyrightHolderENG
- \let\CopyrightTxt =\CopyrightTxtENG
- \let\CopyrightAnot =\CopyrightAnotENG
- \let\ThesisDeclare =\ThesisDeclareENG
- \let\Signat =\SignatENG
- \let\Datetxt =\DateENG
- }
-\newcommand{\UScaptionsenglish}{%
- \def\declarationname{Declaration}%
- \def\abstractname{Abstract}%
- }
+\newcommand*\USName{}
+\newcommand*\AuthByTxt{}
+\newcommand*\StudyLeaderType{}
+\newcommand*\StudyLeadersType{}
+\newcommand*\PromotorType{}
+\newcommand*\PromotorsType{}
+\newcommand*\TypeReport{}
+\newcommand*\TypeAssignment{}
+\newcommand*\TypeThesis{}
+\newcommand*\TypePhD{}
+\newcommand*\CopyrightHolder{}
+\newcommand*\CopyrightTxt{}
+\newcommand*\CopyrightAnot{}
+\newcommand*\Signat{}
+\newcommand*\Datetxt{}
+\newcommand*\MasterDescript{}
+\newcommand*\PhDDescript{}
+\newcommand*\PhDFinalDescript{}
+\newcommand*\ThesisDeclare{}
+\newcommand*\MonthName{}
+\newcommand*\DeclarationName{}
+\newcommand*\AbstractName{}
+\InputIfFileExists{usthesis.afr}
+ {\ClassInfo{usthesis}{Input file 'usthesis.afr' loaded}}
+ {\ClassError{usthesis}{No file 'usthesis.afr'}{}}
+\InputIfFileExists{usthesis.eng}
+ {\ClassInfo{usthesis}{Input file 'usthesis.eng' loaded}}
+ {\ClassError{usthesis}{No file 'usthesis.eng'}{}}
\USextrasenglish
\UScaptionsenglish
\def\US@addto#1#2{%
@@ -279,41 +182,33 @@
\DeclareOption{twocolumn}{}
\newif\if@ABlock
\newif\if@GBlock
+\newif\if@WBlock
\@ABlockfalse
\@GBlockfalse
+\@WBlockfalse
\DeclareOption{a5block}{%
\PassOptionsToClass{a4paper}{\US@basetype}%
\@ABlocktrue
- \@GBlockfalse}
+ \@GBlockfalse
+ \@WBlockfalse}
\DeclareOption{goldenblock}{%
\PassOptionsToClass{a4paper}{\US@basetype}%
\@GBlocktrue
- \@ABlockfalse}
+ \@ABlockfalse
+ \@WBlockfalse}
+\DeclareOption{wideblock}{%
+ \PassOptionsToClass{a4paper}{\US@basetype}%
+ \@GBlockfalse
+ \@ABlockfalse
+ \@WBlocktrue}
\DeclareOption{stdblock}{%
\@GBlockfalse
- \@ABlockfalse}
+ \@ABlockfalse
+ \@WBlockfalse}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\US@basetype}}
\ExecuteOptions{report}
\ProcessOptions*\relax
\LoadClass[oneside,openany]{\US@basetype}
-\RequirePackage{calc}
-\providecommand{\phantomsection}{}
-\newif\ifpdf
-\ifx\pdfoutput\undefined
-\else
- \ifx\pdfoutput\relax
- \else
- \ifcase\pdfoutput
- \else
- \pdftrue
- \fi
- \fi
-\fi
-\AtBeginDocument{%
- \@ifpackageloaded{graphicx}{}{%
- \ClassError{usthesis}{You must load the graphicx package}{}%
- }%
- }
\newlength{\US@tdima}
\newlength{\US@tdimb}
\newsavebox{\US@tboxa}
@@ -372,6 +267,20 @@
\setlength\pdfpageheight{\paperheight}
\fi
\fi
+\if@WBlock
+ \setlength\paperheight {297.3mm}
+ \setlength\paperwidth {210.2mm} % A4 paper
+ \setlength\textheight {\paperheight-50mm}
+ \setlength\textwidth {\paperwidth-50mm}
+ \setlength\marginparsep {7\p@}
+ \setlength\marginparpush{7\p@}
+ \FixVertParams{0.5}
+ \FixHorizParams{0.5}
+ \ifpdf
+ \setlength\pdfpagewidth{\paperwidth}
+ \setlength\pdfpageheight{\paperheight}
+ \fi
+\fi
\begingroup
\catcode`\Q=3
\long\gdef\US@ifempt#1{\US@xifempt#1QQ\@secondoftwo\@firstoftwo\@nil}
@@ -437,7 +346,7 @@
{\LARGE \@title \par}
\vspace{2em}
\if@Authorpresent
- {\large \AorE{deur}{by}\par}
+ {\large \AuthByTxt\par}
\vspace{2em}
{\Large
\lineskip .75em\relax%
@@ -446,12 +355,16 @@
\end{tabular}\par}%
\vfill
\fi
+ \if@Report\if@Subjectpresent
+ {\large\DegreeNameLong\par}
+ \vfill
+ \fi\fi
{\large\slshape
\begin{US@adjustwidth}{1.5cm}{1.5cm}
\centering\US@ThesisDescript
\end{US@adjustwidth}\par}
\vfill
- {\US@adress\par}
+ {\US@address\par}
\vfill
{\normalsize \US@promotorset \par}
\vfill
@@ -489,13 +402,19 @@
\ThesisDescript{\PhDDescript}%
\fi
\fi
+\newif\if@Subjectpresent
+\@Subjectpresentfalse
\newcommand\degree[2]{%
- \gdef\US@degree{#1}%
- \gdef\US@degreelong{#2}}
+ \@Subjectpresenttrue
+ \gdef\DegreeName{#1}%
+ \gdef\DegreeNameLong{#2}}
\let\subject=\degree
-\newcommand\adress[1]{\gdef\US@adress{#1}}
-\newcommand\US@adress{%
+\newcommand\address[1]{\gdef\US@address{#1}}
+\let\adress\address % backward compatibility :-)
+\newcommand\US@address{%
\ClassWarning{usthesis}{No institutional address supplied}}
+\newif\if@Promotorpresent
+\@Promotorpresentfalse
\newif\ifUS@multprm\US@multprmfalse
\newif\ifUS@prmstacked\US@prmstackedfalse
\newcommand\US@promotor{}
@@ -505,26 +424,29 @@
\@ifstar{\US@prmstackedtrue\@promotor}%
{\US@prmstackedfalse\@promotor}}
\newcommand{\@promotor}[2][l]{%
+ \US@ifempt{#2}{}{\@Promotorpresenttrue}%
\renewcommand*\US@prmalign{#1}%
\renewcommand\US@promotor{#2}}
\newcommand{\US@promotorset}{%
- \edef\US@beginTab{%
- \noexpand\begin{tabular}[t]{@{}\US@prmalign @{}}}%
- \edef\US@endTab{%
- \noexpand\end{tabular}}%
- \sbox{\US@tboxa}{%
- \let\and\US@prm@and%
- \US@beginTab%
- \US@promotor%
- \US@endTab}%
- \ifUS@prmstacked
- \makebox[\wd\US@tboxa][\US@prmalign]{%
- \ifUS@multprm\PromotorsText\else\PromotorText\fi}\\[1ex]%
- \usebox{\US@tboxa}%
- \else
- \ifUS@multprm\PromotorsText\else\PromotorText\fi
- \US@prmnewline%
- \usebox{\US@tboxa}%
+ \if@Promotorpresent
+ \edef\US@beginTab{%
+ \noexpand\begin{tabular}[t]{@{}\US@prmalign @{}}}%
+ \edef\US@endTab{%
+ \noexpand\end{tabular}}%
+ \sbox{\US@tboxa}{%
+ \let\and\US@prm@and%
+ \US@beginTab%
+ \US@promotor%
+ \US@endTab}%
+ \ifUS@prmstacked
+ \makebox[\wd\US@tboxa][\US@prmalign]{%
+ \ifUS@multprm\PromotorsText\else\PromotorText\fi}\\[1ex]%
+ \usebox{\US@tboxa}%
+ \else
+ \ifUS@multprm\PromotorsText\else\PromotorText\fi
+ \US@prmnewline%
+ \usebox{\US@tboxa}%
+ \fi
\fi
}
\newcommand*{\US@prm@and}[1][2ex]{%
@@ -574,10 +496,10 @@
\fi
\par
\thispagestyle{plain}%
- \chapter*{\declarationname}%
+ \chapter*{\DeclarationName}%
\declaremark
\phantomsection
- \addcontentsline{toc}{chapter}{\declarationname}%
+ \addcontentsline{toc}{chapter}{\DeclarationName}%
#1\par
\vspace{3cm}
\noindent
@@ -608,10 +530,10 @@
\@restonecolfalse
\fi
\par
- \chapter*{\abstractname}%
+ \chapter*{\AbstractName}%
\abstractmark
\phantomsection
- \addcontentsline{toc}{chapter}{\abstractname}%
+ \addcontentsline{toc}{chapter}{\AbstractName}%
\if@Report\else
\begin{center}
{\large\bfseries \@title \par}
@@ -621,9 +543,9 @@
\US@author
\end{tabular}\par}
\smallskip
- {\small\itshape\US@adress\par}
+ {\small\itshape\US@address\par}
\smallskip
- {\ThesisType: \US@degree\par}
+ {\ThesisType: \DegreeName\par}
\smallskip
{\US@date\par}
\end{center}
@@ -748,8 +670,8 @@
\thesection. \ %
\fi
##1}}}%
- \def\declaremark{\markboth{\MakeUppercase{\declarationname}}{}}%
- \def\abstractmark{\markboth{\MakeUppercase{\abstractname}}{}}%
+ \def\declaremark{\markboth{\MakeUppercase{\DeclarationName}}{}}%
+ \def\abstractmark{\markboth{\MakeUppercase{\AbstractName}}{}}%
\def\tocmark{\markboth{\MakeUppercase{\contentsname}}{}}%
\def\lofmark{\markboth{\MakeUppercase{\listfigurename}}{}}%
\def\lotmark{\markboth{\MakeUppercase{\listtablename}}{}}%
@@ -769,8 +691,8 @@
\fi
\fi
##1}}}%
- \def\declaremark{\markright{\MakeUppercase{\declarationname}}}%
- \def\abstractmark{\markright{\MakeUppercase{\abstractname}}}%
+ \def\declaremark{\markright{\MakeUppercase{\DeclarationName}}}%
+ \def\abstractmark{\markright{\MakeUppercase{\AbstractName}}}%
\def\tocmark{\markright{\MakeUppercase{\contentsname}}}%
\def\lofmark{\markright{\MakeUppercase{\listfigurename}}}%
\def\lotmark{\markright{\MakeUppercase{\listtablename}}}%