-
Notifications
You must be signed in to change notification settings - Fork 0
/
thesis.cs.pub.ro.cls
247 lines (194 loc) · 6.44 KB
/
thesis.cs.pub.ro.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
% Mircea Bardac, 2008-2009
% dev@mircea.bardac.net
% thesis.cs.pub.ro.cls - class for thesis
% Copyright notice: you must keep the original author(s)/copyright information in the files
% Released: 2009-06-23 - v 0.1 (preview and public testing phase)
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{thesis.cs.pub.ro}[2008/07/14]
\let\ExecuteOptions@ltx\ExecuteOptions
\def\ExecuteOptions#1{%
\ExecuteOptions@ltx{a4paper,11pt,oneside,onecolumn,final}%
}%
\LoadClassWithOptions{report}
\let\ExecuteOptions\ExecuteOptions@ltx
% uncomment the lines bellow for Romanian Language support
% Use UTF8 file encoding when writing .tex files in Romanian
% Romanian Language support
%\usepackage{ucs}
%\usepackage[utf8x]{inputenc}
%\usepackage[english,romanian]{babel}
\usepackage{makeidx}
\usepackage[top=3cm, bottom=3cm, left=3cm, right=2.54cm]{geometry}
\setlength{\headheight}{1.20cm}
\setlength{\headsep}{0.50cm}
\usepackage{parskip}
% package for variable line spacing (1, 1.5, 2)
% usage: write \onehalfspacing before the part which should be
% with 1.5 line spacing
% for example, in "thesis.tex" before "\input{src/main}" will make
% all the chapters with 1.5 line spacing
\usepackage{setspace}
% saved by the spacing :)
%\onehalfspacing
% hyper-references
% http://www.tug.org/applications/hyperref/manual.html
\usepackage{hyperref}
\hypersetup{%
colorlinks=true,
linkcolor=black,
anchorcolor=black,
citecolor=black,
filecolor=black,
menucolor=black,
urlcolor=black,
bookmarks=true,
bookmarksnumbered=true
}
\urlstyle{sf}
% Treat _ as a normal character
\usepackage{underscore}
% Support for including graphics
\usepackage{graphicx}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
% Code listings support
\usepackage{listings}
\lstset{
numbers=left, numberstyle=\footnotesize,
frame=lines, captionpos=b,
breaklines=true,
basicstyle=\ttfamily
}
% notations and abbreviations
% http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/nomencl.pdf
% Sample usage (anywhere in the doc): \abbrev{ABC}{Alpha Beta Gama}
\usepackage{nomencl}
\let\abbrev\nomenclature
\renewcommand{\nomname}{Notations and Abbreviations}
\renewcommand{\nomlabel}[1]{#1 --}
\setlength{\nomitemsep}{-\parsep}
% to be used in the main .tex file
\newcommand{\printabbrev}{
\printnomenclature
\newpage
}
\makenomenclature
% restart numbering footnotes on every page
\usepackage{perpage}
\MakePerPage{footnote}
% custom variables for altering front page content
% for some reason I can't use \VAR@author as described in
% http://www.gocad.org/meeting/Nancy2008/papers/gocad.sty
\newcommand{\VARauthor} {}
\newcommand{\VARdate} {}
\newcommand{\VARadviser} {}
\newcommand{\VARtitleen} {}
\newcommand{\VARtitlero} {}
\newcommand{\VARtitlefooteren} {}
\newcommand{\VARtitlefooterro} {}
\renewcommand{\author}[1]{ \renewcommand{\VARauthor}{#1} }
\renewcommand{\date}[1]{ \renewcommand{\VARdate}{#1} }
\newcommand{\adviser}[1]{ \renewcommand{\VARadviser}{#1} }
\newcommand{\titleen}[1]{ \renewcommand{\VARtitleen}{#1} }
\newcommand{\titlero}[1]{ \renewcommand{\VARtitlero}{#1} }
\newcommand{\titlefooteren}[1]{ \renewcommand{\VARtitlefooteren}{#1} }
\newcommand{\titlefooterro}[1]{ \renewcommand{\VARtitlefooterro}{#1} }
% fancyhdr package
% headers with chapter title and page number
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % delete default settings
\fancyhead[L,RO]{\bfseries \thepage} % page number
\fancyhead[L]{\bfseries\leftmark} % section name
% line in header
\renewcommand{\headrulewidth}{0.5pt}
% more space for the line in header
\addtolength{\headheight}{0.5pt}
% no line in footer
\renewcommand{\footrulewidth}{0pt}
% longtable package
\usepackage{longtable}
% Fix verbatim environment: smaller text size
\let\oldverbatim=\verbatim
\renewenvironment{verbatim}{
\begin{small}
\begin{oldverbatim}
\vspace*{1em}
}%
{%
\vspace*{1em}
\end{oldverbatim}
\end{small}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% iiscthes.sty - IISC Thesis Style
% http://etd.ncsi.iisc.ernet.in/instructions/templates.htm
% Page formatting and numbering
\newenvironment{frontmatter}{\pagenumbering{roman}}{\newpage \pagenumbering{arabic}}
\renewenvironment{abstract}{\null\vfil\prefacesection{Abstract}}{\par\vfill\null}
\def\prefacesection#1{%
\chapter*{#1}
\addcontentsline{toc}{chapter}{#1}}
% Added by Y.N. Srikant
\def\keywords{\prefacesection{Keywords}}
\def\notations{\prefacesection{Notation and Abbreviations}}
\def\vita{\prefacesection{Vita}}
\def\publications{\prefacesection{Publications based on this Thesis}}
%% end iiscthes.sty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\notitlesection#1{%
\addcontentsline{toc}{chapter}{#1}}
\newenvironment{acknowledgements} {
\notitlesection{Acknowledgements}
\thispagestyle{empty} }
{\pagestyle{fancy}}
\newcommand{\includechapter}[1]{\input{src/chapter-#1/index}}
\newcommand{\includesection}[2]{\input{src/chapter-#1/#2}}
% No indent
\setlength{\parindent}{0pt}
\usepackage[T1]{fontenc}
% Default fonts
% (more info: http://www.tug.dk/FontCatalogue/)
% TT font: Courier
\usepackage{courier}
%\usepackage[T1]{fontenc}
%\usepackage{tgpagella}
% SF font: Helvetica (default document font)
% \usepackage[scaled]{helvet}
% \renewcommand*\familydefault{\sfdefault}
% command for specifying TODOs
\newcommand{\todo}[1]{
\colorbox{yellow}{
\begin{minipage}{15cm}
\textbf{TODO:}\\
#1
\end{minipage}
}
}
% command for formatting inline functions
% Usage (default language = C)
% \func{function_name}
% \func[language]{function_name}
% 'language' must be supported by package 'listings'
\newcommand{\func}[2][C]{\lstset{language=#1}\lstinline|#2|\lstset{language=C}}
% command for formatting file names
\newcommand{\file}[1]{\textbf{\texttt{#1}}}
% command for formatting inline commands
\newcommand{\cmd}[1]{\textbf{\texttt{#1}}}
% commands for creating labeled hyper-linked references
\newcommand{\labelindexref}[2]{\hyperref[#2]{#1~\ref*{#2}}}
\newcommand{\labelref}[2]{\hyperref[#2]{#1}}
\newcommand{\appref}[1]{\hyperref[#1]{Appendix~\ref{#1}}}
\newcommand{\figref}[1]{\hyperref[#1]{figure~\ref{#1}}}
\newcommand{\tabref}[1]{\hyperref[#1]{table~\ref{#1}}}
\newcommand{\chpref}[1]{\hyperref[#1]{chapter~\ref{#1}}}
% command for inserting labeled figures
% Usage: \fig{file}{label}{caption}
% TODO: references should point to the top of the image
\newcommand{\fig}[4][]{
\begin{figure}[htb]
\begin{center}
\includegraphics[#1]{#2}
\caption{#4 \label{#3}}
\end{center}
\end{figure}
}