source: doc/rob_thesis/thesis.tex @ 35dd0f42

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 35dd0f42 was 12d3187, checked in by Rob Schluntz <rschlunt@…>, 8 years ago

final revisions to thesis

  • Property mode set to 100644
File size: 14.4 KB
Line 
1% uWaterloo Thesis Template for LaTeX
2% Last Updated May 24, 2011 by Stephen Carr, IST Client Services
3% FOR ASSISTANCE, please send mail to rt-IST-CSmathsci@ist.uwaterloo.ca
4
5% Effective October 2006, the University of Waterloo
6% requires electronic thesis submission. See the uWaterloo thesis regulations at
7% http://www.grad.uwaterloo.ca/Thesis_Regs/thesistofc.asp.
8
9% DON'T FORGET TO ADD YOUR OWN NAME AND TITLE in the "hyperref" package
10% configuration below. THIS INFORMATION GETS EMBEDDED IN THE PDF FINAL PDF DOCUMENT.
11% You can view the information if you view Properties of the PDF document.
12
13% Many faculties/departments also require one or more printed
14% copies. This template attempts to satisfy both types of output.
15% It is based on the standard "book" document class which provides all necessary
16% sectioning structures and allows multi-part theses.
17
18% DISCLAIMER
19% To the best of our knowledge, this template satisfies the current uWaterloo requirements.
20% However, it is your responsibility to assure that you have met all
21% requirements of the University and your particular department.
22% Many thanks to the feedback from many graduates that assisted the development of this template.
23
24% -----------------------------------------------------------------------
25
26% By default, output is produced that is geared toward generating a PDF
27% version optimized for viewing on an electronic display, including
28% hyperlinks within the PDF.
29
30% E.g. to process a thesis called "mythesis.tex" based on this template, run:
31
32% pdflatex mythesis     -- first pass of the pdflatex processor
33% bibtex mythesis       -- generates bibliography from .bib data file(s)
34% pdflatex mythesis     -- fixes cross-references, bibliographic references, etc
35% pdflatex mythesis     -- fixes cross-references, bibliographic references, etc
36
37% If you use the recommended LaTeX editor, Texmaker, you would open the mythesis.tex
38% file, then click the pdflatex button. Then run BibTeX (under the Tools menu).
39% Then click the pdflatex button two more times. If you have an index as well,
40% you'll need to run MakeIndex from the Tools menu as well, before running pdflatex
41% the last two times.
42
43% N.B. The "pdftex" program allows graphics in the following formats to be
44% included with the "\includegraphics" command: PNG, PDF, JPEG, TIFF
45% Tip 1: Generate your figures and photos in the size you want them to appear
46% in your thesis, rather than scaling them with \includegraphics options.
47% Tip 2: Any drawings you do should be in scalable vector graphic formats:
48% SVG, PNG, WMF, EPS and then converted to PNG or PDF, so they are scalable in
49% the final PDF as well.
50% Tip 3: Photographs should be cropped and compressed so as not to be too large.
51
52% To create a PDF output that is optimized for double-sided printing:
53%
54% 1) comment-out the \documentclass statement in the preamble below, and
55% un-comment the second \documentclass line.
56%
57% 2) change the value assigned below to the boolean variable
58% "PrintVersion" from "false" to "true".
59
60% --------------------- Start of Document Preamble -----------------------
61
62% Specify the document class, default style attributes, and page dimensions
63% For hyperlinked PDF, suitable for viewing on a computer, use this:
64\PassOptionsToPackage{
65dvipsnames
66% ,monochrome % toggle black and white mode
67}{xcolor}
68\documentclass[letterpaper,12pt,titlepage,oneside,final]{book}
69
70% For PDF, suitable for double-sided printing, change the PrintVersion variable below
71% to "true" and use this \documentclass line instead of the one above:
72% \documentclass[letterpaper,12pt,titlepage,openright,twoside,final]{book}
73
74\usepackage[T1]{fontenc}                                % allow Latin1 (extended ASCII) characters
75\usepackage{textcomp}
76% \usepackage[utf8]{inputenc}
77% \usepackage[latin1]{inputenc}
78\usepackage{fullpage,times,comment}
79% \usepackage{epic,eepic}
80\usepackage{upquote}                                    % switch curled `'" to straight
81% \usepackage{calc}
82\usepackage{xspace}
83% \usepackage{graphicx}
84\usepackage{varioref}                                   % extended references
85\usepackage{listings}                                   % format program code
86% \usepackage[flushmargin]{footmisc}                      % support label/reference in footnote
87% \usepackage{latexsym}                                   % \Box glyph
88% \usepackage{mathptmx}                                   % better math font with "times"
89% \usepackage[usenames]{color}
90% \usepackage[pagewise]{lineno}
91% \renewcommand{\linenumberfont}{\scriptsize\sffamily}
92\usepackage{courier}
93\input{common}                                          % bespoke macros used in the document
94
95\usepackage{bigfoot}
96
97\interfootnotelinepenalty=10000
98
99% Some LaTeX commands I define for my own nomenclature.
100% If you have to, it's better to change nomenclature once here than in a
101% million places throughout your thesis!
102\newcommand{\package}[1]{\textbf{#1}} % package names in bold text
103\newcommand{\cmmd}[1]{\textbackslash\texttt{#1}} % command name in tt font
104\newcommand{\href}[1]{#1} % does nothing, but defines the command so the
105    % print-optimized version will ignore \href tags (redefined by hyperref pkg).
106%\newcommand{\texorpdfstring}[2]{#1} % does nothing, but defines the command
107% Anything defined here may be redefined by packages added below...
108
109% This package allows if-then-else control structures.
110\usepackage{ifthen}
111\newboolean{PrintVersion}
112\setboolean{PrintVersion}{false}
113% CHANGE THIS VALUE TO "true" as necessary, to improve printed results for hard copies
114% by overriding some options of the hyperref package below.
115
116%\usepackage{nomencl} % For a nomenclature (optional; available from ctan.org)
117\usepackage{amsmath,amssymb,amstext} % Lots of math symbols and environments
118\usepackage[pdftex]{graphicx} % For including graphics N.B. pdftex graphics driver
119
120\usepackage{xcolor}
121\usepackage{listings}
122
123\input{cfa-format.tex}
124
125% Hyperlinks make it very easy to navigate an electronic document.
126% In addition, this is where you should specify the thesis title
127% and author as they appear in the properties of the PDF document.
128% Use the "hyperref" package
129% N.B. HYPERREF MUST BE THE LAST PACKAGE LOADED; ADD ADDITIONAL PKGS ABOVE
130\usepackage[pdftex,letterpaper=true,pagebackref=false]{hyperref} % with basic options
131                % N.B. pagebackref=true provides links back from the References to the body text. This can cause trouble for printing.
132\hypersetup{
133    plainpages=false,       % needed if Roman numbers in frontpages
134    pdfpagelabels=true,     % adds page number as label in Acrobat's page count
135    bookmarks=true,         % show bookmarks bar?
136    unicode=false,          % non-Latin characters in Acrobat’s bookmarks
137    pdftoolbar=true,        % show Acrobat’s toolbar?
138    pdfmenubar=true,        % show Acrobat’s menu?
139    pdffitwindow=false,     % window fit to page when opened
140    pdfstartview={FitH},    % fits the width of the page to the window
141    pdftitle={Resource Management and Tuples in \CFA},    % title: CHANGE THIS TEXT!
142    pdfauthor={Rob Schluntz},    % author: CHANGE THIS TEXT! and uncomment this line
143    pdfsubject={Programming Languages}% subject: CHANGE THIS TEXT! and uncomment this line
144%    pdfkeywords={keyword1} {key2} {key3}, % list of keywords, and uncomment this line if desired
145    pdfnewwindow=true,      % links in new window
146    colorlinks=true,        % false: boxed links; true: colored links
147    linkcolor=blue,         % color of internal links
148    citecolor=green,        % color of links to bibliography
149    filecolor=magenta,      % color of file links
150    urlcolor=cyan           % color of external links
151}
152\ifthenelse{\boolean{PrintVersion}}{   % for improved print quality, change some hyperref options
153\hypersetup{    % override some previously defined hyperref options
154%    colorlinks,%
155    citecolor=black,%
156    filecolor=black,%
157    linkcolor=black,%
158    urlcolor=black}
159}{} % end of ifthenelse (no else)
160
161% Setting up the page margins...
162% uWaterloo thesis requirements specify a minimum of 1 inch (72pt) margin at the
163% top, bottom, and outside page edges and a 1.125 in. (81pt) gutter
164% margin (on binding side). While this is not an issue for electronic
165% viewing, a PDF may be printed, and so we have the same page layout for
166% both printed and electronic versions, we leave the gutter margin in.
167% Set margins to minimum permitted by uWaterloo thesis regulations:
168\setlength{\marginparwidth}{0pt} % width of margin notes
169% N.B. If margin notes are used, you must adjust \textwidth, \marginparwidth
170% and \marginparsep so that the space left between the margin notes and page
171% edge is less than 15 mm (0.6 in.)
172\setlength{\marginparsep}{0pt} % width of space between body text and margin notes
173\setlength{\evensidemargin}{0.125in} % Adds 1/8 in. to binding side of all
174% even-numbered pages when the "twoside" printing option is selected
175\setlength{\oddsidemargin}{0.125in} % Adds 1/8 in. to the left of all pages
176% when "oneside" printing is selected, and to the left of all odd-numbered
177% pages when "twoside" printing is selected
178\setlength{\textwidth}{6.375in} % assuming US letter paper (8.5 in. x 11 in.) and
179% side margins as above
180\raggedbottom
181
182% The following statement specifies the amount of space between
183% paragraphs. Other reasonable specifications are \bigskipamount and \smallskipamount.
184\setlength{\parskip}{\medskipamount}
185
186% The following statement controls the line spacing.  The default
187% spacing corresponds to good typographic conventions and only slight
188% changes (e.g., perhaps "1.2"), if any, should be made.
189\renewcommand{\baselinestretch}{1} % this is the default line space setting
190
191% By default, each chapter will start on a recto (right-hand side)
192% page.  We also force each section of the front pages to start on
193% a recto page by inserting \cleardoublepage commands.
194% In many cases, this will require that the verso page be
195% blank and, while it should be counted, a page number should not be
196% printed.  The following statements ensure a page number is not
197% printed on an otherwise blank verso page.
198\let\origdoublepage\cleardoublepage
199\newcommand{\clearemptydoublepage}{%
200  \clearpage{\pagestyle{empty}\origdoublepage}}
201\let\cleardoublepage\clearemptydoublepage
202
203%======================================================================
204%   L O G I C A L    D O C U M E N T -- the content of your thesis
205%======================================================================
206\begin{document}
207
208% For a large document, it is a good idea to divide your thesis
209% into several files, each one containing one chapter.
210% To illustrate this idea, the "front pages" (i.e., title page,
211% declaration, borrowers' page, abstract, acknowledgements,
212% dedication, table of contents, list of tables, list of figures,
213% nomenclature) are contained within the file "thesis-frontpgs.tex" which is
214% included into the document by the following statement.
215%----------------------------------------------------------------------
216% FRONT MATERIAL
217%----------------------------------------------------------------------
218\input{thesis-frontpgs}
219
220%----------------------------------------------------------------------
221% MAIN BODY
222%----------------------------------------------------------------------
223
224\input{intro}
225
226\input{ctordtor}
227
228\input{tuples}
229
230\input{variadic}
231
232\input{conclusions}
233
234% The \appendix statement indicates the beginning of the appendices.
235% \appendix
236
237% % Add a title page before the appendices and a line in the Table of Contents
238% \chapter*{APPENDICES}
239% \addcontentsline{toc}{chapter}{APPENDICES}
240% %======================================================================
241% \chapter[PDF Plots From Matlab]{Matlab Code for Making a PDF Plot}
242% \label{AppendixA}
243% % Tip 4: Example of how to get a shorter chapter title for the Table of Contents
244% %======================================================================
245% \section{Using the GUI}
246% Properties of Matab plots can be adjusted from the plot window via a graphical interface. Under the Desktop menu in the Figure window, select the Property Editor. You may also want to check the Plot Browser and Figure Palette for more tools. To adjust properties of the axes, look under the Edit menu and select Axes Properties.
247
248% To set the figure size and to save as PDF or other file formats, click the Export Setup button in the figure Property Editor.
249
250% \section{From the Command Line}
251% All figure properties can also be manipulated from the command line. Here's an example:
252% \begin{verbatim}
253% x=[0:0.1:pi];
254% hold on % Plot multiple traces on one figure
255% plot(x,sin(x))
256% plot(x,cos(x),'--r')
257% plot(x,tan(x),'.-g')
258% title('Some Trig Functions Over 0 to \pi') % Note LaTeX markup!
259% legend('{\it sin}(x)','{\it cos}(x)','{\it tan}(x)')
260% hold off
261% set(gca,'Ylim',[-3 3]) % Adjust Y limits of "current axes"
262% set(gcf,'Units','inches') % Set figure size units of "current figure"
263% set(gcf,'Position',[0,0,6,4]) % Set figure width (6 in.) and height (4 in.)
264% cd n:\thesis\plots % Select where to save
265% print -dpdf plot.pdf % Save as PDF
266% \end{verbatim}
267
268%----------------------------------------------------------------------
269% END MATERIAL
270%----------------------------------------------------------------------
271
272% B I B L I O G R A P H Y
273% -----------------------
274
275% The following statement selects the style to use for references.  It controls the sort order of the entries in the bibliography and also the formatting for the in-text labels.
276\bibliographystyle{plain}
277% This specifies the location of the file containing the bibliographic information.
278% It assumes you're using BibTeX (if not, why not?).
279\cleardoublepage % This is needed if the book class is used, to place the anchor in the correct page,
280                 % because the bibliography will start on its own page.
281                 % Use \clearpage instead if the document class uses the "oneside" argument
282\phantomsection  % With hyperref package, enables hyperlinking from the table of contents to bibliography
283% The following statement causes the title "References" to be used for the bibliography section:
284\renewcommand*{\bibname}{References}
285
286% Add the References to the Table of Contents
287\addcontentsline{toc}{chapter}{\textbf{References}}
288
289\bibliography{cfa,thesis}
290% Tip 5: You can create multiple .bib files to organize your references.
291% Just list them all in the \bibliogaphy command, separated by commas (no spaces).
292
293% The following statement causes the specified references to be added to the bibliography% even if they were not
294% cited in the text. The asterisk is a wildcard that causes all entries in the bibliographic database to be included (optional).
295% \nocite{*}
296
297\end{document}
Note: See TracBrowser for help on using the repository browser.