Sharedwww / courses / xthesis.styOpen in CoCalc
Author: William A. Stein
1
\typeout{Document Style Option `thesis'.}
2
3
% Define the page heading to be page number only.
4
\newcommand{\properpagestyle}{
5
\pagestyle{myheadings}\markboth{}{}\markright{}}
6
7
% First thing we do is make sure that report has been loaded. A
8
% common error is to try to use suthesis as a documentstyle.
9
\@ifundefined{chapter}{\@latexerr{The `thesis' option should be used
10
with the `report' document style}{}}{}
11
12
% We need 1" margins except on the binding edge, where it is 1 1/2"
13
% Theses are single-sided, so we don't care about \evensidemargin
14
\oddsidemargin 0.5in \evensidemargin 0in
15
\marginparwidth 40pt \marginparsep 10pt
16
\topmargin 0pt \headsep .5in
17
\textheight 8.1in \textwidth 6in
18
19
% Disallow page breaks at hyphens (this will give some underfull vbox's,
20
% so an alternative is to use \brokenpenalty=100 and manually search
21
% for and fix such page breaks)
22
\brokenpenalty=10000
23
24
% Use 1.37 times the normal baseline-to-baseline skip
25
\renewcommand{\baselinestretch}{1.37}
26
27
% Redefine the macro used for floats (including figures and tables)
28
% so that single spacing is used.
29
% (Note \def\figure{\@float{figure}set single spacing} doesn't work
30
% because figure has an optional argument)
31
\def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
32
\@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner
33
\@parmoderr\@floatpenalty\[email protected]
34
\else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
35
\multiply\@tempcnta\@xxxii\advance\@tempcnta\[email protected]@n
36
\@tfor \@tempa :=#2\do
37
{\if\@tempa h\advance\@tempcnta \@ne\fi
38
\if\@tempa t\advance\@tempcnta \[email protected]\fi
39
\if\@tempa b\advance\@tempcnta 4\relax\fi
40
\if\@tempa p\advance\@tempcnta 8\relax\fi
41
}\global\count\@currbox\@tempcnta}\@fltovf\fi
42
\global\setbox\@currbox\vbox\bgroup
43
\def\baselinestretch{1}\@normalsize
44
\boxmaxdepth\[email protected]
45
\hsize\columnwidth \@parboxrestore}
46
47
% Redefine the macro used for footnotes to use single spacing
48
\long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize
49
\interlinepenalty\interfootnotelinepenalty
50
\splittopskip\footnotesep
51
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
52
\hsize\columnwidth \@parboxrestore
53
\edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
54
{\rule{\[email protected]}{\footnotesep}\ignorespaces
55
#1\strut}}}
56
57
% \author, \title are defined in report; here are the rest of the
58
% front matter defining macros
59
\def\university#1{\gdef\@university{#1}}
60
\def\address#1{\gdef\@address{#1}}
61
\def\dept#1{\gdef\@dept{#1}}
62
\def\submitdate#1{\gdef\@submitdate{#1}}
63
64
\def\@title{}
65
\def\@author{}
66
\def\@university{Harvard University}
67
\def\@address{Cambridge, Massachusetts}
68
\def\@dept{Mathematics}
69
\def\@submitdate{\ifcase\the\month\or
70
January\or February\or March\or April\or May\or June\or
71
July\or August\or September\or October\or November\or December\fi
72
\space \number\the\year}
73
74
\def\dedicate#1{\[email protected]\gdef\[email protected]{#1}}
75
76
\def\draft{\renewcommand{\properpagestyle}{\pagestyle{myheadings}
77
\markright{{\rm Draft Version -- \today}}}\[email protected]\properpagestyle}
78
\def\nobib{\[email protected]}
79
\def\nolistoffigures{\figurespagefalse}
80
\def\nolistoftables{\tablespagefalse}
81
\def\nofront{\[email protected]\permissionfalse\figurespagefalse\tablespagefalse}
82
83
% New if constructs: Default conditions:
84
\newif\ifpermission \permissiontrue
85
\newif\iffigurespage \figurespagetrue
86
\newif\iftablespage \tablespagetrue
87
\newif\[email protected] \[email protected]
88
\newif\[email protected] \[email protected]
89
\newif\[email protected] \[email protected]
90
\newif\[email protected] \[email protected]
91
\newif\[email protected] \[email protected]
92
\newif\[email protected] \[email protected]
93
\newif\[email protected] \[email protected]
94
\newif\[email protected] \[email protected]
95
\newif\[email protected] \[email protected]
96
97
\def\[email protected]#1{{\def\\{ \ignorespaces}#1}} % disallow explicit line breaks
98
99
\def\titlep{%
100
\thispagestyle{empty}%
101
\[email protected]
102
\begin{center} \Large DRAFT COPY\\ \large Printed \today \end{center}
103
\fi
104
\null\vskip0.5in
105
\begin{center}
106
\hyphenpenalty=10000\Large\uppercase\expandafter{\@title}
107
\end{center}
108
\null\vskip0.5in
109
\begin{center}
110
\large\rm A SENIOR THESIS OF \\
111
\@author
112
\end{center}
113
\null\vskip0.5in
114
\begin{center}
115
\footnotesize \rm THESIS ADVISOR: WILLIAM A. STEIN \\
116
\null\vskip0.3in
117
\footnotesize SUBMITTED IN PARTIAL FULFILLMENT OF THE HONORS REQUIREMENTS \\
118
FOR THE DEGREE OF BACHELOR OF ARTS TO THE \\
119
\null\vskip0.3in
120
DEPARTMENT OF MATHEMATICS \\
121
\uppercase\expandafter{\@university} \\
122
\null\vskip0.3in
123
\uppercase\expandafter{\@address} \\
124
\uppercase\expandafter{\@submitdate}
125
\end{center}
126
}
127
128
129
\def\beforepreface{
130
\typeout{Most over/underfulls in first few pages are the fault of dalthesis.}
131
\typeout{Ignore all them. If uncorrectable errors occur, notify staff.}
132
\pagenumbering{roman}
133
\pagestyle{plain}
134
\titlep
135
% \[email protected]\signaturepage\else\addtocounter{page}{1}\fi
136
% \ifpermission\permissionpage\else\addtocounter{page}{1}\fi
137
\[email protected]\[email protected]
138
\newpage\begin{center}\Large\em\null\vskip1in
139
\[email protected]
140
\vfill\end{center}
141
\fi\fi
142
\[email protected]\tableofcontents\else\addtocounter{page}{1}\fi
143
\newpage
144
\iftablespage
145
\addcontentsline{toc}{chapter}{List of Tables}\listoftables
146
\newpage
147
\fi
148
\iffigurespage
149
\addcontentsline{toc}{chapter}{List of Figures}\listoffigures
150
\newpage
151
\fi
152
}
153
154
\def\nonumchapter#1{%
155
\chapter*{#1}
156
\addcontentsline{toc}{chapter}{#1}}
157
158
\def\prefacesection#1{%
159
\chapter*{#1}
160
\addcontentsline{toc}{chapter}{#1}}
161
162
\newenvironment{dedication}{\newpage\begin{center}\Large\em\null\vskip1in}%
163
{\vfill\end{center}}
164
165
166
\def\afterpreface{\newpage
167
\pagenumbering{arabic}
168
\typeout{Dalthesis preface pages completed.}
169
\properpagestyle}
170
171
% Redefine \thebibliography to go to a new page and put an entry in the
172
% table of contents
173
\let\@ldthebibliography\thebibliography
174
\renewcommand{\thebibliography}[1]{%
175
\newpage
176
\addcontentsline{toc}{chapter}{Bibliography}
177
\@ldthebibliography{#1}
178
}
179
180
\let\@ldbibliography\bibliography
181
\renewcommand{\bibliography}[1]{\[email protected]\@ldbibliography{#1}\fi}
182
183
% Start out normal
184
\properpagestyle
185