forked from bwoosley/unophd_latex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unophd.cls
232 lines (162 loc) · 5.12 KB
/
unophd.cls
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
% --- Class structure: declaration of options part
% ---
% This class extends the article class
% Read all the documentclass options; pass them to article,
% unless the file "<currentoption>.min" exists, then it is loaded
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
% --- Class structure: execution of options part
% ---
\ProcessOptions \relax
% --- Class structure: declaration of options part
% ---
\LoadClass{book}
\RequirePackage[inner=1.5in,outer=1in,top=1in,bottom=1in]{geometry}
\RequirePackage{fancyhdr}
\fancypagestyle{plain}{%
\fancyhf{}
\fancyhead[R]{\thepage}
\fancyhead[L]{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\renewcommand\rightmark{}
\renewcommand\leftmark{}
\RequirePackage{setspace}
\RequirePackage{etoolbox}
\doublespacing
%\def\@subtitle{None}
%\newcommand{\subtitle}[1]{\def\@subtitle{#1}}
\def\@degree{None}
\newcommand{\degree}[1]{\def\@degree{#1}}
\def\@major{None}
\newcommand{\major}[1]{\def\@major{#1}}
\def\@advisor{None}
\newcommand{\advisor}[1]{\def\@advisor{#1}}
%\def\@committeeOne{None}
%\newcommand{\committeeOne}[1]{\def\@committeeOne{#1}}
%\def\@committeeTwo{None}
%\newcommand{\committeeTwo}[1]{\def\@committeeTwo{#1}}
%\def\@committeeThree{None}
%\newcommand{\committeeThree}[1]{\def\@committeeThree{#1}}
\newcounter{cnt}
\newcommand\textlist{}
\newcommand\settext[2]{%
\csdef{text#1}{#2}}
\newcommand\addcommitteemember[1]{%
\stepcounter{cnt}%
\csdef{text\thecnt}{#1}}
\newcommand\getcommitteemember[1]{%
\csuse{text#1}}
%\newcounter{colnum}
%\newcommand\maketabularrow[1]{%
% \setcounter{colnum}{0}%
% \whileboolexpr
% { test {\ifnumcomp{\value{colnum}}{<}{#1}} }%
% {&\stepcounter{colnum}\thecolnum}
% }
%\makeatletter
\renewcommand\maketitle{%
\begin{titlepage}
\begin{center}
\vspace*{1cm}
{\huge{\textbf{\@title}}}
\vspace{0.5cm}
{\large
By
\vspace{1.5cm}
\textbf{\@author}
%\vfill
A DISSERTATION
Presented to the Faculty of
The Graduate College at the University of Nebraska
In Partial Fulfillment of Requirements
For the Degree of \@degree
Major: \@major
Under the Supervision of \@advisor
Omaha, Nebraska
\@date
\vfill
Supervisory Committee:
\@advisor
\newcounter{colnum}
%\newcommand\maketabularrow[1]{%
\setcounter{colnum}{0}
\whileboolexpr
{ test {\ifnumcomp{\value{colnum}}{<}{\thecnt}} }%
{\stepcounter{colnum}\getcommitteemember{\thecolnum}\\}
}
%}
%Dr. \@committeeOne
%Dr. \@committeeTwo
%Dr. \@committeeThree
%\@committee3
%A thesis presented for the degree of\\
%Doctor of Philosophy
%\vspace{0.8cm}
%Department Name\\
%University Name\\
%Country\\
%\@date
\end{center}
\end{titlepage}}
%\makeatother
\def\@abrv{None}
\newcommand{\abrv}[1]{\def\@abrv{#1}}
\def\@dateyear{None}
\newcommand{\dateyear}[1]{\def\@dateyear{#1}}
\def\@abstract{None}
\newcommand{\abstract}[1]{\def\@abstract{#1}}
\newcommand{\makeabstract}{%
\begin{center}
{\huge{\@title}}
\vspace{.5cm}
\@author, \@abrv
\vspace{.5cm}
University of Nebraska, \@dateyear
\vspace{.5cm}
Advisor: \@advisor
\vspace{.5cm}
\end{center}
\@abstract
}
% CODE STARTS HERE
% Based on `tocloft` package
\RequirePackage[titles]{tocloft}
\newcommand{\listmultimedianame}{List of Figures and Tables}
\newlistof{figtab}{loft}{\listmultimedianame}
\makeatletter
% Change the file extension of both lot and lof
\def\ext@figure{loft}
\def\ext@table{loft}
% Store the original `\thefigure` and `\thetable`
\let\tohe@thefigure\thefigure
\let\tohe@thetable\thetable
% Redefine them to contain a "dummy" `\tohe@list...`
\def\thefigure{\tohe@listfig\tohe@thefigure}
\def\thetable{\tohe@listtab\tohe@thetable}
% Make the two dummy commands truly dummy
\let\tohe@listfig\relax
\let\tohe@listtab\relax
% Store the original `\listoffigtab`
\let\tohe@listoffigtab\listoffigtab
% Redefine it in such a way that the dummy commands insert "Fig." or "Tab." respectively
\def\listoffigtab{%
\begingroup
\def\tohe@listfig{Fig.~}
\def\tohe@listtab{Tab.~}
\tohe@listoffigtab
\endgroup
}
% Change \listoffigtab spacing
\setlength{\cftfignumwidth}{5em}
\setlength{\cfttabnumwidth}{5em}
\setlength{\cftfigindent}{0pt}
\setlength{\cfttabindent}{0pt}
\makeatother
% CODE ENDS HERE
\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\def\tohe@listeq{Eq.~}
\newcommand{\myequations}[1]{%
\addcontentsline{equ}{myequations}{\protect\numberline{Eq.~\theequation}#1}\par}
\setlength{\cftmyequationsnumwidth}{3.5em}% Width of equation number in List of Equations
% TODO: add equations to above list, see http://tex.stackexchange.com/questions/173102/table-of-equations-like-list-of-figures for idea on how to do it