Guest User

Untitled

a guest
Nov 13th, 2012
1,082
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. %---------------------------------------------------------------
  3. % PhDthesis version 2 style file by Jakob Suckale, 2007
  4. % based on CUEDthesis version 1 by Harish Bhanderi 2002
  5. %---------------------------------------------------------------
  6.  
  7.  
  8.  
  9. %-------------------------- identification ---------------------
  10. %\NeedsTeXFormat{LaTeX2e}
  11. \ProvidesClass{Latex/Classes/PhDthesisPSnPDF}[2007/09/06 v2 PhD thesis class]
  12.  
  13.  
  14. %:-------------------------- report or book -----------------------
  15.  
  16. %If you want to use a Report style document then uncomment the following 3 lines and comment the below 8 book style lines:
  17. %\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
  18. %\ProcessOptions\relax
  19. %%\LoadClass[a4paper]{report}
  20. %\ifx\pdfoutput\undefined
  21. % \LoadClass[dvips, a4paper]{report}
  22. %\else
  23. % \LoadClass[pdftex, a4paper]{report}
  24. %\fi
  25.  
  26. %%Bibliography
  27. %%uncomment next line to change bibliography name to references for Report document class
  28. %\renewcommand{\refname}{References}
  29.  
  30. %If you want to use a Book style document then uncomment the following 3 lines and comment the above 8 report style lines:
  31. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
  32. \ProcessOptions\relax
  33. \ifx\pdfoutput\undefined
  34. \LoadClass[dvips, a4paper]{book}
  35. \else
  36. \LoadClass[pdftex, a4paper]{book}
  37. \fi
  38.  
  39.  
  40. %:-------------------------- packages for fancy things -----------------------
  41.  
  42. \usepackage{amssymb}
  43. \usepackage{graphics} % for improved inclusion of graphics
  44. %\usepackage{wrapfig} % to include figure with text wrapping around it
  45. \usepackage[margin=10pt,font=small,labelfont=bf]{caption} % for improved layout of figure captions with extra margin, smaller font than text
  46. \usepackage{fancyhdr} % for better header layout
  47. \usepackage{eucal}
  48. \usepackage[english]{babel}
  49. \usepackage[usenames, dvipsnames]{color}
  50. \usepackage[perpage]{footmisc}
  51. \usepackage[round, sort, numbers]{natbib}
  52. \usepackage{ifthen}
  53. \usepackage{multicol} % for pages with multiple text columns, e.g. References
  54. \setlength{\columnsep}{20pt} % space between columns; default 10pt quite narrow
  55. \usepackage[nottoc]{tocbibind} % correct page numbers for bib in TOC, nottoc suppresses an entry for TOC itself
  56. %\usepackage{nextpage}
  57.  
  58. %:-------------------------- Glossary/Abbrev./Symbols -----------------------
  59.  
  60. \usepackage[intoc]{nomencl} % load nomencl extension; include in TOC
  61. %\nomrefpage % to include page numbers after abbrevations
  62. \renewcommand{\nomname}{Glossary} % rename nomenclature
  63. \renewcommand{\nomlabel}[1]{\textbf{#1}} % make abbreviations bold
  64. \makenomenclature % used to be \makeglossary
  65. \newcommand{\g}{\footnote{For all abbreviations see the glossary on page \pageref{nom}.}} % type "\g" to refer to glossary
  66.  
  67. % used to be for sorting into categories:
  68. %\renewcommand\nomgroup[1]{%
  69. % \ifthenelse{\equal{#1}{A}}{%
  70. % \item[\textbf{Roman Symbols}] }{% A - Roman
  71. % \ifthenelse{\equal{#1}{G}}{%
  72. % \item[\textbf{Greek Symbols}]}{% G - Greek
  73. % \ifthenelse{\equal{#1}{R}}{%
  74. % \item[\textbf{Superscripts}]}{% R - Superscripts
  75. % \ifthenelse{\equal{#1}{S}}{%
  76. % \item[\textbf{Subscripts}]}{{% S - Subscripts
  77. % \ifthenelse{\equal{#1}{X}}{%
  78. % \item[\textbf{Other Symbols}]}{{% X - Other Symbols
  79. % \ifthenelse{\equal{#1}{Z}}{%
  80. % \item[\textbf{Acronyms}]}% Z - Acronyms
  81. % {{}}}}}}}}}}
  82.  
  83.  
  84. %:-------------------------- PDF/PS setup -----------------------
  85.  
  86. %if you use a macTeX 2008 or later, use the ifpdf package
  87. \usepackage{ifpdf}
  88.  
  89. %if you use an older version, uncomment these lines:
  90. %\newif \ifpdf
  91. % \ifx \pdfoutput \undefined
  92. % for running latex
  93. % \pdffalse
  94. % \else
  95. % for running pdflatex
  96. % \pdfoutput = 1 % positive value for a PDF output
  97. % otherwise a DVI
  98. % \pdftrue
  99. %\fi
  100.  
  101. \ifpdf
  102. %-->
  103. %--> Google.com search "hyperref options"
  104. %-->
  105. %--> http://www.ai.mit.edu/lab/sysadmin/latex/documentation/latex/hyperref/manual.pdf
  106. %--> http://www.chemie.unibas.ch/~vogtp/LaTeX2PDFLaTeX.pdf
  107. %--> http://www.uni-giessen.de/partosch/eurotex99/ oberdiek/print/sli4a4col.pdf
  108. %--> http://me.in-berlin.de/~miwie/tex-refs/html/latex-packages.html
  109. %-->
  110. \usepackage[ pdftex, plainpages = false, pdfpagelabels,
  111. pdfpagelayout = useoutlines,
  112. bookmarks,
  113. bookmarksopen = true,
  114. bookmarksnumbered = true,
  115. breaklinks = true,
  116. linktocpage,
  117. pagebackref,
  118. colorlinks = false, % was true
  119. linkcolor = blue,
  120. urlcolor = blue,
  121. citecolor = red,
  122. anchorcolor = green,
  123. hyperindex = true,
  124. hyperfigures
  125. ]{hyperref}
  126.  
  127. \DeclareGraphicsExtensions{.png, .jpg, .jpeg, .pdf, .gif} %GIF doesn't work??
  128. \usepackage[pdftex]{graphicx}
  129. \pdfcompresslevel=9
  130. \graphicspath{{0_frontmatter/figures/PNG/}{0_frontmatter/figures/PDF/}{0_frontmatter/figures/}}
  131. \else
  132. \usepackage[ dvips,
  133. bookmarks,
  134. bookmarksopen = true,
  135. bookmarksnumbered = true,
  136. breaklinks = true,
  137. linktocpage,
  138. pagebackref,
  139. colorlinks = true,
  140. linkcolor = blue,
  141. urlcolor = blue,
  142. citecolor = red,
  143. anchorcolor = green,
  144. hyperindex = true,
  145. hyperfigures
  146. ]{hyperref}
  147.  
  148. \DeclareGraphicsExtensions{.eps, .ps}
  149. \usepackage{epsfig}
  150. \usepackage{graphicx}
  151. \graphicspath{{0_frontmatter/figures/EPS/}{0_frontmatter/figures/}}
  152. \fi
  153.  
  154.  
  155. %:-------------------------- page layout -----------------------
  156.  
  157. %A4 settings
  158. \ifpdf
  159. \pdfpageheight=297mm
  160. \pdfpagewidth=210mm
  161. \else
  162. \setlength{\paperheight}{297mm}
  163. \setlength{\paperwidth}{210mm}
  164. \fi
  165.  
  166. \setlength{\hoffset}{0.00cm}
  167. \setlength{\voffset}{0.00cm}
  168.  
  169. %: Uncomment this secion for two-sided printing
  170. % ------------------------------
  171. \setlength{\oddsidemargin}{1.5cm}
  172. \setlength{\evensidemargin}{0cm}
  173. \setlength{\topmargin}{1mm}
  174. \setlength{\headheight}{1.36cm}
  175. \setlength{\headsep}{1.00cm}
  176. \setlength{\textheight}{20.84cm}
  177. \setlength{\textwidth}{14.5cm}
  178. \setlength{\marginparsep}{1mm}
  179. \setlength{\marginparwidth}{3cm}
  180. \setlength{\footskip}{2.36cm}
  181.  
  182.  
  183. %: Uncomment this secion for one-sided printing
  184. % taken from the original file, but with the first two lanes modified
  185. % ------------------------------
  186. %\setlength{\evensidemargin}{1.9cm} % was 1.96cm in original
  187. %\setlength{\oddsidemargin}{-0.001cm} % was -0.54cm in original file
  188. %\setlength{\topmargin}{1mm}
  189. %\setlength{\headheight}{1.36cm}
  190. %\setlength{\headsep}{1.00cm}
  191. %\setlength{\textheight}{20.84cm}
  192. %\setlength{\textwidth}{14.5cm}
  193. %\setlength{\marginparsep}{1mm}
  194. %\setlength{\marginparwidth}{3cm}
  195. %\setlength{\footskip}{2.36cm}
  196.  
  197.  
  198. %: section below defines fancy page layout options
  199. % ------------------------------
  200. \pagestyle{fancy}
  201. \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter. #1 }}{}}
  202. \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
  203. \fancyhf{}
  204. \fancyhead[RO]{\bfseries\rightmark}
  205. \fancyhead[LE]{\bfseries\leftmark}
  206. \fancyfoot[C]{\thepage}
  207. \renewcommand{\headrulewidth}{0.5pt}
  208. \renewcommand{\footrulewidth}{0pt}
  209. \addtolength{\headheight}{0.5pt}
  210. \fancypagestyle{plain}{
  211. \fancyhead{}
  212. \renewcommand{\headrulewidth}{0pt}
  213. }
  214.  
  215.  
  216.  
  217.  
  218.  
  219. %:-------------------------- title page layout -----------------------
  220.  
  221. % starts roman page numbering until chapter 1
  222. % important to avoid two pages numbered 1 and 2 which may cause bad links
  223. % bug: cover i + back side ii and then numbering restarts with i; should be iii
  224. \renewcommand{\thepage}{\roman{page}}
  225.  
  226. \newcommand{\submittedtext}{{A thesis submitted for the degree of}}
  227.  
  228. % DECLARATIONS
  229. % These macros are used to declare arguments needed for the
  230. % construction of the title page and other preamble.
  231.  
  232. % The year and term the degree will be officially conferred
  233. \def\degreedate#1{\gdef\@degreedate{#1}}
  234. % The full (unabbreviated) name of the degree
  235. \def\degree#1{\gdef\@degree{#1}}
  236. % The name of your college or department(eg. Trinity, Pembroke, Maths, Physics)
  237. \def\collegeordept#1{\gdef\@collegeordept{#1}}
  238. % The name of your University
  239. \def\university#1{\gdef\@university{#1}}
  240. % Defining the crest
  241. \def\crest#1{\gdef\@crest{#1}}
  242. % Stating the city of birth for title page where needed; uncommented for use
  243. %\def\cityofbirth#1{\gdef\@cityofbirth{#1}}
  244.  
  245. % These macros define an environment for front matter that is always
  246. % single column even in a double-column document.
  247.  
  248. \newenvironment{alwayssingle}{%
  249. \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  250. \else\newpage\fi}
  251. {\if@restonecol\twocolumn\else\newpage\fi}
  252.  
  253. %define title page layout
  254. \renewcommand{\maketitle}{%
  255. \begin{alwayssingle}
  256. \renewcommand{\footnotesize}{\small}
  257. \renewcommand{\footnoterule}{\relax}
  258. \thispagestyle{empty}
  259. % \null\vfill
  260. \begin{center}
  261. { \Huge {\bfseries {\@title}} \par}
  262. {\large \vspace*{35mm} {{\@crest} \par} \vspace*{25mm}}
  263. {{\Large \@author} \par}
  264. % \vspace*{1ex}
  265. % {{\@cityofbirth} \par}
  266. {\large
  267. \vspace*{1ex}
  268. {{\@collegeordept} \par}
  269. \vspace*{1ex}
  270. {{\@university} \par}
  271. \vspace*{25mm}
  272. {{\submittedtext} \par}
  273. \vspace*{1ex}
  274. {\it {\@degree} \par}
  275. \vspace*{2ex}
  276. {\@degreedate}
  277. }%end large
  278. \end{center}
  279. \null\vfill
  280. \end{alwayssingle}}
  281.  
  282. % page number for cover back side should have page number blanked
  283.  
  284.  
  285. %:-------------------------- front matter layout -----------------------
  286.  
  287. % DEDICATION
  288. %
  289. % The dedication environment makes sure the dedication gets its
  290. % own page and is set out in verse format.
  291.  
  292. \newenvironment{dedication}
  293. {\begin{alwayssingle}
  294. \pagestyle{empty}
  295. \begin{center}
  296. \vspace*{1.5cm}
  297. {\LARGE }
  298. \end{center}
  299. \vspace{0.5cm}
  300. \begin{quote} \begin{center}}
  301. {\end{center} \end{quote} \end{alwayssingle}}
  302.  
  303.  
  304. % ACKNOWLEDGEMENTS
  305. %
  306. % The acknowledgements environment puts a large, bold, centered
  307. % "Acknowledgements" label at the top of the page. The acknowledgements
  308. % themselves appear in a quote environment, i.e. tabbed in at both sides, and
  309. % on its own page.
  310.  
  311. \newenvironment{acknowledgements}
  312. {\pagestyle{empty}
  313. \begin{alwayssingle}
  314. \begin{center}
  315. \vspace*{1.5cm}
  316. {\Large \bfseries Acknowledgements}
  317. \end{center}
  318. \vspace{0.5cm}
  319. \begin{quote}}
  320. {\end{quote}\end{alwayssingle}}
  321.  
  322. % The acknowledgementslong environment puts a large, bold, centered
  323. % "Acknowledgements" label at the top of the page. The acknowledgement itself
  324. % does not appears in a quote environment so you can get more in.
  325.  
  326. \newenvironment{acknowledgementslong}
  327. {\pagestyle{empty}
  328. \begin{alwayssingle}
  329. \begin{center}
  330. \vspace*{1.5cm}
  331. {\Large \bfseries Acknowledgements}
  332. \end{center}
  333. \vspace{0.5cm}\begin{quote}}
  334. {\end{quote}\end{alwayssingle}}
  335.  
  336. %ABSTRACT
  337. %
  338. %The abstract environment puts a large, bold, centered "Abstract" label at
  339. %the top of the page. The abstract itself appears in a quote environment,
  340. %i.e. tabbed in at both sides, and on its own page.
  341.  
  342. \newenvironment{abstracts} {\begin{alwayssingle} \pagestyle{empty}
  343. \begin{center}
  344. \vspace*{1.5cm}
  345. {\Large \bfseries Abstract}
  346. \end{center}
  347. \vspace{0.5cm}
  348. \begin{quote}}
  349. {\end{quote}\end{alwayssingle}}
  350.  
  351. %The abstractlong environment puts a large, bold, centered "Abstract" label at
  352. %the top of the page. The abstract itself does not appears in a quote
  353. %environment so you can get more in.
  354.  
  355. \newenvironment{abstractslong} {\begin{alwayssingle} \pagestyle{empty}
  356. \begin{center}
  357. \vspace*{1.5cm}
  358. {\Large \bfseries Abstract}
  359. \end{center}
  360. \vspace{0.5cm} \begin{quote}}
  361. {\end{quote}\end{alwayssingle}}
  362.  
  363. %The abstractseparate environment is for running of a page with the abstract
  364. %on including title and author etc as required to be handed in separately
  365.  
  366. \newenvironment{abstractseparate} {\begin{alwayssingle} \pagestyle{empty}
  367. \vspace*{-1in}
  368. \begin{center}
  369. { \Large {\bfseries {\@title}} \par}
  370. {{\large \vspace*{1ex} \@author} \par}
  371. {\large \vspace*{1ex}
  372. {{\@collegeordept} \par}
  373. {{\@university} \par}
  374. \vspace*{1ex}
  375. {{\it \submittedtext} \par}
  376. {\it {\@degree} \par}
  377. \vspace*{2ex}
  378. {\@degreedate}}
  379. \end{center}}
  380. {\end{alwayssingle}}
  381.  
  382. %Statement of originality if required
  383.  
  384. \newenvironment{declaration} {\begin{alwayssingle} \pagestyle{empty}
  385. \begin{center}
  386. \vspace*{1.5cm}
  387. {\Large \bfseries Declaration}
  388. \end{center}
  389. \vspace{0.5cm}
  390. \begin{quote}}
  391. {\end{quote}\end{alwayssingle}}
  392.  
  393.  
  394. %:-------------------------- page numbers: roman+arabic -----------------------
  395.  
  396. % ROMANPAGES
  397. %
  398. % The romanpages environment set the page numbering to lowercase roman one
  399. % for the contents and figures lists. It also resets
  400. % page-numbering for the remainder of the dissertation (arabic, starting at 1).
  401.  
  402. %\newenvironment{romanpages}
  403. %{
  404. % \setcounter{page}{1}
  405. % \renewcommand{\thepage}{\roman{page}}
  406. %} % close romanpage env't
  407.  
  408. {\newpage\renewcommand{\thepage}{\arabic{page}}\setcounter{page}{1}}
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×