Changeset f17fb7d for doc/theses


Ignore:
Timestamp:
Apr 20, 2021, 11:24:17 AM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
6a8208cb
Parents:
72f246d
Message:

Cleaned up the PrintVersion? code in the thesis template.

File:
1 edited

Legend:

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

    r72f246d rf17fb7d  
    7474% ======================================================================
    7575%   D O C U M E N T   P R E A M B L E
    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}
     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}
    8688
    8789% Some LaTeX commands I define for my own nomenclature.
     
    9496% Anything defined here may be redefined by packages added below...
    9597
    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)
     98% For a nomenclature (optional; available from ctan.org)
     99%\usepackage{nomencl}
    104100% Lots of math symbols and environments
    105101\usepackage{amsmath,amssymb,amstext}
     
    111107\usepackage{todonotes}
    112108
    113 
    114109% Hyperlinks make it very easy to navigate an electronic document.
    115110% In addition, this is where you should specify the thesis title and author as
     
    117112% Use the "hyperref" package
    118113% N.B. HYPERREF MUST BE THE LAST PACKAGE LOADED; ADD ADDITIONAL PKGS ABOVE
    119 \usepackage[pdftex,pagebackref=true]{hyperref} % with basic options
    120 %\usepackage[pdftex,pagebackref=true]{hyperref}
     114\usepackage[pdftex,pagebackref=true]{hyperref}
    121115% N.B. pagebackref=true provides links back from the References to the body
    122116% text. This can cause trouble for printing.
     
    128122    pdffitwindow=false,     % window fit to page when opened
    129123    pdfstartview={FitH},    % fits the width of the page to the window
    130 %    pdftitle={uWaterloo\ LaTeX\ Thesis\ Template}, % title: CHANGE THIS TEXT!
    131 %    pdfauthor={Author},    % author: CHANGE THIS TEXT! and uncomment this line
    132 %    pdfsubject={Subject},  % subject: CHANGE THIS TEXT! and uncomment this line
    133 %    pdfkeywords={keyword1} {key2} {key3}, % optional list of keywords
    134124    pdfnewwindow=true,      % links in new window
    135125    colorlinks=true,        % false: boxed links; true: colored links
    136     linkcolor=blue,         % color of internal links
    137     citecolor=green,        % color of links to bibliography
    138     filecolor=magenta,      % color of file links
    139     urlcolor=cyan           % color of external links
    140126}
    141 % for improved print quality, change some hyperref options
    142 \ifthenelse{\boolean{PrintVersion}}{
    143 \hypersetup{    % override some previously defined hyperref options
    144 %    colorlinks,%
    145     citecolor=black,%
    146     filecolor=black,%
    147     linkcolor=black,%
    148     urlcolor=black}
    149 }{} % end of ifthenelse (no else)
     127\iftoggle{printversion}{
     128  \hypersetup{
     129    citecolor=black,        % colour of links to bibliography
     130    filecolor=black,        % colour of file links
     131    linkcolor=black,        % colour of internal links
     132    urlcolor=black,         % colour of external links
     133  }
     134}{ % Digital Version
     135  \hypersetup{
     136    citecolor=green,
     137    filecolor=magenta,
     138    linkcolor=blue,
     139    urlcolor=cyan,
     140  }
     141}
     142
     143\hypersetup{
     144  pdftitle={Exception Handling in Cforall},
     145  pdfauthor={Andrew James Beach},
     146  pdfsubject={Computer Science},
     147  pdfkeywords={programming languages} {exceptions}
     148      {language design} {language implementation},
     149}
    150150
    151151% Exception to the rule of hyperref being the last add-on package
Note: See TracChangeset for help on using the changeset viewer.