-
Notifications
You must be signed in to change notification settings - Fork 25
/
asudis.sty
334 lines (312 loc) · 10.5 KB
/
asudis.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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
% Dissertation style file by John Shumway.
% Attempts to meet requirements of the Graduate College of Arizona State
% University
% No guarantees - PLEASE CHECK FORMAT CAREFULLY!
%
% Setup the page layout (8 1/2 x 11 one and one-half spaced page, for 12pt font)
% 1.25" side margins, 1.00" top and bottom margins
%
%\geometry{top=71.0truept,hmargin=90.344truept,height=648.0truept,includefoot,
%letterpaper}%,showframe,showcrop}
%
\geometry{top=1.0in,hmargin=1.25in,height=9.0in,includefoot,
letterpaper}%,showframe,showcrop}
%
% Define singlespace and doublespace commands for 12pt fonts.
%
\newcommand{\doublespace} {
\renewcommand{\baselinestretch}{1.66}\small\normalsize
}
\newcommand{\exactdoublespace} {
\renewcommand{\baselinestretch}{1.8}\small\normalsize
}
\newcommand{\oneandhalfspace} {
\renewcommand{\baselinestretch}{1.24}\small\normalsize
}
\newcommand{\singlespace} {
\renewcommand{\baselinestretch}{0.9}\small\normalsize
}
\singlespace
%
% Title page.
%
% Define "\defensemonth" "\defenseyear" "\gradmonth" "\gradyear" commands for
% title page.
\title{\tt$\backslash$\string title}
\author{\tt$\backslash$\string author}
\newcommand{\defensemonth}[1]{\renewcommand{\@defensemonth}{#1}}
\newcommand{\@defensemonth}{\tt$\backslash$\string defensemonth}
\newcommand{\defenseyear}[1]{\renewcommand{\@defenseyear}{#1}}
\newcommand{\@defenseyear}{\tt$\backslash$\string defenseyear}
\newcommand{\gradmonth}[1]{\renewcommand{\@gradmonth}{#1}}
\newcommand{\@gradmonth}{\tt$\backslash$\string gradmonth}
\newcommand{\gradyear}[1]{\renewcommand{\@gradyear}{#1}}
\newcommand{\@gradyear}{\tt$\backslash$\string gradyear}
% Define "\chair" and \member commands for title page.
\newcommand{\chair}[1]{\renewcommand{\@chair}{#1}}
\newcommand{\@chair}{\tt$\backslash$\string chair}
\newcommand{\memberOne}[1]{\renewcommand{\@memberOne}{#1}}
\newcommand{\@memberOne}{\tt$\backslash$\string memberOne}
\newcommand{\memberTwo}[1]{\renewcommand{\@memberTwo}{#1}}
\newcommand{\@memberTwo}{\tt$\backslash$\string memberTwo}
\newcommand{\memberThree}[1]{\renewcommand{\@memberThree}{#1}}
\newcommand{\@memberThree}{\tt$\backslash$\string memberThree}
\newcommand{\memberFour}[1]{\renewcommand{\@memberFour}{#1}}
\newcommand{\@memberFour}{\tt$\backslash$\string memberFour}
% Define "\degreeName" command for Title Page.
% (should set to degree title eg "Doctor of Philosophy")
\newcommand{\degreeName}[1]{\renewcommand{\@degreeName}{#1}}
\newcommand{\@degreeName}{\tt$\backslash$\string degreeName}
% Define "\paperType" command for Title Page.
% (should set to "Dissertation" or "Thesis)
\newcommand{\paperType}[1]{\renewcommand{\@paperType}{#1}}
\newcommand{\@paperType}{\tt$\backslash$\string paperType}
%
% Redefine maketitle
\newlength{\fiveblanklines}\setlength{\fiveblanklines}{0.7 in}
\newlength{\tenblanklines}\setlength{\tenblanklines}{1.5 in}
\renewcommand\maketitle{
\enlargethispage{0.5in} %make extra room where page number would go
\thispagestyle{empty}
\noindent
\begin{minipage}[t][647.0truept][t]{\linewidth}
\exactdoublespace
\begin{center}
\@title\\
by\\
\@author
\end{center}
\singlespace
\vspace{\fiveblanklines}
\begin{center}
\singlespace
A \@paperType\ Presented in Partial Fulfillment\\
of the Requirements for the Degree\\
\@degreeName
\end{center}
\vspace{\tenblanklines}
\begin{center}
\singlespace
Approved \@defensemonth\ \@defenseyear\ by the\\
Graduate Supervisory Committee:\\
\ \\
\@chair, Chair\\
\@memberOne\\
\@memberTwo\\
\@memberThree\\
\@memberFour
\end{center}
\vfill
\begin{center}
\doublespace
ARIZONA STATE UNIVERSITY\\
\@gradmonth\ \@gradyear
\end{center}
\end{minipage}
\clearpage
}
%
% redefine abstract environment
%
\renewenvironment{abstract}{
\setcounter{page}{1}
\begin{center}
\doublespace
ABSTRACT
\end{center}
} {
\clearpage
}
%
% make acknowledgements environment
%
\newenvironment{acknowledgements}{
\begin{center}
\doublespace
ACKNOWLEDGMENTS
\end{center}
} {
\clearpage
}
%
% define \dedicationpage
%
%\newcommand{\dedicationpage}[1]{
%\clearpage\vspace*{0.5\textheight}
%\centerline{\itshape #1}\clearpage
\newcommand{\dedicationpage}[1]{
\begin{center}
\doublespace
{\itshape #1}
\end{center}
\clearpage
}
%
% Fix the table of contents
%
%
% Get leader dots right. They should all be spaced the same and need to be
% added for chapters and parts.
%
\renewcommand{\cftchapdotsep}{1.7}
\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}
\renewcommand{\cftpartdotsep}{1.7}
\renewcommand{\cftpartleader}{\cftdotfill{\cftpartdotsep}}
\renewcommand{\cftsecdotsep}{1.7}
\renewcommand{\cftsubsecdotsep}{1.7}
\renewcommand{\cfttabdotsep}{1.7}
\renewcommand{\cftfigdotsep}{1.7}
%
% Fonts for the chapter titles and part titles.
%
\renewcommand{\cftchapfont}{\rm}
\renewcommand{\cftpartfont}{\rm}
\renewcommand{\cftchappagefont}{\rm}
\renewcommand{\cftpartpagefont}{\rm}
%
% Indentations: These are in accordance with the chart at the top of page 4 of
% the document
% ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/tocloft/tocloft.pdf
% I simply moved each of the following sections "up" one level to get the
% indentations right.
%
\cftsetindents{chapter}{1.5em}{1.5em}
\cftsetindents{section}{3.0em}{2.3em}
\cftsetindents{subsection}{5.3em}{3.2em}
%
% Spacing between entries is taken care of by the double-spacing in this
% section, so no need for extra space before chapter or part entries.
%
\setlength{\cftbeforepartskip}{0truept}
\setlength{\cftbeforechapskip}{0truept}
%
% Get the title for the TOC normal sized, centered, and at the right height.
%
\setlength{\cftbeforetoctitleskip}{-64.0truept}
\setlength{\cftaftertoctitleskip}{0truept}
%
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\cfttoctitlefont}{\hfill\normalsize\rm}
\renewcommand{\cftaftertoctitle}{\hfill}
%
\newcommand{\cftlabel}{CHAPTER}
%
% Get rid of the header underline.
\renewcommand{\headrulewidth}{0pt}
%
% Get the header on subsequent pages right.
\renewcommand{\@cfttocstart}{
\newgeometry{top=1.0in,hmargin=1.25in,height=9.0in,
includehead,includefoot,letterpaper}%,showcrop,showframe}
\doublespace
\pagestyle{fancyplain}
\afterpage{\lhead{\cftlabel}\rhead{Page}}
}
\renewcommand{\@cfttocfinish}{
\restoregeometry\clearpage\afterpage{\lhead{}\rhead{}}
}
%
% Get the title for the LOT normal sized, centered, and at the right height.
%
\setlength{\cftbeforelottitleskip}{-64.0truept}
\setlength{\cftafterlottitleskip}{0truept}
%
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand{\cftlottitlefont}{\hfill\normalsize\rm}
\renewcommand{\cftafterlottitle}{\hfill}
%
% Get the title for the LOF normal sized, centered, and at the right height.
%
\setlength{\cftbeforeloftitleskip}{-64.0truept}
\setlength{\cftafterloftitleskip}{0truept}
%
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\cftloftitlefont}{\hfill\normalsize\rm}
\renewcommand{\cftafterloftitle}{\hfill}
%
% Here is a hack. The report class automatically adds a bit of extra vertical
% space between table and figure entries in the LOT and LOF if they are from
% different chapters. I have simply commmented out the lines in the definition
% of \@chapter which do this. As far as I can tell, the tocloft package doesn't
% have a command for this so a hack is necessary.
%
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}{\texorpdfstring{\MakeUppercase{#1}}{}}}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
%These two lines below are commented out.
%\addtocontents{lof}{\protect\addvspace{10\p@}}%
%\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
%
% Change some of the rules for float placement.
%
\setcounter{topnumber}{2} %Maximum 2 floats on top
\setcounter{bottomnumber}{1} %Maximum 1 float on bottom
%\renewcommand{\topfraction}{0.7} %Top float max size is 70%
%\renewcommand{\bottomfraction}{0.7} %Bottom float max size is 70%
\renewcommand{\topfraction}{0.9} %Top float max size is 70%
\renewcommand{\bottomfraction}{0.8} %Bottom float max size is 70%
\renewcommand{\floatpagefraction}{0.7}
%
% Fix chapter and section formats
%
% Chapters names are all caps, centered under "Chapter N"
\renewcommand{\@makechapterhead}[1]{
\begin{center}
\chaptername\ \thechapter\vspace{\baselineskip}\\
\uppercase\expandafter{#1}\vspace{\baselineskip}
\end{center}
}
% Numbers chapters, sections, and subsections
\setcounter{secnumdepth}{2}
% Center section titles
\renewcommand{\section}{\@startsection{section}{1}{0 in}{1em}{1em}{\centering}}
% Center and italicize subsection titles
\renewcommand{\subsection}{\@startsection{subsection}{2}{0 in}{1em}{1em}
{\centering\slshape}}
% This is a bit of a hack. I couldn't figure out a better way, but surely there
% is one. What I want is for the title page of the appendix to appear with
% just one double space between the words "Appendix A" and the title. So, here,
% I redefine the command with our \singlespace command, and then inside the
% actual appendix, I use \doublespace. This gets the spacing of the appendix
% title page right.
\renewcommand\appendix{\par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\gdef\@chapapp{\appendixname}%
\gdef\thechapter{\@Alph\c@chapter}
% I added this line.
\singlespace}
%
% Fix bibliography header.
%
\renewcommand\bibname{References}
\renewcommand\bibsection{
\begin{center}\uppercase\expandafter{\bibname}\vspace{1em}\end{center}
}
%
% Modify figure captions so that they print singlespace.
%
\renewcommand{\@makecaption}[2]{% #1 is e.g. Figure 1, #2 is captiontext
\singlespace
{\textbf{#1:} #2\par}
}
%
% Modify footnotes to be single spaced per footnote, double in between
%
\setlength{\footnotesep}{\baselineskip} %double space between footnotes
\let\oldfootnoterule\footnoterule %dont put a gap between the line and the first footnote
\def\footnoterule{\oldfootnoterule\vspace{-0.2\baselineskip}}
\let\oldfn\footnote %single space individual footnotes
\renewcommand{\footnote}[1]{\singlespace\oldfn{#1}\doublespace}