Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Thesis.cls 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. %%
  2. %% This is file `Thesis.cls', based on 'ECSthesis.cls', by Steve R. Gunn
  3. %% generated with the docstrip utility.
  4. %%
  5. %% Created by Steve R. Gunn, modified by Sunil Patel: www.sunilpatel.co.uk
  6. \NeedsTeXFormat{LaTeX2e}[1996/12/01]
  7. \ProvidesClass{Thesis}
  8. [2007/22/02 v1.0
  9. LaTeX document class]
  10. \def\baseclass{book}
  11. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
  12. \def\@checkoptions#1#2{
  13. \edef\@curroptions{\@ptionlist{\@currname.\@currext}}
  14. \@tempswafalse
  15. \@tfor\@this:=#2\do{
  16. \@expandtwoargs\in@{,\@this,}{,\@curroptions,}
  17. \ifin@ \@tempswatrue \@break@tfor \fi}
  18. \let\@this\@empty
  19. \if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
  20. }
  21. \@checkoptions{11pt}{{10pt}{11pt}{12pt}}
  22. \PassOptionsToClass{a4paper}{\baseclass}
  23. \ProcessOptions\relax
  24. \LoadClass{\baseclass}
  25. \newcommand\bhrule{\typeout{------------------------------------------------------------------------------}}
  26. \newcommand\Declaration[1]{
  27. \btypeout{Declaration of Authorship}
  28. \addtotoc{Declaration of Authorship}
  29. \thispagestyle{plain}
  30. \null\vfil
  31. %\vskip 60\p@
  32. \begin{center}{\huge\bf Declaration of Authorship\par}\end{center}
  33. %\vskip 60\p@
  34. {\normalsize #1}
  35. \vfil\vfil\null
  36. %\cleardoublepage
  37. }
  38. \newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
  39. \def\today{\ifcase\month\or
  40. January\or February\or March\or April\or May\or June\or
  41. July\or August\or September\or October\or November\or December\fi
  42. \space \number\year}
  43. \usepackage{setspace}
  44. \onehalfspacing
  45. \setlength{\parindent}{0pt}
  46. \setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
  47. \usepackage{vmargin}
  48. \setmarginsrb { 1.5in} % left margin
  49. { 0.6in} % top margin
  50. { 1.0in} % right margin
  51. { 0.8in} % bottom margin
  52. { 20pt} % head height
  53. {0.25in} % head sep
  54. { 9pt} % foot height
  55. { 0.3in} % foot sep
  56. \raggedbottom
  57. \setlength{\topskip}{1\topskip \@plus 5\p@}
  58. \doublehyphendemerits=10000 % No consecutive line hyphens.
  59. \brokenpenalty=10000 % No broken words across columns/pages.
  60. \widowpenalty=9999 % Almost no widows at bottom of page.
  61. \clubpenalty=9999 % Almost no orphans at top of page.
  62. \interfootnotelinepenalty=9999 % Almost never break footnotes.
  63. \usepackage{fancyhdr}
  64. \lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
  65. \rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
  66. \chead{}\lfoot{}\rfoot{}\cfoot{}
  67. \pagestyle{fancy}
  68. \renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}
  69. \renewcommand{\sectionmark}[1]{}
  70. \renewcommand{\subsectionmark}[1]{}
  71. \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  72. \hbox{}
  73. \thispagestyle{empty}
  74. \newpage
  75. \if@twocolumn\hbox{}\newpage\fi\fi\fi}
  76. \usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}
  77. \theoremstyle{plain}
  78. \newtheorem{example}{Example}[chapter]
  79. \newtheorem{theorem}{Theorem}[chapter]
  80. \newtheorem{corollary}[theorem]{Corollary}
  81. \newtheorem{lemma}[theorem]{Lemma}
  82. \newtheorem{proposition}[theorem]{Proposition}
  83. \newtheorem{axiom}[theorem]{Axiom}
  84. \theoremstyle{definition}
  85. \newtheorem{definition}[theorem]{Definition}
  86. \theoremstyle{remark}
  87. \newtheorem{remark}[theorem]{Remark}
  88. \usepackage[centerlast,small,sc]{caption}
  89. \setlength{\captionmargin}{20pt}
  90. \newcommand{\fref}[1]{Figure~\ref{#1}}
  91. \newcommand{\tref}[1]{Table~\ref{#1}}
  92. \newcommand{\eref}[1]{Equation~\ref{#1}}
  93. \newcommand{\cref}[1]{Chapter~\ref{#1}}
  94. \newcommand{\sref}[1]{Section~\ref{#1}}
  95. \newcommand{\aref}[1]{Appendix~\ref{#1}}
  96. \renewcommand{\topfraction}{0.85}
  97. \renewcommand{\bottomfraction}{.85}
  98. \renewcommand{\textfraction}{0.1}
  99. \renewcommand{\dbltopfraction}{.85}
  100. \renewcommand{\floatpagefraction}{0.75}
  101. \renewcommand{\dblfloatpagefraction}{.75}
  102. \setcounter{topnumber}{9}
  103. \setcounter{bottomnumber}{9}
  104. \setcounter{totalnumber}{20}
  105. \setcounter{dbltopnumber}{9}
  106. \usepackage{graphicx}
  107. \usepackage{epstopdf}
  108. \usepackage[scriptsize]{subfigure}
  109. \usepackage{booktabs}
  110. \usepackage{rotating}
  111. \usepackage{listings}
  112. \usepackage{lstpatch}
  113. \lstset{captionpos=b,
  114. frame=tb,
  115. basicstyle=\scriptsize\ttfamily,
  116. showstringspaces=false,
  117. keepspaces=true}
  118. \lstdefinestyle{matlab} {
  119. language=Matlab,
  120. keywordstyle=\color{blue},
  121. commentstyle=\color[rgb]{0.13,0.55,0.13}\em,
  122. stringstyle=\color[rgb]{0.7,0,0} }
  123. \usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,
  124. bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,
  125. colorlinks,linkcolor={blue},citecolor={blue},urlcolor={red},
  126. pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
  127. \pdfstringdefDisableCommands{
  128. \let\\\space
  129. }
  130. \newcommand*{\supervisor}[1]{\def\supname{#1}}
  131. \newcommand*{\examiner}[1]{\def\examname{#1}}
  132. \newcommand*{\degree}[1]{\def\degreename{#1}}
  133. \newcommand*{\authors}[1]{\def\authornames{#1}}
  134. \newcommand*{\addresses}[1]{\def\addressnames{#1}}
  135. \newcommand*{\university}[1]{\def\univname{#1}}
  136. \newcommand*{\UNIVERSITY}[1]{\def\UNIVNAME{#1}}
  137. \newcommand*{\department}[1]{\def\deptname{#1}}
  138. \newcommand*{\DEPARTMENT}[1]{\def\DEPTNAME{#1}}
  139. \newcommand*{\group}[1]{\def\groupname{#1}}
  140. \newcommand*{\GROUP}[1]{\def\GROUPNAME{#1}}
  141. \newcommand*{\faculty}[1]{\def\facname{#1}}
  142. \newcommand*{\FACULTY}[1]{\def\FACNAME{#1}}
  143. \newcommand*{\subject}[1]{\def\subjectname{#1}}
  144. \newcommand*{\keywords}[1]{\def\keywordnames{#1}}
  145. \supervisor {}
  146. \examiner {}
  147. \degree {}
  148. \authors {}
  149. \university {\texorpdfstring{\href{University Web Site URL Here (include http://)}
  150. {University Name}}
  151. {University Name}}
  152. \UNIVERSITY {\texorpdfstring{\href{University Web Site URL Here (include http://)}
  153. {UNIVERSITY NAME (IN BLOCK CAPITALS)}}
  154. {UNIVERSITY NAME (IN BLOCK CAPITALS)}}
  155. \department {\texorpdfstring{\href{Department or School Web Site URL Here (include http://)}
  156. {Department or School Name}}
  157. {Department or School Name}}
  158. \DEPARTMENT {\texorpdfstring{\href{Department or School Web Site URL Here (include http://)}
  159. {DEPARTMENT OR SCHOOL NAME (IN BLOCK CAPITALS)}}
  160. {DEPARTMENT OR SCHOOL NAME (IN BLOCK CAPITALS)}}
  161. \group {\texorpdfstring{\href{Research Group Web Site URL Here (include http://)}
  162. {Research Group Name}}
  163. {Research Group Name}}
  164. \GROUP {\texorpdfstring{\href{Research Group Web Site URL Here (include http://)}
  165. {RESEARCH GROUP NAME (IN BLOCK CAPITALS)}}
  166. {RESEARCH GROUP NAME (IN BLOCK CAPITALS)}}
  167. \faculty {\texorpdfstring{\href{Faculty Web Site URL Here (include http://)}
  168. {Faculty Name}}
  169. {Faculty Name}}
  170. \FACULTY {\texorpdfstring{\href{Faculty Web Site URL Here (include http://)}
  171. {FACULTY NAME (IN BLOCK CAPITALS)}}
  172. {FACULTY NAME (IN BLOCK CAPITALS)}}
  173. \addresses {}
  174. \subject {}
  175. \keywords {}
  176. \renewcommand\maketitle{
  177. \btypeout{Title Page}
  178. \hypersetup{pdftitle={\@title}}
  179. \hypersetup{pdfsubject=\subjectname}
  180. \hypersetup{pdfauthor=\authornames}
  181. \hypersetup{pdfkeywords=\keywordnames}
  182. \thispagestyle{empty}
  183. \begin{titlepage}
  184. \let\footnotesize\small
  185. \let\footnoterule\relax
  186. \let \footnote \thanks
  187. \setcounter{footnote}{0}
  188. \null\vfil
  189. \vskip 60\p@
  190. \begin{center}
  191. \setlength{\parskip}{0pt}
  192. {\large\textbf{\UNIVNAME}\par}
  193. \vfill
  194. {\huge \bf \@title \par}
  195. \vfill
  196. {\LARGE by \par}
  197. \smallskip
  198. {\LARGE \authornames \par}
  199. \vfill
  200. {\large A thesis submitted in partial fulfillment for the \par}
  201. {\large degree of Doctor of Philosophy \par}
  202. \bigskip
  203. \bigskip
  204. {\large in the \par}
  205. {\large \facname \par}
  206. {\large \deptname \par}
  207. \bigskip
  208. \bigskip
  209. \bigskip
  210. {\Large \@date \par}
  211. \bigskip
  212. \end{center}
  213. \par
  214. \@thanks
  215. \vfil\null
  216. \end{titlepage}
  217. \setcounter{footnote}{0}%
  218. \global\let\thanks\relax
  219. \global\let\maketitle\relax
  220. \global\let\@thanks\@empty
  221. \global\let\@author\@empty
  222. \global\let\@date\@empty
  223. \global\let\@title\@empty
  224. \global\let\title\relax
  225. \global\let\author\relax
  226. \global\let\date\relax
  227. \global\let\and\relax
  228. \cleardoublepage
  229. }
  230. \newenvironment{abstract}
  231. {
  232. \btypeout{Abstract Page}
  233. \thispagestyle{empty}
  234. \null\vfil
  235. \begin{center}
  236. \setlength{\parskip}{0pt}
  237. {\normalsize \UNIVNAME \par}
  238. \bigskip
  239. {\huge{\textit{Abstract}} \par}
  240. \bigskip
  241. {\normalsize \facname \par}
  242. {\normalsize \deptname \par}
  243. \bigskip
  244. {\normalsize Doctor of Philosophy\par}
  245. \bigskip
  246. {\normalsize\bf \@title \par}
  247. \medskip
  248. {\normalsize by \authornames \par}
  249. \bigskip
  250. \end{center}
  251. }
  252. {
  253. \vfil\vfil\vfil\null
  254. \cleardoublepage
  255. }
  256. \addtocounter{secnumdepth}{1}
  257. \setcounter{tocdepth}{6}
  258. \newcounter{dummy}
  259. \newcommand\addtotoc[1]{
  260. \refstepcounter{dummy}
  261. \addcontentsline{toc}{chapter}{#1}}
  262. \renewcommand\tableofcontents{
  263. \btypeout{Table of Contents}
  264. \begin{spacing}{1}{
  265. \setlength{\parskip}{1pt}
  266. \if@twocolumn
  267. \@restonecoltrue\onecolumn
  268. \else
  269. \@restonecolfalse
  270. \fi
  271. \chapter*{\contentsname
  272. \@mkboth{
  273. \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
  274. \@starttoc{toc}
  275. \if@restonecol\twocolumn\fi
  276. \cleardoublepage
  277. }\end{spacing}
  278. }
  279. \renewcommand\listoffigures{
  280. \btypeout{List of Figures}
  281. \addtotoc{List of Figures}
  282. \begin{spacing}{1}{
  283. \setlength{\parskip}{1pt}
  284. \if@twocolumn
  285. \@restonecoltrue\onecolumn
  286. \else
  287. \@restonecolfalse
  288. \fi
  289. \chapter*{\listfigurename
  290. \@mkboth{\MakeUppercase\listfigurename}
  291. {\MakeUppercase\listfigurename}}
  292. \@starttoc{lof}
  293. \if@restonecol\twocolumn\fi
  294. \cleardoublepage
  295. }\end{spacing}
  296. }
  297. \renewcommand\listoftables{
  298. \btypeout{List of Tables}
  299. \addtotoc{List of Tables}
  300. \begin{spacing}{1}{
  301. \setlength{\parskip}{1pt}
  302. \if@twocolumn
  303. \@restonecoltrue\onecolumn
  304. \else
  305. \@restonecolfalse
  306. \fi
  307. \chapter*{\listtablename
  308. \@mkboth{
  309. \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
  310. \@starttoc{lot}
  311. \if@restonecol\twocolumn\fi
  312. \cleardoublepage
  313. }\end{spacing}
  314. }
  315. \newcommand\listsymbolname{Abbreviations}
  316. \usepackage{longtable}
  317. \newcommand\listofsymbols[2]{
  318. \btypeout{\listsymbolname}
  319. \addtotoc{\listsymbolname}
  320. \chapter*{\listsymbolname
  321. \@mkboth{
  322. \MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}
  323. \begin{longtable}[c]{#1}#2\end{longtable}\par
  324. \cleardoublepage
  325. }
  326. \newcommand\listconstants{Physical Constants}
  327. \usepackage{longtable}
  328. \newcommand\listofconstants[2]{
  329. \btypeout{\listconstants}
  330. \addtotoc{\listconstants}
  331. \chapter*{\listconstants
  332. \@mkboth{
  333. \MakeUppercase\listconstants}{\MakeUppercase\listconstants}}
  334. \begin{longtable}[c]{#1}#2\end{longtable}\par
  335. \cleardoublepage
  336. }
  337. \newcommand\listnomenclature{Symbols}
  338. \usepackage{longtable}
  339. \newcommand\listofnomenclature[2]{
  340. \btypeout{\listnomenclature}
  341. \addtotoc{\listnomenclature}
  342. \chapter*{\listnomenclature
  343. \@mkboth{
  344. \MakeUppercase\listnomenclature}{\MakeUppercase\listnomenclature}}
  345. \begin{longtable}[c]{#1}#2\end{longtable}\par
  346. \cleardoublepage
  347. }
  348. \newcommand\acknowledgements[1]{
  349. \btypeout{Acknowledgements}
  350. \addtotoc{Acknowledgements}
  351. \thispagestyle{plain}
  352. \begin{center}{\huge{\textit{Acknowledgements}} \par}\end{center}
  353. {\normalsize #1}
  354. \vfil\vfil\null
  355. }
  356. \newcommand\dedicatory[1]{
  357. \btypeout{Dedicatory}
  358. \thispagestyle{plain}
  359. \null\vfil
  360. \vskip 60\p@
  361. \begin{center}{\Large \sl #1}\end{center}
  362. \vfil\null
  363. \cleardoublepage
  364. }
  365. \renewcommand\backmatter{
  366. \if@openright
  367. \cleardoublepage
  368. \else
  369. \clearpage
  370. \fi
  371. \addtotoc{\bibname}
  372. \btypeout{\bibname}
  373. \@mainmatterfalse}
  374. \endinput
  375. %%
  376. %% End of file `Thesis.cls'.