Guest User

uet_thesis.cls

a guest
May 9th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 14.33 KB | None | 0 0
  1. %%
  2. %% This file uet_thesis.cls is based on `Thesis.cls' and 'ECSthesis.cls', by    %% Sunil Patel and Steve R. Gunn respectively.
  3. %%
  4. %% Created by Steve R. Gunn, first modified by Sunil Patel: www.sunilpatel.co.uk %% ,adopted for UET style by M Tahir (mtahir@uet.edu.pk), modified for CSE dept. by Tania habib (tania.habib@uet.edu.pk)
  5.  
  6. \NeedsTeXFormat{LaTeX2e}[1996/12/01]
  7. \ProvidesClass{uet_thesis}
  8.              [2010/22/03 v1.1
  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.  
  27. \newcommand\Declaration[1]{
  28. \btypeout{Declaration of Authorship}
  29. %\addtotoc{Declaration of Authorship}
  30. \thispagestyle{plain}
  31. \null\vfil
  32. %\vskip 60\p@
  33. \begin{center}{\huge \bf Declaration \par}\end{center}
  34. %\vskip 60\p@
  35. {\normalsize #1}
  36. \vfil\vfil\null
  37. %\cleardoublepage
  38. }
  39.  
  40.  
  41. \newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
  42. \def\today{\ifcase\month\or
  43.  January\or February\or March\or April\or May\or June\or
  44.  July\or August\or September\or October\or November\or December\fi
  45.  \space \number\year}
  46. \usepackage{setspace}
  47. \onehalfspacing
  48. \setlength{\parindent}{0pt}
  49. \setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
  50. \usepackage{vmargin}
  51. \setmarginsrb           { 1.5in}  % left margin
  52.                         { 0.6in}  % top margin
  53.                         { 1.0in}  % right margin
  54.                         { 0.8in}  % bottom margin
  55.                         {  20pt}  % head height
  56.                         {0.25in}  % head sep
  57.                         {   9pt}  % foot height
  58.                         { 0.3in}  % foot sep
  59. \raggedbottom
  60. \setlength{\topskip}{1\topskip \@plus 5\p@}
  61. \doublehyphendemerits=10000       % No consecutive line hyphens.
  62. \brokenpenalty=10000              % No broken words across columns/pages.
  63. \widowpenalty=9999                % Almost no widows at bottom of page.
  64. \clubpenalty=9999                 % Almost no orphans at top of page.
  65. \interfootnotelinepenalty=9999    % Almost never break footnotes.
  66. \usepackage{fancyhdr}
  67. \lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
  68. \rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
  69. \chead{}\lfoot{}\rfoot{}\cfoot{}
  70. \pagestyle{fancy}
  71. \renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}
  72. \renewcommand{\sectionmark}[1]{}
  73. \renewcommand{\subsectionmark}[1]{}
  74. \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  75. \hbox{}
  76. \thispagestyle{empty}
  77. \newpage
  78. \if@twocolumn\hbox{}\newpage\fi\fi\fi}
  79. \usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}
  80. \theoremstyle{plain}
  81. \newtheorem{example}{Example}[chapter]
  82. \newtheorem{theorem}{Theorem}[chapter]
  83. \newtheorem{corollary}[theorem]{Corollary}
  84. \newtheorem{lemma}[theorem]{Lemma}
  85. \newtheorem{proposition}[theorem]{Proposition}
  86. \newtheorem{axiom}[theorem]{Axiom}
  87. \theoremstyle{definition}
  88. \newtheorem{definition}[theorem]{Definition}
  89. \theoremstyle{remark}
  90. \newtheorem{remark}[theorem]{Remark}
  91. \usepackage[centerlast,small,sc]{caption}
  92. \setlength{\captionmargin}{20pt}
  93. \newcommand{\fref}[1]{Figure~\ref{#1}}
  94. \newcommand{\tref}[1]{Table~\ref{#1}}
  95. \newcommand{\eref}[1]{Equation~\ref{#1}}
  96. \newcommand{\cref}[1]{Chapter~\ref{#1}}
  97. \newcommand{\sref}[1]{Section~\ref{#1}}
  98. \newcommand{\aref}[1]{Appendix~\ref{#1}}
  99. \renewcommand{\topfraction}{0.85}
  100. \renewcommand{\bottomfraction}{.85}
  101. \renewcommand{\textfraction}{0.1}
  102. \renewcommand{\dbltopfraction}{.85}
  103. \renewcommand{\floatpagefraction}{0.75}
  104. \renewcommand{\dblfloatpagefraction}{.75}
  105. \setcounter{topnumber}{9}
  106. \setcounter{bottomnumber}{9}
  107. \setcounter{totalnumber}{20}
  108. \setcounter{dbltopnumber}{9}
  109. \usepackage{graphicx}
  110. %\usepackage{epstopdf}
  111. \usepackage[scriptsize]{subfigure}
  112. \usepackage{booktabs}
  113. \usepackage{rotating}
  114. \usepackage{listings}
  115. %\usepackage{lstpatch}
  116. \lstset{captionpos=b,
  117.        frame=tb,
  118.        basicstyle=\scriptsize\ttfamily,
  119.        showstringspaces=false,
  120.        keepspaces=true}
  121. \lstdefinestyle{matlab} {
  122.        language=Matlab,
  123.        keywordstyle=\color{blue},
  124.        commentstyle=\color[rgb]{0.13,0.55,0.13}\em,
  125.        stringstyle=\color[rgb]{0.7,0,0} }
  126. \usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,
  127.   bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,
  128.   colorlinks,linkcolor={blue},citecolor={blue},urlcolor={red},
  129.   pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
  130. \pdfstringdefDisableCommands{
  131.   \let\\\space
  132. }
  133. \newcommand*{\supervisor}[1]{\def\supname{#1}}
  134. \newcommand*{\examiner}[1]{\def\examname{#1}}
  135. \newcommand*{\degree}[1]{\def\degreename{#1}}
  136. \newcommand*{\authors}[1]{\def\authornames{#1}}
  137. \newcommand*{\advisor}[1]{\def\advisorname{#1}}
  138. \newcommand*{\session}[1]{\def\groupsession{#1}}
  139. \newcommand*{\addresses}[1]{\def\addressnames{#1}}
  140. \newcommand*{\university}[1]{\def\univname{#1}}
  141. \newcommand*{\UNIVERSITY}[1]{\def\UNIVNAME{#1}}
  142. \newcommand*{\department}[1]{\def\deptname{#1}}
  143. \newcommand*{\DEPARTMENT}[1]{\def\DEPTNAME{#1}}
  144. \newcommand*{\group}[1]{\def\groupname{#1}}
  145. \newcommand*{\GROUP}[1]{\def\GROUPNAME{#1}}
  146. \newcommand*{\faculty}[1]{\def\facname{#1}}
  147. \newcommand*{\FACULTY}[1]{\def\FACNAME{#1}}
  148. \newcommand*{\subject}[1]{\def\subjectname{#1}}
  149. \newcommand*{\keywords}[1]{\def\keywordnames{#1}}
  150. \supervisor  {}
  151. \examiner    {}
  152. \degree      {}
  153. \authors     {}
  154. \university  {University of Engineering and Technology Lahore Pakistan}
  155. \UNIVERSITY  {UNIVERSITY OF ENGINEERING AND TECHNOLOGY LAHORE, PAKISTAN}
  156. \department  {{Department of Computer Science and Engineering}}
  157. \DEPARTMENT  {{DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING}}
  158.  
  159. \group       {{Research Group Name}}
  160. \GROUP       {{RESEARCH GROUP NAME (IN BLOCK CAPITALS)}}
  161. \faculty     {{Faculty Name}}
  162. \FACULTY     {{FACULTY NAME (IN BLOCK CAPITALS)}}
  163. \addresses   {}
  164. \subject     {}
  165. \keywords    {}
  166. \renewcommand\maketitle{
  167.  \btypeout{Title Page}
  168.  \hypersetup{pdftitle={\@title}}
  169.  \hypersetup{pdfsubject=\subjectname}
  170.  \hypersetup{pdfauthor=\authornames}
  171.  \hypersetup{pdfkeywords=\keywordnames}
  172.  \thispagestyle{empty}
  173.  \begin{titlepage}
  174.    \let\footnotesize\small
  175.    \let\footnoterule\relax
  176.    \let \footnote \thanks
  177.    \setcounter{footnote}{0}
  178.    \null\vfil
  179.    \vskip 60\p@
  180.    \begin{center}
  181.      \setlength{\parskip}{0pt}
  182.      {\huge \bf \@title \par}
  183. %       {\rule{35em}{1.5pt}}
  184.       \vfill
  185.         \begin{figure}[h]
  186.         \centering
  187.         \includegraphics{./Figures/uet_logo.pdf}
  188.         \end{figure}
  189.      { {Session:} \groupsession  \par}
  190.      \bigskip
  191.      \bigskip
  192.         {\Large {\bf Submitted by:}  \\
  193.         {\authornames} \par}
  194.         \bigskip    
  195.         \bigskip    
  196.      \bigskip
  197.  
  198.         {\Large {\bf Supervised by:} \\
  199.         \advisorname \par}
  200.       \vfill
  201. %%      {\large A thesis submitted in partial fulfillment for the \par}
  202. %%      {\large degree of Doctor of Philosophy \par}
  203.       \bigskip
  204.         \bigskip
  205. %%      {\large in the \par}
  206. %       {\rule{35em}{1.5pt}}
  207.       {\Large \deptname \par}
  208.      {\Large\textbf{\univname}\par}
  209. %      \bigskip
  210.            
  211. %      {\Large \@date \par}
  212. %      \bigskip
  213.     \end{center}
  214. %    \par
  215. %    \@thanks
  216. %    \vfil\null
  217.   \end{titlepage}
  218.  \setcounter{footnote}{0}%
  219.   \global\let\thanks\relax
  220.   \global\let\maketitle\relax
  221.   \global\let\@thanks\@empty
  222.   \global\let\@author\@empty
  223.   \global\let\@date\@empty
  224. %  \global\let\@title\@empty
  225. %  \global\let\title\relax
  226.   \global\let\author\relax
  227.   \global\let\date\relax
  228.   \global\let\and\relax
  229.   \cleardoublepage
  230. }
  231. \newenvironment{abstract}
  232. {
  233.  \btypeout{Abstract Page}
  234.  \thispagestyle{empty}
  235.  \begin{center}
  236.    \setlength{\parskip}{0pt}
  237.    {\huge{ \bf Abstract} \par}
  238.   \end{center}
  239. }
  240. {
  241.  \vfil\vfil\vfil\null
  242.  \cleardoublepage
  243. }
  244. \addtocounter{secnumdepth}{1}
  245. \setcounter{tocdepth}{6}
  246. \newcounter{dummy}
  247. \newcommand\addtotoc[1]{
  248. \refstepcounter{dummy}
  249. \addcontentsline{toc}{chapter}{#1}}
  250. \renewcommand\tableofcontents{
  251. \btypeout{Table of Contents}
  252. \begin{spacing}{1}{
  253.    \setlength{\parskip}{1pt}
  254.    \if@twocolumn
  255.      \@restonecoltrue\onecolumn
  256.    \else
  257.      \@restonecolfalse
  258.    \fi
  259.    \chapter*{\contentsname
  260.        \@mkboth{
  261.           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
  262.    \@starttoc{toc}
  263.    \if@restonecol\twocolumn\fi
  264.   \cleardoublepage
  265. }\end{spacing}
  266. }
  267. \renewcommand\listoffigures{
  268. \btypeout{List of Figures}
  269. \addtotoc{List of Figures}
  270. \begin{spacing}{1}{
  271.    \setlength{\parskip}{1pt}
  272.    \if@twocolumn
  273.      \@restonecoltrue\onecolumn
  274.    \else
  275.      \@restonecolfalse
  276.    \fi
  277.    \chapter*{\listfigurename
  278.      \@mkboth{\MakeUppercase\listfigurename}
  279.              {\MakeUppercase\listfigurename}}
  280.    \@starttoc{lof}
  281.    \if@restonecol\twocolumn\fi
  282.    \cleardoublepage
  283. }\end{spacing}
  284. }
  285. \renewcommand\listoftables{
  286. \btypeout{List of Tables}
  287. \addtotoc{List of Tables}
  288. \begin{spacing}{1}{
  289.    \setlength{\parskip}{1pt}
  290.    \if@twocolumn
  291.      \@restonecoltrue\onecolumn
  292.    \else
  293.      \@restonecolfalse
  294.    \fi
  295.    \chapter*{\listtablename
  296.      \@mkboth{
  297.          \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
  298.    \@starttoc{lot}
  299.    \if@restonecol\twocolumn\fi
  300.    \cleardoublepage
  301. }\end{spacing}
  302. }
  303. \newcommand\listsymbolname{Abbreviations}
  304. \usepackage{longtable}
  305. \newcommand\listofsymbols[2]{
  306. \btypeout{\listsymbolname}
  307. \addtotoc{\listsymbolname}
  308.    \chapter*{\listsymbolname
  309.      \@mkboth{
  310.          \MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}
  311. \begin{longtable}[c]{#1}#2\end{longtable}\par
  312.    \cleardoublepage
  313. }
  314. \newcommand\listconstants{Physical Constants}
  315. \usepackage{longtable}
  316. \newcommand\listofconstants[2]{
  317. \btypeout{\listconstants}
  318. \addtotoc{\listconstants}
  319.    \chapter*{\listconstants
  320.      \@mkboth{
  321.          \MakeUppercase\listconstants}{\MakeUppercase\listconstants}}
  322. \begin{longtable}[c]{#1}#2\end{longtable}\par
  323.    \cleardoublepage
  324. }
  325. \newcommand\listnomenclature{Symbols}
  326. \usepackage{longtable}
  327. \newcommand\listofnomenclature[2]{
  328. \btypeout{\listnomenclature}
  329. \addtotoc{\listnomenclature}
  330.    \chapter*{\listnomenclature
  331.      \@mkboth{
  332.          \MakeUppercase\listnomenclature}{\MakeUppercase\listnomenclature}}
  333. \begin{longtable}[c]{#1}#2\end{longtable}\par
  334.    \cleardoublepage
  335. }
  336. \newcommand\acknowledgements[1]{
  337. \btypeout{Acknowledgments}
  338. \addtotoc{Acknowledgments}
  339. \thispagestyle{plain}
  340. \vspace{0.5in}
  341. \begin{center}{\huge{\bf Acknowledgments} \par}\end{center}
  342. {\normalsize #1}
  343. \vfil\vfil\null
  344.  
  345. }
  346.  
  347. \newcommand\CertificationBSc[1]{
  348. \btypeout{Certification}
  349. %\addtotoc{Declaration of Authorship}
  350. \thispagestyle{plain}
  351. \null\vfil
  352.  
  353. %\vskip 60\p@
  354. \begin{center}{\large{ \bf \@title \par}(Session 2012 \D0 Computer Engineering)}\end{center}
  355. \vskip 20\p@
  356. \begin{center}
  357. The thesis is to be submitted to the Department of Computer Science and Engineering, University of Engineering and Technology, Lahore for the partial fulfillment of the requirement for the Bachelor\D5s degree in Computer Engineering.
  358. \end{center}
  359. {\normalsize #1}
  360. \vfil\vfil\null
  361. \bigskip
  362. \bigskip
  363.  
  364. \begin{table}[h]
  365. %\centering
  366. \begin{tabular}{lllll}
  367.  
  368. \textbf{\underline{Internal Examiner}} & ~~~~~~~~~~~~~~ & \textbf{\underline{External Examiner}}\\
  369. Signature: & ~~~~~~~~~~~~~~ & Signature:\\
  370. \rule[0em]{15em}{1.0pt} & ~~~~~~~~~~~~~~ & \rule[0em]{15em}{1.0pt} \\
  371. Name: & ~~~~~~~~~~~~~~ & Name:\\
  372. \rule[0em]{15em}{1.0pt} & ~~~~~~~~~~~~~~ & \rule[0em]{15em}{1.0pt} \\
  373. Designation: & ~~~~~~~~~~~~~~ & Designation:\\
  374. \rule[0em]{15em}{1.0pt} & ~~~~~~~~~~~~~~ & \rule[0em]{15em}{1.0pt}
  375. \end{tabular}
  376. \end{table}
  377.  
  378. \vfill
  379.  
  380. \begin{table}[h]
  381. \centering
  382. \begin{tabular}{lllll}
  383.  
  384. \textbf{\underline{Chairman}} & ~~~~~~~~~~~~~~ & \textbf{\underline{Dean}}\\
  385. Signature: & ~~~~~~~~~~~~~~ & Signature:\\
  386. \rule[0em]{15em}{1.0pt} & ~~~~~~~~~~~~~~ & \rule[0em]{15em}{1.0pt} \\
  387. Prof. Muhammad Ali Maud& ~~~~~~~~~~~~~~ & Name:\\
  388. \end{tabular}
  389. \end{table}
  390.  
  391. \vfill
  392.  
  393. \begin{center}
  394. \bigskip
  395.  
  396. {\Large \deptname \par}
  397. {\Large \textbf{\univname}\par}
  398.  
  399. \end{center}
  400. %\cleardoublepage
  401. }
  402.  
  403. \newcommand\CertificationMSc[1]{
  404. \btypeout{Certification}
  405. %\addtotoc{Declaration of Authorship}
  406. \thispagestyle{empty}
  407. \null\vfil
  408. %\vskip 60\p@
  409. \begin{center}{\huge \bf \@title \par}\end{center}
  410. \vskip 60\p@
  411. \begin{center}
  412. Submitted to the faculty of the Computer Science and Engineering Department of the University of Engineering and Technology Lahore in partial fulfillment of the requirements for the Degree of \\ \LARGE{Master of Science} \\ \Large{in} \\ \LARGE{\bf Computer Engineering}.  
  413. \end{center}
  414. {\normalsize #1}
  415. \vfil\vfil\null
  416. \bigskip
  417. \bigskip
  418.  
  419. \begin{table}[h]
  420. %\centering
  421. \begin{tabular}{lllll}
  422.  
  423. \textbf{\underline{Internal Examiner}} & ~~~~~~~~~~~~~~ & \textbf{\underline{External Examiner}}\\
  424. Signature: & ~~~~~~~~~~~~~~ & Signature:\\
  425. \rule[0em]{15em}{1.0pt} & ~~~~~~~~~~~~~~ & \rule[0em]{15em}{1.0pt} \\
  426. Name: & ~~~~~~~~~~~~~~ & Name:\\
  427. \rule[0em]{15em}{1.0pt} & ~~~~~~~~~~~~~~ & \rule[0em]{15em}{1.0pt} \\
  428. Designation: & ~~~~~~~~~~~~~~ & Designation:\\
  429. \rule[0em]{15em}{1.0pt} & ~~~~~~~~~~~~~~ & \rule[0em]{15em}{1.0pt}
  430. \end{tabular}
  431. \end{table}
  432.  
  433. \vfill
  434.  
  435. \begin{table}[h]
  436. \centering
  437. \begin{tabular}{lllll}
  438.  
  439. \textbf{\underline{Chairman}} & ~~~~~~~~~~~~~~ & \textbf{\underline{Dean}}\\
  440. Signature: & ~~~~~~~~~~~~~~ & Signature:\\
  441. \rule[0em]{15em}{1.0pt} & ~~~~~~~~~~~~~~ & \rule[0em]{15em}{1.0pt} \\
  442. Prof. Muhammad Shahbaz& ~~~~~~~~~~~~~~ & Name:\\
  443. \end{tabular}
  444. \end{table}
  445.  
  446.  
  447. \vfill
  448.  
  449. \begin{center}
  450.    
  451. \bigskip
  452.  
  453. {\Large \deptname \par}
  454. {\Large \textbf{\univname}\par}
  455.  
  456. \end{center}
  457. %\cleardoublepage
  458. }
  459.  
  460. \newcommand\dedicatory[1]{
  461. \btypeout{Dedicatory}
  462. \thispagestyle{plain}
  463. \null\vfil
  464. \vskip 60\p@
  465. \begin{center}{\Large \sl #1}\end{center}
  466. \vfil\null
  467. \cleardoublepage
  468. }
  469.  
  470. \renewcommand\backmatter{
  471.  \if@openright
  472.    \cleardoublepage
  473.  \else
  474.    \clearpage
  475.  \fi
  476.  \renewcommand{\bibname}{References}
  477.  \addtotoc{\bibname}
  478.  \btypeout{\bibname}
  479.  \@mainmatterfalse}
  480. \endinput
  481. %%
  482. %% End of file `uet_thesis.cls'.
Add Comment
Please, Sign In to add comment