Guest User

Untitled

a guest
Nov 14th, 2016
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.14 KB | None | 0 0
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % Thesis LaTeX Template - THESIS CLASS FILE
  3. %
  4. % This template has been downloaded from:
  5. % http://www.latextemplates.com
  6. %
  7. % This class file defines the structure and design of the template.
  8. %
  9. % There is one part of this file that needs to be filled out - the variables
  10. % dictating the document particulars such as the author name, university
  11. % name, etc. You will find these in the commented "DOCUMENT VARIABLES"
  12. % section below.
  13. %
  14. % The other two easily-editable sections are the margin sizes and abstract.
  15. % These have both been commented for easy editing. Advanced LaTeX
  16. % users will have no trouble editing the rest of the document to their liking.
  17. %
  18. % Original header:
  19. %% This is file `Thesis.cls', based on 'ECSthesis.cls', by Steve R. Gunn
  20. %% generated with the docstrip utility.
  21. %%
  22. %% Created by Steve R. Gunn, modified by Sunil Patel: www.sunilpatel.co.uk
  23. %% Further modified by www.latextemplates.com
  24. %
  25. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  26.  
  27. \NeedsTeXFormat{LaTeX2e}[1996/12/01]
  28. \ProvidesClass{Thesis}
  29. [2007/22/02 v1.0
  30. LaTeX document class]
  31. \def\baseclass{book}
  32. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
  33. \def\@checkoptions#1#2{
  34. \edef\@curroptions{\@ptionlist{\@currname.\@currext}}
  35. \@tempswafalse
  36. \@tfor\@this:=#2\do{
  37. \@expandtwoargs\in@{,\@this,}{,\@curroptions,}
  38. \ifin@ \@tempswatrue \@break@tfor \fi}
  39. \let\@this\@empty
  40. \if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
  41. }
  42. \@checkoptions{11pt}{{10pt}{11pt}{12pt}}
  43. \PassOptionsToClass{a4paper}{\baseclass}
  44. \ProcessOptions\relax
  45. \LoadClass{\baseclass}
  46. \newcommand\bhrule{\typeout{------------------------------------------------------------------------------}}
  47.  
  48. \newcommand\Declaration[1]{
  49. \btypeout{Declaration of Authorship}
  50. \addtotoc{Declaration of Authorship}
  51. \thispagestyle{plain}
  52. \null\vfil
  53. %\vskip 60\p@
  54. \begin{center}{\huge\bf Declaration of Authorship\par}\end{center}
  55. %\vskip 60\p@
  56. {\normalsize #1}
  57. \vfil\vfil\null
  58. \cleardoublepage
  59. }
  60.  
  61. \newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
  62. \def\today{\ifcase\month\or
  63. January\or February\or March\or April\or May\or June\or
  64. July\or August\or September\or October\or November\or December\fi
  65. \space \number\year}
  66. \usepackage{setspace}
  67. \onehalfspacing
  68. \setlength{\parindent}{0pt}
  69. \setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
  70. \usepackage{vmargin}
  71.  
  72. \RequirePackage[utf8]{inputenc} % Allows the use of international characters (e.g. Umlauts)
  73.  
  74. %----------------------------------------------------------------------------------------%
  75. % MARGINS
  76. %----------------------------------------------------------------------------------------
  77. \setmarginsrb { 1.5in} % left margin
  78. { 0.6in} % top margin
  79. { 1.0in} % right margin
  80. { 0.8in} % bottom margin
  81. { 20pt} % head height
  82. {0.25in} % head sep
  83. { 9pt} % foot height
  84. { 0.3in} % foot sep
  85.  
  86. %----------------------------------------------------------------------------------------
  87. \raggedbottom
  88. \setlength{\topskip}{1\topskip \@plus 5\p@}
  89. \doublehyphendemerits=10000 % No consecutive line hyphens.
  90. \brokenpenalty=10000 % No broken words across columns/pages.
  91. \widowpenalty=9999 % Almost no widows at bottom of page.
  92. \clubpenalty=9999 % Almost no orphans at top of page.
  93. \interfootnotelinepenalty=9999 % Almost never break footnotes.
  94. %\usepackage{fancyhdr}
  95.  
  96. %\lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
  97. %\rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
  98. %\chead{}\lfoot{}\rfoot{}\cfoot{}
  99.  
  100. %\pagestyle{fancy}
  101.  
  102. \renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}
  103. \renewcommand{\sectionmark}[1]{}
  104. \renewcommand{\subsectionmark}[1]{}
  105. \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  106. \hbox{}
  107. \thispagestyle{empty}
  108. \newpage
  109. \if@twocolumn\hbox{}\newpage\fi\fi\fi}
  110. \usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}
  111. \theoremstyle{plain}
  112. \newtheorem{example}{Example}[chapter]
  113. \newtheorem{theorem}{Theorem}[chapter]
  114. \newtheorem{corollary}[theorem]{Corollary}
  115. \newtheorem{lemma}[theorem]{Lemma}
  116. \newtheorem{proposition}[theorem]{Proposition}
  117. \newtheorem{axiom}[theorem]{Axiom}
  118. \theoremstyle{definition}
  119. \newtheorem{definition}[theorem]{Definition}
  120. \theoremstyle{remark}
  121. \newtheorem{remark}[theorem]{Remark}
  122. \usepackage[centerlast,small,sc]{caption}
  123. \setlength{\captionmargin}{20pt}
  124. \newcommand{\fref}[1]{Figure~\ref{#1}}
  125. \newcommand{\tref}[1]{Table~\ref{#1}}
  126. \newcommand{\eref}[1]{Equation~\ref{#1}}
  127. \newcommand{\cref}[1]{Chapter~\ref{#1}}
  128. \newcommand{\sref}[1]{Section~\ref{#1}}
  129. \newcommand{\aref}[1]{Appendix~\ref{#1}}
  130. \renewcommand{\topfraction}{0.85}
  131. \renewcommand{\bottomfraction}{.85}
  132. \renewcommand{\textfraction}{0.1}
  133. \renewcommand{\dbltopfraction}{.85}
  134. \renewcommand{\floatpagefraction}{0.75}
  135. \renewcommand{\dblfloatpagefraction}{.75}
  136. \setcounter{topnumber}{9}
  137. \setcounter{bottomnumber}{9}
  138. \setcounter{totalnumber}{20}
  139. \setcounter{dbltopnumber}{9}
  140. \usepackage{graphicx}
  141. \usepackage{epstopdf}
  142. \usepackage{booktabs}
  143. \usepackage{rotating}
  144. \usepackage{listings}
  145. \usepackage{lstpatch}
  146. \lstset{captionpos=b,
  147. frame=tb,
  148. basicstyle=\scriptsize\ttfamily,
  149. showstringspaces=false,
  150. keepspaces=true}
  151. \lstdefinestyle{matlab} {
  152. language=Matlab,
  153. keywordstyle=\color{blue},
  154. commentstyle=\color[rgb]{0.13,0.55,0.13}\em,
  155. stringstyle=\color[rgb]{0.7,0,0} }
  156. \usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,
  157. bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,
  158. colorlinks,linkcolor={RoyalRed},citecolor={RoyalRed},urlcolor={RoyalRed},
  159. pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
  160. \pdfstringdefDisableCommands{
  161. \let\\\space
  162. }
  163. \newcommand*{\supervisor}[1]{\def\supname{#1}}
  164. \newcommand*{\cosupervisor}[1]{\def\cosupname{#1}}
  165. \newcommand*{\thesistitle}[1]{\def\ttitle{#1}}
  166. \newcommand*{\examiner}[1]{\def\examname{#1}}
  167. \newcommand*{\degree}[1]{\def\degreename{#1}}
  168. \newcommand*{\authors}[1]{\def\authornames{#1}}
  169. \newcommand*{\addresses}[1]{\def\addressnames{#1}}
  170. \newcommand*{\university}[1]{\def\univname{#1}}
  171. \newcommand*{\UNIVERSITY}[1]{\def\UNIVNAME{#1}}
  172. \newcommand*{\department}[1]{\def\deptname{#1}}
  173. \newcommand*{\DEPARTMENT}[1]{\def\DEPTNAME{#1}}
  174. \newcommand*{\group}[1]{\def\groupname{#1}}
  175. \newcommand*{\GROUP}[1]{\def\GROUPNAME{#1}}
  176. \newcommand*{\faculty}[1]{\def\facname{#1}}
  177. \newcommand*{\FACULTY}[1]{\def\FACNAME{#1}}
  178. \newcommand*{\subject}[1]{\def\subjectname{#1}}
  179. \newcommand*{\keywords}[1]{\def\keywordnames{#1}}
  180.  
  181. %----------------------------------------------------------------------------------------
  182. % DOCUMENT VARIABLES
  183. % Fill in the lines below to update the thesis template
  184. % If you wish to cite each of the variables defined below, look at the
  185. % section above for the citation command e.g. \examiner{} below is
  186. % defined as \examname above so you cite it as \examname
  187. %----------------------------------------------------------------------------------------
  188.  
  189.  
  190. \thesistitle{}
  191.  
  192. %-------------------------------------------------
  193. \supervisor{} % You supervisor's name - this is used in the title page
  194. \cosupervisor{}
  195. %-------------------------------------------------
  196. \examiner{} % Your examiner's name - this is not currently used anywhere in the template, cite it with \examname if you want it
  197. %-------------------------------------------------
  198. \degree{} % Your degree name - this is currently used in the title page and abstract
  199. %-------------------------------------------------
  200. \authors{} % Your name - this is used in the title page and abstract
  201. %-------------------------------------------------
  202. \addresses{} % Your address - this is not currently used anywhere in the template, cite it with \addressnames if you want it
  203. %-------------------------------------------------
  204. \subject{} % Your subject area - this is not currently used anywhere in the template, cite it with \subjectname if you want it
  205. %-------------------------------------------------
  206. \keywords{} % Keywords for your thesis - this is not currently used anywhere in the template, cite it with \keywordnames if you want it
  207. %-------------------------------------------------
  208. \university{\texorpdfstring{\href{} % Your university's URL
  209. {}} % Your university's name - this is currently used in the title page
  210. {}}
  211. %-------------------------------------------------
  212. \UNIVERSITY{\texorpdfstring{\href{} % Your university's URL
  213. {}} % Your university's name in capitals - this is currently used in the abstract page
  214. {}}
  215. %-------------------------------------------------
  216. \department{\texorpdfstring{\href{} % Your department's URL
  217. {}} % Your department's name - used in the title page and abstract
  218. {}}
  219. %-------------------------------------------------
  220. \DEPARTMENT{\texorpdfstring{\href{} % Your department's URL
  221. {}} % Your department's name in capitals - this is not currently used anywhere in the template, cite it with \DEPTNAME if you want it
  222. {}}
  223. %-------------------------------------------------
  224. \group{\texorpdfstring{\href{Research Group Web Site URL Here (include http://)} % Your research group's URL
  225. {Research Group Name}} % Your research group's name - this is currently used in the title page
  226. {Research Group Name}}
  227. %-------------------------------------------------
  228. \GROUP{\texorpdfstring{\href{Research Group Web Site URL Here (include http://)} % Your research group's URL
  229. {RESEARCH GROUP NAME (IN BLOCK CAPITALS)}} % Your research group's name in capitals - this is not currently used anywhere in the template, cite it with \GROUPNAME if you want it
  230. {RESEARCH GROUP NAME (IN BLOCK CAPITALS)}}
  231. %-------------------------------------------------
  232. \faculty{\texorpdfstring{\href{} % Your faculty's URL
  233. {}} % Your faculty's name - this is currently used in the abstract page
  234. {}}
  235. %-------------------------------------------------
  236. \FACULTY{\texorpdfstring{} % Your faculty's URL
  237. {}} % Your faculty's name in capitals - this is not currently used anywhere in the template, cite it with \FACNAME if you want it
  238. {}
  239. %----------------------------------------------------------------------------------------
  240.  
  241. % The default title page, this is not used in this www.latextemplates.com version
  242. \renewcommand\maketitle{
  243. \btypeout{Title Page}
  244. \hypersetup{pdftitle={\@title}}
  245. \hypersetup{pdfsubject=\subjectname}
  246. \hypersetup{pdfauthor=\authornames}
  247. \hypersetup{pdfkeywords=\keywordnames}
  248. \thispagestyle{empty}
  249. \begin{titlepage}
  250. \let\footnotesize\small
  251. \let\footnoterule\relax
  252. \let \footnote \thanks
  253. \setcounter{footnote}{0}
  254. \null\vfil
  255. \vskip 60\p@
  256. \begin{center}
  257. \setlength{\parskip}{0pt}
  258. {\large\textbf{\UNIVNAME}\par}
  259. \vfill
  260. {\huge \bf \@title \par}
  261. \vfill
  262. {\LARGE by \par}
  263. \smallskip
  264. {\LARGE \authornames \par}
  265. \vfill
  266. {\large A thesis submitted in partial fulfillment for the \par}
  267. {\large degree of \degreename \par}
  268. \bigskip
  269. \bigskip
  270. {\large in the \par}
  271. {\large \facname \par}
  272. {\large \deptname \par}
  273. \bigskip
  274. \bigskip
  275. \bigskip
  276. {\Large \@date \par}
  277. \bigskip
  278. \end{center}
  279. \par
  280. \@thanks
  281. \vfil\null
  282. \end{titlepage}
  283. \setcounter{footnote}{0}%
  284. \global\let\thanks\relax
  285. \global\let\maketitle\relax
  286. \global\let\@thanks\@empty
  287. \global\let\@author\@empty
  288. \global\let\@date\@empty
  289. \global\let\@title\@empty
  290. \global\let\title\relax
  291. \global\let\author\relax
  292. \global\let\date\relax
  293. \global\let\and\relax
  294. \cleardoublepage
  295. }
  296. %----------------------------------------------------------------------------------------
  297. % ABSTRACT PAGE DESIGN
  298. %----------------------------------------------------------------------------------------
  299. \newenvironment{abstract}
  300. {
  301. \btypeout{Abstract Page}
  302. \thispagestyle{empty}
  303. \null\vfil
  304. \newpage
  305. \begin{center}
  306. \setlength{\parskip}{0pt}
  307. {\normalsize \UNIVNAME \par} % University name in capitals
  308. \bigskip
  309. {\huge{\textit{Abstract}} \par}
  310. \bigskip
  311. {\normalsize \facname \par} % Faculty name
  312. {\normalsize \deptname \par} % Department name
  313. \bigskip
  314. {\normalsize \degreename\par} % Degree name
  315. \bigskip
  316. {\normalsize\bf \@title \par} % Thesis title
  317. \medskip
  318. {\normalsize by \authornames \par} % Author name
  319. \bigskip
  320. \end{center}
  321. }
  322.  
  323.  
  324.  
  325. %----------------------------------------------------------------------------------------
  326. %{
  327. % \vfil\vfil\vfil\null
  328. % \cleardoublepage
  329. %}
  330. \addtocounter{secnumdepth}{1}
  331. \setcounter{tocdepth}{6}
  332. \newcounter{dummy}
  333. \newcommand\addtotoc[1]{
  334. \refstepcounter{dummy}
  335. \addcontentsline{toc}{chapter}{#1}}
  336. \renewcommand\tableofcontents{
  337. \btypeout{Table of Contents}
  338. \addtotoc{Contents}
  339. \begin{spacing}{1}{
  340. \setlength{\parskip}{1pt}
  341. \if@twocolumn
  342. \@restonecoltrue\onecolumn
  343. \else
  344. \@restonecolfalse
  345. \fi
  346. \chapter*{\contentsname
  347. \@mkboth{
  348. \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
  349. \@starttoc{toc}
  350. \if@restonecol\twocolumn\fi
  351. \cleardoublepage
  352. }\end{spacing}
  353. }
  354. \renewcommand\listoffigures{
  355. \btypeout{List of Figures}
  356. \addtotoc{List of Figures}
  357. \begin{spacing}{1}{
  358. \setlength{\parskip}{1pt}
  359. \if@twocolumn
  360. \@restonecoltrue\onecolumn
  361. \else
  362. \@restonecolfalse
  363. \fi
  364. \chapter*{\listfigurename
  365. \@mkboth{\MakeUppercase\listfigurename}
  366. {\MakeUppercase\listfigurename}}
  367. \@starttoc{lof}
  368. \if@restonecol\twocolumn\fi
  369. \cleardoublepage
  370. }\end{spacing}
  371. }
  372. \renewcommand\listoftables{
  373. \btypeout{List of Tables}
  374. \addtotoc{List of Tables}
  375. \begin{spacing}{1}{
  376. \setlength{\parskip}{1pt}
  377. \if@twocolumn
  378. \@restonecoltrue\onecolumn
  379. \else
  380. \@restonecolfalse
  381. \fi
  382. \chapter*{\listtablename
  383. \@mkboth{
  384. \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
  385. \@starttoc{lot}
  386. \if@restonecol\twocolumn\fi
  387. \cleardoublepage
  388. }\end{spacing}
  389. }
  390.  
  391.  
  392. \newcommand\listsymbolname{Abbreviations}
  393. \usepackage{longtable}
  394. \newcommand\listofsymbols[2]{
  395. \btypeout{\listsymbolname}
  396. \addtotoc{\listsymbolname}
  397. \chapter*{\listsymbolname
  398. \@mkboth{
  399. \MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}
  400. \begin{longtable}[c]{#1}#2\end{longtable}\par
  401. \cleardoublepage
  402. }
  403. \newcommand\listconstants{Physical Constants}
  404. \usepackage{longtable}
  405. \newcommand\listofconstants[2]{
  406. \btypeout{\listconstants}
  407. \addtotoc{\listconstants}
  408. \chapter*{\listconstants
  409. \@mkboth{
  410. \MakeUppercase\listconstants}{\MakeUppercase\listconstants}}
  411. \begin{longtable}[c]{#1}#2\end{longtable}\par
  412. \cleardoublepage
  413. }
  414. \newcommand\listnomenclature{Symbols}
  415. \usepackage{longtable}
  416. \newcommand\listofnomenclature[2]{
  417. \btypeout{\listnomenclature}
  418. \addtotoc{\listnomenclature}
  419. \chapter*{\listnomenclature
  420. \@mkboth{
  421. \MakeUppercase\listnomenclature}{\MakeUppercase\listnomenclature}}
  422. \begin{longtable}[c]{#1}#2\end{longtable}\par
  423. \cleardoublepage
  424. }
  425. \newcommand\acknowledgements[1]{
  426. \btypeout{Acknowledgements}
  427. \addtotoc{Acknowledgements}
  428. \thispagestyle{plain}
  429. \begin{center}{\huge{\textit{Acknowledgements}} \par}\end{center}
  430. {\normalsize #1}
  431. \vfil\vfil\null
  432.  
  433. }
  434. \newcommand\dedicatory[1]{
  435. \btypeout{Dedicatory}
  436. \thispagestyle{plain}
  437. \null\vfil
  438. \vskip 60\p@
  439. \begin{center}{\Large \sl #1}\end{center}
  440. \vfil\null
  441. \cleardoublepage
  442. }
  443. \renewcommand\backmatter{
  444. \if@openright
  445. \cleardoublepage
  446. \else
  447. \clearpage
  448. \fi
  449. \addtotoc{\bibname}
  450. \btypeout{\bibname}
  451. \@mainmatterfalse}
  452. \endinput
Advertisement
Add Comment
Please, Sign In to add comment