-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tex
328 lines (275 loc) · 10.8 KB
/
main.tex
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
\documentclass[msc,oneside,11pt,norunningheaders]{ubcthesiscpbl}
%[phd,10pt,noupper,runningheaders]{ubcthesis}
\usepackage[utf8]{inputenc}
\usepackage{setspace}
\newcommand{\ifdoDoubleSpace}[1]{}
% committee option is for draft: 1.5 spacing
%\makeatletter
\if@twoside
\def\setpageforTOC{\setcounter{page}{2}}
\else
\def\setpageforTOC{}
\fi
\if@twoside
\def\ps@plain{%
%\let\@oddfoot\@empty\let\@evenfoot\@empty
\let\@oddhead\@empty\let\@evenhead\@empty
%\def\@evenhead{%
\def\@evenfoot{%
\parbox{\textwidth}{%
\makebox[\textwidth]{{\pagenumberfont\thepage}\hfill}
%\if@headline\vspace{\headlinespace}\fi
}%
}%
%\def\@oddhead{%
\def\@oddfoot{%
\parbox{\textwidth}{%
\makebox[\textwidth]{\hfill{\pagenumberfont\thepage}}
%\if@headline\vspace{\headlinespace}\fi
}%
}%
}%
\fi
\def\ps@plain{%
%\let\@oddfoot\@empty\let\@evenfoot\@empty
\let\@oddhead\@empty\let\@evenhead\@empty
%\def\@evenhead{%
\def\@evenfoot{%
\parbox{\textwidth}{%
\makebox[\textwidth]{{\pagenumberfont\thepage}\hfill}
%\if@headline\vspace{\headlinespace}\fi
}%
}%
%\def\@oddhead{%
\def\@oddfoot{%
\parbox{\textwidth}{%
\makebox[\textwidth]{\hfill{\pagenumberfont\thepage}}
%\if@headline\vspace{\headlinespace}\fi
}%
}%
}%
\makeatother
\usepackage{phdthesis}
\usepackage{mathptmx}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\usepackage{varioref} % eqref is in here?????
\usepackage{url} % For a url..
\usepackage{amssymb} % amssymb/amsmath have?? checkmark? eqref?
\usepackage{amsmath} % align environment (everyone says stop using eqnarray!)
\usepackage{index}
% Following two are just black holes to accomodate index calls in the
% variable list table
\newindex{vars}{vidx}{and}{Coded variables}
\newindex{surveyvars}{sidx}{sand}{Survey variables}
\providecommand{\tabularnewline}{\\} % LyX relic
%******** natbib ********************************
% This is a very nice package for bibliographies. It includes options
% for sorting and compressing bibliographic entries.
%\usepackage[square,authoryear]{natbib} % REMOVED OPTIONS: numbers,sort&compress,
\usepackage[square,comma,numbers,sort&compress]{natbib}
% cPbL: For chapter-level bibliographies:
%\usepackage{bibtopic}
%\bibliographystyle{aguCpbl}%cje}
%******** graphics and graphicx ******************************
% This allows you to include encapsulated postscript files. If you
% don't have this, comment the \includegraphics{} line following the
% comment "%includegraphics" later in this file.
\usepackage{graphicx}
\usepackage{subfigure}
%\usepackage{epstopdf} % allows to include `eps` graphics instead of `pdf`
%******** lscape ******************************
% This allows you to include landscape layout pages by using the
% |landscape| environment. Note that this output might only be valid
% after converting to a postscript or pdf file.
\usepackage{lscape}
\usepackage{listings}
%******** psfrag ******************************
% This allows you to replace text in postscript pictures with formated
% latex text. This allows you to use math in graph labels
% etc. Uncomment the psfrag lines following the "%psfrag" comment
% later in this file if you don't have this package. The replacements
% will only be visible in the final postscript file: they will be
% listed in the .dvi file but not performed.
\usepackage{psfrag}
%******** afterpage ***************************
% This package allows you to issue commands at the end of the current
% page. A good use for this is to use the command
% \afterpage{\clearpage} right after a figure. This will cause the
% figure to be inserted on the page following the current one (or on
% the current page if it will fit) but will not break the page in the
% middle.
\usepackage{afterpage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Allow a new preface entity which is useful for a DEDICATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Use as follows:
% \beforepreface
% \dedication{To my grandparents ...}
% \prefacesection{Abstract} ...
%
% 2000 February 14: cPbL
\def\dedication#1{
\chapter[Dedication]{} % Put in TOC but don't display "Dedication"
% on page
% \thispagestyle{empty} % No page number
\thispagestyle{plain} % Yes page number
\vspace{6cm}
\begin{center}
#1
\end{center}
}
% Define a command to start a bib section for manuscript-based thesis
\newcommand{\placeSecBib}[1]{
\forThesis{
\newpage
\begin{btSect}{veblen,evolution,institutions,swb,general,urban,weather,sk}
\chapter*{Bibliography for #1}
\addcontentsline{toc}{section}{Bibliography for #1}
\btPrintCited
\end{btSect}
\end{btUnit}
}
}
\renewcommand{\listfigurename}{List of Figures}
\renewcommand{\listtablename}{List of Tables}
% These commands are optional. The defaults are shown.
\institution{AGH University of Science and Technology}
\institutionaddress{Cracow, Poland}
\program{Department of Telecommunications}
% You can issue as many of these as you have...
%\previousdegree{S.B. Physics, Massachusetts Institute of Technology, 1995}
%\previousdegree{M.Sc. Applied Physics, Stanford University, 1998}
%\previousdegree{Ph.D. Applied Physics, Stanford University, 2001}
% These commands are required.
\title{Writing Scalable Network Applications in Python}
\subtitle{}
\author{Łukasz Marcin Dobrzański}
\copyrightyear{2009}
\submitdate{September 2009}%\today}
\advisor{Andrzej Głowacz}
\advisortitle{Ph.D. in Telecommunications}
% One might want to override the format of the section and chapter
% numbers. This shows you how to do it. Note that
\renewcommand\thepart {\Roman{part}}
\renewcommand\thechapter {\arabic{chapter}}
\renewcommand\thesection {\thechapter.\arabic{section}}
\renewcommand\thesubsection {\thesection.\arabic{subsection}}
\renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}
\renewcommand\theparagraph {\thesubsubsection.\arabic{paragraph}}
\renewcommand\thesubparagraph {\theparagraph.\arabic{subparagraph}}
\usepackage{multicol}
\usepackage{relsize}
\newcommand\muchsmaller{\smaller\smaller}
\usepackage{cpblRef}
\usepackage{cpblTables}
% Below is for the data (survey appendix). Gods help me!
\usepackage{psfrag,color,graphicx}
\graphicspath{{/home/cpbl/papers/incomeCMA/plots/}{./}}
\graphicspath{{/home/cpbl/models/veblenNeighbourhoods/figuresLEL/}{/home/cpbl/models/veblenNeighbourhoods/figuresvs/}{./}{./figuresvs}{./tmpg}{/home/cpbl/papers/incomeCMA/plots/}{./}}
\usepackage{amsthm}
\usepackage{ushort} % For an underbar that looks like \bar.
\usepackage{wrapfig} % For acknowledgements only
% BELOW DEFINES THE THEOREM ENVIROS I NEED: PROPOSITION, LEMMA, PROOF
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newenvironment{definition}[1][Definition]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{example}[1][Example]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{remark}[1][Remark]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
% Some tools to differentiate between thesis version and journal
% manuscript version.
\newcommand{\forThesis}[1]{#1}
\newcommand{\forPaper}[1]{}
\newcommand{\LELcfig}[1]{\includegraphics[width=0.75\textwidth,keepaspectratio]{#1.\epspdf}}%{\input{#1}.tex}
% Above redundant: see cpblRef.sty LELwfig
\newcommand{\epspdf}{pdf}%{eps}%
\newcommand{\cmykrgb}{cmyk}%{rgb}
\newcommand{\rawplotspath}{/home/cpbl/models/veblenNeighbourhoods/plots/raw/}
\newcommand{\iCMArawplotspath}{/home/cpbl/econ/favouritePlots/cityScatterPlots/}%{papers/incomeCMA/plots/raw/}
\usepackage[footnotesize,bf]{caption} % Does this actually call caption2 or caption3?
\setlength{\captionmargin}{20pt}
% Inconspicuous hyperref -- very nice.
\usepackage[
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
]{hyperref}
%\usepackage[hyphenbreaks]{breakurl}
\newif\ifNBER
%%% TURN OFF COMMENTS:
\renewcommand{\draftComment}[1]{}
\renewcommand{\safeDraftComment}[1]{}
\renewcommand{\cpblOldComment}[1]{}
% Turn on comments:
%\renewcommand{\draftComment}{\draftCommentColouredBox}
%\renewcommand{\cpblOldComment}{\draftCommentColouredBox}
% UBC has strange format requirements, but some things not strict. So
% don't worry about things looking nice. Widen so I can fit my big tables:
% To ensure that the margin fiddling for the huge/wide/long tables
%\addtolength\oddsidemargin{-1cm}
%\addtolength\evensidemargin{-1cm}
%\addtolength\textwidth{2cm}
\addtolength\oddsidemargin{-1cm}
\addtolength\evensidemargin{-1cm}
\addtolength\textwidth{2cm}
\addtolength\textheight{3.4cm}
\newcommand{\starsOrColours}[2]{#1}
\ifdoDoubleSpace{\doublespacing}
\begin{document}
%\renewcommand\baselinestretch{1.0}
\ifdoDoubleSpace{ \begin{singlespace} }
% This starts numbering in Roman numerals as required for the thesis
% style.
\frontmatter
% The order of the following components is preserved. The order
% listed here is the order currently required by the library.
\maketitle
\newpage\thispagestyle{empty}\newpage %\pagestyle{empty}
\include{abstract}
\newpage\thispagestyle{empty}\newpage %\pagestyle{empty}
\setpageforTOC
\tableofcontents
\listoftables
\listoffigures
\input{acknowledgements}
%\dedication{\Large \em
%For Iris: this one --- and I promise it's the last --- is for you,\\
%who set me on this hidden path in 2000,\\ \vspace{5mm}
%And in memory of Robert, who had so much left to say.
%}
\newpage % Force a new page.
\thispagestyle{plain} % Suppress the running headers for this page only.
\mainmatter %Now regular page numbering begins.
\ifdoDoubleSpace{ \end{singlespace} }
\include{Chapter_01} % Introduction
\include{Chapter_02} % Related work,Theory
\include{Chapter_03} % System concept
\include{Chapter_04} % System description
\include{Chapter_05} % System evalualtion
\include{Chapter_06} % Conclusion
%% Honors theses are required to
%% have an unnumbered chapter
%% for conclusions. The file
%% Conclusion.tex should begin
%%
%% \chapter*{Conclusion}
%% followed by the appropriate
%% text.
\begin{spacing}{1.0}
\bibliographystyle{plain}
\bibliography{mbib}
\end{spacing}
%\include{biblio} %% Calls biblio.tex. See below.
%-->\Appendix %% Use this command if you have one
%% appendix. Use \Appendices if you
%% have more than one.
%-->\include{toolong} %% Calls toolong.tex which contains
%% an appendix.
\end{document}