[585d910] | 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: |
---|
[86c1f1c3] | 65 | \documentclass[letterpaper,12pt,titlepage,oneside,final]{book} |
---|
| 66 | |
---|
[585d910] | 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 | \newcommand{\href}[1]{#1} % does nothing, but defines the command so the |
---|
| 72 | % print-optimized version will ignore \href tags (redefined by hyperref pkg). |
---|
| 73 | |
---|
| 74 | % This package allows if-then-else control structures. |
---|
| 75 | \usepackage{ifthen} |
---|
| 76 | \newboolean{PrintVersion} |
---|
| 77 | \setboolean{PrintVersion}{false} |
---|
| 78 | % CHANGE THIS VALUE TO "true" as necessary, to improve printed results for hard copies |
---|
| 79 | % by overriding some options of the hyperref package below. |
---|
| 80 | |
---|
| 81 | %\usepackage{nomencl} % For a nomenclature (optional; available from ctan.org) |
---|
| 82 | \usepackage{amsmath,amssymb,amstext} % Lots of math symbols and environments |
---|
[7cef785] | 83 | \usepackage{xcolor} |
---|
[585d910] | 84 | \usepackage{graphicx} % For including graphics |
---|
| 85 | |
---|
| 86 | % Hyperlinks make it very easy to navigate an electronic document. |
---|
| 87 | % In addition, this is where you should specify the thesis title |
---|
| 88 | % and author as they appear in the properties of the PDF document. |
---|
| 89 | % Use the "hyperref" package |
---|
| 90 | % N.B. HYPERREF MUST BE THE LAST PACKAGE LOADED; ADD ADDITIONAL PKGS ABOVE |
---|
| 91 | \usepackage[pagebackref=false]{hyperref} % with basic options |
---|
| 92 | % N.B. pagebackref=true provides links back from the References to the body text. This can cause trouble for printing. |
---|
| 93 | \hypersetup{ |
---|
[d835116] | 94 | plainpages=false, % needed if Roman numbers in frontpages |
---|
| 95 | unicode=false, % non-Latin characters in Acrobat’s bookmarks |
---|
| 96 | pdftoolbar=true, % show Acrobat’s toolbar? |
---|
| 97 | pdfmenubar=true, % show Acrobat’s menu? |
---|
| 98 | pdffitwindow=false, % window fit to page when opened |
---|
| 99 | pdfstartview={FitH}, % fits the width of the page to the window |
---|
| 100 | pdftitle={The Cforall Scheduler}, % title |
---|
| 101 | pdfauthor={Thierry Delisle}, % author |
---|
| 102 | pdfsubject={Cforall}, % subject |
---|
| 103 | pdfkeywords={Cforall} {concurrency} {scheduling}, % list of keywords |
---|
| 104 | pdfnewwindow=true, % links in new window |
---|
| 105 | colorlinks=true, % false: boxed links; true: colored links |
---|
| 106 | linkcolor=blue, % color of internal links |
---|
| 107 | citecolor=green, % color of links to bibliography |
---|
| 108 | filecolor=magenta, % color of file links |
---|
| 109 | urlcolor=cyan % color of external links |
---|
[585d910] | 110 | } |
---|
| 111 | \ifthenelse{\boolean{PrintVersion}}{ % for improved print quality, change some hyperref options |
---|
| 112 | \hypersetup{ % override some previously defined hyperref options |
---|
[d835116] | 113 | citecolor=black, |
---|
| 114 | filecolor=black, |
---|
| 115 | linkcolor=black, |
---|
| 116 | urlcolor=black |
---|
| 117 | }}{} % end of ifthenelse (no else) |
---|
[585d910] | 118 | |
---|
| 119 | \usepackage[automake,toc,abbreviations]{glossaries-extra} % Exception to the rule of hyperref being the last add-on package |
---|
| 120 | % If glossaries-extra is not in your LaTeX distribution, get it from CTAN (http://ctan.org/pkg/glossaries-extra), |
---|
| 121 | % although it's supposed to be in both the TeX Live and MikTeX distributions. There are also documentation and |
---|
| 122 | % installation instructions there. |
---|
[7cef785] | 123 | \makeatletter |
---|
| 124 | \newcommand*{\glsplainhyperlink}[2]{% |
---|
| 125 | \colorlet{currenttext}{.}% store current text color |
---|
| 126 | \colorlet{currentlink}{\@linkcolor}% store current link color |
---|
| 127 | \hypersetup{linkcolor=currenttext}% set link color |
---|
| 128 | \hyperlink{#1}{#2}% |
---|
| 129 | \hypersetup{linkcolor=currentlink}% reset to default |
---|
| 130 | } |
---|
| 131 | \let\@glslink\glsplainhyperlink |
---|
| 132 | \makeatother |
---|
[585d910] | 133 | |
---|
[b9537e6] | 134 | \usepackage{csquotes} |
---|
| 135 | \usepackage{indentfirst} % as any self-respecting frenchman would |
---|
| 136 | |
---|
[585d910] | 137 | % Setting up the page margins... |
---|
[bace538] | 138 | \setlength{\textheight}{9in}\setlength{\topmargin}{-0.45in}\setlength{\headsep}{0.25in} |
---|
[585d910] | 139 | % uWaterloo thesis requirements specify a minimum of 1 inch (72pt) margin at the |
---|
| 140 | % top, bottom, and outside page edges and a 1.125 in. (81pt) gutter |
---|
| 141 | % margin (on binding side). While this is not an issue for electronic |
---|
| 142 | % viewing, a PDF may be printed, and so we have the same page layout for |
---|
| 143 | % both printed and electronic versions, we leave the gutter margin in. |
---|
| 144 | % Set margins to minimum permitted by uWaterloo thesis regulations: |
---|
| 145 | \setlength{\marginparwidth}{0pt} % width of margin notes |
---|
| 146 | % N.B. If margin notes are used, you must adjust \textwidth, \marginparwidth |
---|
| 147 | % and \marginparsep so that the space left between the margin notes and page |
---|
| 148 | % edge is less than 15 mm (0.6 in.) |
---|
| 149 | \setlength{\marginparsep}{0pt} % width of space between body text and margin notes |
---|
| 150 | \setlength{\evensidemargin}{0.125in} % Adds 1/8 in. to binding side of all |
---|
| 151 | % even-numbered pages when the "twoside" printing option is selected |
---|
| 152 | \setlength{\oddsidemargin}{0.125in} % Adds 1/8 in. to the left of all pages |
---|
| 153 | % when "oneside" printing is selected, and to the left of all odd-numbered |
---|
| 154 | % pages when "twoside" printing is selected |
---|
| 155 | \setlength{\textwidth}{6.375in} % assuming US letter paper (8.5 in. x 11 in.) and |
---|
| 156 | % side margins as above |
---|
| 157 | \raggedbottom |
---|
| 158 | |
---|
| 159 | % The following statement specifies the amount of space between |
---|
| 160 | % paragraphs. Other reasonable specifications are \bigskipamount and \smallskipamount. |
---|
| 161 | \setlength{\parskip}{\medskipamount} |
---|
| 162 | |
---|
| 163 | % The following statement controls the line spacing. The default |
---|
| 164 | % spacing corresponds to good typographic conventions and only slight |
---|
| 165 | % changes (e.g., perhaps "1.2"), if any, should be made. |
---|
| 166 | \renewcommand{\baselinestretch}{1} % this is the default line space setting |
---|
| 167 | |
---|
| 168 | % By default, each chapter will start on a recto (right-hand side) |
---|
| 169 | % page. We also force each section of the front pages to start on |
---|
| 170 | % a recto page by inserting \cleardoublepage commands. |
---|
| 171 | % In many cases, this will require that the verso page be |
---|
| 172 | % blank and, while it should be counted, a page number should not be |
---|
| 173 | % printed. The following statements ensure a page number is not |
---|
| 174 | % printed on an otherwise blank verso page. |
---|
| 175 | \let\origdoublepage\cleardoublepage |
---|
| 176 | \newcommand{\clearemptydoublepage}{% |
---|
| 177 | \clearpage{\pagestyle{empty}\origdoublepage}} |
---|
| 178 | \let\cleardoublepage\clearemptydoublepage |
---|
| 179 | |
---|
[d835116] | 180 | \newcounter{cit} |
---|
| 181 | \newcounter{todo} |
---|
[86c1f1c3] | 182 | |
---|
[d835116] | 183 | % \newcommand{\cit}{\textsuperscript{[Citation Needed]}\xspace} |
---|
| 184 | % \newcommand{\TODO}{{\large\bf\color{red} TODO: }\xspace} |
---|
| 185 | |
---|
| 186 | \newcommand\cit[1]{\refstepcounter{cit}\textsuperscript{[Citation Needed]}\xspace\addcontentsline{cit}{subsection}{\thecit~#1}}% |
---|
| 187 | \newcommand\todo[1]{\refstepcounter{todo}{{\large\bf\color{red} TODO: }\xspace\color{red}{#1}}\addcontentsline{todo}{subsection}{\thetodo~#1}}% |
---|
| 188 | |
---|
| 189 | \makeatletter |
---|
| 190 | \newcommand\citname{cit} |
---|
| 191 | \newcommand\listcitname{List of missing citations} |
---|
| 192 | \newcommand\listofcits{% |
---|
| 193 | \section*{\listcitname}\@starttoc{cit}} |
---|
| 194 | \makeatother |
---|
| 195 | |
---|
| 196 | \makeatletter |
---|
| 197 | \newcommand\todoname{todo} |
---|
| 198 | \newcommand\listtodoname{List of todos} |
---|
| 199 | \newcommand\listoftodos{% |
---|
| 200 | \section*{\listtodoname}\@starttoc{todo}} |
---|
| 201 | \makeatother |
---|
[86c1f1c3] | 202 | |
---|
| 203 | % cfa macros used in the document |
---|
| 204 | \input{common} |
---|
[bace538] | 205 | \CFAStyle % CFA code-style for all languages |
---|
| 206 | \lstset{basicstyle=\linespread{0.9}\tt} |
---|
[86c1f1c3] | 207 | |
---|
| 208 | % glossary of terms to use |
---|
| 209 | \input{glossary} |
---|
[bace538] | 210 | \makeindex |
---|
[86c1f1c3] | 211 | |
---|
[d4a4b17] | 212 | \newcommand\io{\glsxtrshort{io}}% |
---|
| 213 | |
---|
[86c1f1c3] | 214 | %====================================================================== |
---|
[585d910] | 215 | % L O G I C A L D O C U M E N T -- the content of your thesis |
---|
[86c1f1c3] | 216 | %====================================================================== |
---|
| 217 | \begin{document} |
---|
[585d910] | 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 is |
---|
| 225 | % included into the document by the following statement. |
---|
| 226 | %---------------------------------------------------------------------- |
---|
| 227 | % FRONT MATERIAL |
---|
| 228 | %---------------------------------------------------------------------- |
---|
[86c1f1c3] | 229 | \input{text/front.tex} |
---|
[585d910] | 230 | |
---|
| 231 | |
---|
| 232 | %---------------------------------------------------------------------- |
---|
| 233 | % MAIN BODY |
---|
| 234 | %---------------------------------------------------------------------- |
---|
| 235 | % Because this is a short document, and to reduce the number of files |
---|
| 236 | % needed for this template, the chapters are not separate |
---|
| 237 | % documents as suggested above, but you get the idea. If they were |
---|
| 238 | % separate documents, they would each start with the \chapter command, i.e, |
---|
| 239 | % do not contain \documentclass or \begin{document} and \end{document} commands. |
---|
[b9537e6] | 240 | \part{Introduction} |
---|
[86c1f1c3] | 241 | \input{text/intro.tex} |
---|
[b9537e6] | 242 | \input{text/existing.tex} |
---|
[86c1f1c3] | 243 | \input{text/runtime.tex} |
---|
[b9537e6] | 244 | \part{Design} |
---|
[86c1f1c3] | 245 | \input{text/core.tex} |
---|
| 246 | \input{text/io.tex} |
---|
[c292244] | 247 | \input{text/practice.tex} |
---|
[b9537e6] | 248 | \part{Evaluation} |
---|
[bace538] | 249 | \label{Evaluation} |
---|
[b9537e6] | 250 | \chapter{Theoretical and Existance Proofs} |
---|
| 251 | \chapter{Micro-Benchmarks} |
---|
| 252 | \chapter{Larger-Scale applications} |
---|
| 253 | \part{Conclusion \& Annexes} |
---|
[86c1f1c3] | 254 | |
---|
[585d910] | 255 | %---------------------------------------------------------------------- |
---|
| 256 | % END MATERIAL |
---|
| 257 | %---------------------------------------------------------------------- |
---|
| 258 | |
---|
| 259 | % B I B L I O G R A P H Y |
---|
| 260 | % ----------------------- |
---|
| 261 | |
---|
| 262 | % 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. |
---|
| 263 | \bibliographystyle{plain} |
---|
| 264 | % This specifies the location of the file containing the bibliographic information. |
---|
| 265 | % It assumes you're using BibTeX (if not, why not?). |
---|
| 266 | \cleardoublepage % This is needed if the book class is used, to place the anchor in the correct page, |
---|
| 267 | % because the bibliography will start on its own page. |
---|
| 268 | % Use \clearpage instead if the document class uses the "oneside" argument |
---|
| 269 | \phantomsection % With hyperref package, enables hyperlinking from the table of contents to bibliography |
---|
| 270 | % The following statement causes the title "References" to be used for the bibliography section: |
---|
| 271 | \renewcommand*{\bibname}{References} |
---|
| 272 | |
---|
| 273 | % Add the References to the Table of Contents |
---|
| 274 | \addcontentsline{toc}{chapter}{\textbf{References}} |
---|
| 275 | |
---|
[bace538] | 276 | \bibliography{local,pl} |
---|
[585d910] | 277 | % Tip 5: You can create multiple .bib files to organize your references. |
---|
| 278 | % Just list them all in the \bibliogaphy command, separated by commas (no spaces). |
---|
| 279 | |
---|
[b9537e6] | 280 | % % The following statement causes the specified references to be added to the bibliography% even if they were not |
---|
| 281 | % % cited in the text. The asterisk is a wildcard that causes all entries in the bibliographic database to be included (optional). |
---|
| 282 | % \nocite{*} |
---|
[585d910] | 283 | |
---|
| 284 | % The \appendix statement indicates the beginning of the appendices. |
---|
| 285 | \appendix |
---|
| 286 | % Add a title page before the appendices and a line in the Table of Contents |
---|
| 287 | \chapter*{APPENDICES} |
---|
| 288 | \addcontentsline{toc}{chapter}{APPENDICES} |
---|
| 289 | %====================================================================== |
---|
| 290 | \chapter[PDF Plots From Matlab]{Matlab Code for Making a PDF Plot} |
---|
| 291 | \label{AppendixA} |
---|
| 292 | % Tip 4: Example of how to get a shorter chapter title for the Table of Contents |
---|
| 293 | %====================================================================== |
---|
| 294 | \section{Using the GUI} |
---|
| 295 | 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. |
---|
| 296 | |
---|
| 297 | To set the figure size and to save as PDF or other file formats, click the Export Setup button in the figure Property Editor. |
---|
| 298 | |
---|
| 299 | \section{From the Command Line} |
---|
| 300 | All figure properties can also be manipulated from the command line. Here's an example: |
---|
| 301 | \begin{verbatim} |
---|
| 302 | x=[0:0.1:pi]; |
---|
| 303 | hold on % Plot multiple traces on one figure |
---|
| 304 | plot(x,sin(x)) |
---|
| 305 | plot(x,cos(x),'--r') |
---|
| 306 | plot(x,tan(x),'.-g') |
---|
| 307 | title('Some Trig Functions Over 0 to \pi') % Note LaTeX markup! |
---|
| 308 | legend('{\it sin}(x)','{\it cos}(x)','{\it tan}(x)') |
---|
| 309 | hold off |
---|
| 310 | set(gca,'Ylim',[-3 3]) % Adjust Y limits of "current axes" |
---|
| 311 | set(gcf,'Units','inches') % Set figure size units of "current figure" |
---|
| 312 | set(gcf,'Position',[0,0,6,4]) % Set figure width (6 in.) and height (4 in.) |
---|
| 313 | cd n:\thesis\plots % Select where to save |
---|
| 314 | print -dpdf plot.pdf % Save as PDF |
---|
| 315 | \end{verbatim} |
---|
| 316 | |
---|
[d835116] | 317 | % GLOSSARIES (Lists of definitions, abbreviations, symbols, etc. provided by the glossaries-extra package) |
---|
| 318 | % ----------------------------- |
---|
| 319 | \printglossary |
---|
| 320 | \cleardoublepage |
---|
[bace538] | 321 | |
---|
| 322 | % Index |
---|
| 323 | % ----------------------------- |
---|
| 324 | %\input{thesis.ind} % index |
---|
| 325 | |
---|
[d835116] | 326 | \phantomsection |
---|
| 327 | |
---|
[bace538] | 328 | \end{document} |
---|