Changeset 912cc7d7 for doc


Ignore:
Timestamp:
Oct 25, 2020, 6:55:11 PM (4 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:
ab8c6a6
Parents:
a3f36dc
Message:

In Andrew/MMath; added a configuration command.

Location:
doc/theses/andrew_beach_MMath
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/thesis-frontpgs.tex

    ra3f36dc r912cc7d7  
    55% TITLE PAGE
    66%----------------------------------------------------------------------
     7
     8% Slowly generalizing.
     9\ethesissetup{
     10  author=Pat Neugraad,%
     11  title={University of Waterloo E-Thesis Template for \LaTeX},
     12  degree=phd,%
     13  program=Zoology,%
     14}
    715
    816\pagestyle{empty}
     
    1523        \vspace*{1.0cm}
    1624
    17         \Huge
    18         {\bf University of Waterloo E-Thesis Template for \LaTeX }
    19 
    20         \vspace*{1.0cm}
    21 
    22         \normalsize
     25        {\Huge\bf \eprint{title}}
     26
     27        \vspace*{1.0cm}
     28
    2329        by \\
    2430
    2531        \vspace*{1.0cm}
    2632
    27         \Large
    28         Pat Neugraad \\
     33        {\Large \eprint{author}} \\
    2934
    3035        \vspace*{3.0cm}
    3136
    32         \normalsize
    3337        A thesis \\
    3438        presented to the University of Waterloo \\
    3539        in fulfillment of the \\
    3640        thesis requirement for the degree of \\
    37         Doctor of Philosophy \\
     41        \eprint{degree} \\
    3842        in \\
    39         Zoology \\
     43        \eprint{program} \\
    4044
    4145        \vspace*{2.0cm}
     
    4549        \vspace*{1.0cm}
    4650
    47         \copyright\ Pat Neugraad 2017 \\
     51        \copyright{} \eprint{author} 2017 \\
    4852        \end{center}
    4953\end{titlepage}
  • doc/theses/andrew_beach_MMath/uw-ethesis.cls

    ra3f36dc r912cc7d7  
    1919%
    2020% Exported Names:
     21%   \ethesissetup{<key-value-pairs>}
     22%     Preforms set-up (or a reconfiguration) of the document class. See the
     23%     Set-Up Keys section for the keys that may be passed in. Use commas to
     24%     seperate key-value-pairs.
     25%
    2126%   \ifformat{<format>}{<true>}{<false>}
    2227%     If the document's format is <format> than expands to <true> otherwise
     
    2732%     initial setup depends on the document format but they can be overriden
    2833%     with options in <setup> (set hyperref's \hypersetup for details).
     34%
     35%   \eprint{<key>}
     36%     Expands to a human readable value tracked by the ethesis class. This
     37%     can be used to retreave and format values set during set up.
     38%
     39% Set-Up Keys:
     40%   author=<text>
     41%   title=<text>
     42%   program=<text>
     43%   subject=<text>
     44%   keywords=<text>
     45%   degree=masters|phd
     46%   faculty=ahs|arts|eng|env|math|sci
    2947\NeedsTeXFormat{LaTeX2e}
    30 \ProvidesClass{uw-ethesis}[2020/03/24 v0.1 UW-eThesis Template Document Class]
     48\ProvidesClass{uw-ethesis}[2020/10/25 v0.2 UW-eThesis Template Document Class]
    3149
    3250\RequirePackage{etoolbox}
     51\RequirePackage{xkeyval}
    3352
    3453% Requested Format:
     
    89108\renewcommand*{\bibname}{References}
    90109
    91 % Configurations
    92 \def\setThesisTitle#1{\newrobustcmd*{\ethesis@@title}{#1}}
    93 \def\setThesisAuthor#1{\newrobustcmd*{\ethesis@@author}{#1}}
    94 \def\setThesisSubject#1{\newrobustcmd*{\ethesis@@subject}{#1}}
    95 \def\setThesisKeywords#1{\newrobustcmd*{\ethesis@@keywords}{#1}}
     110\newrobustcmd*\ethesissetup[1]{\setkeys{ethesis}{#1}}
     111
     112\define@cmdkeys{ethesis}[ethesis@@]{%
     113  author,title,program,subject,keywords}
     114
     115\define@choicekey{ethesis}{degree}{masters,phd}{\def\ethesis@@degree{#1}}
     116\define@choicekey{ethesis}{faculty}{ahs,arts,eng,env,math,sci}%
     117  {\def\ethesis@@faculty{#1}}
     118
     119\newrobustcmd*\eprint[1]{
     120  \ifcsdef{ethesis@long#1}{\csuse{ethesis@long#1}}{%
     121    \ifcsdef{ethesis@@#1}{\csuse{ethesis@@#1}}{%
     122      % ERROR: (Check for a way to emit an actual error.)
     123      [UW-eThesis doesn't know how to print: #1 ]
     124    }
     125  }
     126}
     127
     128\newrobustcmd*\ethesis@longdegree{%
     129  \ifdefstring{\ethesis@@degree}{phd}{Doctor of Philosophy}{Masters}}
    96130
    97131% Includes the hyperref package loading a number of defaults.
Note: See TracChangeset for help on using the changeset viewer.