source: doc/theses/andrew_beach_MMath/thesis.tex @ 5a3d67c

arm-ehjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-expr
Last change on this file since 5a3d67c was 5a3d67c, checked in by Andrew Beach <ajbeach@…>, 20 months ago

Cleaned up AB M template some more and add the Makefile.

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