-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathuwthesis.sty
185 lines (149 loc) · 6.06 KB
/
uwthesis.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
% uwthesis.sty University of Wisconsin--Madison theses/dissertations
% based on pwasu.sty
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{uwthesis}[2012/04/25 v0.1 UW thesis style]
%% Only works with the memoir class!!!!!!!!!!!!!!!
% \@ifclassloaded{memoir}{\let\endpwuw\relax}{\let\endpwuw\endinput
% \PackageError{pwuw}{The pwuw package only works with the memoir class}{\@ehd}}
% \endpwuw
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% MARGINS (relying on functions from the memoir class)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Set the upper and lower margins (automatically adjust the textblock)
%% Upper margin needs to be larger than 1in to allow room for the page number
\setulmarginsandblock{1.5in}{1in}{*}
%% Left margin is a little larger to allow room for binding
%% Set the left and right margins (automatically adjust the textblock)
\setlrmarginsandblock{1.5in}{1in}{*}
%% Set the distance between the top of the page and the top of the header
%% The first argument is headdrop (distance from top of page to top of header)
\setheaderspaces{1in}{*}{*}
%% Implement the above changes
\checkandfixthelayout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% INTERFACE (variables for the user to set)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% For the title/committee page
\newcommand{\settitle}[1]{\def\uwtitle{#1}} % your title
\newcommand{\setauthor}[1]{\def\uwauthor{#1}} % you
\newcommand{\setdepartment}[1]{\def\uwdepartment{#1}} % your title
\newcommand{\masters}{\def\uwdegree{Master of Arts}}
\newcommand{\doctors}{\def\uwdegree{Doctor of Philosophy}}
\newcommand{\setgraddate}[1]{\def\uwgraddate{#1}} % graduation date
\newcommand{\setdefensedate}[1]{\def\uwdefensedate{#1}} % defense date
\newcommand{\setabstract}[1]{\def\uwabstract{#1}} % abstract
%% Members of the Final Oral Committee
\newcommand{\setfoca}[3]{\def\uwfoca{#1}\def\uwranka{#2}\def\uwdepa{#3}}
\newcommand{\setfocb}[3]{\def\uwfocb{#1}\def\uwrankb{#2}\def\uwdepb{#3}}
\newcommand{\setfocc}[3]{\def\uwfocc{#1}\def\uwrankc{#2}\def\uwdepc{#3}}
\newcommand{\setfocd}[3]{\def\uwfocd{#1}\def\uwrankd{#2}\def\uwdepd{#3}}
\newcommand{\setfoce}[3]{\def\uwfoce{#1}\def\uwranke{#2}\def\uwdepe{#3}}
\newcommand{\setfocf}[3]{\def\uwfocf{#1}\def\uwrankf{#2}\def\uwdepf{#3}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% REFERENCES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Make the reference section single-spaced
\let\oldbib\bibliography
\renewcommand*{\bibliography}{\SingleSpace\oldbib}
\setlength{\bibitemsep}{\onelineskip}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% TITLE/COMMITTEE page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Command to determine how the members of the committee are formatted
\newcommand{\boxfoc}[3]{\makebox[0.4\textwidth][r]{#1} $\cdot$ \makebox[0.4\textwidth][l]{#2 of #3}}
%% Command to create the title page
\newcommand{\thetitlepage}{%
\thispagestyle{empty}
\begin{center}
\vfill
{\Large\sc\uwtitle\par}
\vfill
\emph{by} \\
\uwauthor \\
\vfill
A dissertation submitted in partial fulfillment of \\
the requirements for the degree of \\
\vfill
\uwdegree \\
(\uwdepartment) \\
\vfill
\emph{at the} \\
\textsc{University of Wisconsin -- Madison}\\
\uwgraddate \\
\vfill
\noindent Defended on \uwdefensedate{}\\ Dissertation approved by the following members of the Final Oral Committee: \\
\ifx\uwfoca\undefined {}
\else \boxfoc{\uwfoca}{\uwranka}{\uwdepa} \\
\fi
\ifx\uwfocb\undefined {}
\else \boxfoc{\uwfocb}{\uwrankb}{\uwdepb} \\
\fi
\ifx\uwfocc\undefined {}
\else \boxfoc{\uwfocc}{\uwrankc}{\uwdepc} \\
\fi
\ifx\uwfocd\undefined {}
\else \boxfoc{\uwfocd}{\uwrankd}{\uwdepd} \\
\fi
\ifx\uwfoce\undefined {}
\else \boxfoc{\uwfoce}{\uwranke}{\uwdepe} \\
\fi
\ifx\uwfocf\undefined {}
\else \boxfoc{\uwfocf}{\uwrankf}{\uwdepf} \\
\fi
\vfill
\end{center}
\clearpage
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% COPYRIGHT Page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% If you're registering copyright
\newcommand{\thecopyrightpage}{%
\thispagestyle{empty}
\begin{center}
\null
\vfill
\copyright{} Copyright \uwauthor{} \uwgraddate{}\\
All Rights Reserved
\vspace{1in}
\end{center}
}
% If you don't want to pay the copyright fee
\newcommand{\theblankcopyrightpage}{%
\thispagestyle{empty}
\null
\vfill
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% UMI ABSTRACT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\theumiabstract}{%
\clearpage
%% The UMI abstract is not part of the document, so we skip pagination
\savepagenumber
\thispagestyle{empty}
\begin{center}
{\Large \textsc{\uwtitle}} \\
\uwauthor \\
Under the supervision of \uwranka \uwfoca \\
At the University of Wisconsin--Madison \\
\end{center}
\vspace{\baselineskip}
\uwabstract
\clearpage
\restorepagenumber
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Other STYLE stuff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% myheadings is used to define custom content for the headings
% We set headings on both odd and even pages blank, as required by UW
\pagestyle{myheadings}
\markboth{}{}
% By default, the first page of a chapter has a special style,
% so we need to explicitly set the chapter style to myheadings as well
\aliaspagestyle{chapter}{myheadings}
% Set memoir's DoubleSpacing
\DoubleSpacing
%%%%%%%%%%%%%%% end of *.sty file
\endinput