Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/uw-ethesis.tex

    r6a8208cb r7039ab9  
    7474% ======================================================================
    7575%   D O C U M E N T   P R E A M B L E
    76 \RequirePackage{etoolbox}
    77 
    78 % Control if this for print (set true) or will stay digital (default).
    79 % Print is two sided, digital uses more colours.
    80 \newtoggle{printversion}
    81 %\toggletrue{printversion}
    82 
    83 \iftoggle{printversion}{%
    84   \documentclass[letterpaper,12pt,titlepage,openright,twoside,final]{book}
    85 }{%
    86   \documentclass[letterpaper,12pt,titlepage,oneside,final]{book}
    87 }
     76% Specify the document class, default style attributes, page dimensions, etc.
     77% For hyperlinked PDF, suitable for viewing on a computer, use this:
     78\documentclass[letterpaper,12pt,titlepage,oneside,final]{book}
     79
     80% For PDF, suitable for double-sided printing, change the PrintVersion
     81% variable below to "true" and use this \documentclass line instead of the
     82% one above:
     83%\documentclass[letterpaper,12pt,titlepage,openright,twoside,final]{book}
     84
     85\usepackage{etoolbox}
    8886
    8987% Some LaTeX commands I define for my own nomenclature.
     
    9694% Anything defined here may be redefined by packages added below...
    9795
    98 % For a nomenclature (optional; available from ctan.org)
    99 %\usepackage{nomencl}
     96% This package allows if-then-else control structures.
     97\usepackage{ifthen}
     98\newboolean{PrintVersion}
     99\setboolean{PrintVersion}{false}
     100% CHANGE THIS VALUE TO "true" as necessary, to improve printed results for
     101% hard copies by overriding some options of the hyperref package, called below.
     102
     103%\usepackage{nomencl} % For a nomenclature (optional; available from ctan.org)
    100104% Lots of math symbols and environments
    101105\usepackage{amsmath,amssymb,amstext}
    102 % For including graphics (must match graphics driver)
     106% For including graphics N.B. pdftex graphics driver
     107%\usepackage[pdftex]{graphicx}
    103108\usepackage{epic,eepic}
    104109\usepackage{graphicx}
     
    108113\usepackage{todonotes}
    109114
     115
    110116% Hyperlinks make it very easy to navigate an electronic document.
    111117% In addition, this is where you should specify the thesis title and author as
     
    113119% Use the "hyperref" package
    114120% N.B. HYPERREF MUST BE THE LAST PACKAGE LOADED; ADD ADDITIONAL PKGS ABOVE
    115 \usepackage[pagebackref=true]{hyperref}
     121%\usepackage[pdftex,pagebackref=true]{hyperref} % with basic options
     122\usepackage[pagebackref=true]{hyperref} % with basic options
     123%\usepackage[pdftex,pagebackref=true]{hyperref}
    116124% N.B. pagebackref=true provides links back from the References to the body
    117125% text. This can cause trouble for printing.
     
    123131    pdffitwindow=false,     % window fit to page when opened
    124132    pdfstartview={FitH},    % fits the width of the page to the window
     133%    pdftitle={uWaterloo\ LaTeX\ Thesis\ Template}, % title: CHANGE THIS TEXT!
     134%    pdfauthor={Author},    % author: CHANGE THIS TEXT! and uncomment this line
     135%    pdfsubject={Subject},  % subject: CHANGE THIS TEXT! and uncomment this line
     136%    pdfkeywords={keyword1} {key2} {key3}, % optional list of keywords
    125137    pdfnewwindow=true,      % links in new window
    126138    colorlinks=true,        % false: boxed links; true: colored links
     139    linkcolor=blue,         % color of internal links
     140    citecolor=green,        % color of links to bibliography
     141    filecolor=magenta,      % color of file links
     142    urlcolor=cyan           % color of external links
    127143}
    128 \iftoggle{printversion}{
    129   \hypersetup{
    130     citecolor=black,        % colour of links to bibliography
    131     filecolor=black,        % colour of file links
    132     linkcolor=black,        % colour of internal links
    133     urlcolor=black,         % colour of external links
    134   }
    135 }{ % Digital Version
    136   \hypersetup{
    137     citecolor=green,
    138     filecolor=magenta,
    139     linkcolor=blue,
    140     urlcolor=cyan,
    141   }
    142 }
    143 
    144 \hypersetup{
    145   pdftitle={Exception Handling in Cforall},
    146   pdfauthor={Andrew James Beach},
    147   pdfsubject={Computer Science},
    148   pdfkeywords={programming languages} {exceptions}
    149       {language design} {language implementation},
    150 }
     144% for improved print quality, change some hyperref options
     145\ifthenelse{\boolean{PrintVersion}}{
     146\hypersetup{    % override some previously defined hyperref options
     147%    colorlinks,%
     148    citecolor=black,%
     149    filecolor=black,%
     150    linkcolor=black,%
     151    urlcolor=black}
     152}{} % end of ifthenelse (no else)
    151153
    152154% Exception to the rule of hyperref being the last add-on package
     
    218220\pdfstringdefDisableCommands{\def\Cpp{C++}}
    219221
    220 % Wrappers for inline code snippits.
    221 \newrobustcmd*\codeCFA[1]{\lstinline[language=CFA]{#1}}
    222 \newrobustcmd*\codeC[1]{\lstinline[language=C]{#1}}
    223 \newrobustcmd*\codeCpp[1]{\lstinline[language=C++]{#1}}
    224 \newrobustcmd*\codePy[1]{\lstinline[language=Python]{#1}}
    225 
    226222% Colour text, formatted in LaTeX style instead of TeX style.
    227223\newcommand*\colour[2]{{\color{#1}#2}}
Note: See TracChangeset for help on using the changeset viewer.