Index: doc/theses/andrew_beach_MMath/.gitignore
===================================================================
--- doc/theses/andrew_beach_MMath/.gitignore	(revision 48779a6073522178caae187c63f46709c5ee69a8)
+++ doc/theses/andrew_beach_MMath/.gitignore	(revision f9723e8ec57193bf0ba2c9236fc95d6b60e6dcb0)
@@ -4,2 +4,5 @@
 # Final Files:
 thesis.pdf
+
+# The Makefile here is not generated.
+!Makefile
Index: doc/theses/andrew_beach_MMath/Makefile
===================================================================
--- doc/theses/andrew_beach_MMath/Makefile	(revision f9723e8ec57193bf0ba2c9236fc95d6b60e6dcb0)
+++ doc/theses/andrew_beach_MMath/Makefile	(revision f9723e8ec57193bf0ba2c9236fc95d6b60e6dcb0)
@@ -0,0 +1,43 @@
+### Makefile for Andrew Beach's Masters Thesis
+
+DOC=thesis.pdf
+BUILD=out
+TEXSRC=$(wildcard *.tex)
+BIBSRC=$(wildcard *.bib)
+TEXLIB= .:${BUILD}:
+BIBLIB= .:../../bibliography
+
+# Since tex programs like to add their own file extensions:
+BASE= ${DOC:%.pdf=%}
+
+### Special Rules:
+
+.PHONY: all clean deepclean
+
+### Commands:
+LATEX=TEXINPUTS=${TEXLIB} pdflatex -halt-on-error -output-directory=${BUILD}
+BIBTEX=BIBINPUTS=${BIBLIB} bibtex
+GLOSSARY=INDEXSTYLE=${BUILD} makeglossaries-lite
+
+### Rules and Recipies:
+
+all: ${DOC}
+
+${BUILD}/${DOC}: ${TEXSRC} ${BIBSRC} Makefile | ${BUILD}
+	${LATEX} ${BASE}
+	${BIBTEX} ${BUILD}/${BASE}
+	${GLOSSARY} ${BUILD}/${BASE}
+	${LATEX} ${BASE}
+	${LATEX} ${BASE}
+
+${DOC}: ${BUILD}/${DOC}
+	cp $< $@
+
+${BUILD}:
+	mkdir $@
+
+clean:
+	-@rm -rv ${BUILD}
+
+deepclean: clean
+	-@rm -v ${DOC}
Index: doc/theses/andrew_beach_MMath/thesis-frontpgs.tex
===================================================================
--- doc/theses/andrew_beach_MMath/thesis-frontpgs.tex	(revision 48779a6073522178caae187c63f46709c5ee69a8)
+++ doc/theses/andrew_beach_MMath/thesis-frontpgs.tex	(revision f9723e8ec57193bf0ba2c9236fc95d6b60e6dcb0)
@@ -1,7 +1,9 @@
-% T I T L E   P A G E
-% -------------------
 % Last updated June 14, 2017, by Stephen Carr, IST-Client Services
 % The title page is counted as page `i' but we need to suppress the
 % page number. Also, we don't want any headers or footers.
+%----------------------------------------------------------------------
+% TITLE PAGE
+%----------------------------------------------------------------------
+
 \pagestyle{empty}
 \pagenumbering{roman}
@@ -47,13 +49,19 @@
 \end{titlepage}
 
-% The rest of the front pages should contain no headers and be numbered using Roman numerals starting with `ii'
+% The rest of the front pages should contain no headers
+% and be numbered using Roman numerals starting with `ii'.
 \pagestyle{plain}
 \setcounter{page}{2}
 
-\cleardoublepage % Ends the current page and causes all figures and tables that have so far appeared in the input to be printed.
-% In a two-sided printing style, it also makes the next page a right-hand (odd-numbered) page, producing a blank page if necessary.
+% Ends the current page and causes all figures and tables that have so far
+% appeared in the input to be printed. In a two-sided printing style, it also
+% makes the next page a right-hand (odd-numbered) page, producing a blank page
+% if necessary.
+\cleardoublepage
 
  
-% E X A M I N I N G   C O M M I T T E E (Required for Ph.D. theses only)
+%----------------------------------------------------------------------
+% EXAMINING COMMITTEE (Required for Ph.D. theses only)
+%----------------------------------------------------------------------
 % Remove or comment out the lines below to remove this page
 \begin{center}\textbf{Examining Committee Membership}\end{center}
@@ -105,6 +113,7 @@
 \cleardoublepage
 
-% D E C L A R A T I O N   P A G E
-% -------------------------------
+%----------------------------------------------------------------------
+% DECLARATION PAGE
+%----------------------------------------------------------------------
   % The following is a sample Delaration Page as provided by the GSO
   % December 13th, 2006.  It is designed for an electronic thesis.
@@ -119,6 +128,7 @@
 \cleardoublepage
 
-% A B S T R A C T
-% ---------------
+%----------------------------------------------------------------------
+% ABSTRACT
+%----------------------------------------------------------------------
 
 \begin{center}\textbf{Abstract}\end{center}
@@ -142,6 +152,7 @@
 \cleardoublepage
 
-% A C K N O W L E D G E M E N T S
-% -------------------------------
+%----------------------------------------------------------------------
+% ACKNOWLEDGEMENTS
+%----------------------------------------------------------------------
 
 \begin{center}\textbf{Acknowledgements}\end{center}
@@ -150,7 +161,7 @@
 \cleardoublepage
 
-% D E D I C A T I O N
-% -------------------
-
+%----------------------------------------------------------------------
+% DEDICATION
+%----------------------------------------------------------------------
 \begin{center}\textbf{Dedication}\end{center}
 
@@ -158,6 +169,7 @@
 \cleardoublepage
 
-% T A B L E   O F   C O N T E N T S
-% ---------------------------------
+%----------------------------------------------------------------------
+% TABLE OF CONTENTS
+%----------------------------------------------------------------------
 \renewcommand\contentsname{Table of Contents}
 \tableofcontents
@@ -165,6 +177,7 @@
 \phantomsection    % allows hyperref to link to the correct page
 
-% L I S T   O F   T A B L E S
-% ---------------------------
+%----------------------------------------------------------------------
+% LIST OF TABLES
+%----------------------------------------------------------------------
 \addcontentsline{toc}{chapter}{List of Tables}
 \listoftables
@@ -172,6 +185,7 @@
 \phantomsection		% allows hyperref to link to the correct page
 
-% L I S T   O F   F I G U R E S
-% -----------------------------
+%----------------------------------------------------------------------
+% LIST OF FIGURES
+%----------------------------------------------------------------------
 \addcontentsline{toc}{chapter}{List of Figures}
 \listoffigures
@@ -179,6 +193,7 @@
 \phantomsection		% allows hyperref to link to the correct page
 
-% GLOSSARIES (Lists of definitions, abbreviations, symbols, etc. provided by the glossaries-extra package)
-% -----------------------------
+%----------------------------------------------------------------------
+% GLOSSARIES (Provided by the glossaries-extra package)
+%----------------------------------------------------------------------
 \printglossaries
 \cleardoublepage
Index: doc/theses/andrew_beach_MMath/thesis.tex
===================================================================
--- doc/theses/andrew_beach_MMath/thesis.tex	(revision 48779a6073522178caae187c63f46709c5ee69a8)
+++ doc/theses/andrew_beach_MMath/thesis.tex	(revision f9723e8ec57193bf0ba2c9236fc95d6b60e6dcb0)
@@ -8,17 +8,18 @@
 
 % DON'T FORGET TO ADD YOUR OWN NAME AND TITLE in the "hyperref" package
-% configuration below. THIS INFORMATION GETS EMBEDDED IN THE PDF FINAL PDF DOCUMENT.
+% configuration. THIS INFORMATION GETS EMBEDDED IN THE FINAL PDF DOCUMENT.
 % You can view the information if you view Properties of the PDF document.
 
 % Many faculties/departments also require one or more printed
 % copies. This template attempts to satisfy both types of output. 
-% It is based on the standard "book" document class which provides all necessary 
-% sectioning structures and allows multi-part theses.
+% It is based on the standard "book" document class which provides all
+% necessary sectioning structures and allows multi-part theses.
 
 % DISCLAIMER
-% To the best of our knowledge, this template satisfies the current uWaterloo requirements.
-% However, it is your responsibility to assure that you have met all 
-% requirements of the University and your particular department.
-% Many thanks for the feedback from many graduates that assisted the development of this template.
+% To the best of our knowledge, this template satisfies the current uWaterloo
+% requirements. However, it is your responsibility to assure that you have met
+% all  requirements of the University and your particular department.
+% Many thanks for the feedback from many graduates that assisted the
+% development of this template.
 
 % -----------------------------------------------------------------------
@@ -33,12 +34,6 @@
 % bibtex mythesis	-- generates bibliography from .bib data file(s)
 % makeindex         -- should be run only if an index is used 
-% pdflatex mythesis	-- fixes numbering in cross-references, bibliographic references, glossaries, index, etc.
-% pdflatex mythesis	-- fixes numbering in cross-references, bibliographic references, glossaries, index, etc.
-
-% If you use the recommended LaTeX editor, Texmaker, you would open the mythesis.tex
-% file, then click the PDFLaTeX button. Then run BibTeX (under the Tools menu).
-% Then click the PDFLaTeX button two more times. If you have an index as well,
-% you'll need to run MakeIndex from the Tools menu as well, before running pdflatex
-% the last two times.
+% pdflatex mythesis	-- fixes numbering in cross-references,
+% pdflatex mythesis --   bibliographic references, glossaries, index, etc.
 
 % N.B. The "pdftex" program allows graphics in the following formats to be
@@ -65,6 +60,7 @@
 \documentclass[letterpaper,12pt,titlepage,oneside,final]{book}
  
-% For PDF, suitable for double-sided printing, change the PrintVersion variable below
-% to "true" and use this \documentclass line instead of the one above:
+% For PDF, suitable for double-sided printing, change the PrintVersion
+% variable below to "true" and use this \documentclass line instead of the one
+% above:
 %\documentclass[letterpaper,12pt,titlepage,openright,twoside,final]{book}
 
@@ -75,5 +71,5 @@
 \newcommand{\cmmd}[1]{\textbackslash\texttt{#1}} % command name in tt font 
 \newcommand{\href}[1]{#1} % does nothing, but defines the command so the
-    % print-optimized version will ignore \href tags (redefined by hyperref pkg).
+  % print-optimized version will ignore \href tags (redefined by hyperref pkg).
 %\newcommand{\texorpdfstring}[2]{#1} % does nothing, but defines the command
 % Anything defined here may be redefined by packages added below...
@@ -83,10 +79,17 @@
 \newboolean{PrintVersion}
 \setboolean{PrintVersion}{false} 
-% CHANGE THIS VALUE TO "true" as necessary, to improve printed results for hard copies
-% by overriding some options of the hyperref package below.
-
-%\usepackage{nomencl} % For a nomenclature (optional; available from ctan.org)
-\usepackage{amsmath,amssymb,amstext} % Lots of math symbols and environments
-\usepackage[pdftex]{graphicx} % For including graphics N.B. pdftex graphics driver 
+% CHANGE THIS VALUE TO "true" as necessary, to improve printed results for
+% hard copies by overriding some options of the hyperref package below.
+
+% For a nomenclature (optional; available from ctan.org)
+%\usepackage{nomencl}
+% Lots of math symbols and environments
+\usepackage{amsmath,amssymb,amstext}
+% For including graphics N.B. pdftex graphics driver 
+\usepackage[pdftex]{graphicx}
+
+% I believe the general index function is covered by the glossaries.
+% \usepackage{makeidx}
+% \makeindex
 
 % Hyperlinks make it very easy to navigate an electronic document.
@@ -95,6 +98,7 @@
 % Use the "hyperref" package 
 % N.B. HYPERREF MUST BE THE LAST PACKAGE LOADED; ADD ADDITIONAL PKGS ABOVE
+% N.B. pagebackref=true provides links back from the References to the body
+% text. This can cause trouble for printing.
 \usepackage[pdftex,pagebackref=false]{hyperref} % with basic options
-		% N.B. pagebackref=true provides links back from the References to the body text. This can cause trouble for printing.
 \hypersetup{
     plainpages=false,       % needed if Roman numbers in frontpages
@@ -115,6 +119,7 @@
     urlcolor=cyan           % color of external links
 }
-\ifthenelse{\boolean{PrintVersion}}{   % for improved print quality, change some hyperref options
-\hypersetup{	% override some previously defined hyperref options
+\ifthenelse{\boolean{PrintVersion}}{
+  % for improved print quality, override some hyperref options
+\hypersetup{
 %    colorlinks,%
     citecolor=black,%
@@ -124,12 +129,12 @@
 }{} % end of ifthenelse (no else)
 
-\usepackage[automake,toc,abbreviations]{glossaries-extra} % Exception to the rule of hyperref being the last add-on package
-% If glossaries-extra is not in your LaTeX distribution, get it from CTAN (http://ctan.org/pkg/glossaries-extra), 
-% although it's supposed to be in both the TeX Live and MikTeX distributions. There are also documentation and 
-% installation instructions there.
+\usepackage[toc,abbreviations]{glossaries-extra} % Exception to the
+% rule of hyperref being the last add-on package. If glossaries-extra is not
+% in your LaTeX distribution, get it from CTAN
+% (http://ctan.org/pkg/glossaries-extra). 
 
 % Setting up the page margins...
-% uWaterloo thesis requirements specify a minimum of 1 inch (72pt) margin at the
-% top, bottom, and outside page edges and a 1.125 in. (81pt) gutter
+% uWaterloo thesis requirements specify a minimum of 1 inch (72pt) margin at
+% the top, bottom, and outside page edges and a 1.125 in. (81pt) gutter
 % margin (on binding side). While this is not an issue for electronic
 % viewing, a PDF may be printed, and so we have the same page layout for
@@ -140,5 +145,6 @@
 % and \marginparsep so that the space left between the margin notes and page
 % edge is less than 15 mm (0.6 in.)
-\setlength{\marginparsep}{0pt} % width of space between body text and margin notes
+% Width of space between body text and margin notes.
+\setlength{\marginparsep}{0pt}
 \setlength{\evensidemargin}{0.125in} % Adds 1/8 in. to binding side of all 
 % even-numbered pages when the "twoside" printing option is selected
@@ -146,10 +152,10 @@
 % when "oneside" printing is selected, and to the left of all odd-numbered
 % pages when "twoside" printing is selected
-\setlength{\textwidth}{6.375in} % assuming US letter paper (8.5 in. x 11 in.) and 
-% side margins as above
+% Assuming US letter paper (8.5 in. x 11 in.) and side margins as above.
+\setlength{\textwidth}{6.375in}
 \raggedbottom
 
-% The following statement specifies the amount of space between
-% paragraphs. Other reasonable specifications are \bigskipamount and \smallskipamount.
+% The following statement specifies the amount of space between paragraphs.
+% Other reasonable specifications are \bigskipamount and \smallskipamount.
 \setlength{\parskip}{\medskipamount}
 
@@ -171,5 +177,6 @@
 \let\cleardoublepage\clearemptydoublepage
 
-% Define Glossary terms (This is properly done here, in the preamble. Could be \input{} from a file...)
+% Define Glossary terms (This is properly done here, in the preamble.
+% Could be \input{} from a file...)
 % Main glossary entries -- definitions of relevant terminology
 \newglossaryentry{computer}
@@ -190,5 +197,5 @@
 }
 
-% List of Abbreviations (abbreviations type is built in to the glossaries-extra package)
+% List of Abbreviations (abbreviations are from the glossaries-extra package)
 \newabbreviation{aaaaz}{AAAAZ}{American Association of Amature Astronomers and Zoologists}
 
@@ -215,6 +222,6 @@
 % declaration, borrowers' page, abstract, acknowledgements,
 % dedication, table of contents, list of tables, list of figures,
-% nomenclature) are contained within the file "uw-ethesis-frontpgs.tex" which is
-% included into the document by the following statement.
+% nomenclature) are contained within the file "uw-ethesis-frontpgs.tex" which
+% is included into the document by the following statement.
 %----------------------------------------------------------------------
 % FRONT MATERIAL
@@ -228,6 +235,6 @@
 % needed for this template, the chapters are not separate
 % documents as suggested above, but you get the idea. If they were
-% separate documents, they would each start with the \chapter command, i.e, 
-% do not contain \documentclass or \begin{document} and \end{document} commands.
+% separate documents, they would each start with the \chapter command, i.e, do
+% not contain \documentclass or \begin{document} and \end{document} commands.
 %======================================================================
 \chapter{Introduction}
@@ -238,5 +245,7 @@
    e^{\pi i} + 1 = 0  \label{eqn_pi}
 \end{equation}
-A \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} . 
+A \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} . 
 
 %----------------------------------------------------------------------
@@ -284,6 +293,7 @@
 create a PS file, then convert that to EPS (encapsulated PS, which has a 
 bounding box to describe its exact size rather than a whole page). 
-Programs such as GSView (a Ghostscript GUI) can create both EPS and PDF from PS files.
-Appendix~\ref{AppendixA} shows how to generate properly sized Matlab plots and save them as PDF.
+Programs such as GSView (a Ghostscript GUI) can create both EPS and PDF from
+PS files. Appendix~\ref{AppendixA} shows how to generate properly sized Matlab
+plots and save them as PDF.
 \item It's important to crop your photos and draw your figures to the size that
 you want to appear in your thesis. Scaling photos with the 
@@ -292,5 +302,6 @@
 \end{itemize}
  
-For 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}. 
+For 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}. 
 \footnote{
 Note that while it is possible to include hyperlinks to external documents,
@@ -301,6 +312,6 @@
 as for the print-optimized option in this thesis template, any \cmmd{href} 
 commands in your logical document are no longer defined.
-A work-around employed by this thesis template is to define a dummy \cmmd{href} 
-command (which does nothing) in the preamble of the document, 
+A work-around employed by this thesis template is to define a dummy
+\cmmd{href} command (which does nothing) in the preamble of the document, 
 before the \package{hyperref} package is included. 
 The dummy definition is then redifined by the
@@ -308,5 +319,6 @@
 }
 
-The 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 
+The 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 
 Goossens \textit{et al} \cite{goossens.book}.
 
@@ -318,13 +330,21 @@
 % -----------------------
 
-% 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.
+% 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.
 \bibliographystyle{plain}
-% This specifies the location of the file containing the bibliographic information.  
-% It assumes you're using BibTeX (if not, why not?).
-\cleardoublepage % This is needed if the book class is used, to place the anchor in the correct page,
-                 % because the bibliography will start on its own page.
-                 % Use \clearpage instead if the document class uses the "oneside" argument
-\phantomsection  % With hyperref package, enables hyperlinking from the table of contents to bibliography             
-% The following statement causes the title "References" to be used for the bibliography section:
+% This specifies the location of the file containing the bibliographic
+% information. It assumes you're using BibTeX (if not, why not?).
+
+% This is needed if the book class is used, to place the anchor in the correct
+% page, because the bibliography will start on its own page.
+% Use \clearpage instead if the document class uses the "oneside" argument.
+\cleardoublepage
+% With hyperref package, enables hyperlinking from the table of contents to
+% bibliography
+\phantomsection
+
+% The following statement causes the title "References" to be used for the
+% bibliography section:
 \renewcommand*{\bibname}{References}
 
@@ -332,10 +352,12 @@
 \addcontentsline{toc}{chapter}{\textbf{References}}
 
+% Tip 5: You can create multiple .bib files to organize your references. Just
+% list them all in the \bibliogaphy command, separated by commas (no spaces).
 \bibliography{thesis}
-% Tip 5: You can create multiple .bib files to organize your references. 
-% Just list them all in the \bibliogaphy command, separated by commas (no spaces).
-
-% The following statement causes the specified references to be added to the bibliography% even if they were not 
-% cited in the text. The asterisk is a wildcard that causes all entries in the bibliographic database to be included (optional).
+
+% The following statement causes the specified references to be added to the
+% bibliography even if they were not cited in the text. The asterisk is a
+% wildcard that causes all entries in the bibliographic database to be
+% included (optional).
 \nocite{*}
 
@@ -348,13 +370,19 @@
 \chapter[PDF Plots From Matlab]{Matlab Code for Making a PDF Plot}
 \label{AppendixA}
-% Tip 4: Example of how to get a shorter chapter title for the Table of Contents 
+% Tip 4: Example of how to get a short chapter title for the Table of Contents
 %======================================================================
 \section{Using the GUI}
-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.
-
-To set the figure size and to save as PDF or other file formats, click the Export Setup button in the figure Property Editor.
+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.
+
+To set the figure size and to save as PDF or other file formats, click the
+Export Setup button in the figure Property Editor.
 
 \section{From the Command Line} 
-All figure properties can also be manipulated from the command line. Here's an example: 
+All figure properties can also be manipulated from the command line. Here's an
+example: 
 \begin{verbatim}
 x=[0:0.1:pi];
