-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy paththesis.tex
234 lines (179 loc) · 6.24 KB
/
thesis.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
% Root File for a UC Dissertation / Thesis
% UCD thesis class: c/o Shwaine <[email protected]>
%
% modified by Dylan Beaudette, 2006,2010
% modified and source uploaded to github by Alex Mandel, 2014
% Source code available at http://github.com/wildintellect/ucdthesis
\documentclass[11pt]{ucdthesis}
%\documentclass[10pt,twoside,final]{ucdthesis}
% \documentclass[10pt,twoside,draft]{ucdthesis}
% \documentclass[10pt,oneside,final]{ucdthesis}
% TODO: this makes strange things happen in the header...
% this is the version that grad studies wants
% \documentclass[11pt,oneside,final]{ucdthesis}
% when we are giving people drafts, use more of the page:
% \usepackage[letterpaper,left=0.75in,right=0.75in,top=1.25in,bottom=0.5in]{geometry}
% need this for the \foreach command
\usepackage{tikz}
% Turn on single spacing with \ssp.
% Turn on double spacing with \dsp.
% By default, your dissertation is double spaced, as is required by UCD.
% spacing in figures and tables and their captions can be
% changed here (\ssp for single-space, empty for same as surrounding
% text); for this to work, the command \figsp has to be included
% in every figure and table right after the \begin{figure}
% \def\figsp{\ssp}
%\def\figsp{}
% useful for drafts
% line numbers:
% http://www.ctan.org/tex-archive/help/Catalogue/entries/lineno.html
%
% \usepackage{lineno}
%
% SVN integration
%
% \usepackage{svnkw}
% customized headers
%
% http://www.ctan.org/tex-archive/help/Catalogue/entries/fancyhdr.html
% \usepackage{fancyhdr}
% a better verbatim environment: c/o Pete Dirac
% use like this:
% \begin{Verbatim}[fontsize=8]
% foobar
% \end{Verbatim}
% \usepackage{fancyvrb}
% more flexible math support
\usepackage{amsmath}
% allow some pages to be landscape
\usepackage{lscape}
% more flexible definition of table environments
\usepackage{ctable}
%need this for \includegraphics{}
\usepackage{graphicx}
%enable the listings package specifically for including programming code
\usepackage{listings}
%Special hack to make code listings not break pages, fyi they must be short then
\usepackage{float}
\floatstyle{plain} % optionally change the style of the new float
\newfloat{Code}{H}{myc}
%test alternative to listings package minted which requires the python pygments package
%minted was installed to latex by hand
%\usepackage{minted}
% TODO: use the new subfig package instead
% http://www.ctan.org/tex-archive/macros/latex/contrib/subfig/
%
%use this to put figures side by side
\usepackage{subfigure}
% PDF links --- > breaks with some bibliography entries
% \usepackage{hyperref}
% nice looking, parenthetical references
\usepackage[sorting=nyt,natbib=true,citestyle=authoryear,bibstyle=authoryear,maxnames=3,refsection
=chapter]{biblatex}
%\usepackage{chapterbib} % incompatible with biblatex
\bibliography{proposal}
\defbibheading{bibliography}{%
\section{References}
}
% bibliography can be single-spaced for UC thesis format
\appto{\bibsetup}{\ssp}
%make the index
% \usepackage{makeidx}
% \makeindex
% custom colors
\usepackage{color}
% make a color for comments
\definecolor{MyDarkBlue}{rgb}{0,0.08,0.45}
% customized captions with bold label and small, italic text
% table captions are located above tables
% http://www.kronto.org/thesis/tips/custom-captions.html
% http://www.ctan.org/tex-archive/macros/latex/contrib/caption/
% does this have any effect?
%\usepackage{caption}
% \renewcommand{\captionfont}{\small\itshape}
%
\usepackage[hypcap,font=singlespacing]{caption}
\usepackage{subcaption}
% modern method for setting up captions\
\captionsetup{margin=10pt,font=small,labelfont=bf}
%
% fix so that table captions have correct spacing
\captionsetup[table]{position=top}
% %
% % fit more material on the page:
% %
%
% reset some float-controlling parameters
\renewcommand{\floatpagefraction}{0.8} % require fuller float pages
% N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\topfraction}{0.9} % max fraction of floats at top
\renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom
% PDF formatting options, indexing, hyperlinking, with control over link style
%Set PDF Metadata
\usepackage[pdftex,
pdfauthor={Author Name},
pdftitle={Title Here},
pdfsubject={Subject},
pdfkeywords={Comma, List, Keywords},
%pdfproducer={Latex with hyperref, or other system},
%pdfcreator={pdflatex, or other tool}
]{hyperref}
\hypersetup{
%driver=pdftex,
colorlinks=true,
urlcolor=blue,
linkcolor=blue, % color of internal links
citecolor=blue, % color of links to bibliography
filecolor=magenta
}
%Use an additional package to make bookmarks point to the top to tables, figures and listings
\usepackage[all]{hypcap}
%Alex's customizations
\usepackage{indentfirst} %Indents first paragraph of chapter
\usepackage{datatool} %Allows import of csv and other data-tables
\usepackage{varwidth}
\usepackage{color}
\usepackage{rotating}
\AtEveryBibitem{\clearfield{month}} %Cleaner references without month being printed
%%% Document Portion:
\begin{document}
%
%% Title, Front Matter, and Abstract:
\input{title_and_frontmatter}
%
% the chapters
%
% set page style:
% make the chapter and section smaller, chapter and section numbers are removed
% fancyplain will keep the page numbers at the bottom of all pages
%\pagestyle{fancyplain} %Note the \fancyplain command !!!
%\renewcommand{\chaptermark}[1]{\markboth{\small{#1}}{}}
%\renewcommand{\sectionmark}[1]{\markright{\small{#1}}{}}
% TODO: this is only for draft copies !!
% start line number printing
%
% \linenumbers
% chapter 1
\chapter{Real Title Here}
\input{chapter1} %This looks for chapter1.tex
% chapter 2
\chapter{Real Title Here}
\input{chapter2} %This looks for chapter2.tex
% note that the 'plainnat' style does not allow URL's in the bibtex entry
%
% some ideas here:
% http://bib2web.djvuzone.org/bibtex.html
%
% reset the page style
%\pagestyle{plain}
% To enable this it will need to be added to toc so it's not in a chapter
%\printbibliography[heading=bibliography]
% the appendix:
% there are several sections, that don't really fit into the main chapters
%
\part*{\addcontentsline{toc}{part}{Appendices}Appendices}
\appendix
% reset page style to fancy
%\pagestyle{fancyplain}
\input{appendix}
\end{document}