Transitioned to DUT-centric namespace with aliases and bumped to v0.10.
[drexel-thesis.git] / drexel-thesis.dtx
1 % \def\fileversion{0.10}
2 % \def\filedate{2010/05/21}
3 % \iffalse meta-comment
4 %<*driver>
5 \ProvidesFile{drexel-thesis.dtx}
6 \documentclass{ltxdoc}
7 %</driver>
8 %<*class|driver>
9 \def\fileversion{0.10}
10 \def\filedate{2010/05/21}
11 %</class|driver>
12 %
13 % Copyright (C) 2010  C.Y. Ip
14 %                     Christopher D. Cera
15 %                     Christopher S. Dahn
16 %                     Daniel J. Cross
17 %                     David T. McWherter
18 %                     Evan Sultanik
19 %                     Jeff Arahamson
20 %                     Mitchell Peabody
21 %                     R. Rojas, E
22 %                     Robert Bernecky
23 %                     T. Tsankov
24 %                     Vincent A. Cicirello
25 %                     W. Trevor King
26 % -------------------------------------------------------
27
28 % This file may be distributed and/or modified under the
29 % conditions of the LaTeX Project Public License, either version 1.3
30 % of this license or (at your option) any later version.
31 % The latest version of this license is in:
32 %
33 %    http://www.latex-project.org/lppl.txt
34 %
35 % and version 1.3 or later is part of all distributions of LaTeX 
36 % version 2003/12/01 or later.
37 %
38 % Docstrip formatting initially based on Scott Pakin's
39 % dtxtut/cskeleton.dtx
40 %   http://www.ctan.org/tex-archive/info/dtxtut/
41 %
42 % \fi
43 %
44 % \iffalse meta-comment
45 %<class>\NeedsTeXFormat{LaTeX2e}
46 %<class>\ProvidesClass{drexel-thesis}
47 %<class> [\filedate\ \fileversion\ Drexel Thesis]
48 %
49 % Code for the .ini driver, see \S 2.1 ``The driver file'' of doc.dtx.
50 %<*driver>
51 \usepackage[colorlinks=true,]{hyperref}
52 \hypersetup{pdfauthor={W. Trevor King et al.}}
53 \hypersetup{pdftitle={drexel-thesis \fileversion\ documentation}}
54 %</driver>
55 % Include some useful commands from |xkeyval|'s |<preamble>|.
56 %<*driver>
57 \usepackage{xcolor}
58 \usepackage{listings}
59 \lstnewenvironment{command}{%
60   \lstset{columns=flexible,frame=single,backgroundcolor=\color{blue!20},%
61     xleftmargin=\fboxsep,xrightmargin=\fboxsep,escapeinside=`',gobble=1}}{}
62 \lstnewenvironment{example}{%
63   \lstset{basicstyle=\footnotesize\ttfamily,columns=flexible,frame=single,%
64     backgroundcolor=\color{yellow!20},xleftmargin=\fboxsep,%
65     xrightmargin=\fboxsep,gobble=1}}{}
66 %</driver>
67 % Define a quick and dirty version of |xkeyval|'s |\DescribeOptions|.
68 %<*driver>
69 \newenvironment{option}[1]{\begin{macro}{#1}}
70                           {\end{macro}}
71 %</driver>
72 % Some commonly used abbreviations from |classes.dtx|.
73 %<*driver>
74 \newcommand*{\Lopt}[1]{\textsf {#1}}
75 \newcommand*{\file}[1]{\texttt {#1}}
76 \newcommand*{\Lcount}[1]{\textsl {\small#1}}
77 \newcommand*{\pstyle}[1]{\textsl {#1}}
78 %</driver>
79 % Provide easy access to the @ character.  Note that this, like the
80 % short-verbatim markers ||, does not work in |\changes| sections
81 % because of the way they are cached to the glossary file.  If you
82 % find a way to make them work there, let me know :).
83 %<*driver>
84 \newcommand*{\textat}{\makeatletter @ \makeatother}
85 %</driver>
86 %<*driver>
87 \makeatletter
88 \def\DescribeOption#1{\leavevmode\@bsphack
89               \marginpar{\raggedleft\PrintDescribeOption{#1}}%
90               \SpecialOptionIndex{#1}\@esphack\ignorespaces}
91 \def\PrintDescribeOption#1{\strut\emph{option}\\\MacroFont #1\ }
92 \def\SpecialOptionIndex#1{\@bsphack
93     \index{#1\actualchar{\protect\ttfamily#1}
94            (option)\encapchar usage}%
95     \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
96            usage}\@esphack}
97 \def\DescribeOptions#1{\leavevmode\@bsphack
98   \marginpar{\raggedleft\strut\emph{options}%
99   \@for\@tempa:=#1\do{%
100     \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa
101   }}\@esphack\ignorespaces}
102 \makeatother
103 %</driver>
104 %<*driver>
105 \EnableCrossrefs
106 \RecordChanges
107 \EnableCrossrefs         
108 \begin{document}
109   \DocInput{drexel-thesis.dtx}
110 \end{document}
111 %</driver>
112 % \fi
113 %
114 % \CheckSum{0}
115 %
116 % \CharacterTable
117 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
118 %   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
119 %   Digits        \0\1\2\3\4\5\6\7\8\9
120 %   Exclamation   \!     Double quote  \"     Hash (number) \#
121 %   Dollar        \$     Percent       \%     Ampersand     \&
122 %   Acute accent  \'     Left paren    \(     Right paren   \)
123 %   Asterisk      \*     Plus          \+     Comma         \,
124 %   Minus         \-     Point         \.     Solidus       \/
125 %   Colon         \:     Semicolon     \;     Less than     \<
126 %   Equals        \=     Greater than  \>     Question mark \?
127 %   Commercial at \@     Left bracket  \[     Backslash     \\
128 %   Right bracket \]     Circumflex    \^     Underscore    \_
129 %   Grave accent  \`     Left brace    \{     Vertical bar  \|
130 %   Right brace   \}     Tilde         \~}
131 %
132 %
133 % \changes{0.1}{2006/01/18}{Rewrite by Daniel J.~Cross}
134 % \changes{0.2}{2010/01/09}{W.~Trevor King transitioned from thesis.cls
135 %   to drexel-thesis.dtx and did a good deal of reorganizing.}
136 % \changes{0.3}{2010/01/13}{W.~Trevor King merged drexelthesis.cls
137 %   developed in the Comp.~Sci.~Department by Jeff Abrahamson,
138 %   Evan Sultanik, C.Y.~Ip, Christopher S.~Dahn, Christopher D.~Cera,
139 %   Mitchell Peabody, David T.~McWherter, and Vincent A.~Cicirello.
140 %   Based on the University of Toronto Thesis \LaTeXe\ Class.  Also
141 %   greatly improved the documentation by incorperating bits of
142 %   the base/*.dtx files.}
143 % \changes{0.4}{2010/02/23}{W.~Trevor King repositioned hyperref
144 %   inclusion for proper hyperref overriding.  The previous
145 %   implementation couldn't handle $\backslash$label for
146 %   $\backslash$paragraph and some other section levels.  The page
147 %   number for the reference was correct, but the link went to the
148 %   label's parent chapter.}
149 % \changes{0.5}{2010/03/03}{W.~Trevor King use hypcap for better
150 %   caption hyperlink anchor placement.}
151 % \changes{0.6}{2010/03/11}{W.~Trevor King fixed
152 %   $\backslash$if$@$final handling.  Previous versions used
153 %   it more like a hypothetical $\backslash$if$@$finalspace.
154 %   Also adjusted theindex to use a listed$@$schapter.}
155 % \changes{0.10}{2010/05/21}{W.~Trevor King added $\backslash$DUT\*
156 %   aliases for all public macros and environments and renamed
157 %   $\backslash$defmonth and $\backslash$defyear to
158 %   $\backslash$DUTmonth and $\backslash$DUTyear for consistency with
159 %   the new aliases.}
160 %
161 % \MakeShortVerb{\|}
162 % \newcommand{\pkg}[1]{\textsf{#1}}
163 % \newcommand{\cls}[1]{\textsf{#1}}
164 % ^^A\newcommand{\BibTeX}{{\scshape Bib}\TeX}
165
166 % \title{The \textsf{drexel-thesis} class\thanks{This document
167 %   corresponds to \textsf{drexel-thesis}~\fileversion, dated \filedate.}}
168 % \author{W.~Trevor King \\\texttt{wking@drexel.edu}
169 %         \and Daniel J.~Cross \and T.~Tsankov \and R.~Rojas.}
170 % \date{\filedate}
171 %
172 % \maketitle
173 %
174 %
175 % \section{Introduction}
176 %
177 % This package defines a \LaTeX\ thesis class for Drexel University
178 % conforming to the
179 % \href{http://www.library.drexel.edu/files/services_documents/thesismanual.pdf}
180 %   {Drexel University Thesis Manual version 2009/06/01}.
181 %
182 % \section{Usage}
183 %
184 % To write a thesis, you load the Drexel thesis definitions by loading
185 % the \pkg{drexel-thesis} class at the beginning of your
186 % \LaTeX\ document with the |\documentclass| command.  For example,
187 % \begin{example}
188 %   \documentclass{drexel-thesis}
189 % \end{example}
190 %
191 % \subsection{Options}
192 %
193 % \DescribeOptions{final,draft}
194 % The default option (selected if not options are passed) is
195 % \Lopt{final} mode, which has all the proper formatting and spacing
196 % for your final product. The other main option is \Lopt{draft} mode,
197 % which reduces all the spacing in the document, so might be helpful
198 % when printing out drafts (saves paper).
199 %
200 % \Lopt{final} mode corresponds to (with Thesis Manual chapter and
201 % verse) \\
202 % \begin{tabular}{r p{0.8\textwidth}}
203 %   \Lopt{oneside} & 1.5 Library Submission Information, Print
204 %     Version: ``All copies must be: \ldots Typed/printed on only one
205 %     side of the page (not double-sided).'' \\
206 %   \Lopt{finalspace} & Assorted single, double, and triple spacing
207 %   directives. \\
208 %   \Lopt{dottedtoc} & From the example on p17.
209 % \end{tabular}
210 %
211 % \Lopt{draft} mode corresponds to \\
212 % \begin{tabular}{r p{0.8\textwidth}}
213 %   \Lopt{twoside} & Save space. \\
214 %   \Lopt{draftspace} & Save space. \\
215 %   \Lopt{dottedtoc} & Might as well be consistent with \Lopt{final}. \\
216 %   \Lopt{mydraftwatermark} & It's good to have a timestamp. \\
217 % \end{tabular}
218 %
219 % \DescribeOption{subfig}
220 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/subfig/}{\pkg{subfig}}
221 % makes it easy to include and caption multi-part figures.  However,
222 % getting \pkg{subfig} to cooperate with \pkg{floatrow} and
223 % \pkg{tocloft} can be tricky.  If you want to use \pkg{subfig}, just
224 % pass the \Lopt{subfig} option to \cls{drexel-thesis}, and all the
225 % pesky details will be taken care of.  See \S
226 % \ref{sec:better-example} for an example.
227 %
228 % \DescribeOption{finalspace}
229 % Loosen spacing.
230 %
231 % \DescribeOption{draftspace}
232 % Tighten spacing.
233 %
234 % \DescribeOptions{dottedtoc,boldtoc,
235 %                  dottedpart,boldpart,
236 %                  dottedchapter,boldchapter}
237 % These options change how the relevant table of contents lines are
238 % printed.  \LaTeX\ defaults to bold but not dots.  The \Lopt{*toc}
239 % options set all of the types.  For example, \Lopt{boldtoc} is
240 % equivalent to \Lopt{boldchapter,boldpart}.
241 %
242 % \DescribeOption{indenttoc}
243 % The example table of contents in the Manual p17 does not indent
244 % section entries, etc., so neither does \cls{drexel-thesis}.  If you
245 % \emph{do} want pretty, indented TOCs, like the \LaTeX\ defaults pass
246 % \Lopt{indenttoc} to \cls{drexel-thesis}.
247 %
248 % \DescribeOption{draftwatermark}
249 % \Lopt{draftwatermark} adds ``DRAFT \meta{date}'' watermarks to each
250 % page.  A useful way to remember that the version you're looking at
251 % is not final.  Also helps reviewers tell you what version they're
252 % correcting.  Requires the \pkg{draftmark} package.
253 %
254 % \DescribeOption{mydraftwatermark}
255 % \Lopt{mydraftwatermark} is similar to \Lopt{draftwatermark} but
256 % depends on the possibly more common \pkg{xcolor}, \pkg{eso-pic},
257 % and \pkg{graphicx}.
258 %
259 % \DescribeOption{indentfirst}
260 % \Lopt{indentfirst} indents the first paragraph after sections etc.
261 %
262 %
263 % \subsubsection{Interesting \cls{book} options}
264
265 % \DescribeOption{oneside}
266 % Setup output for one-sided printing.
267 %
268 % \DescribeOption{twoside}
269 % Setup output for two-sided printing.
270 %
271 % \DescribeOption{leqno}
272 % \Lopt{leqno} places the numbering of formulae on the left hand side
273 % instead of the right.
274 %
275 % \DescribeOption{fleqn}
276 % \Lopt{fleqn} typesets displayed formulae left-aligned instead of
277 % centered.
278 %
279 %
280 % \subsection{Macros}
281 %
282 % To help deal with name collisions, all \cls{drexel-thesis} macros
283 % have ``secret'' aliases.  For example, |\author| can also be used as
284 % |\DUTauthor|.  This is useful if one of your packages clobbers a
285 % \cls{drexel-thesis} macro, but you still want to use the original.
286 % \begin{example}
287 %   \documentclass{drexel-thesis}
288 %   \renewcommand{\author}[1]{I'm forgetting about your author! Muahahaha!}
289 %   \DUTauthor{Your Name Here}
290 %   ...
291 % \end{example}
292 %
293 % \begin{command}
294 %   `\cs{author}\marg{name}'
295 % \end{command}
296 % \DescribeMacro{\author}
297 % \DescribeMacro{\DUTauthor}
298 % Use this macro to set your full name to \meta{name}, including
299 % your middle initial or name.  For example
300 % \begin{example}
301 %   \name{Richard P. Feynman}
302 % \end{example}
303 % See the Manual \S 3.1 p8.
304 %
305 % \begin{command}
306 %   `\cs{title}\marg{title}'
307 % \end{command}
308 % \DescribeMacro{\title}
309 % \DescribeMacro{\DUTtitle}
310 % Use this macro to set your thesis title to \meta{name}.  For example
311 % \begin{example}
312 %   \title{A New Approach to Quantum Theory}
313 % \end{example}
314 % See the Manual p16.
315 %
316 % \begin{command}
317 %   `\cs{advisor}\marg{name}'
318 % \end{command}
319 % \DescribeMacro{\advisor}
320 % \DescribeMacro{\DUTadvisor}
321 % Use this macro to set your advisor's name to \meta{name}.  For
322 % example
323 % \begin{example}
324 %   \advisor{John A. Wheeler, Ph.D.}
325 % \end{example}
326 % You can set multiple advisors, if appropriate, by calling |\advisor|
327 % multiple times.
328 % \begin{example}
329 %   \advisor{John A. Wheeler, Ph.D.}
330 %   \advisor{Advisor 2}
331 % \end{example}
332 % See the Manual \S 3.1 p8.
333 %
334 % \begin{command}
335 %   `\cs{DUTmonth}\marg{month}'
336 %   `\cs{DUTyear}\marg{year}'
337 % \end{command}
338 % \DescribeMacro{\DUTmonth}
339 % \DescribeMacro{\DUTyear}
340 % Use these macros to set the month with \meta{month} (spelled out)
341 % and year with \meta{year} (four digits) of your thesis defense.  For
342 % example
343 % \begin{example}
344 %   \DUTmonth{June}
345 %   \DUTyear{1942}
346 % \end{example}
347 % See the Manual \S 3.1 p8.
348 % There are no non-|DUT| versions of these commands to avoid
349 % collisions with the plain \TeX\ |\month| and |\year| (see the
350 % \href{http://www.tug.org/utilities/plain/cseq.html#month-rp}{month}
351 % and
352 % \href{http://www.tug.org/utilities/plain/cseq.html#year-rp}{year}
353 % entries in the HTML version of David Bausum's \emph{TeX Reference
354 % Manual}).
355 %
356 % \begin{command}
357 %   `\cs{degree}\marg{degree}'
358 % \end{command}
359 % \DescribeMacro{\degree}
360 % \DescribeMacro{\DUTdegree}
361 % Set your target degree with \meta{degree}.  From the Manual \S 3.1
362 % p8.
363 % \begin{quote}
364 %   Write out the name of the degree for which you are a candidate.
365 %   All Ph.D.\ candidates must use |Doctor of Philosophy|.  All
366 %   Master's degree candidates should use the precise degree name
367 %   (e.g., |Master of Science in Mechanical Engineering|).
368 % \end{quote}
369 % So, for a Ph.D candidate,
370 % \begin{example}
371 %   \degree{Doctor of Philosophy}
372 % \end{example}
373 %
374 % \begin{command}
375 %   `\cs{copyrighttext}\marg{text}'
376 % \end{command}
377 % \DescribeMacro{\copyrighttext}
378 % \DescribeMacro{\DUTcopyrighttext}
379 % Use this macro to set the copyright text to \meta{text}.
380 % The default value is ``All Rights Reserved.''.
381 % \begin{example}
382 %   \copyrighttext{Released to the Public Domain.}
383 % \end{example}
384 % See the Manual \S 3.2 p9.
385 %
386 % \begin{command}
387 %   `\cs{copyrighttextCCBYSA}'
388 % \end{command}
389 % \DescribeMacro{\copyrighttextCCBYSA}
390 % \DescribeMacro{\DUTcopyrighttextCCBYSA}
391 % There are a number of predefined copyright messages for ease of use \\
392 % \begin{tabular}{l l}
393 %   |\copyrighttextCCBYSA| &
394 %     Creative Commons Attribution-ShareAlike License Version 3.0.\\
395 % \end{tabular}
396 %
397 % \begin{command}
398 %   `\cs{tableofcontents}'
399 % \end{command}
400 % \DescribeMacro{\tableofcontents}
401 % \DescribeMacro{\DUTtableofcontents}
402 % Write the table of contents (Manual \S 3.5 p9).  You can control the
403 % verbosity by setting |\tocdepth| according to the following table
404 % (\href{http://www.image.ufl.edu/help/latex/intext.shtml}{source}). \\
405 % \begin{tabular}{l l l}
406 %   Depth in document & Section Command & Depth for |\secnumdepth| Command \\
407 %   -1 & |\part| & 1 \\
408 %    0 & |\chapter| & 2 \\
409 %    1 & |\section| & 3 \\
410 %    2 & |\subsection| & 4 \\
411 %    3 & |\subsubsection| & 5 \\
412 %    4 & |\paragraph| & 6 \\
413 %    5 & |\subparagraph| & 7
414 % \end{tabular} \\
415 % For example, to expose everything down to and including the
416 % |\subsection| level, you would add
417 % \begin{example}
418 %   \setcounter{tocdepth}{2}
419 % \end{example}
420 % to your preamble (the section before |\begin{document}|, not the
421 % |preamble| environment discussed below).
422 %
423 % Note that the Manual \S 3.5 p9 requires ``List chapter titles and at
424 % least the first and second order subdivisions.'', which corresponds
425 % to a |\tocdepth| of at least 2.
426 %
427 % \begin{command}
428 %   `\cs{listoftables}'
429 % \end{command}
430 % \DescribeMacro{\listoftables}
431 % \DescribeMacro{\DUTlistoftables}
432 % Write the List of Tables page (Manual \S 3.6 p10).
433 % Skip if you have no tables in your thesis.
434 %
435 % \begin{command}
436 %   `\cs{listoffigures}'
437 % \end{command}
438 % \DescribeMacro{\listoffigures}
439 % \DescribeMacro{\DUTlistoffigures}
440 % Write the List of Figures page (Manual \S 3.7 p10).
441 % Skip if you have no figures in your thesis.
442 %
443 % \begin{command}
444 %   `\cs{blanklines}\marg{num}'
445 % \end{command}
446 % \DescribeMacro{\blanklines}
447 % \DescribeMacro{\DUTblanklines}
448 % Insert \meta{num} blank lines.  For example
449 % \begin{example}
450 %   \blanklines{2}
451 % \end{example}
452 % The skipped lines are always \emph{single spaced} lines, regardless
453 % of the current line spacing in the environment calling this macro.
454 %
455 % \begin{command}
456 %   `\cs{iffinal}\marg{final-mode-action}\marg{draft-mode-action}'
457 % \end{command}
458 % \DescribeMacro{\iffinal}
459 % \DescribeMacro{\DUTiffinal}
460 % Include \Lopt{final}- or \Lopt{draft}-specific code.
461 % \begin{example}
462 %   We're in \iffinal{final}{draft} mode!
463 % \end{example}
464 %
465 %
466 % \subsection{Environments}
467 %
468 % To help deal with name collisions, all \cls{drexel-thesis}
469 % environments have ``secret'' aliases.  For example, |preamble| can
470 % also be used as |DUTpreamble|.  This is useful if one of your
471 % packages clobbers a \cls{drexel-thesis} environment, but you still
472 % want to use the original.
473 % \begin{example}
474 %   \documentclass{drexel-thesis}
475 %   \renewenvironment{preamble}{%
476 %     What preamble?\begingroup\color{white}}{\endgroup}
477 %   \begin{document}
478 %   \begin{DUTpreamble}
479 %   Thwarted again, evil one!
480 %   ...
481 % \end{example}
482 %
483 %
484 % \DescribeEnv{preamble}
485 % \DescribeEnv{DUTpreamble}
486 % Generalize the |\frontmatter| for the thesis, setting up page
487 % numbering, including the title page, copyright page etc.  The
488 % |preamble| environment should contain the following elements
489 % (in order, see the Manual p8)
490 % \begin{itemize}
491 %   \item |dedication| environment (optional)
492 %   \item |acknowledgments| environment (optional)
493 %   \item |\tableofcontents|
494 %   \item |\listoftables|
495 %   \item |\listoffigures|
496 %   \item |abstract| environment
497 % \end{itemize}
498 % This will take care of everything from the title page (Manual \S 3.1),
499 % up through the blank page before the text (Manual \S 3.9).
500 %
501 % \DescribeEnv{dedications}
502 % \DescribeEnv{DUTdedications}
503 % Set the dedications text.
504 % Highlights from the Manual \S 3.3 p9:
505 % \begin{quote}
506 %   The |Dedications| page is optional.
507 % \end{quote}
508 %
509 % \DescribeEnv{acknowledgments}
510 % \DescribeEnv{DUTacknowledgments}
511 % Set the acknowledgments text.
512 % Highlights from the Manual \S 3.4 p9:
513 % \begin{quote}
514 %   The |Acknowledgments| page is optional, but most theses do
515 %   include a brief statement of thanks or recognition of any special
516 %   assistance.
517 % \end{quote}
518 %
519 % \DescribeEnv{abstract}
520 % \DescribeEnv{DUTabstract}
521 % Set the thesis abstract text.  In the Thesis Manual, see \S 3.8
522 % Abstract (p10) for details, p20 for an example.
523 %
524 % Highlights from the Manual:
525 % \begin{quote}
526 %   The abstract is a summary that allows readers to determine the
527 %   value of reading the full thesis.  It should include a statement
528 %   of the problem, an outline of procedures or methods, and a summary
529 %   of results and conclusions.
530 % \end{quote}
531 % \begin{itemize}
532 %   \item Word limits: 600 for a Master's thesis, 350 for a Ph.D.\ thesis.
533 % \end{itemize}
534 %
535 % \DescribeEnv{thesis}
536 % \DescribeEnv{DUTthesis}
537 % Set the thesis text.  In the Thesis Manual, see \S 3.10 Thesis (p11)
538 % for details.
539 %
540 % Highlights from the Manual:
541 % \begin{quote}
542 %   Divide the text into its major parts/chapters/subsections.  No
543 %   fixed arrangement is necessary.  The major parts may contain such
544 %   subjects as introduction, general argument, description of
545 %   experimental procedures, research methods, discussion, summary,
546 %   conclusions, recommendations, and other pertinent topics that are
547 %   necessary for a complete understanding on the part of a
548 %   sophisticated or professional reader.
549 % \end{quote}
550 %
551 % \DescribeEnv{vita}
552 % \DescribeEnv{DUTvita}
553 % Set the thesis vita text (Ph.D.\ only).  See the Manual \S 3.15 p12,
554 % ``Vita'', for details.
555 %
556 % Highlights from the Manual:
557 % \begin{quote}
558 %   The Vita is a biography of the student written in the third person
559 %   in either essay or outline form.  It should include the full name,
560 %   place and date of birth (optional), country of citizenship
561 %   (optional), institutions attended, degrees and honors received,
562 %   titles of publications, teaching and professional experience, and
563 %   other pertinent data.  The Vita must be one page or less.
564 % \end{quote}
565 %
566 %
567 % \subsection{Hints}
568 %
569 %
570 % \subsubsection{Package installation}
571 % \label{sec:dependencies}
572 %
573 % All the packages this class depends on must be installed somewhere
574 % in your texmf tree (they probably already are).  If not, you will
575 % recieve warning messages on compilation such as
576 % \begin{example}
577 %   ! LaTeX Error: File `missing-package.sty' not found.
578 % \end{example}
579 % You should then install the missing package(s) using your operating
580 % systems package manager, or grab the missing package from
581 % \href{http://www.ctan.org/}{CTAN}, and install them following TODO.
582 %
583 %
584 % \subsubsection{Tables and Figures}
585 %
586 % \pkg{drexel-thesis} loads
587 % \href{http://www.ctan.org/tex-archive/macros/latex/required/graphics/}{\pkg{graphicx}}
588 % to define the |\includegraphics| macro,
589 % \href{http://www.ctan.org/tex-archive/macros/latex/required/caption/}{\pkg{caption}}
590 % for pretty caption formatting,
591 % \href{http://www.ctan.org/tex-archive/macros/latex/required/floatrow/}{\pkg{floatrow}}
592 % for placing captions, and
593 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/}{\pkg{hypcap}}
594 % for placing caption anchors.
595 %
596 % Simple float definitions will look like
597 % \begin{example}
598 %   \begin{table}
599 %      \caption{Some caption text}
600 %      \begin{tabular}{...}
601 %        ...
602 %      \end{tabular}
603 %   \end{table}
604 % \end{example}
605 % or
606 % \begin{example}
607 %   \begin{float}
608 %      \includegraphics{...}
609 %      \caption{Some caption text}
610 %   \end{float}
611 % \end{example}
612 % For more useful float information, see the examples in \S
613 % \ref{sec:better-example-part} and the
614 % \href{http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions}
615 %   {\LaTeX\ wikibook page}.
616 %
617 %
618 % \subsubsection{Citations}
619 %
620 % I highly recommend using \BibTeX\ and
621 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/natbib/}{\pkg{natbib}}.
622 % See \S \ref{sec:better-example} for a simple example.
623 %
624 % Suggested options:\\
625 % \begin{tabular}{r p{0.8\textwidth}}
626 %   |super| & selects citations in superscript mode. \\
627 %   |sort&compress| & automatically sorts and compresses compound
628 %     citations (|\pcite{a,b,...}|).
629 % \end{tabular}
630 %
631 %
632 % \subsubsection{References}
633 %
634 % Easier cross referencing with
635 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/cleveref/}{\pkg{cleveref}}.
636 % Is a wonderful tool for easy, consistent crosslinking via |\cref|,
637 % |\Cref|, etc..  The manual is also very good.
638 % Note that if you use |\part|s in your document, you need to tell
639 % \pkg{cleveref} how to deal with them:
640 % \begin{example}
641 %   \usepackage{cleveref}
642 %   \crefname{part}{part}{parts}
643 % \end{example}
644 %
645 %
646 % \subsubsection{Hyperlinks}
647 %
648 % \cls{drexel-thesis} loads
649 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/}{\pkg{hyperref}}.
650 % with the options:\\
651 % \begin{tabular}{r p{0.8\textwidth}}
652 %   |colorlinks| & color the link letters instead of drawing colored boxes. \\
653 % \end{tabular}
654 %
655 % If running with a pdftex-based driver, |\author|, |\title|, and
656 % |\degree| automatically set |pdfauthor|, |pdftitle|, and
657 % |pdfsubject| respectively.  You can use the |\hypersetup| macro to
658 % set options overriding these defaults.
659 %
660 %
661 % \subsubsection{Developing large \LaTeX\ documents}
662 %
663 % A thesis may take a while to compile, especially if it contains
664 % lots of images, etc..  One way to save time, is to use |\includeonly|
665 % when including chapter \file{*.tex} files (see
666 % \href{http://en.wikibooks.org/wiki/TeX/includeonly}{the \TeX\ Wikibook}).
667 % Usage would be something like
668 % \begin{example}
669 % \documentclass{drexel-thesis}
670 % ...
671 % \includeonly{chapter2.tex,chapter3.tex}
672 % \begin{document}
673 % ...
674 % \begin{thesis}
675 % \include{chapter1.tex}
676 % \include{chapter2.tex}
677 % \include{chapter3.tex}
678 % \include{chapter4.tex}
679 % \end{thesis}
680 % ...
681 % \end{document}
682 % \end{example}
683 % which would only compile chapters two and three.  Don't confuse the
684 % similar commands |\include| and |\input|.  The more fundamental
685 % |\input| just inserts the file contents at that point, while
686 % |\include|
687 % \begin{itemize}
688 %   \item may only be used after |\begin{document}|
689 %   \item acts like |\clearpage \input{} \clearpage|
690 %   \item will not crash on nonexistent files
691 % \end{itemize}
692 %
693 %
694 % \StopEventually{\pagebreak\PrintChanges}
695 %
696 %
697 % \section{Implementation}
698 %    \begin{macrocode}
699 %<*class>
700 %    \end{macrocode}
701 %
702 % For simplicity, we'll derive everything from the standard \cls{book}
703 % class.
704 %
705 %
706 % \subsection{Option Processing}
707 %
708 % Include
709 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/xkeyval/}{\pkg{xkeyval}}
710 % for easier option parsing.  If the package is not installed on your system,
711 % see \S \ref{sec:dependencies} for installation instructions.
712 %    \begin{macrocode}
713 \RequirePackage{xkeyval}
714 %    \end{macrocode}
715 %
716 % Define some booleans to store option states
717 %    \begin{macrocode}
718 \newif\if@mainmatter \@mainmattertrue
719 \newif\if@DUT@subfigopt
720 \newif\if@dottedchapter 
721 \newif\if@boldchapter
722 \newif\if@boldpart
723 \newif\if@dottedpart
724 \newif\if@indenttoc
725 \newif\if@draftwatermark
726 \newif\if@mydraftwatermark
727 \newif\if@indentfirst
728 \newif\if@final
729 %    \end{macrocode}
730 %
731 % \begin{macro}{\iffinal}
732 % Setup a user-friendly means for including \Lopt{final}- or
733 % \Lopt{draft}-specific code.
734 % \changes{0.7}{2010/03/14}{W.~Trevor King added macro.}
735 %    \begin{macrocode}
736 \newcommand\iffinal[2]{\if@final #1\else #2\fi}
737 %    \end{macrocode}
738 % \end{macro}
739 %
740 % \begin{option}{subfig}
741 % Set \Lopt{subfig} flag
742 %    \begin{macrocode}
743 \DeclareOptionX{subfig}{\@DUT@subfigopttrue}
744 %    \end{macrocode}
745 % \end{option}
746 %
747 % \begin{option}{finalspace}
748 %    \begin{macrocode}
749 \DeclareOptionX{finalspace}{
750   \setlength\overfullrule{0pt}
751   \def\@cont@sep{1} % content page separation (# blanklines between entries)
752   \def\@ssp{1} % single space
753   \def\@dsp{2} % double space
754   \def\@tsp{3} % triple space
755 }
756 %    \end{macrocode}
757 % \end{option}
758 % \begin{option}{draftspace}
759 %    \begin{macrocode}
760 \DeclareOptionX{draftspace}{
761   \setlength\overfullrule{5pt}
762   \def\@cont@sep{0} % content page separation (# blanklines between entries)
763   \def\@ssp{1} % single space
764   \def\@dsp{1} % double space
765   \def\@tsp{2} % triple space
766 %    \end{macrocode}
767 %  Don't force chapters onto right-hand pages.
768 %    \begin{macrocode}
769   \PassOptionsToClass{openany}{book}
770 }
771 %    \end{macrocode}
772 % \end{option}
773 %
774 % \begin{option}{dottedpart}
775 %    \begin{macrocode}
776 \DeclareOptionX{dottedpart}{\@dottedparttrue}
777 %    \end{macrocode}
778 % \end{option}
779 % \begin{option}{dottedchapter}
780 %    \begin{macrocode}
781 \DeclareOptionX{dottedchapter}{\@dottedchaptertrue}
782 %    \end{macrocode}1
783 % \end{option}
784 % \begin{option}{boldpart}
785 %    \begin{macrocode}
786 \DeclareOptionX{boldpart}{\@boldparttrue}
787 %    \end{macrocode}
788 % \end{option}
789 % \begin{option}{boldchapter}
790 %    \begin{macrocode}
791 \DeclareOptionX{boldchapter}{\@boldchaptertrue}
792 %    \end{macrocode}
793 % \end{option}
794 % \begin{option}{dottedtoc}
795 %    \begin{macrocode}
796 \DeclareOptionX{dottedtoc}{
797   \setkeys{drexel-thesis.cls}{dottedpart}
798   \setkeys{drexel-thesis.cls}{dottedchapter}
799 }
800 %    \end{macrocode}
801 % \end{option}
802 % \begin{option}{boldtoc}
803 %    \begin{macrocode}
804 \DeclareOptionX{boldtoc}{
805   \setkeys{drexel-thesis.cls}{boldpart}
806   \setkeys{drexel-thesis.cls}{boldchapter}
807 }
808 %    \end{macrocode}
809 % \end{option}
810 %
811 % \begin{option}{indenttoc}
812 % Set \Lopt{indenttoc} flag
813 %    \begin{macrocode}
814 \DeclareOptionX{indenttoc}{\@indenttoctrue}
815 %    \end{macrocode}
816 % \end{option}
817 %
818 % \begin{option}{draftwatermark}
819 % Set \Lopt{draftwatermark} flag
820 %    \begin{macrocode}
821 \DeclareOptionX{draftwatermark}{%
822   \@draftwatermarktrue
823   \@mydraftwatermarkfalse}
824 %    \end{macrocode}
825 % \end{option}
826 %
827 % \begin{option}{mydraftwatermark}
828 % Set \Lopt{mydraftwatermark} flag
829 %    \begin{macrocode}
830 \DeclareOptionX{mydraftwatermark}{%
831   \@mydraftwatermarktrue
832   \@draftwatermarkfalse}
833 %    \end{macrocode}
834 % \end{option}
835 %
836 % \begin{option}{indentfirst}
837 % Set \Lopt{indentfirst} flag
838 %    \begin{macrocode}
839 \DeclareOptionX{indentfirst}{\@indentfirsttrue}
840 %    \end{macrocode}
841 % \end{option}
842 %
843 % Define the book options that \Lopt{final} and \Lopt{draft} need to
844 % access.
845 % \begin{option}{oneside}
846 %    \begin{macrocode}
847 \DeclareOptionX{oneside}{\PassOptionsToClass{oneside}{book}}
848 %    \end{macrocode}
849 % \end{option}
850 %
851 % \begin{option}{twoside}
852 %    \begin{macrocode}
853 \DeclareOptionX{twoside}{\PassOptionsToClass{twoside}{book}}
854 %    \end{macrocode}
855 % \end{option}
856 %
857 % \begin{option}{final}
858 %    \begin{macrocode}
859 \DeclareOptionX{final}{
860   \@finaltrue
861   \setkeys{drexel-thesis.cls}{oneside}
862   \setkeys{drexel-thesis.cls}{finalspace}
863   \setkeys{drexel-thesis.cls}{dottedtoc}
864 }
865 %    \end{macrocode}
866 % \end{option}
867 %
868 % \begin{option}{draft}
869 %    \begin{macrocode}
870 \DeclareOptionX{draft}{
871   \@finalfalse
872   \setkeys{drexel-thesis.cls}{twoside}
873   \setkeys{drexel-thesis.cls}{draftspace}
874   \setkeys{drexel-thesis.cls}{dottedtoc}
875   \setkeys{drexel-thesis.cls}{mydraftwatermark}
876 }
877 %    \end{macrocode}
878 % \end{option}
879 %
880 % Use the default \cls{book} implementation for any remaining options
881 % including \Lopt{oneside}, \Lopt{twoside}, \Lopt{leqno}, \Lopt{fleqn},
882 % \ldots.
883 %    \begin{macrocode}
884 \DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{book}}
885 %    \end{macrocode}
886 %
887 % Execute the default options
888 %    \begin{macrocode}
889 \ExecuteOptionsX{final}
890 %    \end{macrocode}
891 %
892 % Process options and load the book class
893 %    \begin{macrocode}
894 \ProcessOptionsX\relax
895 \LoadClass{book}
896 %    \end{macrocode}
897 %
898 %
899 % \subsection{Internal package includes}
900 %
901 %
902 % Include some other packages we'll need.  If the package is not
903 % installed on your system, see \S \ref{sec:dependencies} for
904 % installation instructions.
905 %
906 % For many packages, we want the same functionality for both
907 % \Lopt{final} and \Lopt{draft} modes.  We pass \Lopt{final} to most
908 % of those packages to override a possible \Lopt{draft} option passed
909 % to \pkg{drexel-thesis}.
910 %
911 %
912 % \subsubsection{\pkg{setspace}}
913 %
914 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/setspace/}{\pkg{setspace}}
915 % for double spacing.
916 %    \begin{macrocode}
917 \RequirePackage{setspace}
918 %    \end{macrocode}
919 %
920 %
921 % \subsubsection{\pkg{calc}}
922 %
923 % \href{http://www.ctan.org/tex-archive/macros/latex/required/tools/}{\pkg{calc}}
924 % for |\set@lines@length| macro (page
925 %   \pageref{sec:implement-line-spacing}).
926 %    \begin{macrocode}
927 \RequirePackage{calc}
928 %    \end{macrocode}
929 %
930 %
931 % \subsubsection{\pkg{graphicx}}
932 %
933 % \href{http://www.ctan.org/tex-archive/macros/latex/required/graphics/}{\pkg{graphicx}}
934 % for |\includegraphics|.  Not strictly necessary, but I can't imagine
935 % a thesis without figures.
936 %    \begin{macrocode}
937 \RequirePackage[final]{graphicx}
938 %    \end{macrocode}
939 %
940 % We include the graphicx package now so we can
941 % pass \Lopt{final}, because some later packages include it with no options,
942 % and a \Lopt{final} include after that produces errors like
943 % \begin{example}
944 %   l.104 \RequirePackage
945 %                        [final]{ifpdf}
946 %   The package graphicx has already been loaded with options:
947 %     []
948 %   There has now been an attempt to load it with options
949 %     [final]
950 % \end{example}
951 %
952 %
953 % \subsubsection{\pkg{draftmark}}
954 %
955 % The Comp.~Sci.\ class used
956 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/draftcopy/}{\pkg{draftcopy}}
957 % to add their watermarks, but as of the current 2002/02/25 v2.16, it
958 % uses postscript specials, and so doesn't work with pdf\LaTeX.
959 % Instead we use the recent (catalogued 2009/11/03)
960 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/draftmark/}{\pkg{draftmark}}
961 % which unfortunately has a number of apparently non-standard dependencies
962 % (\href{http://www.ctan.org/tex-archive/macros/latex/contrib/etextools/}{\pkg{etextools}},
963 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/etoolbox/}{\pkg{etoolbox}},
964 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/lastpage/}{\pkg{lastpage}},
965 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/ltxnew/}{\pkg{ltxnew}},
966 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/pagerange/}{\pkg{pagerange}},
967 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/xifthen/}{\pkg{xifthen}},
968 %  if only I had the space to install |texlive-latexextra| |:p|).
969 % The output is, however, very flexible, and it \emph{does} work with
970 % both \LaTeX\ and pdf\LaTeX.  If you don't like the default watermark,
971 % you can also adjust the particulars with |\draftmarksetup|.
972 %    \begin{macrocode}
973 \if@draftwatermark
974   \RequirePackage[draft,allpages,mark={DRAFT \today},
975                   fontsize=2cm,grayness=0.9]{draftmark}
976 \fi
977 %    \end{macrocode}
978 %
979 % Here is Evan's alternative implementation This will not look right
980 % as a DVI, but it'll look fine once rendered to either a PS or PDF.
981 %    \begin{macrocode}
982 \if@mydraftwatermark
983 %    \end{macrocode}
984 % Use \pkg{eso-pic} for |\AddToShipoutPicture|.
985 %    \begin{macrocode}
986   \RequirePackage{eso-pic}
987 %    \end{macrocode}
988 % Use \pkg{xcolor} for |\definecolor|.
989 %    \begin{macrocode}
990   \RequirePackage{xcolor}
991   \definecolor{watermark}{rgb}{0.9,0.9,0.9}
992 %    \end{macrocode}
993 % Set the font explicitly to avoid being effected by the last text on
994 % the page having some strange font.  |\sffamily| sets a sans serif
995 % font.
996 %    \begin{macrocode}
997   \newcommand{\watermarkfont}{%
998     \color{watermark}}%\fontfamily{phv}\selectfont\sffamily}
999   \newcommand{\watermark}{%
1000     \rule{4.25in}{0pt}\raisebox{5.5in}{%
1001       \makebox[0pt]{%
1002 %    \end{macrocode}
1003 % |\rotatebox| and |\resizebox| from \pkg{graphicx}.
1004 %    \begin{macrocode}
1005         \rotatebox[origin=c]{45}{%
1006           \resizebox{!}{1.5in}{%
1007             {\watermarkfont DRAFT}%
1008     }}}}
1009     \raisebox{4.2in}{%
1010       \makebox[0pt]{%
1011         \rotatebox[origin=c]{45}{%
1012           \resizebox{!}{.6in}{%
1013             {\watermarkfont \qquad\today}%
1014     }}}}}
1015   \AddToShipoutPicture{\watermark{}}
1016 \fi
1017 %    \end{macrocode}
1018 %
1019 %
1020 % \subsubsection{\pkg{indentfirst}}
1021 %
1022 % Indent the first paragraph after sections etc.\ with
1023 % \href{http://www.ctan.org/tex-archive/macros/latex/required/tools/}{\pkg{indentfirst}}.
1024 %    \begin{macrocode}
1025 \if@indentfirst
1026   \RequirePackage{indentfirst}
1027 \fi
1028 %    \end{macrocode}
1029 %
1030 %
1031 % \subsubsection{\pkg{geometry}}
1032 %
1033 % Setup page margins with
1034 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/geometry/}{\pkg{geometry}}.
1035 % From the Manual p5:
1036 % \begin{itemize}
1037 %   \item The left margin must be at least 1 1/2'' (1.5 inches)
1038 %   throughout the document.
1039 %   \item All other margins (top, bottom, and right) must be at least 1''.
1040 % \end{itemize}
1041 % And from the Manual \S 1.5 p4, Print Version:
1042 % \begin{quote}
1043 %   The paper size must be 8 1/2'' x 11''.
1044 % \end{quote}
1045 %    \begin{macrocode}
1046 \RequirePackage[letterpaper,margin=1in,bindingoffset=0.5in]{geometry}
1047 %    \end{macrocode}
1048 % Note that we include the \pkg{geometry} package after loading \cls{book} to
1049 % override the margin manipulation that takes place in \cls{book}.
1050 %
1051 %
1052 % \subsubsection{\pkg{tocloft}}
1053 %
1054 % Typeset the table of contents, etc., with
1055 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/tocloft/}{\pkg{tocloft}}.
1056 %    \begin{macrocode}
1057 \if@DUT@subfigopt
1058   \RequirePackage[subfigure]{tocloft}
1059 \else
1060   \RequirePackage{tocloft}
1061 \fi
1062 %    \end{macrocode}
1063 % The \Lopt{subfigure} option sets up \pkg{tocloft} for
1064 % \pkg{subfig}/\pkg{subfigure} compatibility. See the
1065 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/tocloft/tocloft.pdf}{%
1066 %   \pkg{tocloft} manual \S 2.1}
1067 % for details.
1068 %
1069 % The configuration of \pkg{tocloft} takes place in \S
1070 % \ref{sec:implement-toc}, \S \ref{sec:implement-lof}, and \S
1071 % \ref{sec:implement-lot}.
1072 %
1073 %
1074 % \subsubsection{\pkg{caption}}
1075 %
1076 % Get nice caption formatting with
1077 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/caption/}{\pkg{caption}}.
1078 % From the Manual p5:
1079 % \begin{itemize}
1080 %   \item The left margin must be at least 1 1/2'' (1.5 inches)
1081 %   throughout the document.
1082 %   \item All other margins (top, bottom, and right) must be at least 1''.
1083 % \end{itemize}
1084 %    \begin{macrocode}
1085 \RequirePackage[margin=10pt,labelfont=bf,labelsep=colon]{caption}
1086 %    \end{macrocode}
1087 % You can change these settings if you like using |\captionsetup|.
1088 %
1089 %
1090 % \subsubsection{\pkg{floatrow}}
1091 % \label{sec:floatrow}
1092 %
1093 % Enforce caption placement with
1094 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/floatrow/}{\pkg{floatrow}}.
1095 % From the Manual \S 2.3 p6, ``Tables and Figures'', 
1096 % \begin{quote}
1097 %   \begin{itemize}
1098 %     \item Place figure captions below figures.
1099 %     \item Place table captions above tables.
1100 %   \end{itemize}
1101 % \end{quote}
1102 %    \begin{macrocode}
1103 \RequirePackage{floatrow}
1104 \floatsetup[table]{style=plaintop}
1105 \floatsetup{captionskip=10pt}
1106 \floatsetup[table]{captionskip=10pt}
1107 %    \end{macrocode}
1108 % Use \pkg{fr-subfig} for \pkg{floatrow}/\pkg{subfig} compatibility.
1109 % See the \pkg{floatrow} documentation (Sec.~7.1, ``The \pkg{subfig}
1110 % package'') and \pkg{subfig} documentation (Sec.~4.3,
1111 % ``\pkg{FloatRow} Package'') for details.
1112 %    \begin{macrocode}
1113 \if@DUT@subfigopt
1114   \RequirePackage{fr-subfig}
1115 \fi
1116 %    \end{macrocode}
1117 % We set up the three-line surrounding spaces in \S
1118 % \ref{sec:implement-floats}.
1119 %
1120 % You can change these settings using |\floatsetup|, but you probably
1121 % won't need to.
1122 %
1123 %
1124 % \subsubsection{\pkg{subfig}}
1125 % \label{sec:subfig}
1126 %
1127 % Allow multi-part figures with
1128 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/subfig/}{\pkg{subfig}}.
1129 %    \begin{macrocode}
1130 \if@DUT@subfigopt
1131   \RequirePackage{subfig}
1132 \fi
1133 %    \end{macrocode}
1134 %
1135 %
1136 % \subsubsection{\pkg{fancyhdr}}
1137 % \label{sec:fancyhdr}
1138 %
1139 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/}{\pkg{fancyhdr}}
1140 % for correct page numbering and fancy headers.
1141 % From the Manual \S 2.3 p5, ``Pagination''
1142 % \begin{quote}
1143 %   Place page numbers in the upper right-hand corner of the page,
1144 %   3/4'' from the top.
1145 % \end{quote}
1146 %    \begin{macrocode}
1147 \RequirePackage{fancyhdr}
1148 %    \end{macrocode}
1149 % Setup the standard |fancy| format.
1150 %    \begin{macrocode}
1151 \pagestyle{fancy}
1152 \fancyhf{}
1153 %    \end{macrocode}
1154 % Turn off the header rule by setting its width to $0$.
1155 %    \begin{macrocode}
1156 \renewcommand{\headrulewidth}{0pt}
1157 %    \end{macrocode}
1158 % 0.4 pt is \pkg{fancyhdr}'s default |\headrulewidth|, so we'll
1159 % recycle the value.
1160 %    \begin{macrocode}
1161 \renewcommand{\footrulewidth}{0.4pt}
1162 %    \end{macrocode}
1163 % |\leftmark| is the higher level mark, see |\chaptermark| below.
1164 % |\rightmark| is the lower level mark, see |\sectionmark| below.
1165 % We put the lower level mark to the outside because it changes more
1166 % often.  Page numbers also go on the outside.
1167 %    \begin{macrocode}
1168 \fancyfoot[RE,LO]{\scshape\leftmark}
1169 \fancyfoot[LE,RO]{\scshape\rightmark}
1170 \fancyhead[LE,RO]{\thepage}
1171 %    \end{macrocode}
1172 % Override the |plain| format (for part pages, etc.).
1173 %    \begin{macrocode}
1174 \fancypagestyle{plain}{
1175   \fancyhf{}
1176   \renewcommand{\footrulewidth}{0pt}
1177   \fancyhead[LE,RO]{\thepage}
1178 }
1179 %    \end{macrocode}
1180 % Keep the |empty| format at its default.
1181 %    \begin{macrocode}
1182 \fancypagestyle{empty}{
1183   \fancyhf{}
1184   \renewcommand{\footrulewidth}{0pt}
1185 }
1186 %    \end{macrocode}
1187 %
1188 % Note that the chapter/section footer is not required.  You can
1189 % remove the footer text and rule entirely with.
1190 % \begin{example}
1191 %   \renewcommand{\footrulewidth}{0pt}
1192 %   \fancyfoot[RE,LO]{}
1193 %   \fancyfoot[LE,RO]{}
1194 % \end{example}
1195 %
1196 %
1197 % \subsubsection{\pkg{ifpdf}}
1198 %
1199 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/}{\pkg{ifpdf}}
1200 % for detecting PDF drivers.  We use it to configure \pkg{hyperref} below.
1201 %    \begin{macrocode}
1202 \RequirePackage{ifpdf}
1203 %    \end{macrocode}
1204
1205 % \subsubsection{\pkg{hyperref}}
1206 % \label{sec:hyperref}
1207 %
1208 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/}{\pkg{hyperref}}
1209 % for hyperlinks.  Not strictly necessary, but I can't imagine a
1210 % thesis without it.  We actually include this later (\S
1211 % \ref{sec:hyperref-inclusion}), because \pkg{hyperref} sticks its
1212 % fingers into \emph{everything} and we want it to use our versions of
1213 % some macros (e.g., |\@sect|) but not others (e.g., |thebibliography|).
1214 %
1215 %
1216 % \subsubsection{\pkg{hypcap}}
1217 % \label{sec:hypcap}
1218 %
1219 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/}{\pkg{hypcap}}
1220 % for placing caption hyperlink anchors.  Must be included after
1221 % \pkg{hypercap}, so the actual inclusion is in \S
1222 % \ref{sec:hypcap-inclusion}).
1223 %
1224 %
1225 % \subsection{\LaTeX\ overrides and extensions}
1226 %
1227 % Here we change the behavior of a bunch of macros and environments
1228 % from \file{latex.ltx} (generated by \file{format.ins} in
1229 % \href{http://www.ctan.org/tex-archive/macros/latex/base/}{\pkg{base}}).
1230 % We'll copy in their original notes along with their code, following
1231 % the relevant documentation an order given in \file{format.ins} and
1232 % the associated \file{*.dtx} files.
1233 %
1234 %
1235 % \subsubsection{\file{ltsect.dtx}}
1236 %
1237 % \begin{macro}{\title}
1238 % \begin{macro}{\DUTtitle}
1239 % \begin{macro}{\@DUT@title}
1240 % |\title| for use in |\maketitle|. If not given |\maketitle| will
1241 % produce a warning message (\file{ltsect.dtx}, L117).
1242 %
1243 % We extend |\title| to set \pkg{hyperref}'s |pdftitle|.
1244 % (\file{ltsect.dtx}, L117).
1245 %    \begin{macrocode}
1246 \renewcommand{\title}[1]{
1247   \gdef\@DUT@title{#1}
1248   \ifpdf \hypersetup{pdftitle={\@DUT@title}} \fi
1249 }
1250 \let\DUTtitle\title
1251 \def\@DUT@title{\@latex@error{No \noexpand\title given}\@ehc}
1252 %    \end{macrocode}
1253 % \end{macro}
1254 % \end{macro}
1255 % \end{macro}
1256 %
1257 % \begin{macro}{\author}
1258 % \begin{macro}{\DUTauthor}
1259 % \begin{macro}{\@DUT@author}
1260 % |\author| for use in |\maketitle|.  If not given |\maketitle| will
1261 % produce a warning message (\file{ltsect.dtx}, L129).
1262 %
1263 % We extend |\author| to set \pkg{hyperref}'s |pdfauthor| if we're
1264 % writing a PDF to avoid using |\AtBeginDocument| or some such.
1265 % (\file{ltsect.dtx}, L129).
1266 %    \begin{macrocode}
1267 \renewcommand{\author}[1]{
1268   \gdef\@DUT@author{#1}
1269   \ifpdf \hypersetup{pdfauthor={\protect\@DUT@author}} \fi
1270 }
1271 \let\DUTauthor\author
1272 \def\@DUT@author{\@latex@error{No \noexpand\author given}\@ehc}
1273 %    \end{macrocode}
1274 % \end{macro}
1275 % \end{macro}
1276 % \end{macro}
1277 %
1278 % In a similar vein, we some additional meta-info macros.
1279 %
1280 %  \begin{macro}{\DUTmonth}
1281 %  \begin{macro}{\@DUT@month}
1282 % |\DUTmonth| (defense month) for use in |\maketitle|.  If not given
1283 % |\maketitle| will produce an error message.
1284 %    \begin{macrocode}
1285 \def\DUTmonth#1{\gdef\@DUT@month{#1}}
1286 \def\@DUT@month{\@latex@error{No \noexpand\DUTmonth given}\@ehc}
1287 %    \end{macrocode}
1288 %  \end{macro}
1289 %  \end{macro}
1290 %
1291 %  \begin{macro}{\DUTyear}
1292 %  \begin{macro}{\@DUT@year}
1293 % |\DUTyear| (defense year) for use in |\maketitle|.  If not given
1294 % |\maketitle| will produce an error message.
1295 %    \begin{macrocode}
1296 \def\DUTyear#1{\gdef\@DUT@year{#1}}
1297 \def\@DUT@year{\@latex@error{No \noexpand\DUTyear given}\@ehc}
1298 %    \end{macrocode}
1299 %  \end{macro}
1300 %  \end{macro}
1301 %
1302 %  \begin{macro}{\degree}
1303 %  \begin{macro}{\DUTdegree}
1304 %  \begin{macro}{\@DUT@degree}
1305 % |\degree| for use in |\maketitle|.  If not given |\maketitle| will
1306 % produce an error message.
1307 %    \begin{macrocode}
1308 \def\degree#1{\gdef\@DUT@degree{#1}
1309   \ifpdf \hypersetup{pdfsubject={\@DUT@degree}} \fi}
1310 \let\DUTdegree\degree
1311 \def\@DUT@degree{\@latex@error{No \noexpand\degree given}\@ehc}
1312 %    \end{macrocode}
1313 %  \end{macro}
1314 %  \end{macro}
1315 %  \end{macro}
1316 %
1317 %  \begin{macro}{\copyrighttext}
1318 %  \begin{macro}{\DUTcopyrighttext}
1319 %  \begin{macro}{\@copyrighttext}
1320 % |\copyrighttext| for use in |\@DUT@makecopyright|.  There are a
1321 % number of blurbs predefined in \S \ref{sec:implement-copyright}.
1322 %    \begin{macrocode}
1323 \def\copyrighttext#1{\gdef\@DUT@copyrighttext{#1}}
1324 \let\DUTcopyrighttext\copyrighttext
1325 \def\@DUT@copyrighttext{All Rights Reserved.}
1326 %    \end{macrocode}
1327 %  \end{macro}
1328 %  \end{macro}
1329 %  \end{macro}
1330 %
1331 %  \begin{macro}{\advisor}
1332 %  \begin{macro}{\DUTadvisor}
1333 %  \begin{macro}{\@DUT@advisor}
1334 % |\advisor| stores advisor names, and |\@DUT@advisor| prints them out
1335 % nicely for the |abstract| environment.  If no advisors are given
1336 % |\@DUT@advisor| will produce an error message.  We get a bit fancier
1337 % here to support multiple advisors.
1338 %    \begin{macrocode}
1339 \newcounter{@DUT@advisors}
1340 \setcounter{@DUT@advisors}{0}
1341 %    \end{macrocode}
1342 % Store a new advisor name.
1343 %    \begin{macrocode}
1344 \newcommand\advisor[1]{%
1345   \ifx
1346 %    \end{macrocode}
1347 % If |#1| is |\empty|, this call is a no-op.
1348 %    \begin{macrocode}
1349     \empty{#1}
1350   \else
1351 %    \end{macrocode}
1352 % Save the advisors to |\@DUT@advisor@a|, |\@DUT@advisor@b|, \ldots.
1353 % |\alph{|\Lcount{COUNTER}|}| (\file{ltcounts.dtx}, L319) prints the
1354 %   value of \Lcount{COUNTER} as a lowercase letter: $1 =$~a, $2 =$~
1355 %   b, etc.
1356 %    \begin{macrocode}
1357     \stepcounter{@DUT@advisors}
1358     \expandafter\gdef\csname @DUT@advisor@\alph{@DUT@advisors}\endcsname{#1}
1359   \fi}
1360 %    \end{macrocode}
1361 % Format and print a list of advisor names.
1362 %    \begin{macrocode}
1363 \newcommand\@DUT@advisor{%
1364   \ifnum\c@@DUT@advisors=0%
1365     \@latex@error{No \noexpand\advisor given}\@ehc%
1366   \else%
1367 %    \end{macrocode}
1368 % Start a group so the scratch counter \Lcount{count\textat} is restored
1369 % afterwards\footnote{See the discussion in
1370 %   \href{http://www.ctan.org/tex-archive/macros/latex/contrib/localloc/}{%
1371 %     \pkg{localloc}}
1372 %   for some points on counter allocation.}.
1373 %    \begin{macrocode}
1374     \begingroup%
1375 %    \end{macrocode}
1376 % Because \Lcount{count\textat} is a \TeX\ counter register not
1377 % wrapped by \LaTeX's counter sugar, we don't use \LaTeX's
1378 % |\setcounter| to set \Lcount{count\textat} to one.
1379 %    \begin{macrocode}
1380       \count@\@ne
1381 %    \end{macrocode}
1382 % Print the first advisor, using \TeX's |\@alph| macro instead of
1383 % \LaTeX's |\alph|.
1384 %    \begin{macrocode}
1385 %    \begin{macrocode}
1386       \csname @DUT@advisor@\@alph\count@\endcsname\relax%
1387 %    \end{macrocode}
1388 % For any remaining advisors\ldots
1389 %    \begin{macrocode}
1390       \loop\ifnum\count@<\c@@DUT@advisors%
1391 %    \end{macrocode}
1392 % Advance \Lcount{count\textat} using \TeX's |\advance| macro instead
1393 % of \LaTeX's |\stepcounter|.
1394 %    \begin{macrocode}
1395         \advance\count@\@ne
1396 %    \end{macrocode}
1397 % Print the connecting text.
1398 %    \begin{macrocode}
1399         \ifnum\count@=\c@@DUT@advisors%
1400           \ifnum\c@@DUT@advisors=2%
1401 %    \end{macrocode}
1402 % The next advisor if the last of two.
1403 %    \begin{macrocode}
1404             {\ and\ }%
1405           \else%
1406 %    \end{macrocode}
1407 % The next advisor if the last of many.
1408 %    \begin{macrocode}
1409             {, and\ }%
1410           \fi%
1411         \else%
1412 %    \end{macrocode}
1413 % The next advisor is not the last.
1414 %    \begin{macrocode}
1415           {,\ }%
1416         \fi%
1417 %    \end{macrocode}
1418 % Print the advisor's name.
1419 %    \begin{macrocode}
1420         \csname @DUT@advisor@\@alph\count@\endcsname\relax%
1421       \repeat%
1422     \endgroup%
1423   \fi}
1424 %    \end{macrocode}
1425 %  \end{macro}
1426 %  \end{macro}
1427 %  \end{macro}
1428 %
1429 % \paragraph{baselineskip}
1430 % \label{sec:implement-line-spacing}
1431 %
1432 % \begin{macro}{\@DUT@baselineskip}
1433 % Since we'll be messing with the spacing, save the single-spaced
1434 % baseline.
1435 %   \changes{0.3}{2010/01/13}{Use $\backslash$setlength to store the
1436 %     value at the default font.  The previous version used
1437 %     $\backslash$let, which made $\backslash$DUT\@baselineskip a
1438 %     synonym for $\backslash$baselineskip that changed with font
1439 %     size.}
1440 %    \begin{macrocode}
1441 \newlength\@DUT@baselineskip
1442 \setlength\@DUT@baselineskip\baselineskip
1443 %    \end{macrocode}
1444 % \end{macro}
1445 %
1446 % \begin{command}
1447 %   `\cs{set@lines@length}\marg{length}\marg{N}'
1448 % \end{command}
1449 % \begin{macro}{\set@lines@length}
1450 % Many specifications in the Manual refer to ``\meta{N} blank lines''.
1451 % |\set@lines@length| allows you to set a length to a given number of
1452 % lines, protecting against external |spacing| environments.  It
1453 % requires \pkg{calc} for the multiplication.
1454 %    \begin{macrocode}
1455 \newcommand{\set@lines@length}[2]{%
1456   \setlength{#1}{\@DUT@baselineskip * {#2}}}
1457 %    \end{macrocode}
1458 % \end{macro}
1459 %
1460 %
1461 % Fix |\@ssect| and |\@sect| from \file{latex.ltx} to give single
1462 % spaced headings.
1463 %
1464 % \begin{macro}{\@sect}
1465 % Pseudocode for the |\@sect| command
1466 % \begin{example}
1467 % \@sect{NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}[ARG1]{ARG2}
1468 %           ==
1469 %   BEGIN
1470 %    IF LEVEL > \c@secnumdepth
1471 %      THEN \@svsec :=L null
1472 %      ELSE \refstepcounter{NAME}
1473 %           \@svsec :=L BEGIN \@seccntformat{#1}\relax END
1474 %    FI
1475 %    IF AFTERSKIP > 0
1476 %      THEN \begingroup
1477 %              STYLE
1478 %              \@hangfrom{\hskip INDENT\@svsec}
1479 %              {\interlinepenalty 10000 ARG2\par}
1480 %           \endgroup
1481 %           \NAMEmark{ARG1}
1482 %           \addcontentsline{toc}{NAME}
1483 %              { IF  LEVEL > \c@secnumdepth
1484 %                  ELSE \protect\numberline{\theNAME}  FI
1485 %                ARG1 }
1486 %      ELSE \@svsechd == BEGIN  STYLE
1487 %                               \hskip INDENT\@svsec
1488 %                               ARG2
1489 %                               \NAMEmark{ARG1}
1490 %                               \addcontentsline{toc}{NAME}
1491 %                                  { IF  LEVEL > \c@secnumdepth
1492 %                                      ELSE 
1493 %                                        \protect\numberline{\theNAME}
1494 %                                      FI
1495 %                                    ARG1 }
1496 %                        END
1497 %    FI
1498 %    \@xsect{AFTERSKIP}
1499 % END
1500 % \end{example}
1501 % (\file{ltsect.dtx}, L295).
1502 %    \begin{macrocode}
1503 \def\@sect#1#2#3#4#5#6[#7]#8{%
1504   \ifnum #2>\c@secnumdepth
1505     \let\@svsec\@empty
1506   \else
1507     \refstepcounter{#1}%
1508     \protected@edef\@svsec{\@seccntformat{#1}\relax}%
1509   \fi
1510   \@tempskipa #5\relax
1511   \ifdim \@tempskipa>\z@
1512     \begingroup
1513 %    \end{macrocode}
1514 % Here we deviate from \file{ltsect.dtx} to ensure single spacing for
1515 % the section title.
1516 %    \begin{macrocode}
1517       \setstretch{\@ssp}%
1518       #6{%
1519         \@hangfrom{\hskip #3\relax\@svsec}%
1520           \interlinepenalty \@M #8\@@par}%
1521     \endgroup
1522     \csname #1mark\endcsname{#7}%
1523     \addcontentsline{toc}{#1}{%
1524       \ifnum #2>\c@secnumdepth \else
1525         \protect\numberline{\csname the#1\endcsname}%
1526       \fi
1527       #7}%
1528   \else
1529     \def\@svsechd{%
1530       #6{\hskip #3\relax
1531       \@svsec #8}%
1532       \csname #1mark\endcsname{#7}%
1533       \addcontentsline{toc}{#1}{%
1534         \ifnum #2>\c@secnumdepth \else
1535           \protect\numberline{\csname the#1\endcsname}%
1536         \fi
1537         #7}}%
1538   \fi
1539   \@xsect{#5}}
1540 %    \end{macrocode}
1541 % \end{macro}
1542 %
1543 % \begin{macro}{\@ssect}
1544 % Pseudocode for the |\@ssect| command
1545 % \begin{example}
1546 % \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}{ARG} ==
1547 %   BEGIN
1548 %    IF AFTERSKIP > 0
1549 %      THEN \begingroup
1550 %             STYLE
1551 %             \@hangfrom{\hskip INDENT}{\interlinepenalty 10000 ARG\par}
1552 %           \endgroup
1553 %      ELSE \@svsechd == BEGIN STYLE
1554 %                              \hskip INDENT
1555 %                              ARG
1556 %                        END
1557 %    FI
1558 %    \@xsect{AFTERSKIP}
1559 %   END
1560 % \end{example}
1561 % (\file{ltsect.dtx}, L521).
1562 %    \begin{macrocode}
1563 \def\@ssect#1#2#3#4#5{%
1564   \@tempskipa #3\relax
1565   \ifdim \@tempskipa>\z@
1566     \begingroup
1567 %    \end{macrocode}
1568 % Here we deviate from \file{ltsect.dtx} to ensure single spacing for
1569 % the section title.
1570 %    \begin{macrocode}
1571       \setstretch{\@ssp}%
1572       #4{%
1573         \@hangfrom{\hskip #1}%
1574           \interlinepenalty \@M #5\@@par}%
1575     \endgroup
1576   \else
1577     \def\@svsechd{#4{\hskip #1\relax #5}}%
1578   \fi
1579   \@xsect{#3}}
1580 %    \end{macrocode}
1581 % \end{macro}
1582 %
1583 %
1584 % \subsubsection{\file{ltbibl.dtx}}
1585 %
1586 % \DescribeMacro{\bibliography}
1587 % \DescribeEnv{thebibliography}
1588 % A bibliography is created by the |thebibliography| environment, which
1589 % generates a title such as ``Bibliography'', and a list of entries.
1590 % The \BibTeX\ program will create a file containing such an
1591 % environment, which will be read in by the |\bibliography| command.
1592 % With \BibTeX, the following commands will be used.
1593 %
1594 % The document class must define the thebibliography environment.  This
1595 % environment has a single argument, which is the widest bibliography
1596 % label-- e.g., if the [Knuth67] is the widest entry, then this
1597 % argument will be Knuth67.  The |\thebibliography| command must begin
1598 % a list  environment, which the |\endthebibliography| command ends.
1599 %
1600 % \begin{macro}{\bibliography}
1601 % |\bibliography|\marg{file1,file2,\ldots,filen} : specifies
1602 %   the bibdata files.  Writes a |\bibdata| entry on the |.aux| file
1603 %   and tries to read in |mainfile.bbl|.
1604 %
1605 % We don't need to change it, but it explains why we need to override
1606 % |thebibliography| even when we don't use it directly.
1607 % (\file{ltbibl.dtx}, L284).
1608 %    \begin{macrocode}
1609 %\def\bibliography#1{%
1610 %  \if@filesw
1611 %    \immediate\write\@auxout{\string\bibdata{#1}}%
1612 %  \fi
1613 %  \@input@{\jobname.bbl}
1614 %}
1615 %    \end{macrocode}
1616 % \end{macro}
1617 %
1618 %
1619 % \subsubsection{\file{ltoutput.dtx}}
1620 %
1621 % \begin{macro}{\@DUT@clearpage}
1622 % \begin{macro}{\@DUT@cleardoublepage}
1623 % Versions of |\clear*page| that only work when |\if@final| is true
1624 % (\file{ltoutput.dtx}, L877 and L904).
1625 %    \begin{macrocode}
1626 \newcommand\@DUT@clearpage{\if@final \clearpage \fi}
1627 \newcommand\@DUT@cleardoublepage{\if@final \cleardoublepage \fi}
1628 %    \end{macrocode}
1629 % \end{macro}
1630 % \end{macro}
1631 %
1632 % \begin{macro}{\@DUT@blankpage}
1633 % Add a useful extension to insert a blank page without numbering.
1634 % In draft mode, this macro is a no-op.
1635 %    \begin{macrocode}
1636 \newcommand\@DUT@blankpage{%
1637   \if@final
1638     \@DUT@clearpage
1639     \thispagestyle{empty}
1640     \hphantom{0}
1641     \@DUT@clearpage
1642   \else\fi
1643 }
1644 %    \end{macrocode}
1645 % \end{macro}
1646 %
1647 %
1648 % \begin{command}
1649 %   `\cs{blanklines}\marg{N}'
1650 %   `\cs{blanklines*}\marg{N}'
1651 % \end{command}
1652 % \begin{macro}{\blanklines}
1653 % Insert \meta{N} blank lines.  The starred forms use |\vspace|, which
1654 % inserts space even at the start and end of pages.  The |p| forms
1655 % add a trailing |\par|.  \emph{I'm still trying to get this part working
1656 % cleanly\ldots}
1657 %    \begin{macrocode}
1658 \newlength\@DUT@blanklines@length
1659 \newcommand{\@blanklines@setup}[1]{%
1660   \set@lines@length{\@DUT@blanklines@length}{#1}%
1661   %\typeout{BLANKLINES -- #1}%
1662   %\showthe\@DUT@blanklines@length
1663 }
1664 \newcommand{\blanklines}{\@ifstar\@sblanklines\@blanklines}
1665 \newcommand{\@blanklines}[1]{%
1666   \@blanklines@setup{#1}%
1667   \vspace{\@DUT@blanklines@length}}
1668 \newcommand{\@sblanklines}[1]{%
1669   \@blanklines@setup{#1}%
1670   \vspace*{\@DUT@blanklines@length}}
1671 \newcommand{\blanklinesp}{\@ifstar\@sblanklines\@blanklines}
1672 \newcommand{\@blanklinesp}[1]{%
1673   \@blanklines@setup{#1}%
1674   \vspace{\@DUT@blanklines@length}\par}
1675 \newcommand{\@sblanklinesp}[1]{%
1676   \@blanklines@setup{#1}%
1677   \vspace*{\@DUT@blanklines@length}\par}
1678 %    \end{macrocode}
1679 % \end{macro}
1680 %
1681 %
1682 % \subsection{\pkg{hyperref} inclusion}
1683 % \label{sec:hyperref-inclusion}
1684 %
1685 % This is the awkward \pkg{hyperref} inclusion.  See \S
1686 % \ref{sec:hyperref} for an explanation of why we stash it here.
1687 %    \begin{macrocode}
1688 \RequirePackage[final]{hyperref}
1689 %    \end{macrocode}
1690 % Nobody likes the default colored boxes.  Color the text itself.
1691 %    \begin{macrocode}
1692 \hypersetup{colorlinks}
1693 %    \end{macrocode}
1694 %
1695 % \subsubsection{\pkg{hypcap}}
1696 % \label{sec:hypcap-inclusion}
1697 %
1698 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/}{\pkg{hypcap}}
1699 % for placing caption hyperlink anchors.  Not strictly necessary, but
1700 % we're using \pkg{hyperref}, and the poor link targets are annoying.
1701 %    \begin{macrocode}
1702 \RequirePackage[all]{hypcap}
1703 %    \end{macrocode}
1704 % \Lopt{all} redefines the figure and table environments to
1705 % place the anchor at the start of the float.
1706 %
1707 %
1708 % \subsection{\cls{book} overrides and extensions}
1709 %
1710 % Here we change the behavior of a bunch of macros and environments from
1711 % \cls{book} (generated by \file{classes.ins} from \file{classes.dtx}) in
1712 % \href{http://www.ctan.org/tex-archive/macros/latex/base/}{\pkg{base}}).
1713 % We'll copy in their original notes along with their code, following
1714 % the relevant documentation an order given in \file{classes.dtx}.
1715 %
1716 %
1717 % \subsubsection{Floats on a text page}
1718 % \label{sec:implement-floats}
1719 %
1720 % \begin{macro}{\floatsep}
1721 % \begin{macro}{\textfloatsep}
1722 % When a floating object is placed on a page with text, these
1723 % parameters control the separation between the float and the other
1724 % objects on the page.
1725 %
1726 % |\floatsep| is the space between adjacent floats that are moved
1727 % to the top or bottom of the text page.
1728 %
1729 % |\textfloatsep| is the space between the main text and floats
1730 % at the top or bottom of the page.
1731 %
1732 % |\intextsep| is the space between in-text floats and the text.  We
1733 % don't bother overriding this one, because we've handled it with
1734 % \pkg{floatrow} in \S \ref{sec:floatrow}.
1735 %
1736 % From the Manual \S 2.3 p6, ``Tables and Figures''
1737 % \begin{quote}
1738 %   Insert at least 3 single-spaced lines of space above table
1739 %   captions and figures and below figure captions, tables, and other
1740 %   graphics.
1741 % \end{quote}
1742 % (\file{classes.dtx}, L1426)
1743 %    \begin{macrocode}
1744 \set@lines@length{\floatsep}{\@ssp}
1745 \set@lines@length{\textfloatsep}{\@tsp}
1746 %    \end{macrocode}
1747 % \end{macro}
1748 % \end{macro}
1749 %
1750 %
1751 % \subsubsection{The title}
1752 %
1753 % \begin{macro}{\maketitle}
1754 % Automate the creation of the title page.
1755 % From Manual \S 3.1 p8, ``Title Page'', and the example on p16.
1756 % \begin{itemize}
1757 %   \item This page is counted but not numbered (it counts as page i,
1758 %   but should not have a page number).  TODO: How is this implemented?
1759 % \end{itemize}
1760 % Our definition simplifies \cls{book}'s by ignoring footnotes.
1761 % (\file{classes.dtx}, L1796)
1762 %    \begin{macrocode}
1763 \newcommand\@DUT@maketitle{
1764   \begin{@DUT@titlepage}%
1765 %    \end{macrocode}
1766 % Add some bookmarks if we're using pdf\LaTeX.  The |frontmatter|
1767 % bookmark is set at the \emph{part} level (-1) to hold all bookmarks
1768 % from the |preamble| environment, since those entries are all
1769 % chapters.
1770 % \changes{0.8}{2010/05/20}{W.~Trevor King replaced Titlepage with
1771 %   Title Page for consistency with \LaTeX's book class.}
1772 %    \begin{macrocode}
1773     \ifpdf
1774       \pdfbookmark[-1]{Front Matter}{Front Matter}
1775       \pdfbookmark[0]{Title Page}{Title Page}
1776     \fi
1777 %    \end{macrocode}
1778 % Add some stretchy space to center the title vertically if we're not
1779 % in draft mode.
1780 %    \begin{macrocode}
1781     \if@final \vspace*{\fill} \fi
1782 %    \end{macrocode}
1783 % Here is the title text itself.
1784 %    \begin{macrocode}
1785     \begin{center}%
1786       {\setstretch{\@tsp} \bfseries \@DUT@title \par}%
1787 %    \end{macrocode}
1788 % We want two blank lines (triple spacing) between the title and the
1789 % remaining material, so add three but don't end the paragraph.
1790 %    \begin{macrocode}
1791       \blanklines{\@tsp}%
1792       \setstretch{\@dsp}%
1793       A Thesis\\
1794       Submitted to the Faculty\\
1795       of\\
1796       Drexel University\\
1797       by\\
1798       \@DUT@author\\
1799       in partial fulfillment of the\\
1800       requirements for the degree\\
1801       of\\
1802       \@DUT@degree\\
1803       \@DUT@month\ \@DUT@year
1804     \end{center}\par
1805 %    \end{macrocode}
1806 % Some more stretchy space for the bottom if we're not in draft mode.
1807 %    \begin{macrocode}
1808 %    \end{macrocode}
1809 % Add some stretchy space to center the title vertically if we're not
1810 % in draft mode.
1811 %    \begin{macrocode}
1812     \if@final \vspace*{\fill} \fi
1813   \end{@DUT@titlepage}%
1814 %    \end{macrocode}
1815 % And that's it.  We reset the footnote counter for the rest of the
1816 % document and save space by freeing the memory associated with the
1817 % |\maketitle| and |\and| macros (by setting them equal to |\relax|).
1818 %    \begin{macrocode}
1819   \setcounter{footnote}{0}%
1820   \global\let\maketitle\relax
1821   \global\let\and\relax
1822 }
1823 %    \end{macrocode}
1824 % \end{macro}
1825 %
1826 %
1827 % \subsubsection{Copyright pages}
1828 % \label{sec:implement-copyright}
1829 %
1830 % \begin{macro}{\@DUT@makecopyright}
1831 % The Manual allows for the selection of different copyrights, so we
1832 % define a base macro that generates a proper copyright page
1833 % containing |\@copyrighttext|, which the user can set with
1834 % |\copyrighttext|.
1835 % From Manual \S 3.2 p9, ``Copyright Page''.
1836 % \begin{itemize}
1837 %   \item Include a copyright page with the following information: a
1838 %   copyright notice, full legal name of author, and date of
1839 %   publication on file.
1840 %   \item This page is neither counted nor numbered.
1841 % \end{itemize}
1842 % In final mode, we start off on a new page and center the blurb.
1843 % In draft mode, we dive right into the text.
1844 %    \begin{macrocode}
1845 \newcommand\@DUT@makecopyright{%
1846   \@DUT@clearpage
1847 %    \end{macrocode}
1848 % If we're using pdf\LaTeX, add a bookmark.
1849 %    \begin{macrocode}
1850   \ifpdf \pdfbookmark[0]{Copyright Page}{Copyright Page} \fi
1851   \if@final \vspace*{\fill} \fi
1852   \begin{center}
1853     \copyright~Copyright \@DUT@year\\
1854     \@DUT@author.  \@DUT@copyrighttext
1855   \end{center}
1856   \if@final \vspace*{\fill} \else \blanklinesp{2} \fi
1857 %    \end{macrocode}
1858 % Turn off page numbering for this page.
1859 %    \begin{macrocode}
1860   \thispagestyle{empty}
1861 }
1862 %    \end{macrocode}
1863 % \end{macro}
1864 %
1865 % \begin{macro}{\copyrighttextCCBYSA}
1866 % \begin{macro}{\DUTcopyrighttextCCBYSA}
1867 % The Creative Commons Attribution-ShareAlike License.
1868 % \changes{0.4}{2010/02/23}{W.~Trevor King renamed from
1869 % $\backslash$copyrighttextCC, and made specific to Creative Commons
1870 % Attribution-ShareAlike Version 3.0.}
1871 %    \begin{macrocode}
1872 \newcommand\copyrighttextCCBYSA{
1873   \begin{quote}
1874     This work is licensed under the terms of the Creative Commons
1875     Attribution-ShareAlike license Version 3.0.  The license is
1876     available at \\
1877     \url{http://creativecommons.org/licenses/by-sa/3.0/}.
1878   \end{quote}
1879 }
1880 \let\DUTcopyrighttextCCBYSA\copyrighttextCCBYSA
1881 %    \end{macrocode}
1882 % \end{macro}
1883 % \end{macro}
1884 %
1885 %
1886 % \subsubsection{Mark commands}
1887 %
1888 % Default initializations of |\*mark| commands.  These commands
1889 % are used in the definition of the page styles.
1890 %
1891 % \begin{macro}{\chaptermark}
1892 % Setup colon rather than period separated chapter marks.
1893 % (\file{classes.dtx}, L2053)
1894 %    \begin{macrocode}
1895 \renewcommand\chaptermark[1]{%
1896   \markboth {%
1897     \ifnum \c@secnumdepth >\m@ne
1898       \if@mainmatter
1899         \@chapapp\ \thechapter: \ %
1900       \fi
1901     \fi
1902     #1}{}}
1903 %    \end{macrocode}
1904 % \end{macro}
1905 %
1906 % \begin{macro}{\schaptermark}
1907 % Setup unnumbered chapter marks for \pkg{fancyhdr}.
1908 %    \begin{macrocode}
1909 \newcommand\schaptermark[1]{\markboth{#1}{}}
1910 %    \end{macrocode}
1911 % \end{macro}
1912 %
1913 % \begin{macro}{\sectionmark}
1914 % Setup space rather than period separated section marks.
1915 % (\file{classes.dtx}, L2054)
1916 %    \begin{macrocode}
1917 \renewcommand{\sectionmark}[1]{%
1918   \markright {%
1919     \ifnum \c@secnumdepth >\z@
1920       \thesection \ %
1921     \fi
1922     #1}}
1923 %    \end{macrocode}
1924 % \end{macro}
1925 %
1926 %
1927 % \subsubsection{Front Matter, Main Matter, and Back Matter}
1928 %
1929 % A book contains these three (logical) sections. The switch
1930 % |\@mainmatter| is true if and only if we are processing main
1931 % matter\footnote{%
1932 %   \href{http://en.wikipedia.org/wiki/Book_design}{Wikipedia}
1933 %   suggests \emph{body matter} for the main content, but
1934 %   \href{http://mirror.ctan.org/macros/latex/base/classes.dtx}{\LaTeX's
1935 %   \cls{book}} uses \emph{Main Matter}.  We're a \LaTeX\ class, so
1936 %   we'll stick with ``main matter'' for consistency.
1937 % }.  When this switch is false, the
1938 % |\chapter| command does not print chapter numbers.
1939 %
1940 % \begin{macro}{\mainmatter}
1941 % This command clears the page (in final mode), starts arabic page
1942 % numbering and turns on chapter numbering.  Since this restarts the
1943 % page numbering from 1, it should also ensure that a recto page is
1944 % used.
1945 %
1946 % We replace \cls{book}'s |\clear*page| calls with |\@DUT@clearpage| calls.
1947 % (\file{classes.dtx}, L2211)
1948 %    \begin{macrocode}
1949 \renewcommand\mainmatter{%
1950   \@DUT@cleardoublepage
1951   \@mainmattertrue
1952   \pagenumbering{arabic}}
1953 %    \end{macrocode}
1954 % \end{macro}
1955 %
1956 %
1957 % \subsubsection{Parts}
1958 %
1959 % \begin{macro}{\part}
1960 % The command to start a new part of our document.
1961 %
1962 % We start a new (righthand) page and use the \pstyle{plain}
1963 % pagestyle, replacing \cls{book}'s |\clear*page| calls with
1964 % |\@DUT@clearpage| calls and dropping twopage code.
1965 % (\file{classes.dtx}, L2249)
1966 %    \begin{macrocode}
1967 \renewcommand\part{%
1968   \if@openright
1969     \@DUT@cleardoublepage
1970   \else
1971     \@DUT@clearpage
1972   \fi
1973   \thispagestyle{plain}%
1974   \@tempswafalse
1975 %    \end{macrocode}
1976 % Add some stretchy space for vertical centering if we're in final mode.
1977 %    \begin{macrocode}
1978   \if@final \null\vfil \fi
1979 %    \end{macrocode}
1980 % Here we use |\secdef| to indicate which commands to use to make
1981 % the actual heading.
1982 %    \begin{macrocode}
1983   \secdef\@part\@spart}
1984 %    \end{macrocode}
1985 % \end{macro}
1986 %
1987 % \begin{macro}{\@part}
1988 % This macro does the actual formatting of the title of the part.  We
1989 % replace \cls{book}'s |\Huge| with |\large|, and make use of
1990 % |\numberline| for consistent spacing.
1991 %
1992 % When \Lcount{secnumdepth} is larger than $-2$, we have a numbered
1993 % part, otherwise it is unnumbered.
1994 % (\file{classes.dtx}, L2310)
1995 %    \begin{macrocode}
1996 \def\@part[#1]#2{%
1997     \ifnum \c@secnumdepth >-2\relax
1998       \refstepcounter{part}%
1999       \addcontentsline{toc}{part}%
2000         {\protect\numberline{\thepart}#1}%
2001     \else
2002       \addcontentsline{toc}{part}{#1}%
2003     \fi
2004 %    \end{macrocode}
2005 % We empty the mark registers and center the title on the page.
2006 % Also we prevent breaking between lines and reset the font.
2007 %    \begin{macrocode}
2008     \markboth{}{}%
2009     {\centering
2010      \interlinepenalty \@M
2011      \normalfont
2012 %    \end{macrocode}
2013 % When this is a numbered part we have to print the number.
2014 %    \begin{macrocode}
2015      \ifnum \c@secnumdepth >-2\relax
2016        \large\bfseries \partname\nobreakspace\thepart
2017        \par
2018 %    \end{macrocode}
2019 % We leave some space before we print the title and leave the
2020 % finishing up to |\@endpart|.
2021 %    \begin{macrocode}
2022        \vskip 20\p@
2023      \fi
2024      \large \bfseries #2\par}%
2025     \@endpart}
2026 %    \end{macrocode}
2027 % \end{macro}
2028 %
2029 % \begin{macro}{\@spart}
2030 % This macro does the actual formatting of the title of the part
2031 % when the star form of the user command was used. In this case we
2032 % \emph{never} print a number. Otherwise the formatting is the
2033 % same.
2034 % (\file{classes.dtx}, L2402)
2035 %    \begin{macrocode}
2036 \def\@spart#1{%
2037     {\centering
2038      \interlinepenalty \@M
2039      \normalfont
2040      \large \bfseries #1\par}%
2041     \@endpart}
2042 %    \end{macrocode}
2043 % \end{macro}
2044 %
2045 % \begin{macro}{\@endpart}
2046 % This macro finishes the part page, for both |\@part| and |\@spart|.
2047 % We drop \cls{book}'s twoside handling.
2048 % If |\if@final| is true, we fill the current page.
2049 % (\file{classes.dtx}, L2435)
2050 %    \begin{macrocode}
2051 \def\@endpart{
2052   \if@final \vfil\newpage \fi
2053 %    \end{macrocode}
2054 % Then, when we are in twosided mode and the chapters are supposed to
2055 % be on the right hand sides, we produce a completely blank page.  We
2056 % don't need to check |\if@final| here, because \Lopt{draftspace} set
2057 % |\@openrighttrue|.
2058 %    \begin{macrocode}
2059   \if@twoside
2060     \if@openright
2061       \null
2062       \thispagestyle{empty}%
2063       \newpage
2064     \fi
2065   \fi}
2066 %    \end{macrocode}
2067 % \end{macro}
2068 %
2069 %
2070 % \subsubsection{Chapters}
2071 % \label{sec:implement-chapters}
2072 %
2073 % \begin{macro}{\chapter}
2074 % \cls{book} always starts a chapter on a new page, but we don't want
2075 % to do that if we're in draft mode.
2076 % (\file{classes.dtx}, L2472).
2077 %    \begin{macrocode}
2078 \renewcommand\chapter{%
2079   \if@openright\@DUT@cleardoublepage\else\@DUT@clearpage\fi
2080   \thispagestyle{plain}%
2081 %    \end{macrocode}
2082 % Then we prevent floats from appearing at the top of this page
2083 % because it looks weird to see a floating object above a chapter
2084 % title.
2085 %    \begin{macrocode}
2086   \global\@topnum\z@
2087 %    \end{macrocode}
2088 % Then we suppress the indentation of the first paragraph by
2089 % setting the switch |\@afterindent| to false. We use |\secdef|
2090 % to specify the macros to use for actually setting the chapter
2091 % title.
2092 %    \begin{macrocode}
2093   \@afterindentfalse
2094   \secdef\@chapter\@schapter}
2095 %    \end{macrocode}
2096 % \end{macro}
2097 %
2098 % \begin{macro}{\listed@schapter}
2099 % |\chapter| declares numbered chapters, which are listed in the table
2100 % of contents.
2101 % |\chapter*| declares unnumbered chapters, which are \emph{not}
2102 % listed in the TOC.
2103 % |\listed@schapter| declares an unnumbered chapter that \emph{is}
2104 % listed in the TOC.
2105 %    \begin{macrocode}
2106 \newcommand\listed@schapter[1]{%
2107   \if@openright\@DUT@cleardoublepage\else\@DUT@clearpage\fi
2108   \thispagestyle{plain}%
2109   \global\@topnum\z@
2110   \phantomsection
2111   \addcontentsline{toc}{chapter}{#1}
2112   \@afterindentfalse
2113   \@schapter{#1}}
2114 %    \end{macrocode}
2115 % \end{macro}
2116 %
2117 % \begin{macro}{\@chapter}
2118 % This macro is called when we have a numbered chapter. When
2119 % \Lcount{secnumdepth} is larger than $-1$ and |\@mainmatter| is true,
2120 % we display the chapter number.
2121 % We drop \cls{book}'s \Lopt{twocolumn} code. 
2122 % (\file{classes.dtx}, L2496).
2123 %    \begin{macrocode}
2124 \def\@chapter[#1]#2{
2125 %    \end{macrocode}
2126 % Inform the user that a new chapter is about to be typeset by writing
2127 % a message to the terminal.
2128 % \changes{0.9}{2010/05/21}{W.~Trevor King disabled the label macro
2129 % for typeout.}
2130 % Some users place |\label| in their chapter argument:
2131 % \begin{example}
2132 %   \chapter{Bla bla\label{x}}
2133 % \end{example}
2134 % rather than after (as recommended by
2135 % \href{http://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing#Sections}%
2136 %   {the \LaTeX\ Wikibook} and
2137 % \href{http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf}%
2138 %   {The Not So Short Introduction to \LaTeXe\ (\S 2.8, p36)}):
2139 % \begin{example}
2140 %   \chapter{Bla bla}
2141 %   \label{x}
2142 % \end{example}
2143 % The embedded |\label| chokes |\typeout| so we temporarily redefine
2144 % |\label| to just gobble its contents.  |\@DUT@label| stores the
2145 % original definition.
2146 %    \begin{macrocode}
2147   \let\@DUT@label=\label%
2148   \renewcommand{\label}[1]{}%
2149   \typeout{\@chapapp\space\thechapter. #1}%
2150 %    \end{macrocode}
2151 % Restore |\label| to its previous glory.
2152 %    \begin{macrocode}
2153   \let\label=\@DUT@label%
2154 %    \end{macrocode}
2155 % Now we can get on with the real work.
2156 %    \begin{macrocode}
2157   \ifnum \c@secnumdepth >\m@ne
2158     \if@mainmatter
2159       \refstepcounter{chapter}%
2160       \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
2161     \else
2162       \addcontentsline{toc}{chapter}{#1}%
2163     \fi
2164   \else
2165     \addcontentsline{toc}{chapter}{#1}%
2166   \fi
2167 %    \end{macrocode}
2168 % After having written an entry to the table of contents we store
2169 % the (alternative) title of this chapter with |\chaptermark|.
2170 %    \begin{macrocode}
2171   \chaptermark{#1}%
2172 %    \end{macrocode}
2173 % For nicer lists of figures and tables, we could add some white space
2174 % to separate the chapters.  However, nice lists $\neq$~Manual
2175 % specifications.
2176 %    \begin{macrocode}
2177 %  \addtocontents{lof}{\protect\addvspace{10\p@}}%
2178 %  \addtocontents{lot}{\protect\addvspace{10\p@}}%
2179 %    \end{macrocode}
2180 % Then we call upon |\@makechapterhead| to format the actual chapter
2181 % title.  |\@afterheading| which takes care of suppressing the
2182 % indentation.
2183 %    \begin{macrocode}
2184   \@makechapterhead{#2}%
2185   \@afterheading}
2186 %    \end{macrocode}
2187 % \end{macro}
2188 %
2189 % \begin{macro}{\@makechapterhead}
2190 % The |\@chapter| macro uses |\@makechapterhead|\meta{text} to format
2191 % the heading of the chapter.
2192 % From the Manual \S 3.11 p11.
2193 % \begin{quote}
2194 %   Chapter headings must be bold and centered.
2195 %   The chapter number and title must be on the same line, separated
2196 %   by a colon or period, as shown in the example below:
2197 %   \begin{center}
2198 %     CHAPTER 1: INTRODUCTION
2199 %   \end{center}
2200 %   Headings must not be larger than 12 points.
2201 %   Headings must be single spaced.
2202 % \end{quote}
2203 % \cls{book} sets |\@chapapp| and |\thechapter| (e.g., ``Chapter 5'')
2204 % on a line above the chapter title, but that doesn't match the
2205 % Manual's specification.
2206 %
2207 % We begin by leaving some white space. The we open a group in which
2208 % we have a paragraph indent of 0pt, and in which we have the text set
2209 % ragged right. We also reset the font.
2210 % (\file{classes.dtx}, L2540).
2211 %    \begin{macrocode}
2212 \def\@makechapterhead#1{%
2213 %    \end{macro}
2214 % Adding even a \vspace*{0\p@} here seems to increase the vertical
2215 % space above the chapter heading by two lines.  I'm not sure why.
2216 % Workaround is to pass the ``value of blanklines you want minus two''
2217 % to |\blanklines*|.  HACK!
2218 %    \begin{macro}
2219   \blanklines*{-1}% HACK!
2220   {\parindent \z@ \raggedright \normalfont
2221 %    \end{macrocode}
2222 % Ensure single spacing.
2223 %    \begin{macrocode}
2224     \setstretch{\@ssp}%
2225 %    \end{macrocode}
2226 % Prevent a pagebreak from occuring in the middle of or after the title.
2227 %    \begin{macrocode}
2228     \interlinepenalty\@M
2229 %    \end{macrocode}
2230 % Check whether the number of the chapter has to be printed.
2231 %    \begin{macrocode}
2232     \ifnum \c@secnumdepth >\m@ne
2233 %    \end{macrocode}
2234 % Check whether there \emph{is} a number to be printed.
2235 %    \begin{macrocode}
2236       \if@mainmatter
2237 %    \end{macrocode}
2238 % Setup a ``Chapter \#: Title'' heading.
2239 %    \begin{macrocode}
2240         \center \large \bfseries \@chapapp{} \thechapter: #1\par\nobreak
2241       \else
2242 %    \end{macrocode}
2243 % Setup a ``Title'' heading.
2244 %    \begin{macrocode}
2245         \center \large \bfseries #1\par\nobreak
2246       \fi
2247     \else
2248       \center \large \bfseries #1\par\nobreak
2249     \fi
2250 %    \end{macrocode}
2251 % Put a little space before the chapter body.  We use four blank lines
2252 % to comply with the Manual \S 3.13 p12
2253 % \begin{quote}
2254 %   Begin the list of sources four spaces below the heading.
2255 % \end{quote}
2256 %    \begin{macrocode}
2257     \blanklines{4}
2258   }
2259 }
2260 %    \end{macrocode}
2261 % \end{macro}
2262 %
2263 % \begin{macro}{\@schapter}
2264 % This macro is called when we have an unnumbered chapter.  We drop
2265 % \file{classes.dtx}'s \Lopt{twocolumn} code and set marks for
2266 % \pkg{fancyhdr}.
2267 % (\file{classes.dtx}, L2582).
2268 %    \begin{macrocode}
2269 \def\@schapter#1{
2270 %    \end{macrocode}
2271 % Inform the user that a new chapter is about to be typeset by writing
2272 % a message to the terminal.
2273 %    \begin{macrocode}
2274   \typeout{\@chapapp\space #1}%
2275   \schaptermark{#1}%
2276   \@makeschapterhead{#1}%
2277   \@afterheading}
2278 %    \end{macrocode}
2279 % \end{macro}
2280 %
2281 % \begin{macro}{\@makeschapterhead}
2282 % The macro above uses |\@makeschapterhead|\meta{text} to format
2283 % the heading of the chapter. It is similar to |\@makechapterhead|
2284 % except that it never has to print a chapter number.
2285 % (\file{classes.dtx}, L2595).
2286 %    \begin{macrocode}
2287 \def\@makeschapterhead#1{%
2288   \blanklines*{-1}% HACK!
2289   {\parindent \z@ \raggedright \normalfont
2290     \setstretch{\@ssp}%
2291     \interlinepenalty\@M
2292     \center \large \bfseries  #1\par\nobreak
2293     \blanklines{4}%
2294   }
2295 }
2296 %    \end{macrocode}
2297 % \end{macro}
2298 %
2299 %
2300 % \subsubsection{Lower level headings}
2301 %
2302 % \begin{macro}{\section}
2303 % Setup section headings in |\large| rather than \cls{book}'s
2304 % |\Large|.
2305 % (\file{classes.dtx}, L2623).
2306 %    \begin{macrocode}
2307 \renewcommand\section{%
2308   \@startsection {section}{1}{\z@}%
2309     {-3.5ex \@plus -1ex \@minus -.2ex}%
2310     {2.3ex \@plus.2ex}%
2311     {\normalfont\large\bfseries}}
2312 %    \end{macrocode}
2313 % \end{macro}
2314 %
2315 %
2316 % \subsubsection{Defining new environments}
2317 %
2318 % We don't override any of \cls{book}'s environments, but this is
2319 % where \file{classes.dtx} defines its environments (L2996), so we'll put
2320 % ours here too.
2321 %
2322 % \begin{environment}{preamble}
2323 % \begin{environment}{DUTpreamble}
2324 %    \begin{macrocode}
2325 \newenvironment{preamble}{%
2326   \cleardoublepage
2327   \@mainmatterfalse
2328   \pagenumbering{roman}
2329 %    \end{macrocode}
2330 % From Manual \S 3.1 p8, ``Title Page''.
2331 %    \begin{macrocode}
2332   \@DUT@maketitle
2333 %    \end{macrocode}
2334 % From Manual \S 3.2 p9, ``Copyright Page''.
2335 %    \begin{macrocode}
2336   \@DUT@makecopyright
2337 }{%
2338 %    \end{macrocode}
2339 % From the Manual \S 3.9, p11:
2340 % \begin{quote}
2341 %   Include a blank page (with no page number) before the first page
2342 %   of text.  The blank page is neither numbered nor counted.
2343 % \end{quote}
2344 %    \begin{macrocode}
2345   \@DUT@blankpage
2346 }
2347 %    \end{macrocode}
2348 % \LaTeX's |\newenvironment| and company work by defining |\X| and
2349 % |\endX| for the environment |X|.  We can alias the preamble
2350 % environment by saving these macros.
2351 %    \begin{macrocode}
2352 \let\DUTpreamble\preamble
2353 \let\endDUTpreamble\endpreamble
2354 %    \end{macrocode}
2355 % \end{environment}
2356 % \end{environment}
2357 %
2358 % \begin{environment}{dedications}
2359 % \begin{environment}{DUTdedications}
2360 % From the Manual \S 3.3 p9
2361 % \begin{itemize}
2362 %   \item The heading |Dedications| must appear at the top of the
2363 %   page.  The heading must be bold, centered, and without
2364 %   punctuation.
2365 %   \item This page is counted and numbered in lowercase Roman numerals.
2366 % \end{itemize}
2367 %    \begin{macrocode}
2368 \newenvironment{dedications}{%
2369   \@DUT@clearpage
2370   \ifpdf
2371     \phantomsection
2372     \pdfbookmark[0]{\DUTdedicationsname}{\DUTdedicationsname}
2373   \fi
2374   \chapter*{\DUTdedicationsname}
2375   \setstretch{\@dsp}%
2376 }{%
2377   \setstretch{\@ssp}%
2378 }
2379 \let\DUTdedications\dedications
2380 \let\endDUTdedications\enddedications
2381 %    \end{macrocode}
2382 % \end{environment}
2383 % \end{environment}
2384 %
2385 % \begin{environment}{acknowledgments}
2386 % \begin{environment}{DUTacknowledgments}
2387 % From the Manual \S 3.4 p9
2388 % \begin{itemize}
2389 %   \item The heading |Acknowledgments| must appear at the top of the
2390 %   page.  The heading must be bold, centered, and without
2391 %   punctuation.
2392 %   \item This page is counted and numbered in lowercase Roman numerals.
2393 % \end{itemize}
2394 %    \begin{macrocode}
2395 \newenvironment{acknowledgments}{%
2396   \@DUT@clearpage
2397   \ifpdf
2398     \phantomsection
2399     \pdfbookmark[0]{\DUTacknowledgmentsname}{\DUTacknowledgmentsname}
2400   \fi
2401   \chapter*{\acknowledgmentsname}
2402   \setstretch{\@dsp}%
2403 }{%
2404   \setstretch{\@ssp}%
2405 }
2406 %    \end{macrocode}
2407 \let\DUTacknowledgments\acknowledgments
2408 \let\endDUTacknowledgments\endacknowledgments
2409 % \end{environment}
2410 % \end{environment}
2411 %
2412 % \begin{environment}{abstract}
2413 % \begin{environment}{DUTabstract}
2414 %    \begin{macrocode}
2415 \newenvironment{abstract}{%
2416   \listed@schapter{\abstractname}%
2417 %    \end{macrocode}
2418 % Suck up some blank space to position the rest of the header right
2419 % under the chapter title.
2420 %    \begin{macrocode}
2421   \blanklines{-4}%
2422 %    \end{macrocode}
2423 % From the Manual \S 3.9 p10
2424 % \begin{quote}
2425 %   \begin{itemize}
2426 %     \item The following heading must be centered at the top of the page
2427 %       \begin{center}
2428 %         Abstract \\
2429 %         Full Title of Dissertation or Thesis \\
2430 %         Author's Name as it appears on the Dissertation or Thesis
2431 %       \end{center}
2432 %       In the example on p20, they list the advisor's name after the
2433 %       author, but that is not specified in the text on p10.
2434 %     \item The text begins four lines below this heading.
2435 %   \end{itemize}
2436 % \end{quote}
2437 % On p20
2438 % \begin{quote}
2439 %   \begin{itemize}
2440 %     \item These pages are numbered using lowercase Roman numerals.
2441 %     \item Note that the heading is single spaced, but the abstract
2442 %       is double spaced.
2443 %   \end{itemize}
2444 % \end{quote}
2445 %    \begin{macrocode}
2446     \begin{center}
2447       \setstretch{\@ssp}%
2448       \@DUT@title\\
2449       \@DUT@author\\
2450       \@DUT@advisor\\
2451     \end{center}
2452   \blanklines{4}%
2453   \setstretch{\@dsp}%
2454   \@nobreaktrue
2455   \@afterindentfalse
2456   \@afterheading
2457 }{%
2458   \setstretch{\@ssp}%
2459 }
2460 \let\DUTabstract\abstract
2461 \let\endDUTabstract\endabstract
2462 %    \end{macrocode}
2463 % \end{environment}
2464 % \end{environment}
2465 %
2466 % \begin{environment}{thesis}
2467 % \begin{environment}{DUTthesis}
2468 % From the Manual \S 3.10 p11
2469 % \begin{itemize}
2470 %   \item The pages are counted and numbered in Arabic numerals.
2471 % \end{itemize}
2472 %    \begin{macrocode}
2473 \newenvironment{thesis}{%
2474   \mainmatter
2475   \setstretch{\@dsp}%
2476 }{%
2477   \setstretch{\@ssp}%
2478   \@DUT@clearpage
2479 %    \end{macrocode}
2480 % \changes{0.8}{2010/05/20}{W.~Trevor King replaced Titlepage with
2481 %   Title Page for consistency with \LaTeX's book class.}
2482 %    \begin{macrocode}
2483   \ifpdf
2484     \phantomsection
2485     \pdfbookmark[-1]{Back Matter}{Back Matter}
2486   \fi
2487 }
2488 \let\DUTthesis\thesis
2489 \let\endDUTthesis\endthesis
2490 %    \end{macrocode}
2491 % \end{environment}
2492 % \end{environment}
2493 %
2494 % \paragraph{Vita}
2495 % \label{sec:implement-vita}
2496
2497 % \begin{environment}{vita}
2498 % \begin{environment}{DUTvita}
2499 % From the Manual \S 3.15 p13
2500 % \begin{itemize}
2501 %   \item The heading |Vita| must appear at the top of the page.  The
2502 %   heading must be bold, centered, and without punctuation.
2503 %   \item The Vita text should begin four spaces below the heading.
2504 %   \item List the Vita separately in the Table of Contents.
2505 %   \item The page is counted and numbered in Arabic numerals.
2506 % \end{itemize}
2507 %    \begin{macrocode}
2508 \newenvironment{vita}{%
2509   \listed@schapter{\vitaname}
2510   \setstretch{\@dsp}%
2511 }{%
2512   \setstretch{\@ssp}%
2513 }
2514 \let\DUTvita\vita
2515 \let\endDUTvita\endvita
2516 %    \end{macrocode}
2517 % \end{environment}
2518 % \end{environment}
2519 %
2520 %
2521 % \subsubsection{Titlepage}
2522 %
2523 % \begin{environment}{titlepage}
2524 % In the normal environments, the titlepage environment does nothing
2525 % but start and end a page, and inhibit page numbers.  We inhibit the
2526 % paging in draft mode, since it seems silly to waste a whole page on
2527 % the title.  We also drop the \Lopt{twocolumn} code.
2528 % (\file{classes.dtx}, L3111)
2529 %    \begin{macrocode}
2530 \renewenvironment{titlepage}%
2531   {\thispagestyle{empty}%
2532     \setcounter{page}\z@}%
2533   {\if@final \newpage \else \blanklinesp{2} \par \fi}
2534 \let\@DUT@titlepage\titlepage
2535 \let\end@DUT@titlepage\endtitlepage
2536 %    \end{macrocode}
2537 % \end{environment}
2538 %
2539 %
2540 % \subsubsection{Appendix}
2541 % \label{sec:implement-appendix}
2542 %
2543 % \begin{macro}{\appendix}
2544 % \begin{macro}{\DUTappendix}
2545 % The |\appendix| command is not really an environment, it is a
2546 % macro that makes some changes in the way things are done.
2547 %
2548 % In the article document class the |\appendix| command must do the
2549 % following:
2550 % \begin{itemize}
2551 %   \item reset the section and subsection counters to zero,
2552 %   \item redefine |\thesection| to produce alphabetic appendix
2553 %         numbers. This redefinition is done globally to ensure that it 
2554 %         survives even if |\appendix| is issued within an environment such
2555 %         as \texttt{multicols}.
2556 % \end{itemize}
2557 %
2558 % In addition to \cls{book}'s (or \pkg{hyperref}'s) activity, we
2559 % fiddle with the \pkg{tocloft} chapter settings add switch to global
2560 % double-spacing.
2561 % (\file{classes.dtx}, L3177)
2562 %    \begin{macrocode}
2563 \let\@DUT@appendix\appendix
2564 \renewcommand\appendix{%
2565   \@DUT@appendix%
2566 %    \end{macrocode}
2567 % Setup TOC entries like
2568 % \begin{center}
2569 %   Appendix A: Chapter Title
2570 % \end{center}
2571 % We don't need to worry about the |vita| environment (page
2572 % \pageref{sec:implement-vita}), because it is a |\listed@schapter|,
2573 % and therefore lacks a |\numberline| section in its \file{*.toc}
2574 % entry.
2575 %
2576 % We increase |numwidth| to 6.5em to make room for |Appendix~| before
2577 % the chapter number/letter, and add a colon after it.
2578 %
2579 % The |\protect| calls get the macros into \file{*.toc} unexpanded, so
2580 % they function correctly when \LaTeX\ parses \file{*.toc}.
2581 %    \begin{macrocode}
2582   \addtocontents{toc}{%
2583     \protect\cftsetindents{chapter}{0pt}{6.5em}
2584     \protect\renewcommand{\protect\cftchappresnum}{\protect\appendixname~}
2585     \protect\renewcommand{\protect\cftchapaftersnum}{:}}
2586 %    \end{macrocode}
2587 % We also turn on double spacing by default, since we're no longer
2588 % wrapped in the |thesis| environment.
2589 %    \begin{macrocode}
2590   \setstretch{\@dsp}%
2591 }
2592 \let\DUTappendix\appendix
2593 %    \end{macrocode}
2594 % \end{macro}
2595 % \end{macro}
2596 %
2597 %
2598 % \subsubsection{Table of Contents}
2599 % \label{sec:implement-toc}
2600 %
2601 % From Manual \S 3.5 p9, ``Table of Contents'', and the example on p17.
2602 % \begin{quote}
2603 %   \begin{itemize}
2604 %     \item Do not list any sections that precede the
2605 %     |Table of Contents| (e.g., |Dedications|, |Acknowledgments|).  Do
2606 %     not list the |Table of Contents| itself.
2607 %     \item These pages are counted and numbered in lowercase Roman numerals.
2608 %   \end{itemize}
2609 % \end{quote}
2610 %
2611 % \begin{macro}{\cfttoctitlefont}
2612 % Take advantange of \pkg{tocloft}'s TOC title code.
2613 % (\file{tocloft.dtx}, L1501)
2614 % \begin{example}
2615 %   \cfttoctitlefont\contentsname}{\cftaftertoctitle}
2616 % \end{example}
2617 % by setting it equal to something ending in |\chapter*|.  That way
2618 % \LaTeX parses the whole thing as
2619 % \begin{example}
2620 %   ...\chapter*\contentsname}{\cftaftertoctitle}
2621 % \end{example}
2622 % which will set up the TOC page correctly.
2623 %    \begin{macrocode}
2624 \renewcommand\cfttoctitlefont{%
2625 %    \end{macrocode}
2626 % Start a new page in \Lopt{final} mode
2627 %    \begin{macrocode}
2628   \@DUT@clearpage
2629 %    \end{macrocode}
2630 % Add a bookmark if we're using pdf\LaTeX.
2631 %    \begin{macrocode}
2632   \ifpdf
2633     \phantomsection
2634     \pdfbookmark[0]{\contentsname}{\contentsname}
2635   \fi
2636 %    \end{macrocode}
2637 % |\chapter*| to gobble and format the next token (|\contentsname|).
2638 %    \begin{macrocode}
2639   \chapter*}
2640 %    \end{macrocode}
2641 % \end{macro}
2642 %
2643 % \begin{macro}{\aftertoctitleskip}
2644 % Don't add any extra space after the title (the chapter will take
2645 % care of that).
2646 %    \begin{macrocode}
2647 \setlength\cftaftertoctitleskip{0pt}
2648 %    \end{macrocode}
2649 % \end{macro}
2650 %
2651 % \begin{macro}{\l@cont@sep}
2652 % Define a length for TOC/LOF/LOT spacing.
2653 %    \begin{macrocode}
2654 \newlength\l@cont@sep
2655 \set@lines@length{\l@cont@sep}{\@cont@sep}
2656 %    \end{macrocode}
2657 % \end{macro}
2658 %
2659 % \begin{macro}{\@cont@font}
2660 % Define a font for high level (part, chapter) entries.
2661 %    \begin{macrocode}
2662 \newcommand{\@cont@font}{\normalsize\scshape}
2663 %    \end{macrocode}
2664 % \end{macro}
2665 %
2666 % \begin{macro}{\cftbeforepartskip}
2667 % \begin{macro}{\cftpartfont}
2668 % \begin{macro}{\cftpartleader}
2669 % \begin{macro}{\cftpartdotsep}
2670 % \begin{macro}{\cftpartpagefont}
2671 % Setup parts.  See the \pkg{tocloft} manual for a description of the
2672 % commands.
2673 %    \begin{macrocode}
2674 \setlength\cftbeforepartskip{\l@cont@sep}
2675 \cftsetindents{part}{0pt}{3em}
2676 \if@boldpart   \renewcommand{\cftpartfont}{\bfseries\@cont@font}
2677 \else          \renewcommand{\cftpartfont}{\@cont@font}
2678 \renewcommand{\cftpartleader}{\cftdotfill{\cftpartdotsep}}
2679 \if@dottedpart \renewcommand{\cftpartdotsep}{\cftdotsep}
2680 \else          \renewcommand{\cftpartdotsep}{\cftnodots} \fi
2681 \renewcommand{\cftpartpagefont}{\normalfont}
2682 %    \end{macrocode}
2683 % \end{macro}
2684 % \end{macro}
2685 % \end{macro}
2686 % \end{macro}
2687 % \end{macro}
2688 %
2689 % \begin{macro}{\cftbeforechapskip}
2690 % \begin{macro}{\cftchapaftersnum}
2691 % \begin{macro}{\cftchapfont}
2692 % \begin{macro}{\cftchapleader}
2693 % \begin{macro}{\cftchapdotsep}
2694 % \begin{macro}{\cftchappagefont}
2695 % Setup chapters and appendicies.  Some of these settings are adjusted
2696 % for appendicies in particular by |\appendix|
2697 % (Sec.~\ref{sec:implement-appendix}).
2698 %    \begin{macrocode}
2699 \setlength\cftbeforechapskip{\l@cont@sep}
2700 \cftsetindents{chapter}{0pt}{1.5em}
2701 \renewcommand{\cftchapaftersnum}{.}
2702 \if@boldchapter   \renewcommand{\cftchapfont}{\bfseries\@cont@font}
2703 \else             \renewcommand{\cftchapfont}{\@cont@font} \fi
2704 \renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}
2705 \if@dottedchapter \renewcommand{\cftchapdotsep}{\cftdotsep}
2706 \else             \renewcommand{\cftchapdotsep}{\cftnodots} \fi
2707 \renewcommand{\cftchappagefont}{\normalfont}
2708 %    \end{macrocode}
2709 % \end{macro}
2710 % \end{macro}
2711 % \end{macro}
2712 % \end{macro}
2713 % \end{macro}
2714 % \end{macro}
2715 %
2716 % \begin{macro}{\cftbeforesecskip}
2717 % \begin{macro}{\cftsecfont}
2718 % \begin{macro}{\cftbeforesubsecskip}
2719 % \begin{macro}{\cftsubsecfont}
2720 % \begin{macro}{\cftbeforesubsubsecskip}
2721 % \begin{macro}{\cftsubsubsecfont}
2722 % Setup sections, subsections, etc.
2723 %    \begin{macrocode}
2724 %\cftsetindents{chap}{0pt}{1.5em}
2725 \setlength\cftbeforesecskip{\l@cont@sep}
2726 \cftsetindents{section}{0pt}{3em}
2727 \renewcommand{\cftsecfont}{\normalsize}
2728 \setlength\cftbeforesubsecskip{\l@cont@sep}
2729 \cftsetindents{subsection}{0pt}{4.5em}
2730 \renewcommand{\cftsubsecfont}{\cftsecfont}
2731 \setlength\cftbeforesubsubsecskip{\l@cont@sep}
2732 \cftsetindents{subsubsection}{0pt}{6em}
2733 \renewcommand{\cftsubsubsecfont}{\cftsecfont}
2734 %    \end{macrocode}
2735 % \end{macro}
2736 % \end{macro}
2737 % \end{macro}
2738 % \end{macro}
2739 % \end{macro}
2740 % \end{macro}
2741 %
2742 % The default indents above are all |0pt|.  If \Lopt{indenttoc} was
2743 % given, override this, restoring the \pkg{tocloft} defaults, see the
2744 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/tocloft/tocloft.pdf}{%
2745 %   \pkg{tocloft} manual, Table 1}.
2746 %    \begin{macrocode}
2747 \if@indenttoc
2748   \cftsetindents{chapter}{0pt}{1.5em}
2749   \cftsetindents{section}{1.5em}{2.3em}
2750   \cftsetindents{subsection}{3.8em}{3.2em}
2751   \cftsetindents{subsubsection}{7.0em}{4.1em}
2752 \fi
2753 %    \end{macrocode}
2754 %
2755 %
2756 % \subsubsection{List of figures}
2757 % \label{sec:implement-lof}
2758 %
2759 % From the Manual \S 3.7 p10
2760 % \begin{quote}
2761 %   \begin{itemize}
2762 %     \item The heading |List of Figures| must appear at the top of
2763 %       the first page.
2764 %     \item The heading must be bold, centered, and without
2765 %       punctuation.  List figure captions exactly as they appear
2766 %       below the figures in the text.
2767 %     \item Single space each entry, but double-space between entries.
2768 %     \item Separate figure captions from page numbers with
2769 %       right-justified tabs and dot leaders.
2770 %     \item Do not use periods to separate captions and page numbers.
2771 %     \item These pages are counted and numbered in lowercase Roman
2772 %     numerals.
2773 %   \end{itemize}
2774 % \end{quote}
2775 %
2776 % \begin{macro}{\cftloftitlefont}
2777 % Much like our |\cfttoctitlefont|, but the list of figures gets
2778 % listed in the TOC.
2779 %    \begin{macrocode}
2780 \renewcommand\cftloftitlefont{\listed@schapter}
2781 %    \end{macrocode}
2782 % \end{macro}
2783 %
2784 % \begin{macro}{\afterloftitleskip}
2785 % Don't add any extra space after the title (the chapter will take
2786 % care of that).  Actually we make a one-line correction so the first
2787 % line matches the first line in the TOC.  HACK!
2788 %    \begin{macrocode}
2789 \setlength\cftafterloftitleskip{-12pt}
2790 %    \end{macrocode}
2791 % \end{macro}
2792 %
2793 % \begin{macro}{\cftbeforefigskip}
2794 % \begin{macro}{\cftfigindent}
2795 % \begin{macro}{\cftfigfont}
2796 % Setup figure entries.
2797 %    \begin{macrocode}
2798 \setlength{\cftbeforefigskip}{\l@cont@sep}
2799 \setlength{\cftfigindent}{0pt}
2800 \renewcommand{\cftfigfont}{\normalsize\singlespace}
2801 %    \end{macrocode}
2802 % \end{macro}
2803 % \end{macro}
2804 % \end{macro}
2805 %
2806 %
2807 % \subsubsection{List of tables}
2808 % \label{sec:implement-lot}
2809 %
2810 % From the Manual \S 3.6 p10
2811 % \begin{quote}
2812 %   \begin{itemize}
2813 %     \item The heading |List of Tables| must appear at the top of the
2814 %       first page.
2815 %     \item The heading must be bold, centered, and without
2816 %       punctuation.
2817 %     \item List table captions exactly as they appear above the
2818 %       tables in the text.
2819 %     \item Single space each entry, but double-space between entries.
2820 %     \item Separate table captions from page numbers with
2821 %       right-justified tabs and dot leaders.
2822 %     \item Do not use periods to separate captions and page numbers.
2823 %       These pages are counted and numbered in lowercase Roman
2824 %       numerals.
2825 %   \end{itemize}
2826 % \end{quote}
2827 %
2828 % \begin{macro}{\cftlottitlefont}
2829 % Much like our |\cfttoctitlefont|, but the list of tables gets
2830 % listed in the TOC.
2831 %    \begin{macrocode}
2832 \renewcommand\cftlottitlefont{\listed@schapter}
2833 %    \end{macrocode}
2834 % \end{macro}
2835 %
2836 % \begin{macro}{\afterlottitleskip}
2837 % Don't add any extra space after the title (the chapter will take
2838 % care of that).  Actually we make a one-line correction so the first
2839 % line matches the first line in the TOC.  HACK!
2840 %    \begin{macrocode}
2841 \setlength\cftafterlottitleskip{-12pt}
2842 %    \end{macrocode}
2843 % \end{macro}
2844 %
2845 % \begin{macro}{\cftbeforetabskip}
2846 % \begin{macro}{\cfttabindent}
2847 % \begin{macro}{\cfttabfont}
2848 % Setup table entries.
2849 %    \begin{macrocode}
2850 \setlength{\cfttabindent}{0pt}
2851 \setlength{\cftbeforetabskip}{\l@cont@sep}
2852 \renewcommand{\cfttabfont}{\normalsize\singlespace}
2853 %    \end{macrocode}
2854 % \end{macro}
2855 % \end{macro}
2856 % \end{macro}
2857 %
2858 %
2859 % \subsubsection{Bibliography}
2860 %
2861 % \begin{environment}{thebibliography}
2862 % The |thebibliography| environment is a list environment.  To save the
2863 % use of an extra counter, it should use |enumiv| as the item
2864 % counter. 
2865 % Instead of using |\item|, items in the bibliography are produced by
2866 % the following commands:\\
2867 %   |\bibitem|\marg{name} : Produces a numbered entry cited as
2868 %   \meta{name}.\\
2869 %   |\bibitem|\oarg{label}\marg{name} : Produces an entry labeled by
2870 %   \meta{Label} and cited by \meta{name}.
2871 %
2872 % Override \cls{book}'s version, adding a line to the table of
2873 % contents.  We split out the section-creation code into
2874 % |\bib@heading| for \pkg{natbib} compatibility.
2875 % (\file{classes.dtx}, L4063).
2876 %    \begin{macrocode}
2877 \renewenvironment{thebibliography}[1]
2878      {\bib@heading%
2879       \list{\@biblabel{\@arabic\c@enumiv}}%
2880            {\settowidth\labelwidth{\@biblabel{#1}}%
2881             \leftmargin\labelwidth
2882             \advance\leftmargin\labelsep
2883             \@openbib@code
2884             \usecounter{enumiv}%
2885             \let\p@enumiv\@empty
2886             \renewcommand\theenumiv{\@arabic\c@enumiv}}%
2887 %    \end{macrocode}
2888 % Because it's hard to do line breaks in bibliographies.
2889 %    \begin{macrocode}
2890       \sloppy
2891 %    \end{macrocode}
2892 %    This is setting the normal (non-infinite) value of
2893 %    |\clubpenalty| for the whole of this environment,
2894 %    so we must reset its stored value also.  (Why is there a |%| after
2895 %    the second 4000 below?)
2896 %    \begin{macrocode}
2897       \clubpenalty4000
2898       \@clubpenalty \clubpenalty
2899       \widowpenalty4000%
2900 %    \end{macrocode}
2901 % Cause a `.' (period) not to produce an end-of-sentence space.
2902 %    \begin{macrocode}
2903       \sfcode`\.\@m}
2904 %    \end{macrocode}
2905 % Warn if an empty `thebibliography' environment is found.
2906 %    \begin{macrocode}
2907      {\def\@noitemerr
2908        {\@latex@warning{Empty `thebibliography' environment}}%
2909       \endlist}
2910 %    \end{macrocode}
2911 % \end{environment}
2912 %
2913 % \begin{macro}{\bib@heading}
2914 % \pkg{natbib} messes with |thebibliography|.  We setup |\bib@heading|
2915 % so we will still get our table of contents entry.
2916 %    \begin{macrocode}
2917 \newcommand{\bib@heading}{%
2918   \listed@schapter{\bibname}%
2919 }
2920 %    \end{macrocode}
2921 % \end{macro}
2922 %
2923 %
2924 % \subsubsection{Index}
2925 %
2926 % \begin{environment}{theindex}
2927 % The environment |theindex| can be used for indices. It makes an
2928 % index with two columns, with each entry a separate paragraph. At
2929 % the user level the commands |\item|, |\subitem| and |\subsubitem|
2930 % are used to produce index entries of various levels. When a new
2931 % letter of the alphabet is encountered an amount of |\indexspace|
2932 % white space can be added.
2933 %
2934 % Override \cls{book}'s version, adding a line to the table of
2935 % contents.  We split out the section-creation code into
2936 % |\bib@heading| for \pkg{natbib} compatibility.
2937 % (\file{classes.dtx}, L4107).
2938 %    \begin{macrocode}
2939 \renewenvironment{theindex}
2940                {\if@twocolumn
2941                   \@restonecolfalse
2942                 \else
2943                   \@restonecoltrue
2944                 \fi
2945 %    \end{macrocode}
2946 % Here we add our TOC entry, and setup two-columness by hand
2947 % to avoid the |\clearpage| in \LaTeX's default |\twocolumn|.
2948 %    \begin{macrocode}
2949   \listed@schapter{\indexname}
2950   \global\columnwidth\textwidth
2951   \global\advance\columnwidth-\columnsep
2952   \global\divide\columnwidth\tw@
2953   \global\hsize\columnwidth
2954   \global\linewidth\columnwidth
2955   \global\@twocolumntrue
2956   \global\@firstcolumntrue
2957   \col@number \tw@
2958 %    \end{macrocode}
2959 %    Parameter changes to |\columnseprule| and |\columnsep| have to be
2960 %    done after |\twocolumn| has acted. Otherwise they can affect the
2961 %    last page before the index.
2962 %    \begin{macrocode}
2963                 \parindent\z@
2964                 \parskip\z@ \@plus .3\p@\relax
2965                 \columnseprule \z@
2966                 \columnsep 35\p@
2967                 \let\item\@idxitem}
2968 %    \end{macrocode}
2969 %    When the document continues after the index and it was a one
2970 %    column document we have to switch back to one column after the
2971 %    index.
2972 %    \begin{macrocode}
2973                {\if@restonecol\onecolumn\else\@DUT@clearpage\fi}
2974 %    \end{macrocode}
2975 % \end{environment}
2976 %
2977 %
2978 % \subsubsection{Words}
2979 % \label{sec:words}
2980 %
2981 % Set the official names of the various sections encountered.  Some of
2982 % these are not defined in \file{classes.dtx} but are close analogs of
2983 % those that are.
2984 %
2985 % \begin{macro}{\dedicationsname}
2986 % From the Manual \S 3.3 p9, ``The heading |Dedications| must appear at
2987 % the top of the page.''
2988 %    \begin{macrocode}
2989 \newcommand\dedicationsname{Dedications}
2990 \let\DUTdedicationsname\dedicationsname
2991 %    \end{macrocode}
2992 % \end{macro}
2993 %
2994 % \begin{macro}{\acknowledgmentsname}
2995 % From the Manual \S 3.4 p9, ``The heading |Acknowledgments| must appear
2996 % at the top of the page.''
2997 %    \begin{macrocode}
2998 \newcommand\acknowledgmentsname{Acknowledgments}
2999 \let\DUTacknowledgmentsname\acknowledgmentsname
3000 %    \end{macrocode}
3001 % \end{macro}
3002 %
3003 % \begin{macro}{\contentsname}
3004 % From the Manual \S 3.5 p9, ``The heading |Table of Contents| must
3005 % appear at the top of the page.''  (\file{classes.dtx}, L4331)
3006 %    \begin{macrocode}
3007 \renewcommand\contentsname{Table of Contents}
3008 \let\DUTcontentsname\contentsname
3009 %    \end{macrocode}
3010 % \end{macro}
3011 %
3012 % \begin{macro}{\listtablename}
3013 % From the Manual \S 3.6 p10, ``The heading |List of Tables| must appear
3014 % at the top of the page.''  (\file{classes.dtx}, L4333)
3015 %    \begin{macrocode}
3016 \renewcommand\listtablename{List of Tables}
3017 \let\DUTlisttablename\listtablename
3018 %    \end{macrocode}
3019 % \end{macro}
3020 %
3021 % \begin{macro}{\listfigurename}
3022 % From the Manual \S 3.7 p10, ``The heading |List of Figures| must appear
3023 % at the top of the page.''  (\file{classes.dtx}, L4332)
3024 %    \begin{macrocode}
3025 \renewcommand\listfigurename{List of Figures}
3026 \let\DUTlistfigurename\listfigurename
3027 %    \end{macrocode}
3028 % \end{macro}
3029 %
3030 % \begin{macro}{\abstractname}
3031 % From the Manual \S 3.8 p10, ``The following heading must be centered at
3032 % the top of the first page: |Abstract|\ldots.''
3033 % (\file{classes.dtx}, L4367)
3034 %    \begin{macrocode}
3035 \newcommand\abstractname{Abstract}
3036 \let\DUTabstractname\abstractname
3037 %    \end{macrocode}
3038 % \end{macro}
3039 %
3040 % \begin{macro}{\bibname}
3041 % From the Manual \S 3.13 p12, ``The heading |Bibliography| (or
3042 % |List of References|) must appear at the top of first page.''
3043 % (\file{classes.dtx}, L4344)
3044 %    \begin{macrocode}
3045 \renewcommand\bibname{Bibliography}
3046 \let\DUTbibname\bibname
3047 %    \end{macrocode}
3048 % \end{macro}
3049 %
3050 % \begin{macro}{\appendixname}
3051 % From the Manual \S 3.14 p12, ``Number the appendicies consecutively
3052 % either alphabetically or numerically (|Appendix A|, |Appendix B|\ldots
3053 % or |Appendix 1|, |Appendix 2|\ldots).''
3054 % (\file{classes.dtx}, L4366)
3055 %    \begin{macrocode}
3056 \renewcommand\appendixname{Appendix}
3057 \let\DUTappendixname\appendixname
3058 %    \end{macrocode}
3059 % \end{macro}
3060 %
3061 % \begin{macro}{\vitaname}
3062 % From the Manual \S 3.15 p13, ``The heading |Vita| must appear at the
3063 % top of the page.''
3064 %    \begin{macrocode}
3065 \newcommand\vitaname{Vita}
3066 \let\DUTvitaname\vitaname
3067 %    \end{macrocode}
3068 % \end{macro}
3069 %
3070 % \begin{macro}{\DUTnames}
3071 % Some packages (e.g.,
3072 %   \href{http://www.ctan.org/tex-archive/macros/latex/required/babel/}{%
3073 %     \pkg{babel}})
3074 % mess with our |\*name| values and we have to restore them.
3075 \newcommand{\DUTnames}{%
3076   \gdef\dedicationsname{\DUTdedicationsname}%
3077   \gdef\contentsname{\DUTcontentsname}%
3078   \gdef\listtablename{\DUTlisttablename}%
3079   \gdef\listfigurename{\DUTlistfigurename}%
3080   \gdef\bibname{\DUTbibname}%
3081   \gdef\appendixname{\DUTappendixname}%
3082   \gdef\vitaname{\DUTvitaname}%
3083 }
3084 % \end{macro}
3085 %
3086 %
3087 % \subsection{Remaining details}
3088 %
3089 %
3090 % \subsubsection{Terminal blank page}
3091 %
3092 % Add a terminal blank page (when |\if@final| is true)
3093 % From the Manual \S 3.16 p13
3094 % \begin{quote}
3095 %   Include a blank page (with no page number) at the end of the
3096 %   thesis or dissertation.  The blank page is neither counted nor
3097 %   numbered.
3098 % \end{quote}
3099 %    \begin{macrocode}
3100 \AtEndDocument{\@DUT@blankpage}
3101 %    \end{macrocode}
3102 %
3103 %
3104 %    \begin{macrocode}
3105 %</class>
3106 %    \end{macrocode}
3107 %
3108 %
3109 % \section{Examples}
3110 %
3111 %
3112 % \subsubsection{Template}
3113 %
3114 %    \begin{macrocode}
3115 %<*template>
3116 % See drexel-thesis.pdf for details.
3117 \documentclass{drexel-thesis}
3118
3119 %% Enter the appropriate information here
3120 \author{}    % Fullname
3121 \title{}     % Title Of Thesis
3122 \DUTmonth{}  % Name of the month of you defense
3123 \DUTyear{}   % Year you are defending
3124 \degree{}    % Your target degree, spelled out
3125 \advisor{}   % Advisor's full name, degree
3126 \copyrighttext{} % If not "All Rights Reserved."
3127
3128 %% unsrt style give references in order of citation
3129 \bibliographystyle{unsrt}
3130
3131 \begin{document}
3132 \begin{preamble}
3133
3134 \begin{dedications} % OPTIONAL
3135 %% Type dedications here
3136 \end{dedications}
3137
3138 \begin{acknowledgments} % OPTIONAL
3139 %% Type acknowledgments here
3140 \end{acknowledgments}
3141
3142 \tableofcontents
3143 \listoftables  % If you have tables
3144 \listoffigures % If you have figures
3145
3146 \begin{abstract}
3147 %% Type abstract here
3148 \end{abstract}
3149 \end{preamble}
3150
3151 \begin{thesis}
3152 %% If your thesis does not use \part{}s, you may want to add a
3153 %% part-level PDF bookmark to set the main matter of from the front
3154 %% matter.
3155 %%\pdfbookmark[-1]{Main Matter}{Main Matter}
3156
3157 %% Use include statements to include your main thesis code
3158 %% from seperate files.
3159 %%\include{part1}
3160 %%...
3161 \end{thesis}
3162
3163 \bibliography{references} % Include references.bib BibTeX
3164
3165 \appendix % If you have appendices
3166 %% include files with your appendicies (if any) here
3167 %%\include{appendixA}
3168 %%...
3169
3170 \begin{vita} % Ph.D. only.
3171 %%Vita text.
3172 \end{vita}
3173
3174 \end{document}
3175 %</template>
3176 %    \end{macrocode}
3177 %
3178 %
3179 % \subsection{A better example}
3180 % \label{sec:better-example}
3181 %
3182 % \subsubsection{Main}
3183 %
3184 %    \begin{macrocode}
3185 %<*example|example-draft>
3186 %% See drexel-thesis.pdf for details.
3187 %<example>\documentclass[subfig]{drexel-thesis}
3188 %<example-draft>\documentclass[draft,subfig]{drexel-thesis}
3189
3190 %% Enter the appropriate information here
3191 \author{Johny Henry}
3192 \title{Inadequacies of Steam-Driven Boring Machines}
3193 \DUTmonth{July}
3194 \DUTyear{1872}
3195 \degree{Doctor of Philosophy}
3196 \advisor{Collis Potter Huntington, R.R.D.}
3197 \advisor{Advisor 2, Ph.D.}
3198 \advisor{Advisor 3, Ph.D.}
3199 \copyrighttext{\copyrighttextCCBYSA}
3200
3201 \usepackage[super,sort&compress]{natbib} % fancy citation extensions
3202 \bibliographystyle{unsrtnat}
3203
3204 \usepackage{fancyvrb} % nicer verbatim handling
3205 \DefineShortVerb{\|}  % \verb+TEXT+  ->  |TEXT|
3206
3207 %    \end{macrocode}
3208 % Sometimes other packages clobber \cls{drexel-thesis}'s macros and
3209 % environments.  It's ok though, the originals are all aliased to
3210 % |\DUT*|.  We'll just have to use |DUTpreamble| instead.
3211 %    \begin{macrocode}
3212 \renewenvironment{preamble}{% look, we're clobbering an environment!
3213   What preamble?\begingroup\color{white}}{\endgroup}
3214
3215 %    \end{macrocode}
3216 % Use
3217 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/blindtext/}%
3218 %   {\pkg{blindtext}}
3219 % for dummy text creation.  \pkg{blindtext} requires
3220 % \href{http://www.ctan.org/tex-archive/macros/latex/required/babel/}%
3221 %   {\pkg{babel}}.
3222 %    \begin{macrocode}
3223 \usepackage[english]{babel} % English blindtext
3224 \usepackage{blindtext} % macros for producing dummy output
3225 %    \end{macrocode}
3226 % \pkg{babel} messes with some of our words (\S \ref{sec:words}), so
3227 % we have to reset them.  See the
3228 % \href{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=latexwords}{\TeX\ FAQ}
3229 % for details.
3230 %    \begin{macrocode}
3231 \addto\captionsenglish{\DUTnames}
3232
3233 \begin{document}
3234 \begin{DUTpreamble} % "DUT" because original preamble was clobbered.
3235
3236 \begin{dedications}
3237 We're in \iffinal{final}{draft} mode!
3238
3239 \Blindtext[3]
3240 \end{dedications}
3241
3242 \begin{acknowledgments}
3243 \Blindtext[3]
3244 \end{acknowledgments}
3245
3246 \tableofcontents
3247 \listoftables
3248 \listoffigures
3249
3250 \begin{abstract}
3251 \Blindtext[3]
3252 \end{abstract}
3253 \end{DUTpreamble}
3254
3255 \begin{thesis}
3256 \include{example-1}
3257 \end{thesis}
3258
3259 \bibliography{example-ref}
3260
3261 \appendix
3262 \include{example-a}
3263
3264 \begin{vita}
3265 \Blindtext[3]
3266 \end{vita}
3267
3268 \end{document}
3269 %</example|example-draft>
3270 %    \end{macrocode}
3271 %
3272 %
3273 % \subsubsection{Part}
3274 % \label{section:better-example-part}
3275 %
3276 %    \begin{macrocode}
3277 %<*example-part>
3278 \part{A Part Heading}
3279 \chapter{A Chapter Heading}
3280 \section{A Section Heading}
3281 The following sectioning commands are available:
3282 \begin{quote}
3283  part \\
3284  chapter \\
3285  section \\
3286  subsection \\ 
3287  subsubsection \\ 
3288  paragraph \\ 
3289  subparagraph 
3290 \end{quote}
3291
3292 \subsection{natbib}
3293 You can cite your references with |natbib|'s |\citet| and |\citep|
3294 macros.  See
3295 \href{http://www.ctan.org/tex-archive/macros/latex/contrib/natbib/}
3296 {the natbib manual} for details.
3297
3298 Here we have a text citation \citet{rief97} followed by a
3299 parenthetical citation\citep{rief97}.
3300
3301 \subsubsection{Tables and Figures}
3302 \Blindtext[2]
3303 \begin{table}
3304   \begin{center}
3305   \begin{tabular}{r@{.}l r@{.}l r@{.}l}
3306     \multicolumn{2}{c}{Time (s)} &
3307       \multicolumn{2}{c}{John Henry (m)} &
3308       \multicolumn{2}{c}{Steam drill (m)} \\
3309     0&0 & 0&0 & 0&0 \\
3310     10&0 & 4&3 & 3&75 \\
3311     30&0 & 11&9 & 10&1 \\
3312     \ldots
3313   \end{tabular}
3314   \caption{A table float.} % low caption allowed with floatrow
3315 %% Note the strange |r@{.}l| notation in the |\tabular| column
3316 %% definition.  This allows for numbers aligned at the decimal point
3317 %% (see \href{http://www.stat.unipg.it/tex-man/ltx-68.html}{here}).
3318 %%
3319 %% |\multicolumn{num_cols}{alignment}{contents}| allows the headings
3320 %% to span the pre- and post-decimal columns.
3321   \end{center}
3322 \end{table}
3323 \Blindtext[2]
3324 \begin{figure}
3325   \caption{A figure float. \blindtext} % high caption allowed with floatrow
3326   \begin{center}
3327     \includegraphics[width=0.4\textwidth]{drexel-logo}
3328   \end{center}
3329 \end{figure}
3330 \Blindtext[3]
3331 \begin{figure}
3332   \begin{center}
3333     \subfloat[][]{%
3334       \includegraphics[width=0.2\textwidth]{drexel-logo}%
3335       \label{fig:sub-a}}
3336     \subfloat[][]{%
3337       \includegraphics[width=0.2\textwidth]{drexel-logo}%
3338       \label{fig:sub-b}}
3339     \caption{(a) One subfig float. (b) Another subfig float.%
3340       \label{fig:both}}
3341   \end{center}
3342 \end{figure}
3343 You can reference the subfig floats individually (\ref{fig:sub-a}) or
3344 together (\ref{fig:both}).
3345
3346 \Blindtext[3]
3347
3348 \part{Another Part}
3349 \chapter{Another Chapter}
3350 \Blindtext[5]
3351 \chapter{A Long Title Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla
3352 Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla Bla}
3353 \Blindtext[5]
3354 %</example-part>
3355 %    \end{macrocode}
3356 %
3357 %
3358 % \subsubsection{\BibTeX}
3359 %
3360 % What goes into the \BibTeX\ file |example-ref.bib|?
3361 % For more information, check out this 
3362 % \href{http://cmtw.harvard.edu/Documentation/TeX/Bibtex/Example.html}{basic tutorial}.
3363 % If you want to get deeper, take a look at
3364 % \href{http://www.ctan.org/tex-archive/info/bibtex/tamethebeast/}{Tame the BeaST}.
3365 % Other resources:
3366 % \href{http://www.andy-roberts.net/misc/latex/latextutorial3.html}{how the process works},
3367 %   \href{http://newton.ex.ac.uk/tex/pack/bibtex/btxdoc/node6.html}{entry types},
3368 %   \href{http://newton.ex.ac.uk/tex/pack/bibtex/btxdoc/node7.html}{fields},
3369 %   \href{http://en.wikipedia.org/wiki/BibTeX}{entries and fields},
3370 %   \href{http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html}{assorted style examples}, and
3371 %   \href{http://liinwww.ira.uka.de/bibliography/Bib.Format.html}{assorted \BibTeX tools}.
3372 %
3373 % Here is an example \BibTeX\ file to get you started.  We define
3374 % strings for the publishers, journals, and authors to avoid
3375 % duplication, minimize the risk of typos, etc.
3376 %
3377 %    \begin{macrocode}
3378 %<*example-bibtex-refs>
3379 %% Publishers
3380 @String{APS = "American Physical Society"}
3381
3382 %% Journals
3383 @String{SCI = "Science"}
3384
3385 %% Authors
3386 @String{MRief = "Rief, Matthias"}
3387 @String{MGautel = "Gautel, Mathias"}
3388 @String{FOesterhelt = "Oesterhelt, Filipp"}
3389 @String{JFernandez = "Fernandez, Julio M."}
3390 @String{HGaub = "Gaub, Hermann E."}
3391
3392 %% Articles
3393 @Article{rief97,
3394   author = MRief #" and "# MGautel #" and "# FOesterhelt #" and "#
3395            JFernandez #" and "# HGaub,
3396   title = "Reversible Unfolding of Individual Titin Immunoglobulin
3397            Domains by {AFM}",
3398   journal = SCI,
3399   volume =  276,
3400   number =  5315,
3401   pages =   "1109--1112",
3402   year =    1997,
3403   doi =     "10.1126/science.276.5315.1109",
3404   URL =     "http://www.sciencemag.org/cgi/content/abstract/276/5315/1109",
3405   eprint =  "http://www.sciencemag.org/cgi/reprint/276/5315/1109.pdf",
3406   mynote = "Seminal paper for force spectroscopy on Titin. Cited by
3407            Dietz '04 (ref 9) as an example of how unfolding large
3408            proteins is easily interpreted (vs.\ confusing unfolding in
3409            bulk), but Titin is a rather simple example of that, because
3410            of its globular-chain structure.",
3411 }
3412 %% ...
3413 %</example-bibtex-refs>
3414 %    \end{macrocode}
3415 %
3416 %
3417 % \subsubsection{Appendix}
3418 %
3419 %    \begin{macrocode}
3420 %<*example-appendix>
3421 \chapter{Some Appendix Heading}
3422 \Blindtext[5]
3423 \chapter{Another Appendix Heading}
3424 \Blindtext[5]
3425 %</example-appendix>
3426 %    \end{macrocode}
3427 %
3428 %
3429 % \section{Known bugs and issues}
3430 %
3431 %
3432 % \subsection{Hacks}
3433 %
3434 % \begin{itemize}
3435 %   \item |\vspace*{0\p@}| space between page top and chapter
3436 %     headings (|\@makechapterhead| and |\@makeschapterhead|,
3437 %     Sec.~\ref{sec:implement-chapters}).
3438 %   \item Extra space under LOT and LOF titles compared to TOC.
3439 %     (Secs.~\ref{sec:implement-lof} and \ref{sec:implement-lot}).
3440 % \end{itemize}
3441 %
3442 %
3443 % \subsection{Bugs}
3444 %
3445 % \begin{itemize}
3446 %   \item Different space between chapter heading and section heading,
3447 %     vs.\ chapter heading and text.  Compare \emph{A Chapter Heading}
3448 %     and \emph{Another Chapter} in \file{example.pdf}.  This is a
3449 %     problem (although with opposite order) in the \cls{book} class
3450 %     itself.  For example, compile
3451 %     \begin{example}
3452 %\documentclass{book}
3453 %\begin{document}
3454 %\chapter{Chapter with text}
3455 %Bla bla bla.
3456 %\chapter{Chapter with section}
3457 %\section{Section}
3458 %Bla bla bla.
3459 %\end{document}
3460 %     \end{example}
3461 %   \item Footer overlap if chapter/section names are particularly long.
3462 %     See \emph{Section in long-titled chapter} in \file{example.pdf}.
3463 %     Workaround: turn off sections in the footer:
3464 %     \begin{example}
3465 %       \fancyfoot[RE,LO]{\scshape\leftmark}
3466 %       \fancyfoot[LE,RO]{}
3467 %     \end{example}
3468 %     For more header or footer manipulation ideas, see \S \ref{sec:fancyhdr}.
3469 % \end{itemize}
3470 %
3471 %
3472 % \Finale
3473 \endinput