Ignore:
Timestamp:
Oct 25, 2020, 6:55:11 PM (13 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
ab8c6a6
Parents:
a3f36dc
Message:

In Andrew/MMath; added a configuration command.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.