-
Notifications
You must be signed in to change notification settings - Fork 0
/
iiitd.cls
337 lines (293 loc) · 9.44 KB
/
iiitd.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This is a class for LaTeX2e that should format a report as per
% the iiitd Thesis guidelines. The page layout is set using the
% geometry package. The double/singlespacing is setup using
% setspace. Figure captions are set using the hang option of
% caption2. natbib is used to do the citation using an
% author-year format. I've made an iiitd.bst file that formats
% the references as per the iiitd guidelines.
%
% To use this class do the following:
% \documentclass[options]{iiitd}
%
% Options:
%
% PhD, MS, MTech or BTech -- generates the appropriate title page
% and loads the report class.
%
% synopsis -- Generates the title page for the synopsis. This also
% loads the article class instead of the report.
%
% Example:
%
% \documentclass[PhD,synopsis]{iiitd}
% \documentclass[MS]{iiitd}
%
% IMPORTANT NOTICE:
%
% PLEASE DO NOT MESS WITH THE MARGINS AND GENERAL FORMATTING SETUP
% IN THIS FILE UNLESS YOU ARE ABSOLUTELY SURE THAT THE FORMAT DOES NOT
% MATCH WITH THE THESIS GUIDELINES. FOR EXAMPLE, DO NOT CHANGE THE
% MARGINS AND SPACING JUST TO MAKE YOUR THESIS LARGER!
%
% Notes:
%
% * I am using as much of the Thesis guidelines for the spacing
% and margins as I can.
% * I have used newdiss.cls by R.~K.~Hariram, U.~V.~Ravindra et al.
% as a reference and a source for some of the macros.
% * This class will assume a4paper with 12pt fonts.
% * I am no TeXpert so feel free to clean up the mess.
%
% Prabhu Ramachandran <prabhu@ae.iiitd.ac.in>
% March 2005.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{iiitd}[2005/03/09 Class for IIIT Delhi Dissertations]
\newif\if@PhD
\newif\if@MS
\newif\if@MTech
\newif\if@BTech
\newif\if@Synopsis
\DeclareOption{PhD}{\@PhDtrue}
\DeclareOption{MS}{\@MStrue}
\DeclareOption{MTech}{\@MTechtrue}
\DeclareOption{BTech}{\@BTechtrue}
\DeclareOption{synopsis}{\@Synopsistrue}
\ProcessOptions\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Load the correct class.
\if@Synopsis
\LoadClass[12pt,a4paper]{article}
\else
\LoadClass[12pt,a4paper]{report}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Geometry and page layout
\RequirePackage[a4paper,left=1.5in,right=1in,top=1in,bottom=0.667in,
nohead]{geometry}[2002/07/08]
\parskip 8pt
\renewcommand{\@pnumwidth}{2.5em}
%\renewcommand{\@tocrmarg}{2.5em}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Using setspace to do the single/double spacing. Setspace also
%% makes all tables and figures have single spacing automatically.
\RequirePackage{setspace}
\RequirePackage{atbeginend} % used to redefine the list environs
\setstretch{1.5}
\BeforeBegin{itemize}{\vspace*{-5ex}\begin{singlespace}}
\AfterEnd{itemize}{\end{singlespace}}
\BeforeBegin{enumerate}{\vspace*{-5ex}\begin{singlespace}}
\AfterEnd{enumerate}{\end{singlespace}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The figure captioning is done correctly via the hang option.
%%\RequirePackage[hang]{caption2} -> TeX generates error
\RequirePackage[hang]{caption}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bibliography
%
% natbib allows easy switching of citation style and using it along
% with the iiitd.bst makes things perfect.
\RequirePackage[authoryear,round]{natbib}
%\RequirePackage[numbers,square]{natbib}
\bibliographystyle{iiitd}
\newcommand{\bibstyle@iiitd}{\bibpunct{(}{)}{;}{a}{,}{,}%
\gdef\NAT@biblabel##1{##1. }}
%
\setlength{\bibhang}{0pt}
\citestyle{iiitd}
%\citestyle{unsrt_newen}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Other useful macros. Many of these are modifications from newdiss.cls
% \department{department name} -- user macro to declare name of department.
\def\department#1{\gdef\@department{#1}}
%\RequirePackage[dvips]{graphicx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The title page
\def\maketitle{%
\pagenumbering{roman}
\thispagestyle{empty}
\newpage
\null
\setcounter{page}{0}
\parskip=0pt
\begin{center}%
\let \footnote \thanks
\vglue 0in % this makes top margin 2in
\vskip -5ex%
\centerline{\includegraphics[scale=1.]{iiitd}}
\vspace*{-0.15in}
\if@Synopsis
{\large \em SYNOPSIS OF \par}
\fi
{\Large \bf \expandafter{\@title} \par}%
\vskip 7ex%
{\normalsize
\if@PhD
{ A THESIS }\par
\vskip 2ex%
\if@Synopsis
{\normalsize TO BE SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF \par}
\else
{\normalsize SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF \par}
\fi
\vskip 2ex%
{\bf \large \MakeUppercase{Doctor of Philosophy}}
\vskip 2ex%
{\normalsize BY \par}
\vskip 3ex%
{\bf \large\MakeUppercase{\@author}\par\par}\par
\vskip 1ex%
{\normalsize (PhD18101) \par}\par
\else
\if@MS
{\em A THESIS }\par
\vskip 3ex%
{\normalsize \em submitted by \par}
\vskip 5ex%
{\bf \large\MakeUppercase{\@author}\par\par}
\vskip 5ex%
{\em for the award of the degree }\par
\vskip 5ex%
{\em of} \par
\vskip 5ex%
{\bf \large \MakeUppercase{Master Of Science}} \par
(by Research) \par
\else
{\em A Project Report }\par
\vskip 5ex%
{\normalsize \em submitted by \par}
\vskip 5ex%
{\bf \large\MakeUppercase{\@author}\par\par}
\vskip 5ex%
{\normalsize \em in partial fulfilment of the requirements\par
for the award of the degree of \par}
\vskip 5ex%
\if@MTech
{\bf MASTER OF TECHNOLOGY}
\fi
\if@BTech
{\bf BACHELOR OF TECHNOLOGY}
\fi
\fi
\fi
}
\end{center}%
\vspace*{0.03in}
%\centerline{\psfig{figure=emblem.ps}}
% \centerline{\includegraphics{iiitd.eps}}
\begin{center}
{\@department\par}
{{(Department of Computer Science Engineering)}\par
%{Visual Conception Group and MIDAS LAB}\par
\vspace{0.10in}INDRAPRASTHA INSTITUTE OF INFORMATION TECHNOLOGY\\NEW DELHI- 110020 }\vspace{0.1in}
\vglue 1.00em
{\bf \large \@date}\par
\end{center}
\parskip 4pt
}
\def\titlepage{\newpage\thispagestyle{empty}\c@page\z@}
\def\endtitlepage{\newpage}
\if@Synopsis
\renewcommand\refname{REFERENCES}
\else
% QUOTATIONS
%
\def\quotations{\chapter*{\centerline{QUOTATIONS}}
%\addcontentsline{toc}{chapter}{QUOTATIONS}
}
% DEDICATION
%
\def\dedication{\chapter*{\centerline{DEDICATION}}
%\addcontentsline{toc}{chapter}{DEDICATION}
}
% CERTIFICATE
%
% - this produces a certificate page as per IIITD Regulations
% comment the following lines out to get it working.
%
\def\certificate{%% A preliminary chapter
\clearpage
\vspace*{36pt}
\centerline{\Large \bf THESIS CERTIFICATE}
\vskip 25pt
\thispagestyle{empty}
\typeout{Certificate}
\setcounter{page}{0}
}
% ACKNOWLEDGEMENTS
%
\def\acknowledgements{\chapter*{\centerline{ACKNOWLEDGEMENTS}}
\addcontentsline{toc}{chapter}{ACKNOWLEDGEMENTS}
}
% ABSTRACT
% - this produces pages suitable for an IIITD Abstract
\def\abstract{\chapter*{\centerline{ABSTRACT}}
\addcontentsline{toc}{chapter}{ABSTRACT}
}
% GLOSSARY
%
\def\glossary{\chapter*{\centerline{GLOSSARY}}
\addcontentsline{toc}{chapter}{GLOSSARY}
}
% ABBREVIATIONS
%
\def\abbreviations{\chapter*{\centerline{ABBREVIATIONS}}
\addcontentsline{toc}{chapter}{ABBREVIATIONS}
}
% Use the nomencl package for the NOTATION section.
% Makes the chapter heading
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\begin{center}
\Large\bfseries \@chapapp\space \thechapter
\end{center}
\par\nobreak
\vskip 20\p@
\fi
\interlinepenalty\@M
\Large \bf
\begin{center}
#1\par\nobreak
\end{center}
\vskip 20\p@
\thispagestyle{empty}
}}
% Makes the chapter heading for \chapter* commands
\def\@makeschapterhead#1{%
\vspace*{25\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\Large \bfseries #1\par\nobreak
\vskip 20\p@
}}
%LIST OF PAPERS
\def\listofpapers{
\normalbaselines
\chapter*{\centerline{LIST OF PAPERS BASED ON THESIS}}
\markboth{LIST OF PAPERS BASED ON THESIS}{LIST OF PAPERS BASED ON THESIS}
%\addcontentsline{toc}{chapter}{LIST OF PAPERS BASED ON THESIS}
}
% CV
\def\CV{\chapter*{\centerline{CURRICULUM VITAE}}}
% Comittee
\if@PhD
\def\committee{\chapter*{\centerline{DOCTORAL COMMITTEE}}}
\else
\if@MS
\def\committee{\chapter*{\centerline{GENERAL TEST COMITTEE}}}
\fi
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Renewed commands to set the titles of various pages correctly.
\renewcommand\contentsname{\centering TABLE OF CONTENTS}
\renewcommand\listfigurename{\centering List of Figures}
\renewcommand\listtablename{\centering List of Tables}
%\renewcommand\listsymbolname{\centering LIST OF SYMBOLS}
\renewcommand{\chaptername}{CHAPTER}
\renewcommand\bibname{\centering REFERENCES}
\renewcommand\appendixname{APPENDIX}
\fi