source: doc/theses/andrew_beach_MMath/thesis.tex @ 48779a6

arm-ehenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 48779a6 was 48779a6, checked in by Andrew Beach <ajbeach@…>, 3 years ago

Add the uw-ethesis templates to andrew_beach_MMath. Minimal changes to get them working.

  • Property mode set to 100644
File size: 22.2 KB
Line 
1% uWaterloo Thesis Template for LaTeX
2% Last Updated June 14, 2017 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% https://uwaterloo.ca/graduate-studies/thesis.
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 for 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% makeindex         -- should be run only if an index is used
35% pdflatex mythesis     -- fixes numbering in cross-references, bibliographic references, glossaries, index, etc.
36% pdflatex mythesis     -- fixes numbering in cross-references, bibliographic references, glossaries, index, etc.
37
38% If you use the recommended LaTeX editor, Texmaker, you would open the mythesis.tex
39% file, then click the PDFLaTeX button. Then run BibTeX (under the Tools menu).
40% Then click the PDFLaTeX button two more times. If you have an index as well,
41% you'll need to run MakeIndex from the Tools menu as well, before running pdflatex
42% the last two times.
43
44% N.B. The "pdftex" program allows graphics in the following formats to be
45% included with the "\includegraphics" command: PNG, PDF, JPEG, TIFF
46% Tip 1: Generate your figures and photos in the size you want them to appear
47% in your thesis, rather than scaling them with \includegraphics options.
48% Tip 2: Any drawings you do should be in scalable vector graphic formats:
49% SVG, PNG, WMF, EPS and then converted to PNG or PDF, so they are scalable in
50% the final PDF as well.
51% Tip 3: Photographs should be cropped and compressed so as not to be too large.
52
53% To create a PDF output that is optimized for double-sided printing:
54%
55% 1) comment-out the \documentclass statement in the preamble below, and
56% un-comment the second \documentclass line.
57%
58% 2) change the value assigned below to the boolean variable
59% "PrintVersion" from "false" to "true".
60
61% --------------------- Start of Document Preamble -----------------------
62
63% Specify the document class, default style attributes, and page dimensions
64% For hyperlinked PDF, suitable for viewing on a computer, use this:
65\documentclass[letterpaper,12pt,titlepage,oneside,final]{book}
66 
67% For PDF, suitable for double-sided printing, change the PrintVersion variable below
68% to "true" and use this \documentclass line instead of the one above:
69%\documentclass[letterpaper,12pt,titlepage,openright,twoside,final]{book}
70
71% Some LaTeX commands I define for my own nomenclature.
72% If you have to, it's better to change nomenclature once here than in a
73% million places throughout your thesis!
74\newcommand{\package}[1]{\textbf{#1}} % package names in bold text
75\newcommand{\cmmd}[1]{\textbackslash\texttt{#1}} % command name in tt font
76\newcommand{\href}[1]{#1} % does nothing, but defines the command so the
77    % print-optimized version will ignore \href tags (redefined by hyperref pkg).
78%\newcommand{\texorpdfstring}[2]{#1} % does nothing, but defines the command
79% Anything defined here may be redefined by packages added below...
80
81% This package allows if-then-else control structures.
82\usepackage{ifthen}
83\newboolean{PrintVersion}
84\setboolean{PrintVersion}{false} 
85% CHANGE THIS VALUE TO "true" as necessary, to improve printed results for hard copies
86% by overriding some options of the hyperref package below.
87
88%\usepackage{nomencl} % For a nomenclature (optional; available from ctan.org)
89\usepackage{amsmath,amssymb,amstext} % Lots of math symbols and environments
90\usepackage[pdftex]{graphicx} % For including graphics N.B. pdftex graphics driver
91
92% Hyperlinks make it very easy to navigate an electronic document.
93% In addition, this is where you should specify the thesis title
94% and author as they appear in the properties of the PDF document.
95% Use the "hyperref" package
96% N.B. HYPERREF MUST BE THE LAST PACKAGE LOADED; ADD ADDITIONAL PKGS ABOVE
97\usepackage[pdftex,pagebackref=false]{hyperref} % with basic options
98                % N.B. pagebackref=true provides links back from the References to the body text. This can cause trouble for printing.
99\hypersetup{
100    plainpages=false,       % needed if Roman numbers in frontpages
101    unicode=false,          % non-Latin characters in Acrobat’s bookmarks
102    pdftoolbar=true,        % show Acrobat’s toolbar?
103    pdfmenubar=true,        % show Acrobat’s menu?
104    pdffitwindow=false,     % window fit to page when opened
105    pdfstartview={FitH},    % fits the width of the page to the window
106    pdftitle={uWaterloo\ LaTeX\ Thesis\ Template},    % title: CHANGE THIS TEXT!
107%    pdfauthor={Author},    % author: CHANGE THIS TEXT! and uncomment this line
108%    pdfsubject={Subject},  % subject: CHANGE THIS TEXT! and uncomment this line
109%    pdfkeywords={keyword1} {key2} {key3}, % list of keywords, and uncomment this line if desired
110    pdfnewwindow=true,      % links in new window
111    colorlinks=true,        % false: boxed links; true: colored links
112    linkcolor=blue,         % color of internal links
113    citecolor=green,        % color of links to bibliography
114    filecolor=magenta,      % color of file links
115    urlcolor=cyan           % color of external links
116}
117\ifthenelse{\boolean{PrintVersion}}{   % for improved print quality, change some hyperref options
118\hypersetup{    % override some previously defined hyperref options
119%    colorlinks,%
120    citecolor=black,%
121    filecolor=black,%
122    linkcolor=black,%
123    urlcolor=black}
124}{} % end of ifthenelse (no else)
125
126\usepackage[automake,toc,abbreviations]{glossaries-extra} % Exception to the rule of hyperref being the last add-on package
127% If glossaries-extra is not in your LaTeX distribution, get it from CTAN (http://ctan.org/pkg/glossaries-extra),
128% although it's supposed to be in both the TeX Live and MikTeX distributions. There are also documentation and
129% installation instructions there.
130
131% Setting up the page margins...
132% uWaterloo thesis requirements specify a minimum of 1 inch (72pt) margin at the
133% top, bottom, and outside page edges and a 1.125 in. (81pt) gutter
134% margin (on binding side). While this is not an issue for electronic
135% viewing, a PDF may be printed, and so we have the same page layout for
136% both printed and electronic versions, we leave the gutter margin in.
137% Set margins to minimum permitted by uWaterloo thesis regulations:
138\setlength{\marginparwidth}{0pt} % width of margin notes
139% N.B. If margin notes are used, you must adjust \textwidth, \marginparwidth
140% and \marginparsep so that the space left between the margin notes and page
141% edge is less than 15 mm (0.6 in.)
142\setlength{\marginparsep}{0pt} % width of space between body text and margin notes
143\setlength{\evensidemargin}{0.125in} % Adds 1/8 in. to binding side of all
144% even-numbered pages when the "twoside" printing option is selected
145\setlength{\oddsidemargin}{0.125in} % Adds 1/8 in. to the left of all pages
146% when "oneside" printing is selected, and to the left of all odd-numbered
147% pages when "twoside" printing is selected
148\setlength{\textwidth}{6.375in} % assuming US letter paper (8.5 in. x 11 in.) and
149% side margins as above
150\raggedbottom
151
152% The following statement specifies the amount of space between
153% paragraphs. Other reasonable specifications are \bigskipamount and \smallskipamount.
154\setlength{\parskip}{\medskipamount}
155
156% The following statement controls the line spacing.  The default
157% spacing corresponds to good typographic conventions and only slight
158% changes (e.g., perhaps "1.2"), if any, should be made.
159\renewcommand{\baselinestretch}{1} % this is the default line space setting
160
161% By default, each chapter will start on a recto (right-hand side)
162% page.  We also force each section of the front pages to start on
163% a recto page by inserting \cleardoublepage commands.
164% In many cases, this will require that the verso page be
165% blank and, while it should be counted, a page number should not be
166% printed.  The following statements ensure a page number is not
167% printed on an otherwise blank verso page.
168\let\origdoublepage\cleardoublepage
169\newcommand{\clearemptydoublepage}{%
170  \clearpage{\pagestyle{empty}\origdoublepage}}
171\let\cleardoublepage\clearemptydoublepage
172
173% Define Glossary terms (This is properly done here, in the preamble. Could be \input{} from a file...)
174% Main glossary entries -- definitions of relevant terminology
175\newglossaryentry{computer}
176{
177name=computer,
178description={A programmable machine that receives input data,
179               stores and manipulates the data, and provides
180               formatted output}
181}
182
183% Nomenclature glossary entries -- New definitions, or unusual terminology
184\newglossary*{nomenclature}{Nomenclature}
185\newglossaryentry{dingledorf}
186{
187type=nomenclature,
188name=dingledorf,
189description={A person of supposed average intelligence who makes incredibly brainless misjudgments}
190}
191
192% List of Abbreviations (abbreviations type is built in to the glossaries-extra package)
193\newabbreviation{aaaaz}{AAAAZ}{American Association of Amature Astronomers and Zoologists}
194
195% List of Symbols
196\newglossary*{symbols}{List of Symbols}
197\newglossaryentry{rvec}
198{
199name={$\mathbf{v}$},
200sort={label},
201type=symbols,
202description={Random vector: a location in n-dimensional Cartesian space, where each dimensional component is determined by a random process}
203}
204 
205\makeglossaries
206
207%======================================================================
208%   L O G I C A L    D O C U M E N T -- the content of your thesis
209%======================================================================
210\begin{document}
211
212% For a large document, it is a good idea to divide your thesis
213% into several files, each one containing one chapter.
214% To illustrate this idea, the "front pages" (i.e., title page,
215% declaration, borrowers' page, abstract, acknowledgements,
216% dedication, table of contents, list of tables, list of figures,
217% nomenclature) are contained within the file "uw-ethesis-frontpgs.tex" which is
218% included into the document by the following statement.
219%----------------------------------------------------------------------
220% FRONT MATERIAL
221%----------------------------------------------------------------------
222\input{thesis-frontpgs} 
223
224%----------------------------------------------------------------------
225% MAIN BODY
226%----------------------------------------------------------------------
227% Because this is a short document, and to reduce the number of files
228% needed for this template, the chapters are not separate
229% documents as suggested above, but you get the idea. If they were
230% separate documents, they would each start with the \chapter command, i.e,
231% do not contain \documentclass or \begin{document} and \end{document} commands.
232%======================================================================
233\chapter{Introduction}
234%======================================================================
235In the beginning, there was $\pi$:
236
237\begin{equation}
238   e^{\pi i} + 1 = 0  \label{eqn_pi}
239\end{equation}
240A \gls{computer} could compute $\pi$ all day long. In fact, subsets of digits of $\pi$'s decimal approximation would make a good source for psuedo-random vectors, \gls{rvec} .
241
242%----------------------------------------------------------------------
243\section{State of the Art}
244%----------------------------------------------------------------------
245
246See equation \ref{eqn_pi} on page \pageref{eqn_pi}.\footnote{A famous equation.}
247
248\section{Some Meaningless Stuff}
249
250The credo of the \gls{aaaaz} was, for several years, several paragraphs of gibberish, until the \gls{dingledorf} responsible for the \gls{aaaaz} Web site realized his mistake:
251
252"Velit dolor illum facilisis zzril ipsum, augue odio, accumsan ea augue molestie lobortis zzril laoreet ex ad, adipiscing nulla. Veniam dolore, vel te in dolor te, feugait dolore ex vel erat duis nostrud diam commodo ad eu in consequat esse in ut wisi. Consectetuer dolore feugiat wisi eum dignissim tincidunt vel, nostrud, at vulputate eum euismod, diam minim eros consequat lorem aliquam et ad. Feugait illum sit suscipit ut, tation in dolore euismod et iusto nulla amet wisi odio quis nisl feugiat adipiscing luptatum minim nisl, quis, erat, dolore. Elit quis sit dolor veniam blandit ullamcorper ex, vero nonummy, duis exerci delenit ullamcorper at feugiat ullamcorper, ullamcorper elit vulputate iusto esse luptatum duis autem. Nulla nulla qui, te praesent et at nisl ut in consequat blandit vel augue ut.
253
254Illum suscipit delenit commodo augue exerci magna veniam hendrerit dignissim duis ut feugait amet dolor dolor suscipit iriure veniam. Vel quis enim vulputate nulla facilisis volutpat vel in, suscipit facilisis dolore ut veniam, duis facilisi wisi nulla aliquip vero praesent nibh molestie consectetuer nulla. Wisi nibh exerci hendrerit consequat, nostrud lobortis ut praesent dignissim tincidunt enim eum accumsan. Lorem, nonummy duis iriure autem feugait praesent, duis, accumsan tation enim facilisi qui te dolore magna velit, iusto esse eu, zzril. Feugiat enim zzril, te vel illum, lobortis ut tation, elit luptatum ipsum, aliquam dolor sed. Ex consectetuer aliquip in, tation delenit dignissim accumsan consequat, vero, et ad eu velit ut duis ea ea odio.
255
256Vero qui, te praesent et at nisl ut in consequat blandit vel augue ut dolor illum facilisis zzril ipsum. Exerci odio, accumsan ea augue molestie lobortis zzril laoreet ex ad, adipiscing nulla, et dolore, vel te in dolor te, feugait dolore ex vel erat duis. Ut diam commodo ad eu in consequat esse in ut wisi aliquip dolore feugiat wisi eum dignissim tincidunt vel, nostrud. Ut vulputate eum euismod, diam minim eros consequat lorem aliquam et ad luptatum illum sit suscipit ut, tation in dolore euismod et iusto nulla. Iusto wisi odio quis nisl feugiat adipiscing luptatum minim. Illum, quis, erat, dolore qui quis sit dolor veniam blandit ullamcorper ex, vero nonummy, duis exerci delenit ullamcorper at feugiat. Et, ullamcorper elit vulputate iusto esse luptatum duis autem esse nulla qui.
257
258Praesent dolore et, delenit, laoreet dolore sed eros hendrerit consequat lobortis. Dolor nulla suscipit delenit commodo augue exerci magna veniam hendrerit dignissim duis ut feugait amet. Ad dolor suscipit iriure veniam blandit quis enim vulputate nulla facilisis volutpat vel in. Erat facilisis dolore ut veniam, duis facilisi wisi nulla aliquip vero praesent nibh molestie consectetuer nulla, iriure nibh exerci hendrerit. Vel, nostrud lobortis ut praesent dignissim tincidunt enim eum accumsan ea, nonummy duis. Ad autem feugait praesent, duis, accumsan tation enim facilisi qui te dolore magna velit, iusto esse eu, zzril vel enim zzril, te. Nisl illum, lobortis ut tation, elit luptatum ipsum, aliquam dolor sed minim consectetuer aliquip.
259
260Tation exerci delenit ullamcorper at feugiat ullamcorper, ullamcorper elit vulputate iusto esse luptatum duis autem esse nulla qui. Volutpat praesent et at nisl ut in consequat blandit vel augue ut dolor illum facilisis zzril ipsum, augue odio, accumsan ea augue molestie lobortis zzril laoreet. Ex duis, te velit illum odio, nisl qui consequat aliquip qui blandit hendrerit. Ea dolor nonummy ullamcorper nulla lorem tation laoreet in ea, ullamcorper vel consequat zzril delenit quis dignissim, vulputate tincidunt ut."
261
262%======================================================================
263\chapter{Observations}
264%======================================================================
265
266This would be a good place for some figures and tables.
267
268Some notes on figures and photographs\ldots
269
270\begin{itemize}
271\item A well-prepared PDF should be
272  \begin{enumerate}
273    \item Of reasonable size, {\it i.e.} photos cropped and compressed.
274    \item Scalable, to allow enlargment of text and drawings.
275  \end{enumerate} 
276\item Photos must be bit maps, and so are not scaleable by definition. TIFF and
277BMP are uncompressed formats, while JPEG is compressed. Most photos can be
278compressed without losing their illustrative value.
279\item Drawings that you make should be scalable vector graphics, \emph{not} 
280bit maps. Some scalable vector file formats are: EPS, SVG, PNG, WMF. These can
281all be converted into PNG or PDF, that pdflatex recognizes. Your drawing
282package probably can export to one of these formats directly. Otherwise, a
283common procedure is to print-to-file through a Postscript printer driver to
284create a PS file, then convert that to EPS (encapsulated PS, which has a
285bounding box to describe its exact size rather than a whole page).
286Programs such as GSView (a Ghostscript GUI) can create both EPS and PDF from PS files.
287Appendix~\ref{AppendixA} shows how to generate properly sized Matlab plots and save them as PDF.
288\item It's important to crop your photos and draw your figures to the size that
289you want to appear in your thesis. Scaling photos with the
290includegraphics command will cause loss of resolution. And scaling down
291drawings may cause any text annotations to become too small.
292\end{itemize}
293 
294For more information on \LaTeX\, see the uWaterloo Skills for the Academic Workplace  \href{https://uwaterloo.ca/information-systems-technology/services/electronic-thesis-preparation-and-submission-support/ethesis-guide/creating-pdf-version-your-thesis/creating-pdf-files-using-latex/latex-ethesis-and-large-documents}{course notes}.
295\footnote{
296Note that while it is possible to include hyperlinks to external documents,
297it is not wise to do so, since anything you can't control may change over time.
298It \emph{would} be appropriate and necessary to provide external links to
299additional resources for a multimedia ``enhanced'' thesis.
300But also note that if the \package{hyperref} package is not included,
301as for the print-optimized option in this thesis template, any \cmmd{href} 
302commands in your logical document are no longer defined.
303A work-around employed by this thesis template is to define a dummy \cmmd{href} 
304command (which does nothing) in the preamble of the document,
305before the \package{hyperref} package is included.
306The dummy definition is then redifined by the
307\package{hyperref} package when it is included.
308}
309
310The classic book by Leslie Lamport \cite{lamport.book}, author of \LaTeX , is worth a look too, and the many available add-on packages are described by
311Goossens \textit{et al} \cite{goossens.book}.
312
313%----------------------------------------------------------------------
314% END MATERIAL
315%----------------------------------------------------------------------
316
317% B I B L I O G R A P H Y
318% -----------------------
319
320% 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.
321\bibliographystyle{plain}
322% This specifies the location of the file containing the bibliographic information. 
323% It assumes you're using BibTeX (if not, why not?).
324\cleardoublepage % This is needed if the book class is used, to place the anchor in the correct page,
325                 % because the bibliography will start on its own page.
326                 % Use \clearpage instead if the document class uses the "oneside" argument
327\phantomsection  % With hyperref package, enables hyperlinking from the table of contents to bibliography             
328% The following statement causes the title "References" to be used for the bibliography section:
329\renewcommand*{\bibname}{References}
330
331% Add the References to the Table of Contents
332\addcontentsline{toc}{chapter}{\textbf{References}}
333
334\bibliography{thesis}
335% Tip 5: You can create multiple .bib files to organize your references.
336% Just list them all in the \bibliogaphy command, separated by commas (no spaces).
337
338% The following statement causes the specified references to be added to the bibliography% even if they were not
339% cited in the text. The asterisk is a wildcard that causes all entries in the bibliographic database to be included (optional).
340\nocite{*}
341
342% The \appendix statement indicates the beginning of the appendices.
343\appendix
344% Add a title page before the appendices and a line in the Table of Contents
345\chapter*{APPENDICES}
346\addcontentsline{toc}{chapter}{APPENDICES}
347%======================================================================
348\chapter[PDF Plots From Matlab]{Matlab Code for Making a PDF Plot}
349\label{AppendixA}
350% Tip 4: Example of how to get a shorter chapter title for the Table of Contents
351%======================================================================
352\section{Using the GUI}
353Properties 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.
354
355To set the figure size and to save as PDF or other file formats, click the Export Setup button in the figure Property Editor.
356
357\section{From the Command Line} 
358All figure properties can also be manipulated from the command line. Here's an example:
359\begin{verbatim}
360x=[0:0.1:pi];
361hold on % Plot multiple traces on one figure
362plot(x,sin(x))
363plot(x,cos(x),'--r')
364plot(x,tan(x),'.-g')
365title('Some Trig Functions Over 0 to \pi') % Note LaTeX markup!
366legend('{\it sin}(x)','{\it cos}(x)','{\it tan}(x)')
367hold off
368set(gca,'Ylim',[-3 3]) % Adjust Y limits of "current axes"
369set(gcf,'Units','inches') % Set figure size units of "current figure"
370set(gcf,'Position',[0,0,6,4]) % Set figure width (6 in.) and height (4 in.)
371cd n:\thesis\plots % Select where to save
372print -dpdf plot.pdf % Save as PDF
373\end{verbatim}
374
375\end{document}
Note: See TracBrowser for help on using the repository browser.