Major reorganization. Vast improvements.
[drexel-thesis.git] / drexel-thesis.dtx
1 % \def\fileversion{0.3}
2 % \def\filedate{2010/01/09}
3 % \iffalse meta-comment
4 %<class>\def\fileversion{0.3}
5 %<class>\def\filedate{2010/01/09}
6 %
7 % Copyright (C) 2010 W. Trevor King, Daniel J. Cross, T. Tsankov, and
8 %    R. Rojas.
9 % -------------------------------------------------------
10
11 % This file may be distributed and/or modified under the
12 % conditions of the LaTeX Project Public License, either version 1.3
13 % of this license or (at your option) any later version.
14 % The latest version of this license is in:
15 %
16 %    http://www.latex-project.org/lppl.txt
17 %
18 % and version 1.3 or later is part of all distributions of LaTeX 
19 % version 2003/12/01 or later.
20 %
21 % Based on Scott Pakin's dtxtut/cskeleton.dtx
22 %   http://www.ctan.org/tex-archive/info/dtxtut/
23 %
24 % \fi
25 %
26 % \iffalse meta-comment
27 %<*driver>
28 \ProvidesFile{drexel-thesis.dtx}
29 %</driver>
30 %<class>\NeedsTeXFormat{LaTeX2e}
31 %<class>\ProvidesClass{drexel-thesis}
32 %<class> [\filedate\ \fileversion\ Drexel Thesis]
33 %
34 % Code for the .ini driver, see section "2.1 The driver file" of doc.dtx.
35 %<*driver>
36 \documentclass{ltxdoc}
37 \usepackage[colorlinks=true]{hyperref}
38 %</driver>
39 % Include some useful commands from |xkeyval|'s |<preamble>|.
40 %<*driver>
41 \usepackage{xcolor}
42 \usepackage{listings}
43 \lstnewenvironment{command}{%
44   \lstset{columns=flexible,frame=single,backgroundcolor=\color{blue!20},%
45     xleftmargin=\fboxsep,xrightmargin=\fboxsep,escapeinside=`',gobble=1}}{}
46 \lstnewenvironment{example}{%
47   \lstset{basicstyle=\footnotesize\ttfamily,columns=flexible,frame=single,%
48     backgroundcolor=\color{yellow!20},xleftmargin=\fboxsep,%
49     xrightmargin=\fboxsep,gobble=1}}{}
50 %</driver>
51 % Define a quick and dirty version of |xkeyval|'s |\DescribeOptions|.
52 %<*driver>
53 \newenvironment{option}[1]{\begin{macro}{#1}}
54                           {\end{macro}}
55 %</driver>
56 % Some commonly used abbreviations from |classes.dtx|.
57 %<*driver>
58 \newcommand*{\Lopt}[1]{\textsf {#1}}
59 \newcommand*{\file}[1]{\texttt {#1}}
60 \newcommand*{\Lcount}[1]{\textsl {\small#1}}
61 \newcommand*{\pstyle}[1]{\textsl {#1}}
62 %</driver>
63 %<*driver>
64 \makeatletter
65 \def\DescribeOption#1{\leavevmode\@bsphack
66               \marginpar{\raggedleft\PrintDescribeOption{#1}}%
67               \SpecialOptionIndex{#1}\@esphack\ignorespaces}
68 \def\PrintDescribeOption#1{\strut\emph{option}\\\MacroFont #1\ }
69 \def\SpecialOptionIndex#1{\@bsphack
70     \index{#1\actualchar{\protect\ttfamily#1}
71            (option)\encapchar usage}%
72     \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
73            usage}\@esphack}
74 \def\DescribeOptions#1{\leavevmode\@bsphack
75   \marginpar{\raggedleft\strut\emph{options}%
76   \@for\@tempa:=#1\do{%
77     \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa
78   }}\@esphack\ignorespaces}
79 \makeatother
80 %</driver>
81 %<*driver>
82 \EnableCrossrefs
83 \RecordChanges
84 \EnableCrossrefs         
85 \begin{document}
86   \DocInput{drexel-thesis.dtx}
87 \end{document}
88 %</driver>
89 % \fi
90 %
91 % \CheckSum{0}
92 %
93 % \CharacterTable
94 %  {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
95 %   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
96 %   Digits        \0\1\2\3\4\5\6\7\8\9
97 %   Exclamation   \!     Double quote  \"     Hash (number) \#
98 %   Dollar        \$     Percent       \%     Ampersand     \&
99 %   Acute accent  \'     Left paren    \(     Right paren   \)
100 %   Asterisk      \*     Plus          \+     Comma         \,
101 %   Minus         \-     Point         \.     Solidus       \/
102 %   Colon         \:     Semicolon     \;     Less than     \<
103 %   Equals        \=     Greater than  \>     Question mark \?
104 %   Commercial at \@     Left bracket  \[     Backslash     \\
105 %   Right bracket \]     Circumflex    \^     Underscore    \_
106 %   Grave accent  \`     Left brace    \{     Vertical bar  \|
107 %   Right brace   \}     Tilde         \~}
108 %
109 %
110 % \changes{0.1}{2006/01/18}{Rewrite by Daniel J.~Cross}
111 % \changes{0.2}{2010/01/09}{W.~Trevor King transitioned from thesis.cls
112 %   to drexel-thesis.dtx and did a good deal of reorganizing.}
113 % \changes{0.3}{2010/01/11}{W.~Trevor King merged drexelthesis.cls
114 %   developed in the Comp.~Sci.~Department by Jeff Abrahamson,
115 %   Evan Sultanik, C.Y.~Ip, Christopher S.~Dahn, Christopher D.~Cera,
116 %   Mitchell Peabody, David T.~McWherter, and Vincent A.~Cicirello.
117 %   Based on the University of Toronto Thesis \LaTeXe\ Class.  Also
118 %   greatly improved the documentation by incorperating bits of
119 %   the base/*.dtx files.}
120 %
121 % \MakeShortVerb{\|}
122 % \newcommand{\pkg}[1]{\textsf{#1}}
123 % \newcommand{\cls}[1]{\textsf{#1}}
124 % ^^A\newcommand{\BibTeX}{{\sc Bib}\TeX}
125
126 % \title{The \textsf{drexel-thesis} class\thanks{This document
127 %   corresponds to \textsf{drexel-thesis}~\fileversion, dated \filedate.}}
128 % \author{W.~Trevor King \\\texttt{wking@drexel.edu}
129 %         \and Daniel J.~Cross \and T.~Tsankov \and R.~Rojas.}
130 % \date{\filedate}
131 %
132 % \maketitle
133 %
134 %
135 % \section{Introduction}
136 %
137 % This package defines a \LaTeX\ thesis class for Drexel University
138 % conforming to the
139 % \href{http://www.library.drexel.edu/files/services_documents/thesismanual.pdf}
140 %   {Drexel University Thesis Manual version 2009/06/01}.
141 %
142 % \section{Usage}
143 %
144 % To write a thesis, you load the Drexel thesis definitions by loading
145 % the \pkg{drexel-thesis} class at the beginning of your
146 % \LaTeX\ document with the |\documentclass| command.  For example,
147 % \begin{example}
148 %   \documentclass{drexel-thesis}
149 % \end{example}
150 %
151 % \subsection{Options}
152 %
153 % \DescribeOptions{final,draft}
154 % The default option (selected if not options are passed) is
155 % \Lopt{final} mode, which has all the proper formatting and spacing
156 % for your final product. The other main option is \Lopt{draft} mode,
157 % which reduces all the spacing in the document, so might be helpful
158 % when printing out drafts (saves paper).
159 %
160 % \Lopt{final} mode corresponds to (with Thesis Manual chapter and
161 % verse) \\
162 % \begin{tabular}{r p{0.8\textwidth}}
163 %   \Lopt{oneside} & 1.5 Library Submission Information, Print
164 %     Version: ``All copies must be: \ldots Typed/printed on only one
165 %     side of the page (not double-sided).'' \\
166 %   \Lopt{finalspace} & Assorted single, double, and triple spacing
167 %   directives. \\
168 %   \Lopt{dottedtoc} & From the example on p17.
169 % \end{tabular}
170 %
171 % \Lopt{draft} mode corresponds to \\
172 % \begin{tabular}{r p{0.8\textwidth}}
173 %   \Lopt{twoside} & Save space. \\
174 %   \Lopt{draftspace} & Save space. \\
175 %   \Lopt{dottedtoc} & Might as well be consistent with \Lopt{final}. \\
176 %   \Lopt{draftwatermark} & It's good to have a timestamp. \\
177 % \end{tabular}
178 %
179 % \DescribeOption{finalspace}
180 % Loosen spacing.
181 %
182 % \DescribeOption{draftspace}
183 % Tighten spacing.
184 %
185 % \DescribeOptions{dottedtoc,boldtoc,
186 %                  dottedpart,boldpart,
187 %                  dottedchapter,boldchapter}
188 % These options change how the relevant TOC lines are printed
189 % \LaTeX\ defaults to bold but not dots.  The \Lopt{*toc} options set
190 % all of the types.  For example, \Lopt{boldtoc} is equivalent to
191 % \Lopt{boldchapter,boldpart}.
192 %
193 % \DescribeOption{draftwatermark}
194 % \Lopt{draftwatermark} adds ``DRAFT \meta{date}'' watermarks to each
195 % page.  A useful way to remember that the version you're looking at
196 % is not final.  Also helps reviewers tell you what version they're
197 % correcting.
198 %
199 %
200 % \subsubsection{Interesting \cls{book} options}
201
202 % \DescribeOption{oneside}
203 % Setup output for one-sided printing.
204 %
205 % \DescribeOption{twoside}
206 % Setup output for two-sided printing.
207 %
208 % \DescribeOption{leqno}
209 % \Lopt{leqno} places the numbering of formulae on the left hand side
210 % instead of the right.
211 %
212 % \DescribeOption{fleqn}
213 % \Lopt{fleqn} typesets displayed formulae left-aligned instead of
214 % centered.
215 %
216 %
217 % \subsection{Macros}
218 %
219 % \begin{command}
220 %   `\cs{author}\marg{name}'
221 % \end{command}
222 % \DescribeMacro{\author}
223 % Use this macro to set your full name to \meta{name}, including
224 % your middle initial or name.  For example
225 % \begin{example}
226 %   \name{Richard P. Feynman}
227 % \end{example}
228 % See the Manual 3.1 p8.
229 %
230 % \begin{command}
231 %   `\cs{title}\marg{title}'
232 % \end{command}
233 % \DescribeMacro{\title}
234 % Use this macro to set your thesis title to \meta{name}.  For example
235 % \begin{example}
236 %   \title{A New Approach to Quantum Theory}
237 % \end{example}
238 % See the Manual p16.
239 %
240 % \begin{command}
241 %   `\cs{advisor}\marg{name}'
242 % \end{command}
243 % \DescribeMacro{\advisor}
244 % Use this macro to set your advisor's name to \meta{name}.  For
245 % example
246 % \begin{example}
247 %   \advisor{John A. Wheeler, Ph.D.}
248 % \end{example}
249 % See the Manual 3.1 p8.
250 %
251 % \begin{command}
252 %   `\cs{defmonth}\marg{month}'
253 %   `\cs{defyear}\marg{year}'
254 % \end{command}
255 % \DescribeMacro{\defmonth}
256 % \DescribeMacro{\defyear}
257 % Use these macros to set the month with \meta{month} (spelled out)
258 % and year with \meta{year} (four digits) of your thesis defense.  For
259 % example
260 % \begin{example}
261 %   \defmonth{June}
262 %   \defyear{1942}
263 % \end{example}
264 % See the Manual 3.1 p8.
265 % The |def| in |\def*| avoids collisions with the plain \TeX\ 
266 % |\month| and |\year| (see the
267 % \href{http://www.tug.org/utilities/plain/cseq.html#month-rp}{month}
268 % and
269 % \href{http://www.tug.org/utilities/plain/cseq.html#year-rp}{year}
270 % entries in the HTML version of David Bausum's \emph{TeX Reference
271 % Manual}).
272 %
273 % \begin{command}
274 %   `\cs{degree}\marg{degree}'
275 % \end{command}
276 % \DescribeMacro{\degree}
277 % Set your target degree with \meta{degree}.  From the Manual 3.1 p8.
278 % \begin{quote}
279 %   Write out the name of the degree for which you are a candidate.
280 %   All Ph.D.\ candidates must use |Doctor of Philosophy|.  All
281 %   Master's degree candidates should use the precise degree name
282 %   (e.g., |Master of Science in Mechanical Engineering|).
283 % \end{quote}
284 % So, for a Ph.D candidate,
285 % \begin{example}
286 %   \degree{Doctor of Philosophy}
287 % \end{example}
288 %
289 % \begin{command}
290 %   `\cs{copyrighttext}\marg{text}'
291 % \end{command}
292 % \DescribeMacro{\copyrighttext}
293 % Use this macro to set the copyright text to \meta{text}.
294 % The default value is ``All Rights Reserved.''.
295 % \begin{example}
296 %   \copyrighttext{Released to the Public Domain.}
297 % \end{example}
298 % See the Manual 3.2 p9.
299 %
300 % \begin{command}
301 %   `\cs{copyrighttextCC}'
302 % \end{command}
303 % There are a number of predefined copyright messages for ease of use \\
304 % \begin{tabular}{l l}
305 %   |\copyrighttextCC| & Creative Commons copyright \\
306 % \end{tabular}
307 %
308 % \begin{command}
309 %   `\cs{tableofcontents}'
310 % \end{command}
311 % \DescribeMacro{\tableofcontents}
312 % Write the table of contents (Manual 3.5 p9).  You can control the
313 % verbosity by setting |\tocdepth| according to the following table
314 % (\href{http://www.image.ufl.edu/help/latex/intext.shtml}{source}). \\
315 % \begin{tabular}{l l l}
316 %   Depth in document & Section Command & Depth for |\secnumdepth| Command \\
317 %   -1 & |\part| & 1 \\
318 %    0 & |\chapter| & 2 \\
319 %    1 & |\section| & 3 \\
320 %    2 & |\subsection| & 4 \\
321 %    3 & |\subsubsection| & 5 \\
322 %    4 & |\paragraph| & 6 \\
323 %    5 & |\subparagraph| & 7
324 % \end{tabular} \\
325 % For example, to expose everything down to and including the
326 % |\subsection| level, you would add
327 % \begin{example}
328 %   \setcounter{tocdepth}{2}
329 % \end{example}
330 % to your preamble (the section before |\begin{document}|, not the
331 % |preamble| environment discussed below).
332 %
333 % Note that the Manual 3.5 p9 requires ``List chapter titles and at
334 % least the first and second order subdivisions.'', which corresponds
335 % to a |\tocdepth| of at least 2.
336 %
337 % \begin{command}
338 %   `\cs{listoftables}'
339 % \end{command}
340 % \DescribeMacro{\listoftables}
341 % Write the List of Tables page (Manual 3.7 p10).
342 % Skip if you have no tables in your thesis.
343 %
344 % \begin{command}
345 %   `\cs{listoffigures}'
346 % \end{command}
347 % \DescribeMacro{\listoffigures}
348 % Write the List of Figures page (Manual 3.7 p10).
349 % Skip if you have no figures in your thesis.
350 %
351 % \begin{command}
352 %   `\cs{blanklines}\marg{num}'
353 % \end{command}
354 % \DescribeMacro{\blanklines}
355 % Insert \meta{num} blank lines.  For example
356 % \begin{example}
357 %   \blanklines{2}
358 % \end{example}
359 % The skipped lines are always \emph{single spaced} lines, regardless
360 % of the current line spacing in the environment calling this macro.
361 %
362 %
363 % \subsection{Environments}
364 %
365 % \DescribeEnv{preamble}
366 % Generalize the |\frontmatter| for the thesis, setting up page
367 % numbering, including the title page, copyright page etc.  The
368 % |preamble| environment should contain the following elements
369 % (in order, see the Manual p8)
370 % \begin{itemize}
371 %   \item |dedication| environment (optional)
372 %   \item |acknowledgments| environment (optional)
373 %   \item |\tableofcontents|
374 %   \item |\listoftables|
375 %   \item |\listoffigures|
376 %   \item |abstract| environment
377 % \end{itemize}
378 % This will take care of everything from the title page (Manual 3.1),
379 % up through the blank page before the text (Manual 3.9).
380 %
381 % \DescribeEnv{dedications}
382 % Set the dedications text.
383 % Highlights from the Manual 3.3 p9:
384 % \begin{quote}
385 %   The |Dedications| page is optional.
386 % \end{quote}
387 %
388 % \DescribeEnv{acknowledgments}
389 % Set the acknowledgments text.
390 % Highlights from the Manual 3.4 p9:
391 % \begin{quote}
392 %   The |Acknowledgments| page is optional, but most theses do
393 %   include a brief statement of thanks or recognition of any special
394 %   assistance.
395 % \end{quote}
396 %
397 % \DescribeEnv{abstract}
398 % Set the thesis abstract text.  In the Thesis Manual, see section 3.8
399 % Abstract (p10) for details, p20 for an example.
400 %
401 % Highlights from the Manual:
402 % \begin{quote}
403 %   The abstract is a summary that allows readers to determine the
404 %   value of reading the full thesis.  It should include a statement
405 %   of the problem, an outline of procedures or methods, and a summary
406 %   of results and conclusions.
407 % \end{quote}
408 % \begin{itemize}
409 %   \item Word limits: 600 for a Master's thesis, 350 for a Ph.D.\ thesis.
410 % \end{itemize}
411 %
412 % \DescribeEnv{thesis}
413 % Set the thesis text.  In the Thesis Manual, see section 3.10 Thesis
414 % (p11) for details.
415 %
416 % Highlights from the Manual:
417 % \begin{quote}
418 %   Divide the text into its major parts/chapters/subsections.  No
419 %   fixed arrangement is necessary.  The major parts may contain such
420 %   subjects as introduction, general argument, description of
421 %   experimental procedures, research methods, discussion, summary,
422 %   conclusions, recommendations, and other pertinent topics that are
423 %   necessary for a complete understanding on the part of a
424 %   sophisticated or professional reader.
425 % \end{quote}
426 %
427 % \DescribeEnv{vita}
428 % Set the thesis vita text (Ph.D.\ only).  See the Manual 3.15 p12,
429 % ``Vita'', for details.
430 %
431 % Highlights from the Manual:
432 % \begin{quote}
433 %   The Vita is a biography of the student written in the third person
434 %   in either essay or outline form.  It should include the full name,
435 %   place and date of birth (optional), country of citizenship
436 %   (optional), institutions attended, degrees and honors received,
437 %   titles of publications, teaching and professional experience, and
438 %   other pertinent data.  The Vita must be one page or less.
439 % \end{quote}
440 %
441 %
442 % \subsection{Hints}
443 %
444 %
445 % \subsubsection{Package installation}
446 % \label{sec:dependencies}
447 %
448 % All the packages this class depends on must be installed somewhere
449 % in your texmf tree (they probably already are).  If not, you will
450 % recieve warning messages on compilation such as
451 % \begin{example}
452 %   ! LaTeX Error: File `missing-package.sty' not found.
453 % \end{example}
454 % You should then install the missing package(s) using your operating
455 % systems package manager, or grab the missing package from
456 % \href{http://www.ctan.org/}{CTAN}, and install them following TODO.
457 %
458 %
459 % \subsubsection{Tables and Figures}
460 %
461 % From the Manual 2.3 p6, ``Tables and Figures'', 
462 % \begin{quote}
463 %   Place figure captions below figures.
464 %   Place table captions above tables.
465 % \end{quote}
466 % so make sure the |\caption| command is in the appropriate location.
467 % For example
468 % \begin{example}
469 %   \begin{table}
470 %      \caption{Some caption text}
471 %      \begin{tabular}{...}
472 %        ...
473 %      \end{tabular}
474 %   \end{table}
475 % \end{example}
476 % or
477 % \begin{example}
478 %   \begin{float}
479 %      \includegraphics{...}
480 %      \caption{Some caption text}
481 %   \end{float}
482 % \end{example}
483 % \pkg{drexel-thesis} loads
484 % \href{http://www.ctan.org/tex-archive/macros/latex/required/graphics/}{\pkg{graphicx}}
485 % to define the |\includegraphics| macro.  For more useful
486 % float information, see the
487 % \href{http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions}
488 %   {\LaTeX\ wikibook page}.
489
490 %
491 % \subsubsection{Citations}
492 %
493 % I highly recommend using \BibTeX\ and
494 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/natbib/}{\pkg{natbib}}.
495 % See Section \ref{sec:better-example} for a simple example.
496 %
497 % Suggested options:\\
498 % \begin{tabular}{r p{0.8\textwidth}}
499 %   |super| & selects citations in superscript mode. \\
500 %   |sort&compress| & automatically sorts and compresses compound
501 %     citations (|\pcite{a,b,...}|).
502 % \end{tabular}
503 %
504 %
505 % \subsubsection{References}
506 %
507 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/cleveref/}{\pkg{cleveref}}.
508 % Is a wonderful tool for easy, consistent crosslinking.  The manual is also very good.
509 %
510 %
511 % \subsubsection{Hyperlinks}
512 %
513 % \cls{drexel-thesis} loads
514 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/}{\pkg{hyperref}}.
515 % with the options:\\
516 % \begin{tabular}{r p{0.8\textwidth}}
517 %   |colorlinks| & color the link letters instead of drawing colored boxes. \\
518 % \end{tabular}
519 %
520 % If running with a pdftex-based driver, |\author|, |\title|, and
521 % |\degree| automatically set |pdfauthor|, |pdftitle|, and
522 % |pdfsubject| respectively.  You can use the |\hypersetup| macro to
523 % set options overriding these defaults.
524 %
525 %
526 % \StopEventually{\pagebreak\PrintChanges}
527 %
528 %
529 % \section{Implementation}
530 %    \begin{macrocode}
531 %<*class>
532 %    \end{macrocode}
533 %
534 % For simplicity, we'll derive everything from the standard \cls{book}
535 % class.
536 %
537 %
538 % \subsection{Option Processing}
539 %
540 % Include
541 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/xkeyval/}{\pkg{xkeyval}}
542 % for easier option parsing.  If the package is not installed on your system,
543 % see Section \ref{sec:dependencies} for installation instructions.
544 %    \begin{macrocode}
545 \RequirePackage{xkeyval}
546 %    \end{macrocode}
547 %
548 % Define some booleans to store option states
549 %    \begin{macrocode}
550 \newif\if@mainmatter \@mainmattertrue
551 \newif\if@dottedchapter 
552 \newif\if@boldchapter
553 \newif\if@boldpart
554 \newif\if@dottedpart
555 \newif\if@draftwatermark
556 \newif\if@appendix
557 \newif\if@final \@finalfalse
558 %    \end{macrocode}
559 %
560 % \begin{option}{finalspace}
561 %    \begin{macrocode}
562 \DeclareOptionX{finalspace}{
563   \setlength\overfullrule{0pt}
564   \def\@cont@sep{1} % content page separation (# blanklines between entries)
565   \def\@ssp{1} % single space
566   \def\@dsp{2} % double space
567   \def\@tsp{3} % triple space
568   \@finaltrue
569 }
570 %    \end{macrocode}
571 % \end{option}
572 % \begin{option}{draftspace}
573 %    \begin{macrocode}
574 \DeclareOptionX{draftspace}{
575   \setlength\overfullrule{5pt}
576   \def\@cont@sep{0} % content page separation (# blanklines between entries)
577   \def\@ssp{1} % single space
578   \def\@dsp{1} % double space
579   \def\@tsp{2} % triple space
580 %    \end{macrocode}
581 %  Don't force chapters onto right-hand pages.
582 %    \begin{macrocode}
583   \PassOptionsToClass{openany}{book}
584   \@finalfalse
585 }
586 %    \end{macrocode}
587 % \end{option}
588 %
589 % \begin{option}{dottedpart}
590 %    \begin{macrocode}
591 \DeclareOptionX{dottedpart}{\@dottedparttrue}
592 %    \end{macrocode}
593 % \end{option}
594 % \begin{option}{dottedchapter}
595 %    \begin{macrocode}
596 \DeclareOptionX{dottedchapter}{\@dottedchaptertrue}
597 %    \end{macrocode}
598 % \end{option}
599 % \begin{option}{boldpart}
600 %    \begin{macrocode}
601 \DeclareOptionX{boldpart}{\@boldparttrue}
602 %    \end{macrocode}
603 % \end{option}
604 % \begin{option}{boldchapter}
605 %    \begin{macrocode}
606 \DeclareOptionX{boldchapter}{\@boldchaptertrue}
607 %    \end{macrocode}
608 % \end{option}
609 % \begin{option}{dottedtoc}
610 %    \begin{macrocode}
611 \DeclareOptionX{dottedtoc}{
612   \setkeys{drexel-thesis.cls}{dottedpart}
613   \setkeys{drexel-thesis.cls}{dottedchapter}
614 }
615 %    \end{macrocode}
616 % \end{option}
617 % \begin{option}{boldtoc}
618 %    \begin{macrocode}
619 \DeclareOptionX{boldtoc}{
620   \setkeys{drexel-thesis.cls}{boldpart}
621   \setkeys{drexel-thesis.cls}{boldchapter}
622 }
623 %    \end{macrocode}
624 % \end{option}
625 %
626 % \begin{option}{draftwatermark}
627 % Set draft watermark flag
628 %    \begin{macrocode}
629 \DeclareOptionX{draftwatermark}{\@draftwatermarktrue}
630 %    \end{macrocode}
631 % \end{option}
632 %
633 % Define the book options that \Lopt{final} and \Lopt{draft} need to
634 % access.
635 % \begin{option}{oneside}
636 %    \begin{macrocode}
637 \DeclareOptionX{oneside}{\PassOptionsToClass{oneside}{book}}
638 %    \end{macrocode}
639 % \end{option}
640 %
641 % \begin{option}{twoside}
642 %    \begin{macrocode}
643 \DeclareOptionX{twoside}{\PassOptionsToClass{twoside}{book}}
644 %    \end{macrocode}
645 % \end{option}
646 %
647 % \begin{option}{final}
648 %    \begin{macrocode}
649 \DeclareOptionX{final}{
650   \setkeys{drexel-thesis.cls}{oneside}
651   \setkeys{drexel-thesis.cls}{finalspace}
652   \setkeys{drexel-thesis.cls}{dottedtoc}
653 }
654 %    \end{macrocode}
655 % \end{option}
656 %
657 % \begin{option}{draft}
658 %    \begin{macrocode}
659 \DeclareOptionX{draft}{
660   \setkeys{drexel-thesis.cls}{twoside}
661   \setkeys{drexel-thesis.cls}{draftspace}
662   \setkeys{drexel-thesis.cls}{dottedtoc}
663   \setkeys{drexel-thesis.cls}{draftwatermark}
664 }
665 %    \end{macrocode}
666 % \end{option}
667 %
668 % Use the default \cls{book} implementation for any remaining options
669 % including \Lopt{oneside}, \Lopt{twoside}, \Lopt{leqno}, \Lopt{fleqn},
670 % \ldots.
671 %    \begin{macrocode}
672 \DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{book}}
673 %    \end{macrocode}
674 %
675 % Execute the default options
676 %    \begin{macrocode}
677 \ExecuteOptionsX{final}
678 %    \end{macrocode}
679 %
680 % Process options and load the book class
681 %    \begin{macrocode}
682 \ProcessOptionsX\relax
683 \LoadClass{book}
684 %    \end{macrocode}
685 %
686 %
687 % \subsection{Internal package includes}
688 %
689
690 % Include some other packages we'll need.  If the package is not
691 % installed on your system, see Section \ref{sec:dependencies} for
692 % installation instructions.
693 %
694 % For many packages, we want the same functionality for both
695 % \Lopt{final} and \Lopt{draft} modes.  We pass \Lopt{final} to most
696 % of those packages to override a possible \Lopt{draft} option passed
697 % to \pkg{drexel-thesis}.
698 %
699 %
700 % \subsubsection{\pkg{setspace}}
701 %
702 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/setspace/}{\pkg{setspace}}
703 % for double spacing.
704 %    \begin{macrocode}
705 \RequirePackage{setspace}
706 %    \end{macrocode}
707 %
708 % \subsubsection{\pkg{calc}}
709 %
710 % \href{http://www.ctan.org/tex-archive/macros/latex/required/tools/}{\pkg{calc}}
711 % for |\blanklines| macro.
712 %    \begin{macrocode}
713 \RequirePackage{calc}
714 %    \end{macrocode}
715 %
716 % \subsubsection{\pkg{graphicx}}
717 %
718 % \href{http://www.ctan.org/tex-archive/macros/latex/required/graphics/}{\pkg{graphicx}}
719 % for |\includegraphics|.  Not strictly necessary, but I can't imagine
720 % a thesis without figures.
721 %    \begin{macrocode}
722 \RequirePackage[final]{graphicx}
723 %    \end{macrocode}
724 %
725 % We include the graphicx package now so we can
726 % pass \Lopt{final}, because some later packages include it with no options,
727 % and a \Lopt{final} include after that produces errors like
728 % \begin{example}
729 %   l.104 \RequirePackage
730 %                        [final]{ifpdf}
731 %   The package graphicx has already been loaded with options:
732 %     []
733 %   There has now been an attempt to load it with options
734 %     [final]
735 % \end{example}
736 %
737 % \subsubsection{\pkg{draftmark}}
738 %
739 % The Comp.~Sci.\ class used
740 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/draftcopy/}{\pkg{draftcopy}}
741 % to add their watermarks, but as of the current 2002/02/25 v2.16, it
742 % uses postscript specials, and so doesn't work with pdf\LaTeX.
743 % Instead we use the recent (catalogued 2009/11/03)
744 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/draftmark/}{\pkg{draftmark}}
745 % which unfortunately has a number of apparently non-standard dependencies
746 % (\href{http://www.ctan.org/tex-archive/macros/latex/contrib/etextools/}{\pkg{etextools}},
747 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/etoolbox/}{\pkg{etoolbox}},
748 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/xifthen/}{\pkg{xifthen}},
749 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/ltxnew/}{\pkg{ltxnew}},
750 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/pagerange/}{\pkg{pagerange}},
751 %  \href{http://www.ctan.org/tex-archive/macros/latex/contrib/lastpage/}{\pkg{lastpage}},
752 %  if only I had the space to install |texlive-latexextra| |:p|).
753 % The output is, however, very flexible, and it \emph{does} work with
754 % both \LaTeX\ and pdf\LaTeX.  If you don't like the default watermark,
755 % you can also adjust the particulars with |\draftmarksetup|.
756 %    \begin{macrocode}
757 \if@draftwatermark
758   \RequirePackage[draft,allpages,mark={DRAFT \today},
759                   fontsize=2cm,grayness=0.9]{draftmark}
760 \fi
761 %    \end{macrocode}
762 %
763 % \subsubsection{\pkg{geometry}}
764 %
765 % Setup page margins with the
766 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/geometry/}{\pkg{geometry}}
767 % package.  From the Manual p5:
768 % \begin{itemize}
769 %   \item The left margin must be at least 1 1/2'' (1.5 inches)
770 %   throughout the document.
771 %   \item All other margins (top, bottom, and right) must be at least 1''.
772 % \end{itemize}
773 % And from the Manual 1.5 p4, Print Version:
774 % \begin{quote}
775 %   The paper size must be 8 1/2'' x 11''.
776 % \end{quote}
777 %    \begin{macrocode}
778 \RequirePackage[letterpaper,margin=1in,bindingoffset=0.5in]{geometry}
779 %    \end{macrocode}
780 % Note that we include the \pkg{geometry} package after loading \cls{book} to
781 % override the margin manipulation that takes place in \cls{book}.
782 %
783 % \subsubsection{\pkg{fancyhdr}}
784 %
785 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/}{\pkg{fancyhdr}}
786 % for correct page numbering and fancy headers.
787 %    \begin{macrocode}
788 \RequirePackage{fancyhdr}
789 %    \end{macrocode}
790 % Setup the standard |fancy| format.  |\leftmark| is the higher level
791 % mark, see |\chaptermark| below.  |\rightmark| is the lower level
792 % mark, see |\sectionmark| below.
793 %    \begin{macrocode}
794 \pagestyle{fancy}
795 \fancyhf{}
796 \fancyhead[LE,RO]{\slshape\rightmark}
797 \fancyhead[LO,RE]{\slshape\leftmark}
798 \fancyfoot[LE,RO]{\thepage}
799 %    \end{macrocode}
800 % Override the |plain| format (for chapter pages, etc.).
801 %    \begin{macrocode}
802 \fancypagestyle{plain}{
803   \fancyhf{}
804   \renewcommand{\headrulewidth}{0pt}
805   \fancyfoot[LE,RO]{\thepage}
806 }
807 %    \end{macrocode}
808 %
809 %
810 % \subsubsection{\pkg{ifpdf}}
811 %
812 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/}{\pkg{ifpdf}}
813 % for detecting PDF drivers.  We use it to configure \pkg{hyperref} below.
814 %    \begin{macrocode}
815 \RequirePackage{ifpdf}
816 %    \end{macrocode}
817
818 % \subsubsection{\pkg{hyperref}}
819 %
820 % \href{http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/}{\pkg{hyperref}}
821 % for hyperlinks.  Not strictly necessary, but I can't imagine a
822 % thesis without it.
823 %    \begin{macrocode}
824 \RequirePackage[final]{hyperref}
825 %    \end{macrocode}
826 % Nobody likes the default colored boxes.  Color the text itself.
827 %    \begin{macrocode}
828 \hypersetup{colorlinks}
829 %    \end{macrocode}
830 % If we're writing a PDF, we set the |pdfauthor|, etc.\ arguments in
831 % |\author|, etc.\ to avoid using |\AtBeginDocument| or some such.
832 %
833 %
834 % \subsection{\LaTeX\ overrides and extensions}
835 %
836 % Here we change the behavior of a bunch of macros and environments
837 % from \file{latex.ltx} (generated by \file{format.ins} in
838 % \href{http://www.ctan.org/tex-archive/macros/latex/base/}{\pkg{base}}).
839 % We'll copy in their original notes along with their code, following
840 % the relevant documentation an order given in \file{format.ins} and
841 % the associated \file{*.dtx} files.
842 %
843 %
844 % \subsubsection{\file{ltsect.dtx}}
845 %
846 % \begin{macro}{\title}
847 % |\title| for use in |\maketitle|. If not given |\maketitle| will
848 % produce a warning message (\file{ltsect.dtx}, L117).
849 %
850 % We extend |\title| to set \pkg{hyperref}'s |pdftitle|.
851 % (\file{ltsect.dtx}, L117).
852 %    \begin{macrocode}
853 \let\DUT@title\title
854 \renewcommand{\title}[1]{
855   \DUT@title{#1}
856   \ifpdf \hypersetup{pdftitle={\@title}} \fi
857 }
858 %    \end{macrocode}
859 % \end{macro}
860 %
861 % \begin{macro}{\author}
862 % |\author| for use in |\maketitle|.  If not given |\maketitle| will
863 % produce a warning message (\file{ltsect.dtx}, L129).
864 %
865 % We extend |\author| to set \pkg{hyperref}'s |pdfauthor|.
866 % (\file{ltsect.dtx}, L129).
867 %    \begin{macrocode}
868 \let\DUT@author\author
869 \renewcommand{\author}[1]{
870   \DUT@author{#1}
871   \ifpdf \hypersetup{pdfauthor={\@author}} \fi
872 }
873 %    \end{macrocode}
874 % \end{macro}
875 %
876 % In a similar vein, we some additional meta-info macros.
877 %
878 %  \begin{macro}{\advisor}
879 %  \begin{macro}{\@advisor}
880 % |\advisor| for use in |\maketitle|.  If not given |\maketitle| will
881 % produce an error message.
882 %    \begin{macrocode}
883 \def\advisor#1{\gdef\@advisor{#1}}
884 \def\@advisor{\@latex@error{No \noexpand\advisor given}\@ehc}
885 %    \end{macrocode}
886 %  \end{macro}
887 %  \end{macro}
888 %
889 %  \begin{macro}{\defmonth}
890 %  \begin{macro}{\@defmonth}
891 % |\defmonth| (defense month) for use in |\maketitle|.  If not given
892 % |\maketitle| will produce an error message.
893 %    \begin{macrocode}
894 \def\defmonth#1{\gdef\def@month{#1}}
895 \def\def@month{\@latex@error{No \noexpand\defmonth given}\@ehc}
896 %    \end{macrocode}
897 %  \end{macro}
898 %  \end{macro}
899 %
900 %  \begin{macro}{\defyear}
901 %  \begin{macro}{\@defyear}
902 % |\defyear| (defense year) for use in |\maketitle|.  If not given
903 % |\maketitle| will produce an error message.
904 %    \begin{macrocode}
905 \def\defyear#1{\gdef\def@year{#1}}
906 \def\def@year{\@latex@error{No \noexpand\defyear given}\@ehc}
907 %    \end{macrocode}
908 %  \end{macro}
909 %  \end{macro}
910 %
911 %  \begin{macro}{\degree}
912 %  \begin{macro}{\@degree}
913 % |\degree| for use in |\maketitle|.  If not given |\maketitle| will
914 % produce an error message.
915 %    \begin{macrocode}
916 \def\degree#1{\gdef\@degree{#1}
917   \ifpdf \hypersetup{pdfsubject={\@degree}} \fi}
918 \def\@advisor{\@latex@error{No \noexpand\degree given}\@ehc}
919 %    \end{macrocode}
920 %  \end{macro}
921 %  \end{macro}
922 %
923 %  \begin{macro}{\copyrighttext}
924 %  \begin{macro}{\@copyrighttext}
925 % |\copyrighttext| for use in |\makecopyright|.  There are a number of
926 % blurbs predefined in Section \ref{sec:implement-copyright}.
927 %    \begin{macrocode}
928 \def\copyrighttext#1{\gdef\@copyrighttext{#1}}
929 \def\@copyrighttext{All Rights Reserved.}
930 %    \end{macrocode}
931 %  \end{macro}
932 %  \end{macro}
933 %
934 %
935 % \begin{command}
936 %   `\cs{AddContentsLine}\marg{table}\marg{type}\marg{notcap}\marg{entry}'
937 % \end{command}
938 % \begin{macro}{\AddContentsLine}
939 % Define a version of |\addcontentsline| that capitalizes \meta{entry}.
940 % \meta{notcap} allows for |\numberline| bits, etc.
941 %    \begin{macrocode}
942 \newcommand{\AddContentsLine}{\@ifstar
943   \@AddContentsLine\@sAddContentsLine}
944 \newcommand{\@AddContentsLine}[4]{%
945 %  \addcontentsline{#1}{#2}{#3#4}}
946   \addcontentsline{#1}{#2}{#3\uppercase{#4}}}
947 \newcommand{\@sAddContentsLine}[4]{%
948 %  \addcontentsline{#1}{#2}{#3#4}}
949   \addcontentsline{#1}{#2}{#3\uppercase{#4}}}
950 %  \addcontentsline{#1}{#2}{#3\MakeUppercase{#4}}}
951 %    \end{macrocode}
952 % \end{macro}
953 %
954 %
955 % \begin{macro}{\@dottedtocline}
956 % |\@dottedtocline{|\meta{level}|}{|\meta{indent}|}{|\meta{numwidth}%
957 %        |}{|\meta{title}|}{|\meta{page}|}|:
958 %   Macro to produce a table of contents line with the following
959 %   parameters:
960 %   \begin{description}
961 %   \item[level] If \meta{level} $>$ |\c@tocdepth|, then no line 
962 %                produced.
963 %   \item[indent] Total indentation from the left margin.
964 %   \item[numwidth] Width of box for number if the \meta{title} has a
965 %                |\numberline| command.  This is also the amount of extra
966 %                indentation added to second and later lines of a
967 %                multiple line entry.
968 %   \item[title] Contents of entry.
969 %   \item[page] Page number.
970 %  \end{description}
971 %
972 %  Uses the following parameters, which must be set by the document
973 %  style. They should be defined with |\def|'s.
974 %  \begin{description}
975 %  \item[|\@pnumwidth|]  Width of box in which page number is set.
976 %  \item[|\@tocrmarg|] Right margin indentation for all but last line
977 %        of multiple-line entries.
978 %  \item[|\@dotsep|] Separation between dots, in mu units.
979 %                  Should be |\def|'d to a number like 2 or 1.7
980 %  \end{description}
981 %
982 % We just add |spacing| environments to \cls{book}'s version.
983 % (\file{ltsect.dtx}, L804).
984 %    \begin{macrocode}
985 \def\@dottedtocline#1#2#3#4#5{%
986   \begin{spacing}{\@ssp}
987   \ifnum #1>\c@tocdepth \else
988     \vskip \z@ \@plus.2\p@
989     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
990      \parindent #2\relax\@afterindenttrue
991      \interlinepenalty\@M
992      \leavevmode
993      \@tempdima #3\relax
994      \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
995      {#4}\nobreak
996      \leaders\hbox{$\m@th
997         \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
998         mu$}\hfill
999      \nobreak
1000      \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
1001      \par}%
1002      \blanklines{\@cont@sep}
1003   \fi
1004   \end{spacing}
1005 }
1006 %    \end{macrocode}
1007 % \end{macro}
1008 %
1009 %
1010 % Fix |\@ssect| and |\@sect| from \file{latex.ltx} to give single
1011 % spaced headings.
1012 %
1013 % \begin{macro}{\@sect}
1014 % Pseudocode for the |\@sect| command
1015 %     \begin{macrocode}
1016 % \@sect{NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}[ARG1]{ARG2}
1017 %           ==
1018 %   BEGIN
1019 %    IF LEVEL > \c@secnumdepth
1020 %      THEN \@svsec :=L null
1021 %      ELSE \refstepcounter{NAME}
1022 %           \@svsec :=L BEGIN \@seccntformat{#1}\relax END
1023 %    FI
1024 %    IF AFTERSKIP > 0
1025 %      THEN \begingroup
1026 %              STYLE
1027 %              \@hangfrom{\hskip INDENT\@svsec}
1028 %              {\interlinepenalty 10000 ARG2\par}
1029 %           \endgroup
1030 %           \NAMEmark{ARG1}
1031 %           \addcontentsline{toc}{NAME}
1032 %              { IF  LEVEL > \c@secnumdepth
1033 %                  ELSE \protect\numberline{\theNAME}  FI
1034 %                ARG1 }
1035 %      ELSE \@svsechd == BEGIN  STYLE
1036 %                               \hskip INDENT\@svsec
1037 %                               ARG2
1038 %                               \NAMEmark{ARG1}
1039 %                               \addcontentsline{toc}{NAME}
1040 %                                  { IF  LEVEL > \c@secnumdepth
1041 %                                      ELSE 
1042 %                                        \protect\numberline{\theNAME}
1043 %                                      FI
1044 %                                    ARG1 }
1045 %                        END
1046 %    FI
1047 %    \@xsect{AFTERSKIP}
1048 % END
1049 %    \end{macrocode}
1050 % (\file{ltsect.dtx}, L295).
1051 %    \begin{macrocode}
1052 \def\@sect#1#2#3#4#5#6[#7]#8{%
1053   \ifnum #2>\c@secnumdepth
1054     \let\@svsec\@empty
1055   \else
1056     \refstepcounter{#1}%
1057     \protected@edef\@svsec{\@seccntformat{#1}\relax}%
1058   \fi
1059   \@tempskipa #5\relax
1060   \ifdim \@tempskipa>\z@
1061     \begingroup
1062 %    \end{macrocode}
1063 % Here we deviate from \file{ltsect.dtx} to ensure single spacing for
1064 % the section title.
1065 %    \begin{macrocode}
1066     \begin{spacing}{\@ssp}
1067       #6{%
1068         \@hangfrom{\hskip #3\relax\@svsec}%
1069           \interlinepenalty \@M #8\@@par}%
1070     \end{spacing}
1071     \endgroup
1072     \csname #1mark\endcsname{#7}%
1073     \addcontentsline{toc}{#1}{%
1074       \ifnum #2>\c@secnumdepth \else
1075         \protect\numberline{\csname the#1\endcsname}%
1076       \fi
1077       #7}%
1078   \else
1079     \def\@svsechd{%
1080       #6{\hskip #3\relax
1081       \@svsec #8}%
1082       \csname #1mark\endcsname{#7}%
1083       \addcontentsline{toc}{#1}{%
1084         \ifnum #2>\c@secnumdepth \else
1085           \protect\numberline{\csname the#1\endcsname}%
1086         \fi
1087         #7}}%
1088   \fi
1089   \@xsect{#5}}
1090 %    \end{macrocode}
1091 % \end{macro}
1092 %
1093 % \begin{macro}{\@ssect}
1094 % Pseudocode for the |\@ssect| command
1095 %     \begin{macrocode}
1096 % \@ssect{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}{ARG} ==
1097 %   BEGIN
1098 %    IF AFTERSKIP > 0
1099 %      THEN \begingroup
1100 %             STYLE
1101 %             \@hangfrom{\hskip INDENT}{\interlinepenalty 10000 ARG\par}
1102 %           \endgroup
1103 %      ELSE \@svsechd == BEGIN STYLE
1104 %                              \hskip INDENT
1105 %                              ARG
1106 %                        END
1107 %    FI
1108 %    \@xsect{AFTERSKIP}
1109 %   END
1110 %     \end{macrocode}
1111 % (\file{ltsect.dtx}, L521).
1112 %    \begin{macrocode}
1113 \def\@ssect#1#2#3#4#5{%
1114   \@tempskipa #3\relax
1115   \ifdim \@tempskipa>\z@
1116     \begingroup
1117 %    \end{macrocode}
1118 % Here we deviate from \file{ltsect.dtx} to ensure single spacing for
1119 % the section title.
1120 %    \begin{macrocode}
1121     \begin{spacing}{\@ssp}
1122       #4{%
1123         \@hangfrom{\hskip #1}%
1124           \interlinepenalty \@M #5\@@par}%
1125     \endgroup
1126     \end{spacing}
1127   \else
1128     \def\@svsechd{#4{\hskip #1\relax #5}}%
1129   \fi
1130   \@xsect{#3}}
1131 %    \end{macrocode}
1132 % \end{macro}
1133 %
1134 %
1135 % \subsubsection{\file{ltbibl.dtx}}
1136 %
1137 % \DescribeMacro{\bibliography}
1138 % \DescribeEnv{thebibliography}
1139 % A bibliography is created by the |thebibliography| environment, which
1140 % generates a title such as ``Bibliography'', and a list of entries.
1141 % The \BibTeX\ program will create a file containing such an
1142 % environment, which will be read in by the |\bibliography| command.
1143 % With \BibTeX, the following commands will be used.
1144 %
1145 % The document class must define the thebibliography environment.  This
1146 % environment has a single argument, which is the widest bibliography
1147 % label-- e.g., if the [Knuth67] is the widest entry, then this
1148 % argument will be Knuth67.  The |\thebibliography| command must begin
1149 % a list  environment, which the |\endthebibliography| command ends.
1150 %
1151 % \begin{macro}{\bibliography}
1152 % |\bibliography|\marg{file1,file2,\ldots,filen} : specifies
1153 %   the bibdata files.  Writes a |\bibdata| entry on the |.aux| file
1154 %   and tries to read in |mainfile.bbl|.
1155 %
1156 % We don't need to change it, but it explains why we need to override
1157 % |thebibliography| even when we don't use it directly.
1158 % (\file{ltbibl.dtx}, L284).
1159 %    \begin{macrocode}
1160 %\def\bibliography#1{%
1161 %  \if@filesw
1162 %    \immediate\write\@auxout{\string\bibdata{#1}}%
1163 %  \fi
1164 %  \@input@{\jobname.bbl}
1165 %}
1166 %    \end{macrocode}
1167 % \end{macro}
1168 %
1169 %
1170 % \subsubsection{\file{ltoutput.dtx}}
1171 %
1172 % \begin{macro}{\DUT@clearpage}
1173 % \begin{macro}{\DUT@cleardoublepage}
1174 % Versions of |\clear*page| that only work when |\if@final| is true
1175 % (\file{ltoutput.dtx}, L877 and L904).
1176 %    \begin{macrocode}
1177 \newcommand\DUT@clearpage{\if@final \clearpage \fi}
1178 \newcommand\DUT@cleardoublepage{\if@final \cleardoublepage \fi}
1179 %    \end{macrocode}
1180 % \end{macro}
1181 % \end{macro}
1182 %
1183 % \begin{macro}{\blankpage}
1184 % Add a useful extension to insert a blank page without numbering.
1185 % In draft mode, this macro is a no-op.
1186 %    \begin{macrocode}
1187 \newcommand\blankpage{%
1188   \if@final
1189     \DUT@clearpage
1190     \thispagestyle{empty}
1191     \hphantom{0}
1192     \DUT@clearpage
1193   \else\fi
1194 }
1195 %    \end{macrocode}
1196 % \end{macro}
1197 %
1198 % \begin{command}
1199 %   `\cs{set@lines@length}\marg{length}\marg{N}'
1200 % \end{command}
1201 % \begin{macro}{\set@lines@length}
1202 % Many specifications in the Manual refer to ``\meta{N} blank lines''.
1203 % |\set@lines@length| allows you to set a length to a given number of
1204 % lines, protecting against external |spacing| environments.  It
1205 % requires \pkg{calc} for the multiplication.
1206 %    \begin{macrocode}
1207 \let\DUT@baselineskip\baselineskip
1208 \newcommand{\set@lines@length}[2]{%
1209   \setlength{#1}{\DUT@baselineskip * {#2}}
1210 }
1211 %    \end{macrocode}
1212 % \end{macro}
1213 %
1214 % \begin{command}
1215 %   `\cs{blanklines}\marg{N}'
1216 % \end{command}
1217 % \begin{macro}{\blanklines}
1218 % Insert \meta{N} blank lines.
1219 %    \begin{macrocode}
1220 \newlength\DUT@blanklines@length
1221 \newcommand{\blanklines}[1]{%
1222   \begin{spacing}{1}
1223     \set@lines@length{\DUT@blanklines@length}{#1}%
1224     \vspace{\DUT@blanklines@length}
1225   \end{spacing}
1226 }
1227 %    \end{macrocode}
1228 % \end{macro}
1229 %
1230 %
1231 % \subsection{\cls{book} overrides and extensions}
1232 %
1233 % Here we change the behavior of a bunch of macros and environments from
1234 % \cls{book} (generated by \file{classes.ins} from \file{classes.dtx}) in
1235 % \href{http://www.ctan.org/tex-archive/macros/latex/base/}{\pkg{base}}).
1236 % We'll copy in their original notes along with their code, following
1237 % the relevant documentation an order given in \file{classes.dtx}.
1238 %
1239 %
1240 % \subsubsection{Floats on a text page}
1241 %
1242 % \begin{macro}{\floatsep}
1243 % \begin{macro}{\textfloatsep}
1244 % \begin{macro}{\intextsep}
1245 % When a floating object is placed on a page with text, these
1246 % parameters control the separation between the float and the other
1247 % objects on the page.
1248 %
1249 % |\floatsep| is the space between adjacent floats that are moved
1250 % to the top or bottom of the text page.
1251 %
1252 % |\textfloatsep| is the space between the main text and floats
1253 % at the top or bottom of the page.
1254 %
1255 % |\intextsep| is the space between in-text floats and the text.
1256 %
1257 % From the Manual 2.3 p6, ``Tables and Figures''
1258 % \begin{quote}
1259 %   Insert at least 3 single-spaced lines of space above table
1260 %   captions and figures and below figure captions, tables, and other
1261 %   graphics.
1262 % \end{quote}
1263 % (\file{classes.dtx}, L1426)
1264 %    \begin{macrocode}
1265 \set@lines@length{\floatsep}{\@ssp}
1266 \set@lines@length{\textfloatsep}{\@tsp}
1267 \set@lines@length{\intextsep}{\@tsp}
1268 %    \end{macrocode}
1269 % \end{macro}
1270 % \end{macro}
1271 % \end{macro}
1272 %
1273 %
1274 % \subsubsection{The title}
1275 %
1276 % \begin{macro}{\maketitle}
1277 % Automate the creation of the title page.
1278 % From Manual 3.1 p8, ``Title Page'', and the example on p16.
1279 % \begin{itemize}
1280 %   \item This page is counted but not numbered (it counts as page i,
1281 %   but should not have a page number).  TODO: How is this implemented?
1282 % \end{itemize}
1283 % Our definition simplifies \cls{book}'s by ignoring footnotes.
1284 % (\file{classes.dtx}, L1796)
1285 %    \begin{macrocode}
1286 \renewcommand\maketitle{
1287   \begin{titlepage}%
1288 %    \end{macrocode}
1289 % Add some bookmarks if we're using pdf\LaTeX.  The |frontmatter|
1290 % bookmark is set at the \emph{part} level (-1) to hold all bookmarks
1291 % from the |preamble| environment, since those entries are all
1292 % chapters.
1293 %    \begin{macrocode}
1294     \ifpdf
1295       \pdfbookmark[-1]{Frontmatter}{frontmatter}
1296       \pdfbookmark[0]{Title Page}{title}
1297     \fi
1298 %    \end{macrocode}
1299 % Add some stretchy space to center the title vertically if we're not
1300 % in draft mode.
1301 %    \begin{macrocode}
1302     \if@final \vspace*{\fill} \fi
1303 %    \end{macrocode}
1304 % Here is the title text itself.
1305 %    \begin{macrocode}
1306     \begin{center}%
1307     \begin{spacing}{\@tsp}
1308       {\bf \@title \par}%
1309     \end{spacing}
1310     \begin{spacing}{\@dsp}
1311       A Thesis\\
1312       Submitted to the Faculty\\
1313       of\\
1314       Drexel University\\
1315       by\\
1316       \@author \\
1317       in partial fulfillment of the\\
1318       requirements for the degree\\
1319       of\\
1320       \@degree\\
1321       \def@month\ \def@year
1322     \end{spacing}
1323     \end{center}\par
1324 %    \end{macrocode}
1325 % Some more stretchy space for the bottom if we're not in draft mode.
1326 %    \begin{macrocode}
1327 %    \end{macrocode}
1328 % Add some stretchy space to center the title vertically if we're not
1329 % in draft mode.
1330 %    \begin{macrocode}
1331     \if@final \vspace*{\fill} \fi
1332   \end{titlepage}%
1333 %    \end{macrocode}
1334 % And that's it.  We reset the footnote counter for the rest of the
1335 % document and save space by freeing the memory associated with the
1336 % |\maketitle| and |\and| macros (by setting them equal to |\relax|).
1337 %    \begin{macrocode}
1338   \setcounter{footnote}{0}%
1339   \global\let\maketitle\relax
1340   \global\let\and\relax
1341 }
1342 %    \end{macrocode}
1343 % \end{macro}
1344 %
1345 %
1346 % \subsubsection{Copyright pages}
1347 % \label{sec:implement-copyright}
1348 %
1349 % \begin{macro}{\makecopyright}
1350 % The Manual allows for the selection of different copyrights, so we
1351 % define a base macro that generates a proper copyright page
1352 % containing |\@copyrighttext|, which the user can set with
1353 % |\copyrighttext|.
1354 % From Manual 3.2 p9, ``Copyright Page''.
1355 % \begin{itemize}
1356 %   \item Include a copyright page with the following information: a
1357 %   copyright notice, full legal name of author, and date of
1358 %   publication on file.
1359 %   \item This page is neither counted nor numbered.
1360 % \end{itemize}
1361 % In final mode, we start off on a new page and center the blurb.
1362 % In draft mode, we dive right into the text.
1363 %    \begin{macrocode}
1364 \newcommand\makecopyright{%
1365   \DUT@clearpage
1366 %    \end{macrocode}
1367 % If we're using pdf\LaTeX, add a bookmark.
1368 %    \begin{macrocode}
1369   \ifpdf \pdfbookmark[0]{Copyright Page}{copyright} \fi
1370   \if@final \vspace*{\fill} \fi
1371   \begin{center}
1372     \copyright~Copyright \def@year\\
1373     \@author.  \@copyrighttext
1374   \end{center}
1375   \if@final \vspace*{\fill} \else \blanklines{2} \fi
1376 %    \end{macrocode}
1377 % Turn off page numbering for this page.
1378 %    \begin{macrocode}
1379   \thispagestyle{empty}
1380 }
1381 %    \end{macrocode}
1382 % \end{macro}
1383 %
1384 % \begin{macro}{\copyrighttextCC}
1385 % The Creative Commons license.
1386 %    \begin{macrocode}
1387 \newcommand\copyrighttextCC{
1388   \begin{quote}
1389     This work is licensed under the terms of the Creative Commons
1390     Attribution-ShareAlike license.  The license is available at \\
1391     \url{http://creativecommons.org/licenses/by-sa/2.0/}.
1392   \end{quote}
1393 }
1394 %    \end{macrocode}
1395 % \end{macro}
1396 %
1397 %
1398 % \subsubsection{Mark commands}
1399 %
1400 % Default initializations of |\...mark| commands.  These commands
1401 % are used in the definition of the page styles.
1402 %
1403 % \begin{macro}{\chaptermark}
1404 % Setup colon rather than period separated chapter marks.
1405 % (\file{classes.dtx}, L2053)
1406 %    \begin{macrocode}
1407 \renewcommand\chaptermark[1]{%
1408   \markboth {\MakeUppercase{%
1409     \ifnum \c@secnumdepth >\m@ne
1410       \if@mainmatter
1411         \@chapapp\ \thechapter: \ %
1412       \fi
1413     \fi
1414     #1}}{}}
1415 %    \end{macrocode}
1416 % \end{macro}
1417 %
1418 % \begin{macro}{\chaptermark}
1419 % Setup space rather than period separated section marks.
1420 % (\file{classes.dtx}, L2054)
1421 %    \begin{macrocode}
1422 \renewcommand{\sectionmark}[1]{%
1423   \markright {\MakeUppercase{%
1424     \ifnum \c@secnumdepth >\z@
1425       \thesection \ %
1426     \fi
1427     #1}}}
1428 %    \end{macrocode}
1429 % \end{macro}
1430 %
1431 %
1432 % \subsubsection{Front Matter, Main Matter, and Back Matter}
1433 %
1434 % A book contains these three (logical) sections. The switch
1435 % |\@mainmatter| is true iff we are processing Main Matter.  When this
1436 % switch is false, the |\chapter| command does not print chapter
1437 % numbers.
1438 %
1439 % \begin{macro}{\mainmatter}
1440 % This command clears the page (in final mode), starts arabic page
1441 % numbering and turns on chapter numbering.  Since this restarts the
1442 % page numbering from 1, it should also ensure that a recto page is
1443 % used.
1444 %
1445 % We replace \cls{book}'s |\clear*page| calls with |\DUT@clearpage| calls.
1446 % (\file{classes.dtx}, L2211)
1447 %    \begin{macrocode}
1448 \renewcommand\mainmatter{%
1449   \DUT@cleardoublepage
1450   \@mainmattertrue
1451   \pagenumbering{arabic}}
1452 %    \end{macrocode}
1453 % \end{macro}
1454 %
1455 %
1456 % \subsubsection{Parts}
1457 %
1458 % \begin{macro}{\part}
1459 % The command to start a new part of our document.
1460 %
1461 % We start a new (righthand) page and use the \pstyle{plain}
1462 % pagestyle, replacing \cls{book}'s |\clear*page| calls with
1463 % |\DUT@clearpage| calls and dropping twopage code.
1464 % (\file{classes.dtx}, L2249)
1465 %    \begin{macrocode}
1466 \renewcommand\part{%
1467   \if@openright
1468     \DUT@cleardoublepage
1469   \else
1470     \DUT@clearpage
1471   \fi
1472   \thispagestyle{plain}%
1473   \@tempswafalse
1474 %    \end{macrocode}
1475 % Add some stretchy space for vertical centering if we're in final mode.
1476 %    \begin{macrocode}
1477   \if@final \null\vfil \fi
1478 %    \end{macrocode}
1479 % Here we use |\secdef| to indicate which commands to use to make
1480 % the actual heading.
1481 %    \begin{macrocode}
1482   \secdef\@part\@spart}
1483 %    \end{macrocode}
1484 % \end{macro}
1485 %
1486 % \begin{macro}{\@part}
1487 % This macro does the actual formatting of the title of the part.  We
1488 % replace \cls{book}'s |\Huge| with |\large|, and make use of
1489 % |\numberline| for consistent spacing.
1490 %
1491 % When \Lcount{secnumdepth} is larger than $-2$, we have a numbered
1492 % part, otherwise it is unnumbered.
1493 % (\file{classes.dtx}, L2310)
1494 %    \begin{macrocode}
1495 \def\@part[#1]#2{%
1496     \ifnum \c@secnumdepth >-2\relax
1497       \refstepcounter{part}%
1498       \AddContentsLine{toc}{part}%
1499         {\protect\numberline{\thepart}}{#1}%
1500     \else
1501       \AddContentsLine{toc}{part}{}{#1}%
1502     \fi
1503 %    \end{macrocode}
1504 % We empty the mark registers and center the title on the page.
1505 % Also we prevent breaking between lines and reset the font.
1506 %    \begin{macrocode}
1507     \markboth{}{}%
1508     {\centering
1509      \interlinepenalty \@M
1510      \normalfont
1511 %    \end{macrocode}
1512 % When this is a numbered part we have to print the number.
1513 %    \begin{macrocode}
1514      \ifnum \c@secnumdepth >-2\relax
1515        \large\bfseries \partname\nobreakspace\thepart
1516        \par
1517 %    \end{macrocode}
1518 % We leave some space before we print the title and leave the
1519 % finishing up to |\@endpart|.
1520 %    \begin{macrocode}
1521        \vskip 20\p@
1522      \fi
1523      \large \bfseries #2\par}%
1524     \@endpart}
1525 %    \end{macrocode}
1526 % \end{macro}
1527 %
1528 % \begin{macro}{\@spart}
1529 % This macro does the actual formatting of the title of the part
1530 % when the star form of the user command was used. In this case we
1531 % \emph{never} print a number. Otherwise the formatting is the
1532 % same.
1533 % (\file{classes.dtx}, L2402)
1534 %    \begin{macrocode}
1535 \def\@spart#1{%
1536     {\centering
1537      \interlinepenalty \@M
1538      \normalfont
1539      \large \bfseries #1\par}%
1540     \@endpart}
1541 %    \end{macrocode}
1542 % \end{macro}
1543 %
1544 % \begin{macro}{\@endpart}
1545 % This macro finishes the part page, for both |\@part| and |\@spart|.
1546 % We drop \cls{book}'s twoside handling.
1547 % If |\if@final| is true, we fill the current page.
1548 % (\file{classes.dtx}, L2435)
1549 %    \begin{macrocode}
1550 \def\@endpart{
1551   \if@final \vfil\newpage \fi
1552 %    \end{macrocode}
1553 % Then, when we are in twosided mode and the chapters are supposed to
1554 % be on the right hand sides, we produce a completely blank page.  We
1555 % don't need to check |\if@final| here, because \Lopt{draftspace} set
1556 % |\@openrighttrue|.
1557 %    \begin{macrocode}
1558   \if@twoside
1559     \if@openright
1560       \null
1561       \thispagestyle{empty}%
1562       \newpage
1563     \fi
1564   \fi}
1565 %    \end{macrocode}
1566 % \end{macro}
1567 %
1568 %
1569 % \subsubsection{Chapters}
1570 % \label{sec:implement-chapters}
1571 %
1572 % \begin{macro}{\chapter}
1573 % \cls{book} always starts a chapter on a new page, but we don't want
1574 % to do that if we're in draft mode.
1575 % (\file{classes.dtx}, L2472).
1576 %    \begin{macrocode}
1577 \renewcommand\chapter{%
1578   \if@openright\DUT@cleardoublepage\else\DUT@clearpage\fi
1579   \thispagestyle{plain}%
1580 %    \end{macrocode}
1581 % Then we prevent floats from appearing at the top of this page
1582 % because it looks weird to see a floating object above a chapter
1583 % title.
1584 %    \begin{macrocode}
1585   \global\@topnum\z@
1586 %    \end{macrocode}
1587 % Then we suppress the indentation of the first paragraph by
1588 % setting the switch |\@afterindent| to false. We use |\secdef|
1589 % to specify the macros to use for actually setting the chapter
1590 % title.
1591 %    \begin{macrocode}
1592   \@afterindentfalse
1593   \secdef\@chapter\@schapter}
1594 %    \end{macrocode}
1595 % \end{macro}
1596 %
1597 % \begin{macro}{\@chapter}
1598 % This macro is called when we have a numbered chapter. When
1599 % \Lcount{secnumdepth} is larger than $-1$ and |\@mainmatter| is true,
1600 % we display the chapter number.
1601 % We drop \cls{book}'s \Lopt{twocolumn} code. 
1602 % (\file{classes.dtx}, L2496).
1603 % \begin{macrocode}
1604 \def\@chapter[#1]#2{
1605   \ifnum \c@secnumdepth >\m@ne
1606     \if@mainmatter
1607       \refstepcounter{chapter}%
1608 % \end{macrocode}
1609 % Inform the user that a new chapter is about to be typeset by writing
1610 % a message to the terminal.
1611 % \begin{macrocode}
1612       \typeout{\@chapapp\space\thechapter.}%
1613       \if@appendix
1614 % \end{macrocode}
1615 % We're in the appendix (when |\if@mainmatter| and
1616 % |\if@appendix| are both true), add a TOC line like
1617 % \begin{center}
1618 %   Appendix A: Chapter Title
1619 % \end{center}
1620 % |\thechapter| (defined in \cls{book}) is the text representation of 
1621 % the chapter number (e.g.\ |1| or, for an appendix, |A|).
1622 % |\@chapapp{}| (also defined in \cls{book}) was redefined in
1623 % |\appendix| (Sec. \ref{sec:implement-appendix}) as |\appendixname|.
1624 % \begin{macrocode}
1625         \AddContentsLine{toc}{appendix}%
1626           {\protect\numberline{\@chapapp{} \thechapter:}}{#1}%
1627       \else
1628 % \end{macrocode}
1629 % We're in the pre-appendix mainmatter, so add a TOC line like
1630 % \begin{center}
1631 %   1 Chapter Title
1632 % \end{center}
1633 % \begin{macrocode}
1634         \AddContentsLine{toc}{chapter}%
1635           {\protect\numberline{\thechapter}}{#1}%
1636       \fi
1637     \else
1638 % \end{macrocode}
1639 % We're in the pre-mainmatter, so add a TOC line like
1640 % \begin{center}
1641 %   Chapter Title
1642 % \end{center}
1643 % \begin{macrocode}
1644       \AddContentsLine{toc}{chapter}{}{#1}%
1645     \fi
1646   \else
1647     \AddContentsLine{toc}{chapter}{}{#1}%
1648   \fi
1649 %    \end{macrocode}
1650 % After having written an entry to the table of contents we store
1651 % the (alternative) title of this chapter with |\chaptermark| and
1652 % add some white space to the lists of figures and tables.
1653 %    \begin{macrocode}
1654   \chaptermark{#1}%
1655   \addtocontents{lof}{\protect\addvspace{10\p@}}%
1656   \addtocontents{lot}{\protect\addvspace{10\p@}}%
1657 %    \end{macrocode}
1658 % Then we call upon |\@makechapterhead| to format the actual chapter
1659 % title.  |\@afterheading| which takes care of suppressing the
1660 % indentation.
1661 %    \begin{macrocode}
1662   \@makechapterhead{#2}%
1663   \@afterheading}
1664 %    \end{macrocode}
1665 % \end{macro}
1666 %
1667 % \begin{macro}{\@makechapterhead}
1668 % The |\@chapter| macro uses |\@makechapterhead|\meta{text} to format
1669 % the heading of the chapter.
1670 % From the Manual 3.11 p11.
1671 % \begin{quote}
1672 %   Chapter headings must be bold and centered.
1673 %   The chapter number and title must be on the same line, separated
1674 %   by a colon or period, as shown in the example below:
1675 %   \begin{center}
1676 %     CHAPTER 1: INTRODUCTION
1677 %   \end{center}
1678 %   Headings must not be larger than 12 points.
1679 %   Headings must be single spaced.
1680 % \end{quote}
1681 % \cls{book} sets |\@chapapp| and |\thechapter| (e.g.\ ``Chapter 5'')
1682 % on a line above the chapter title, but that doesn't match the
1683 % Manual's specification.
1684 %
1685 % We begin by leaving some white space. The we open a group in which
1686 % we have a paragraph indent of 0pt, and in which we have the text set
1687 % ragged right. We also reset the font.
1688 % (\file{classes.dtx}, L2540).
1689 %    \begin{macrocode}
1690 \def\@makechapterhead#1{%
1691   \blanklines{2}%
1692   {\parindent \z@ \raggedright \normalfont
1693 %    \end{macrocode}
1694 % Ensure single spacing.
1695 %    \begin{macrocode}
1696     \begin{spacing}{\@ssp}
1697 %    \end{macrocode}
1698 % Prevent a pagebreak from occuring in the middle of or after the title.
1699 %    \begin{macrocode}
1700     \interlinepenalty\@M
1701 %    \end{macrocode}
1702 % Check whether the number of the chapter has to be printed.
1703 %    \begin{macrocode}
1704     \ifnum \c@secnumdepth >\m@ne
1705 %    \end{macrocode}
1706 % Check whether there \emph{is} a number to be printed.
1707 %    \begin{macrocode}
1708       \if@mainmatter
1709 %    \end{macrocode}
1710 % Setup a ``Chapter \#: Title'' heading.
1711 %    \begin{macrocode}
1712         \center \large \bfseries \@chapapp{} \thechapter: #1\par\nobreak
1713       \else
1714 %    \end{macrocode}
1715 % Setup a ``Title'' heading.
1716 %    \begin{macrocode}
1717         \center \large \bfseries #1\par\nobreak
1718       \fi
1719     \else
1720       \center \large \bfseries #1\par\nobreak
1721     \fi
1722     \end{spacing}
1723 %    \end{macrocode}
1724 % Put a little space before the chapter body.
1725 %    \begin{macrocode}
1726     \blanklines{2}
1727   }
1728 }
1729 %    \end{macrocode}
1730 % \end{macro}
1731 %
1732 % \begin{macro}{\@schapter}
1733 % We don't have to worry about |\@schapter|, since it is very simple.
1734 % In onecolumn mode it's just
1735 % (\file{classes.dtx}, L2582).
1736 %    \begin{macrocode}
1737 %\def\@schapter#1{\@makeschapterhead{#1}%
1738 %                 \@afterheading}
1739 %    \end{macrocode}
1740 % \end{macro}
1741 %
1742 % \begin{macro}{\@makeschapterhead}
1743 % The macro above uses |\@makeschapterhead|\meta{text} to format
1744 % the heading of the chapter. It is similar to |\@makechapterhead|
1745 % except that it never has to print a chapter number.
1746 % (\file{classes.dtx}, L2595).
1747 %    \begin{macrocode}
1748 \def\@makeschapterhead#1{%
1749   \blanklines{2}%
1750   {\parindent \z@ \raggedright
1751     \normalfont
1752     \interlinepenalty\@M
1753     \begin{spacing}{\@ssp}
1754     \center \large \bfseries  #1\par\nobreak
1755     \end{spacing}
1756     \blanklines{2}
1757   }
1758 }
1759 %    \end{macrocode}
1760 % \end{macro}
1761 %
1762 %
1763 % \begin{macro}{\toclevel@appendix}
1764 % We've added a new TOC entry type with the
1765 % \begin{example} 
1766 %   \AddContentsLine{toc}{appendix}{...}{...}
1767 % \end{example}
1768 % calls above, and \pkg{hyperref} needs to know what level they belong
1769 % to.  Obviously they belong to the chapter level ($0$).
1770 %    \begin{macrocode}
1771 \providecommand*{\toclevel@appendix}{0}
1772 %    \end{macrocode}
1773 % \end{macro}
1774 %
1775 %
1776 % \subsubsection{Lower level headings}
1777 %
1778 % \begin{macro}{\section}
1779 % Setup section headings in |\large| rather than \cls{book}'s
1780 % |\Large|.
1781 % (\file{classes.dtx}, L2623).
1782 %    \begin{macrocode}
1783 \renewcommand\section{%
1784   \@startsection {section}{1}{\z@}%
1785     {-3.5ex \@plus -1ex \@minus -.2ex}%
1786     {2.3ex \@plus.2ex}%
1787     {\normalfont\large\bfseries}}
1788 %    \end{macrocode}
1789 % \end{macro}
1790 %
1791 %
1792 % \subsubsection{Defining new environments}
1793 %
1794 % We don't override any of \cls{book}'s environments, but this is
1795 % where \file{classes.dtx} defines its environments (L2996), so we'll put
1796 % ours here too.
1797 %
1798 % \begin{environment}{preamble}
1799 %    \begin{macrocode}
1800 \newenvironment{preamble}{%
1801   \cleardoublepage
1802   \@mainmatterfalse
1803   \pagenumbering{roman}
1804 %    \end{macrocode}
1805 % From Manual 3.1 p8, ``Title Page''.
1806 %    \begin{macrocode}
1807   \maketitle
1808 %    \end{macrocode}
1809 % From Manual 3.2 p9, ``Copyright Page''.
1810 %    \begin{macrocode}
1811   \makecopyright
1812 }{%
1813 %    \end{macrocode}
1814 % From the Manual 3.9, p11:
1815 % \begin{quote}
1816 %   Include a blank page (with no page number) before the first page
1817 %   of text.  The blank page is neither numbered nor counted.
1818 % \end{quote}
1819 %    \begin{macrocode}
1820   \blankpage
1821 }
1822 %    \end{macrocode}
1823 % \end{environment}
1824 %
1825 % \begin{environment}{dedications}
1826 % From the Manual 3.3 p9
1827 % \begin{itemize}
1828 %   \item The heading |Dedications| must appear at the top of the
1829 %   page.  The heading must be bold, centered, and without
1830 %   punctuation.
1831 %   \item This page is counted and numbered in lowercase Roman numerals.
1832 % \end{itemize}
1833 %    \begin{macrocode}
1834 \newenvironment{dedications}{%
1835   \DUT@clearpage
1836   \ifpdf
1837     \phantomsection
1838     \pdfbookmark[0]{\dedicationsname}{dedications}
1839   \fi
1840   \chapter*{\dedicationsname}
1841   \begin{spacing}{\@dsp}
1842 }{%
1843   \end{spacing}
1844 }
1845 %    \end{macrocode}
1846 % \end{environment}
1847 %
1848 % \begin{environment}{acknowledgments}
1849 % From the Manual 3.4 p9
1850 % \begin{itemize}
1851 %   \item The heading |Acknowledgments| must appear at the top of the
1852 %   page.  The heading must be bold, centered, and without
1853 %   punctuation.
1854 %   \item This page is counted and numbered in lowercase Roman numerals.
1855 % \end{itemize}
1856 %    \begin{macrocode}
1857 \newenvironment{acknowledgments}{%
1858   \DUT@clearpage
1859   \ifpdf
1860     \phantomsection
1861     \pdfbookmark[0]{\acknowledgmentsname}{acknowledgments}
1862   \fi
1863   \chapter*{\acknowledgmentsname}
1864   \begin{spacing}{\@dsp}
1865 }{%
1866   \end{spacing}
1867 }
1868 %    \end{macrocode}
1869 % \end{environment}
1870 %
1871 % \begin{environment}{abstract}
1872 %    \begin{macrocode}
1873 \newenvironment{abstract}{%
1874   \DUT@clearpage
1875   \thispagestyle{plain}%
1876   \global\@topnum\z@
1877   \phantomsection
1878   \AddContentsLine*{toc}{chapter}{}{\abstractname}
1879   \vspace*{50\p@}%
1880 %    \end{macrocode}
1881 % From the Manual 3.9 p10 ``The following heading must be centered at
1882 % the top of the page'':
1883 % \begin{center}
1884 %   Abstract \\
1885 %   Full Title of Dissertation or Thesis \\
1886 %   Author's Name as it appears on the Dissertation or Thesis
1887 % \end{center}
1888 % In the example on p20, they list the advisor's name after the
1889 % author, but that is not specified in the text on p10.
1890 %
1891 % On p20, ``These pages are numbered using lowercase Roman numerals.
1892 % Note that the heading is single spaced, but the abstract is double
1893 % spaced.''
1894 %    \begin{macrocode}
1895   \begin{spacing}{\@ssp}
1896     \begin{center}
1897       {\large \bfseries \abstractname \par}
1898 %%      \@endparpenalty\@M
1899       \@title\\
1900       \@author\\
1901       \@advisor\\
1902     \end{center}
1903   \end{spacing}
1904   \blanklines{2}
1905   \begin{spacing}{\@dsp}
1906   \@nobreaktrue
1907   \@afterindentfalse
1908   \@afterheading
1909 }{%
1910   \end{spacing}
1911 }
1912 %    \end{macrocode}
1913 % \end{environment}
1914 %
1915 % \begin{environment}{thesis}
1916 % From the Manual 3.10 p11
1917 % \begin{itemize}
1918 %   \item The pages are counted and numbered in Arabic numerals.
1919 % \end{itemize}
1920 %    \begin{macrocode}
1921 \newenvironment{thesis}{%
1922   \mainmatter
1923   \begin{spacing}{\@dsp}
1924 }{%
1925   \end{spacing}
1926   \DUT@clearpage
1927   \ifpdf
1928     \phantomsection
1929     \pdfbookmark[-1]{Backmatter}{backmatter}
1930   \fi
1931 }
1932 %    \end{macrocode}
1933 % \end{environment}
1934 %
1935 % \begin{environment}{vita}
1936 % From the Manual 3.15 p13
1937 % \begin{itemize}
1938 %   \item The heading |Vita| must appear at the top of the page.  The
1939 %   heading must be bold, centered, and without punctuation.
1940 %   \item The Vita text should begin four spaces below the heading.
1941 %   \item List the Vita separately in the Table of Contents.
1942 %   \item The page is counted and numbered in Arabic numerals.
1943 % \end{itemize}
1944 %    \begin{macrocode}
1945 \newenvironment{vita}{%
1946   \DUT@clearpage
1947   \phantomsection
1948   \AddContentsLine*{toc}{chapter}{}{\vitaname}
1949   \chapter*{\vitaname}
1950   \blanklines{1}
1951   \begin{spacing}{\@dsp}
1952 }{%
1953   \end{spacing}
1954 }
1955 %    \end{macrocode}
1956 % \end{environment}
1957 %
1958 %
1959 % \subsubsection{Titlepage}
1960 %
1961 % \begin{environment}{titlepage}
1962 % In the normal environments, the titlepage environment does nothing
1963 % but start and end a page, and inhibit page numbers.  We inhibit the
1964 % paging in draft mode, since it seems silly to waste a whole page on
1965 % the title.  We also drop the \Lopt{twocolumn} code.
1966 % (\file{classes.dtx}, L3111)
1967 %    \begin{macrocode}
1968 \renewenvironment{titlepage}{\thispagestyle{empty}%
1969                              \setcounter{page}\z@}%
1970                             {\if@final \newpage \else \blanklines{2} \fi}
1971 %    \end{macrocode}
1972 % \end{environment}
1973 %
1974 %
1975 % \subsubsection{Appendix}
1976 %
1977 % \begin{macro}{\appendix}
1978 % The |\appendix| command is not really an environment, it is a
1979 % macro that makes some changes in the way things are done.
1980 %
1981 % In the article document class the |\appendix| command must do the
1982 % following:
1983 % \begin{itemize}
1984 %   \item reset the section and subsection counters to zero,
1985 %   \item redefine |\thesection| to produce alphabetic appendix
1986 %         numbers. This redefinition is done globally to ensure that it 
1987 %         survives even if |\appendix| is issued within an environment such
1988 %         as \texttt{multicols}.
1989 % \end{itemize}
1990 %
1991 % In addition to \cls{book}'s (or \pkg{hyperref}'s) activity, we add
1992 % |\@appendixtrue|.  This gets |\if@appendix| working in our
1993 % |\chapter| definition (Sec.~\ref{sec:implement-chapters}).
1994 % (\file{classes.dtx}, L3177)
1995 %    \begin{macrocode}
1996 \let\DUT@appendix\appendix
1997 \renewcommand\appendix{%
1998   \@appendixtrue%
1999   \DUT@appendix%
2000 %    \end{macrocode}
2001 % We also turn on double spacing by default, since we're no longer
2002 % wrapped in the |thesis| environment.
2003 %    \begin{macrocode}
2004   \setstretch{\@dsp}
2005 }
2006 %    \end{macrocode}
2007 % \end{macro}
2008 %
2009 %
2010 % \subsubsection{Table}
2011 % \label{sec:implement-tables}
2012 %
2013 % \begin{environment}{table}
2014 % \begin{environment}{table*}
2015 % To help symmetrize the spacing around tables and figures, we set
2016 % |\if@table| in the |table| environments.  The remainder of the
2017 % code comes in Section \ref{sec:implement-captions}.
2018 % (\file{classes.dtx}, L3491)
2019 %    \begin{macrocode}
2020 \newif\if@table \@tablefalse
2021 \renewenvironment{table}
2022                  {\@tabletrue\@float{table}}
2023                  {\end@float\@tablefalse}
2024 \renewenvironment{table*}
2025                  {\@tabletrue\@dblfloat{table}}
2026                  {\end@dblfloat\@tablefalse}
2027 %    \end{macrocode}
2028 % \end{environment}
2029 % \end{environment}
2030 %
2031 %
2032 % \subsubsection{Captions}
2033 % \label{sec:implement-captions}
2034 %
2035 % \begin{macro}{\@makecaption}
2036 % The |\caption| command calls |\@makecaption| to format the
2037 % caption of floating objects. It gets two arguments,
2038 % \meta{number}, the number of the floating object and \meta{text},
2039 % the text of the caption. Usually \meta{number} contains a string
2040 % such as ``Figure 3.2''. The macro can assume it is called inside a
2041 % |\parbox| of right width, with |\normalsize|.
2042 %
2043 % We override \cls{book}'s |\@makecaption|, adding two |\if@table|
2044 % conditionals, which swap |\abovecaptionskip| and |\belowcaptionskip|
2045 % for tables (where the caption is above the float body).  With our
2046 % implementation, |\belowcaptionskip| \emph{always} gives the distance
2047 % between the caption and the text, and |\abovecaptionskip|
2048 % \emph{always} gives the distance between the caption and the float
2049 % body.  See Section \ref{sec:implement-tables} for our |\if@table|
2050 % control.
2051 %
2052 % We also replace the caption lead-in |#1: #2| with
2053 % |\small{\bfseries#1:} #2|.
2054 % (\file{classes.dtx}, L3508)
2055 %    \begin{macrocode}
2056 %    \end{macrocode}
2057 % Define a temporary length for swapping.
2058 %    \begin{macrocode}
2059 \newlength\@tempcapskip
2060 %    \end{macrocode}
2061 % The definition of this macro is |\long| in order to allow more
2062 % then one paragraph in a caption.
2063 %    \begin{macrocode}
2064 \long\def\@makecaption#1#2{%
2065   \if@table
2066 %    \end{macrocode}
2067 % Swap |\abovecaptionskip| and |\belowcaptionskip|.
2068 %    \begin{macrocode}
2069     \@tempcapskip\abovecaptionskip
2070     \abovecaptionskip\belowcaptionskip
2071     \belowcaptionskip\@tempcapskip
2072   \fi
2073   \vskip\abovecaptionskip
2074 %    \end{macrocode}
2075 % We want to see if the caption fits on one line on the page,
2076 % therefore we first typeset it in a temporary box.
2077 %    \begin{macrocode}
2078   \sbox\@tempboxa{\small{\bfseries#1:} #2}%
2079 %    \end{macrocode}
2080 % We can the measure its width. It that is larger than the current
2081 % |\hsize| we typeset the caption as an ordinary paragraph.
2082 %    \begin{macrocode}
2083   \ifdim \wd\@tempboxa >\hsize
2084     {\small{\bfseries#1:} #2\par}
2085   \else
2086 %    \end{macrocode}
2087 % If the caption fits, we center it. Because this uses an |\hbox|
2088 % directly in vertical mode, it does not execute the |\everypar|
2089 % tokens; the only thing that could be needed here is resetting the
2090 % `minipage flag' so we do this explicitly.
2091 %    \begin{macrocode}
2092     \global \@minipagefalse
2093     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
2094   \fi
2095   \vskip\belowcaptionskip
2096 %    \end{macrocode}
2097 % Restore |\abovecaptionskip| and |\belowcaptionskip|.
2098 %    \begin{macrocode}
2099   \if@table
2100     \@tempcapskip\belowcaptionskip
2101     \belowcaptionskip\abovecaptionskip
2102     \abovecaptionskip\@tempcapskip
2103   \fi
2104 }
2105 %    \end{macrocode}
2106 % \end{macro}
2107 %
2108 % \begin{macro}{\abovecaptionskip}
2109 % \begin{macro}{\belowcaptionskip}
2110 % For \cls{book}, these lengths contain the amount of white space to
2111 % leave above and below the caption.  However, because of our work
2112 % with |\@makecaption| (above), |\belowcaptionskip| \emph{always}
2113 % gives the distance between the caption and the text, and
2114 % |\abovecaptionskip| \emph{always} gives the distance between the
2115 % caption and the float.
2116 % (\file{classes.dtx}, L3516)
2117 %    \begin{macrocode}
2118 \set@lines@length{\abovecaptionskip}{\@ssp}
2119 \set@lines@length{\belowcaptionskip}{\@tsp}
2120 %    \end{macrocode}
2121 % \end{macro}
2122 % \end{macro}
2123 %
2124 %
2125 % \subsubsection{Table of Contents}
2126 %
2127 % \begin{macro}{\tableofcontents}
2128 % Automate the creation of the table of contents.
2129 % From Manual 3.5 p9, ``Table of Contents'', and the example on p17.
2130 % \begin{itemize}
2131 %   \item Do not list any sections that precede the
2132 %   |Table of Contents| (e.g.\ |Dedications|, |Acknowledgments|).  Do
2133 %   not list the |Table of Contents| itself.
2134 %   \item These pages are counted and numbered in lowercase Roman numerals.
2135 % \end{itemize}
2136 % We inhibit the paging in draft mode and drop the \Lopt{twocolumn} code.
2137 % (\file{classes.dtx}, L3728)
2138 %    \begin{macrocode}
2139 \renewcommand\tableofcontents{%
2140   \DUT@clearpage
2141 %    \end{macrocode}
2142 % If we're using pdf\LaTeX, add a bookmark.
2143 %    \begin{macrocode}
2144   \ifpdf
2145     \phantomsection
2146     \pdfbookmark[0]{\contentsname}{tableofcontents}
2147   \fi
2148   \chapter*{\contentsname}
2149 %    \end{macrocode}
2150 % Set the marks for \cls{fancyhdr}'s fancy header.
2151 %    \begin{macrocode}
2152   \@mkboth{\MakeUppercase\contentsname}%
2153           {\MakeUppercase\contentsname}%
2154   \@starttoc{toc}%
2155 }
2156 %    \end{macrocode}
2157 % \end{macro}
2158 %
2159 % The command |\contentsline{|\meta{name}|}| expands to
2160 % |\l@|\meta{name}.  So, to specify the table of contents, we must
2161 % define |\l@chapter|, |\l@section|, |\l@subsection|, ... ; to
2162 % specify the list of figures, we must define |\l@figure|; and so
2163 % on.
2164 %
2165 % \begin{command}
2166 %   `\cs{l@DUT@major}\marg{title}\marg{page}\marg{inset}'
2167 % \end{command}
2168 % \begin{macro}{\l@DUT@major}
2169 % Define a wrapper class for printing TOC entries for parts, chapters,
2170 % and appendicies, since they should all have the same formatting.
2171 % \meta{title} and \meta{page} are the first two arguments passed to
2172 % the outer |\l@*| macro.  \meta{inset} gives the distance that the
2173 % title text is offset from the left margin (|\@tempdima|), with any
2174 % |\numberline| text (e.g.\ part or chapter numbers) being printed
2175 % flush on the left margin.
2176 %    \begin{macrocode}
2177 \newif\if@bold@DUT@major
2178 \newif\if@dotted@DUT@major
2179 \newcommand\l@DUT@major[3]{%
2180   \begin{spacing}{\@ssp}
2181     \ifnum \c@tocdepth >\m@ne
2182 %    \end{macrocode}
2183 % Make sure that if a pagebreak should occur, it occurs \emph{before}
2184 % this entry.
2185 %    \begin{macrocode}
2186       \addpenalty{-\@highpenalty}%
2187 %    \end{macrocode}
2188 % The macro |\numberline| requires that the width of the box that
2189 % holds the part number is stored in \LaTeX's scratch register
2190 % |\@tempdima|. Therefore we initialize it there even though we may
2191 % not use |\numberline| internally.
2192 %    \begin{macrocode}
2193       \setlength\@tempdima{#3}%
2194       \begingroup
2195 %    \end{macrocode}
2196 % We set |\parindent| to 0pt and use |\rightskip| to leave
2197 % enough room for the pagenumbers.\footnote{^^A
2198 %   We use \file{classes.dtx} suggested \cs{@tocrmarg} for
2199 %   \cs{rightskip}, which they're delaying until \LaTeX3.}
2200 % To prevent overfull box messages the |\parfillskip| is set to a 
2201 % negative value.
2202 %    \begin{macrocode}
2203         \parindent \z@ \rightskip \@tocrmarg \parfillskip -\rightskip
2204 %    \end{macrocode}
2205 % Leave vertical mode.
2206 %    \begin{macrocode}
2207         \leavevmode
2208 %    \end{macrocode}
2209 % Switch to bold font if appropriate.
2210 %    \begin{macrocode}
2211         \if@bold@DUT@major
2212           \bfseries
2213         \fi
2214 %    \end{macrocode}
2215 % Manuever to place the part number flush left, with the part title
2216 % inset by |\@tempdima|.
2217 %    \begin{macrocode}
2218         \advance\leftskip\@tempdima
2219         \hskip -\leftskip
2220 %    \end{macrocode}
2221 % Set the part title.
2222 %    \begin{macrocode}
2223         #1\nobreak
2224 %    \end{macrocode}
2225 % Draw a dotted line if appropriate.
2226 %    \begin{macrocode}
2227         \if@dotted@DUT@major
2228           \leaders\hbox{$\m@th
2229             \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}
2230         \fi
2231 %    \end{macrocode}
2232 % Wrap up with the page entry, set flush right.
2233 %    \begin{macrocode}
2234         \hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
2235 %    \end{macrocode}
2236 % Prevent a pagebreak immediately after this entry.
2237 %    \begin{macrocode}
2238         \nobreak
2239 %    \end{macrocode}
2240 % Add a content-page-spacing blank after this entry.
2241 %    \begin{macrocode}
2242         \blanklines{\@cont@sep}
2243 %    \end{macrocode}
2244 % Discourage page breaking.
2245 %    \begin{macrocode}
2246         \penalty\@highpenalty
2247       \endgroup
2248     \fi
2249   \end{spacing}
2250 }
2251 %    \end{macrocode}
2252 % \end{macro}
2253 %
2254 % \begin{macro}{\l@part}
2255 % Override \cls{book}'s |\l@part|.
2256 % (\file{classes.dtx}, L3775)
2257 %    \begin{macrocode}
2258 \renewcommand*\l@part[2]{%
2259   \if@boldpart
2260     \@bold@DUT@majortrue
2261   \else
2262     \@bold@DUT@majorfalse
2263   \fi
2264   \if@dottedpart
2265     \@dotted@DUT@majortrue
2266   \else
2267     \@dotted@DUT@majorfalse
2268   \fi
2269   \l@DUT@major{#1}{#2}{3em}}
2270 %    \end{macrocode}
2271 % \end{macro}
2272 %
2273 % \begin{macro}{\l@chapter}
2274 % Override \cls{book}'s |\l@chapter|.
2275 % (\file{classes.dtx}, L3847)
2276 %    \begin{macrocode}
2277 \renewcommand*\l@chapter[2]{%
2278   \if@boldchapter
2279     \@bold@DUT@majortrue
2280   \else
2281     \@bold@DUT@majorfalse
2282   \fi
2283   \if@dottedchapter
2284     \@dotted@DUT@majortrue
2285   \else
2286     \@dotted@DUT@majorfalse
2287   \fi
2288   \l@DUT@major{#1}{#2}{1.5em}}
2289 %    \end{macrocode}
2290 % \end{macro}
2291 %
2292 %
2293 % \begin{macro}{\l@appendix}
2294 % Add |\l@appendix|, which is identical to our |\l@chapter| except
2295 % for setting |\@tempdima| to 8em rather than 1.5em, because the word
2296 % |Appendix| takes up a bunch of space.
2297 %    \begin{macrocode}
2298 \newcommand*\l@appendix[2]{%
2299   \if@boldchapter
2300     \@bold@DUT@majortrue
2301   \else
2302     \@bold@DUT@majorfalse
2303   \fi
2304   \if@dottedchapter
2305     \@dotted@DUT@majortrue
2306   \else
2307     \@dotted@DUT@majorfalse
2308   \fi
2309   \l@DUT@major{#1}{#2}{8em}}
2310 %    \end{macrocode}
2311 % \end{macro}
2312 %
2313 %
2314 % \subsubsection{List of figures}
2315 %
2316 % \begin{macro}{\listoffigures}
2317 % This macro is used to request that \LaTeX\ produces a list of
2318 % figures. It is very similar to |\tableofcontents|.
2319 %
2320 % From the Manual 3.7 p10
2321 % \begin{quote}
2322 %   The heading |List of Figures| must appear at the top of the first
2323 %   page.
2324 %   The heading must be bold, centered, and without punctuation.
2325 %   List figure captions exactly as they appear below the figures in
2326 %   the text.
2327 %   Single space each entry, but double-space between entries.
2328 %   Separate figure captions from page numbers with right-justified
2329 %   tabs and dot leaders.
2330 %   Do not use periods to separate captions and page numbers.
2331 %   These pages are counted and numbered in lowercase Roman numerals.
2332 % \end{quote}
2333 %
2334 % We drop the \Lopt{twocolumn} code, add a line to the table of
2335 % contents, and adjust paging.
2336 % (\file{classes.dtx}, L3981).
2337 %    \begin{macrocode}
2338 \renewcommand\listoffigures{%
2339   \DUT@clearpage
2340   \phantomsection
2341   \AddContentsLine*{toc}{chapter}{}{\listfigurename}
2342   \chapter*{\listfigurename}%
2343   \@mkboth{\MakeUppercase\listfigurename}%
2344           {\MakeUppercase\listfigurename}%
2345   \@starttoc{lof}%
2346 }
2347 %    \end{macrocode}
2348 % \end{macro}
2349 %
2350 %
2351 % \subsubsection{List of tables}
2352 %
2353 % \begin{macro}{\listoftables}
2354 % This macro is used to request that \LaTeX\ produces a list of
2355 % tables. It is very similar to |\tableofcontents|.
2356 %
2357 % From the Manual 3.6 p10
2358 % \begin{quote}
2359 %   The heading |List of Tables| must appear at the top of the first
2360 %   page.
2361 %   The heading must be bold, centered, and without punctuation.
2362 %   List table captions exactly as they appear above the tables in
2363 %   the text.
2364 %   Single space each entry, but double-space between entries.
2365 %   Separate table captions from page numbers with right-justified
2366 %   tabs and dot leaders.
2367 %   Do not use periods to separate captions and page numbers.
2368 %   These pages are counted and numbered in lowercase Roman numerals.
2369 % \end{quote}
2370 %
2371 % We drop the \Lopt{twocolumn} code, add a line to the table of
2372 % contents, and adjust paging.
2373 % (\file{classes.dtx}, L4017).
2374 %    \begin{macrocode}
2375 \renewcommand\listoftables{%
2376   \DUT@clearpage
2377   \phantomsection
2378   \AddContentsLine*{toc}{chapter}{}{\listtablename}
2379   \chapter*{\listtablename}%
2380   \@mkboth{\MakeUppercase\listtablename}%
2381           {\MakeUppercase\listtablename}%
2382   \@starttoc{lot}%
2383 }
2384 %    \end{macrocode}
2385 % \end{macro}
2386 %
2387 %
2388 % \subsubsection{Bibliography}
2389 %
2390 % \begin{environment}{thebibliography}
2391 % The |thebibliography| environment is a list environment.  To save the
2392 % use of an extra counter, it should use |enumiv| as the item
2393 % counter. 
2394 % Instead of using |\item|, items in the bibliography are produced by
2395 % the following commands:\\
2396 %   |\bibitem|\marg{name} : Produces a numbered entry cited as
2397 %   \meta{name}.\\
2398 %   |\bibitem|\oarg{label}\marg{name} : Produces an entry labeled by
2399 %   \meta{Label} and cited by \meta{name}.
2400 %
2401 % Override \cls{book}'s version, adding a line to the table of
2402 % contents.  We split out the section-creation code into
2403 % |\bib@heading| for \pkg{natbib} compatibility.
2404 % (\file{classes.dtx}, L4063).
2405 %    \begin{macrocode}
2406 \renewenvironment{thebibliography}[1]
2407      {\bib@heading%
2408       \list{\@biblabel{\@arabic\c@enumiv}}%
2409            {\settowidth\labelwidth{\@biblabel{#1}}%
2410             \leftmargin\labelwidth
2411             \advance\leftmargin\labelsep
2412             \@openbib@code
2413             \usecounter{enumiv}%
2414             \let\p@enumiv\@empty
2415             \renewcommand\theenumiv{\@arabic\c@enumiv}}%
2416 %    \end{macrocode}
2417 % Because it's hard to do line breaks in bibliographies.
2418 %    \begin{macrocode}
2419       \sloppy
2420 %    \end{macrocode}
2421 %    This is setting the normal (non-infinite) value of
2422 %    |\clubpenalty| for the whole of this environment,
2423 %    so we must reset its stored value also.  (Why is there a |%| after
2424 %    the second 4000 below?)
2425 %    \begin{macrocode}
2426       \clubpenalty4000
2427       \@clubpenalty \clubpenalty
2428       \widowpenalty4000%
2429 %    \end{macrocode}
2430 % Cause a `.' (period) not to produce an end-of-sentence space.
2431 %    \begin{macrocode}
2432       \sfcode`\.\@m}
2433 %    \end{macrocode}
2434 % Warn if an empty `thebibliography' environment is found.
2435 %    \begin{macrocode}
2436      {\def\@noitemerr
2437        {\@latex@warning{Empty `thebibliography' environment}}%
2438       \endlist}
2439 %    \end{macrocode}
2440 % \end{environment}
2441 %
2442 % \begin{macro}{\bib@heading}
2443 % \pkg{natbib} messes with |thebibliography|.  We setup |\bib@heading|
2444 % so we will still get our table of contents entry.
2445 %    \begin{macrocode}
2446 \newcommand{\bib@heading}{%
2447   \phantomsection%
2448   \AddContentsLine*{toc}{chapter}{}{\bibname}%
2449   \chapter*{\bibname}%
2450   \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
2451 }
2452 %    \end{macrocode}
2453 % \end{macro}
2454 %
2455 % \subsubsection{Words}
2456 %
2457 % Set the official names of the various sections encountered.  Some of
2458 % these are not defined in \file{classes.dtx} but are close analogs of
2459 % those that are.
2460 %
2461 % \begin{macro}{\dedicationsname}
2462 % From the Manual 3.3 p9, ``The heading |Dedications| must appear at
2463 % the top of the page.''
2464 %    \begin{macrocode}
2465 \newcommand\dedicationsname{Dedications}
2466 %    \end{macrocode}
2467 % \end{macro}
2468 %
2469 % \begin{macro}{\acknowledgmentsname}
2470 % From the Manual 3.4 p9, ``The heading |Acknowledgments| must appear
2471 % at the top of the page.''
2472 %    \begin{macrocode}
2473 \newcommand\acknowledgmentsname{Acknowledgments}
2474 %    \end{macrocode}
2475 % \end{macro}
2476 %
2477 % \begin{macro}{\contentsname}
2478 % From the Manual 3.5 p9, ``The heading |Table of Contents| must
2479 % appear at the top of the page.''  (\file{classes.dtx}, L4331)
2480 %    \begin{macrocode}
2481 \renewcommand\contentsname{Table of Contents}
2482 %    \end{macrocode}
2483 % \end{macro}
2484 %
2485 % \begin{macro}{\listtablename}
2486 % From the Manual 3.6 p10, ``The heading |List of Tables| must appear
2487 % at the top of the page.''  (\file{classes.dtx}, L4333)
2488 %    \begin{macrocode}
2489 \renewcommand\listtablename{List of Tables}
2490 %    \end{macrocode}
2491 % \end{macro}
2492 %
2493 % \begin{macro}{\listfigurename}
2494 % From the Manual 3.7 p10, ``The heading |List of Figures| must appear
2495 % at the top of the page.''  (\file{classes.dtx}, L4332)
2496 %    \begin{macrocode}
2497 \renewcommand\listfigurename{List of Figures}
2498 %    \end{macrocode}
2499 % \end{macro}
2500 %
2501 % \begin{macro}{\abstractname}
2502 % From the Manual 3.8 p10, ``The following heading must be centered at
2503 % the top of the first page: |Abstract|\ldots.''
2504 % (\file{classes.dtx}, L4367)
2505 %    \begin{macrocode}
2506 \newcommand\abstractname{Abstract}
2507 %    \end{macrocode}
2508 % \end{macro}
2509 %
2510 % \begin{macro}{\bibname}
2511 % From the Manual 3.13 p12, ``The heading |Bibliography| (or
2512 % |List of References|) must appear at the top of first page.''
2513 % (\file{classes.dtx}, L4344)
2514 %    \begin{macrocode}
2515 \renewcommand\bibname{Bibliography}
2516 %    \end{macrocode}
2517 % \end{macro}
2518 %
2519 % \begin{macro}{\appendixname}
2520 % From the Manual 3.14 p12, ``Number the appendicies consecutively
2521 % either alphabetically or numerically (|Appendix A|, |Appendix B|\ldots
2522 % or |Appendix 1|, |Appendix 2|\ldots).''
2523 % (\file{classes.dtx}, L4366)
2524 %    \begin{macrocode}
2525 \renewcommand\appendixname{Appendix}
2526 %    \end{macrocode}
2527 % \end{macro}
2528 %
2529 % \begin{macro}{\vitaname}
2530 % From the Manual 3.15 p13, ``The heading |Vita| must appear at the
2531 % top of the page.''
2532 %    \begin{macrocode}
2533 \newcommand\vitaname{Vita}
2534 %    \end{macrocode}
2535 % \end{macro}
2536 %
2537 %
2538 % \subsection{Remaining details}
2539 %
2540 %
2541 % \subsubsection{Terminal blank page}
2542 %
2543 % Add a terminal blank page (when |\if@final| is true)
2544 % From the Manual 3.16 p13
2545 % \begin{quote}
2546 %   Include a blank page (with no page number) at the end of the
2547 %   thesis or dissertation.  The blank page is neither counted nor
2548 %   numbered.
2549 % \end{quote}
2550 %    \begin{macrocode}
2551 \AtEndDocument{\blankpage}
2552 %    \end{macrocode}
2553 %
2554 %
2555 %    \begin{macrocode}
2556 %</class>
2557 %    \end{macrocode}
2558 %
2559 %
2560 % \subsection{Caveats and bugs}
2561 %
2562 %
2563 % \subsubsection{\pkg{hyperref} and uppercase}
2564 %
2565 % In order to comply with the Manual's specifications,
2566 % part and chapter entries to the table of contents need
2567 % to be uppercased, which we do via |\AddContentsLine|.
2568 % This generates some whining from \pkg{hyperref}
2569 % \begin{example}
2570 %   Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding),
2571 %   (hyperref)                removing `\uppercase' on input line 72.
2572 % \end{example}
2573 % This is because |\uppercase| is parsed in \TeX's stomach, but
2574 % \pkg{hyperref} deals with code in \TeX's mouth, so \pkg{hyperref} is
2575 % drops the token and complains.  Which is fine, since the titles
2576 % don't actually need to be uppercased in the bookmark, but the
2577 % error messages are still produced.  If anyone knows of a good way
2578 % to either fix the problem or silence these particular error messages,
2579 % please let me know.  Otherwise, just ignore the errors.
2580 %
2581 %
2582 % \section{Examples}
2583 %
2584 %
2585 % \subsubsection{Template}
2586 %
2587 %    \begin{macrocode}
2588 %<*template>
2589 % See drexel-thesis.pdf for details.
2590 \documentclass{drexel-thesis}
2591
2592 %% Enter the appropriate information here
2593 \author{}    % Fullname
2594 \title{}     % Title Of Thesis
2595 \defmonth{}  % Name of the month of you defense
2596 \defyear{}   % Year you are defending
2597 \degree{}    % Your target degree, spelled out
2598 \advisor{}   % Advisor's full name, degree
2599 \copyrighttext{} % If not "All Rights Reserved."
2600
2601 %% unsrt style give references in order of citation
2602 \bibliographystyle{unsrt}
2603
2604 \begin{document}
2605 \begin{preamble}
2606
2607 \begin{dedications} % OPTIONAL
2608 %% Type dedications here
2609 \end{dedications}
2610
2611 \begin{acknowledgments} % OPTIONAL
2612 %% Type acknowledgments here
2613 \end{acknowledgments}
2614
2615 \tableofcontents
2616 \listoftables  % If you have tables
2617 \listoffigures % If you have figures
2618
2619 \begin{abstract}
2620 %% Type abstract here
2621 \end{abstract}
2622 \end{preamble}
2623
2624 \begin{thesis}
2625 %% Use include statements to include your main thesis code
2626 %% from seperate files.
2627 %%\include{part1}
2628 %%...
2629 \end{thesis}
2630
2631 \bibliography{references} % Include references.bib BibTeX
2632
2633 \appendix % If you have appendices
2634 %% include files with your appendicies (if any) here
2635 %%\include{appendixA}
2636 %%...
2637
2638 \begin{vita} % Ph.D. only.
2639 %%Vita text.
2640 \end{vita}
2641
2642 \end{document}
2643 %</template>
2644 %    \end{macrocode}
2645 %
2646 %
2647 % \subsection{A better example}
2648 % \label{sec:better-example}
2649 %
2650 % \subsubsection{Main}
2651 %
2652 %     \begin{macrocode}
2653 %<*example|example-draft>
2654 %% See drexel-thesis.pdf for details.
2655 %<example>\documentclass{drexel-thesis}
2656 %<example-draft>\documentclass[draft]{drexel-thesis}
2657
2658 %% Enter the appropriate information here
2659 \author{Johny Henry}
2660 \title{Inadequacies of Steam-Driven Boring Machines}
2661 \defmonth{July}
2662 \defyear{1872}
2663 \degree{Doctor of Philosophy}
2664 \advisor{Collis Potter Huntington, R.R.D.}
2665 \copyrighttext{\copyrighttextCC}
2666
2667 \usepackage[super,sort&compress]{natbib} % fancy citation extensions
2668 \bibliographystyle{plainnat}
2669
2670 \usepackage{fancyvrb} % nicer verbatim handling
2671 \DefineShortVerb{\|}  % \verb+TEXT+  ->  |TEXT|
2672
2673 \usepackage{blabla} % \blabla macro for producing dummy output
2674
2675 \begin{document}
2676 \begin{preamble}
2677
2678 \begin{dedications}
2679 \blabla{10}{20}
2680 \end{dedications}
2681
2682 \begin{acknowledgments}
2683 \blabla{10}{20}
2684 \end{acknowledgments}
2685
2686 \tableofcontents
2687 \listoftables
2688 \listoffigures
2689
2690 \begin{abstract}
2691 \blabla{10}{20}
2692 \end{abstract}
2693 \end{preamble}
2694
2695 \begin{thesis}
2696 \include{example-1}
2697 \end{thesis}
2698
2699 \bibliography{example-ref}
2700
2701 \appendix
2702 \include{example-a}
2703
2704 \begin{vita}
2705 \blabla{10}{20}
2706 \end{vita}
2707
2708 \end{document}
2709 %</example|example-draft>
2710 %    \end{macrocode}
2711 %
2712 %
2713 % \subsubsection{Part}
2714 %
2715 %     \begin{macrocode}
2716 %<*example-part>
2717 \part{A Part Heading}
2718 \chapter{A Chapter Heading}
2719 \section{A Section Heading}
2720 The following sectioning commands are available:
2721 \begin{quote}
2722  part \\
2723  chapter \\
2724  section \\
2725  subsection \\ 
2726  subsubsection \\ 
2727  paragraph \\ 
2728  subparagraph 
2729 \end{quote}
2730
2731 \subsection{natbib}
2732 You can cite your references with |natbib|'s |\citet| and |\citep|
2733 macros.  See
2734 \href{http://www.ctan.org/tex-archive/macros/latex/contrib/natbib/}
2735 {the natbib manual} for details.
2736
2737 Here we have a text citation \citet{rief97} followed by a
2738 parenthetical citation\citep{rief97}.
2739
2740 \subsubsection{Tables and Figures}
2741 \blabla{2}{20}
2742 \begin{table}
2743   \caption{A table float}
2744   \begin{center}
2745   \begin{tabular}{r@{.}l r@{.}l r@{.}l}
2746     \multicolumn{2}{c}{Time (s)} &
2747       \multicolumn{2}{c}{John Henry (m)} &
2748       \multicolumn{2}{c}{Steam drill (m)} \\
2749     0&0 & 0&0 & 0&0 \\
2750     10&0 & 4&3 & 3&75 \\
2751     30&0 & 11&9 & 10&1 \\
2752     \ldots
2753   \end{tabular}
2754 %% Note the strange |r@{.}l| notation in the |\tabular| column
2755 %% definition.  This allows for numbers aligned at the decimal point
2756 %% (see \href{http://www.stat.unipg.it/tex-man/ltx-68.html}{here}).
2757 %%
2758 %% |\multicolumn{num_cols}{alignment}{contents}| allows the headings
2759 %% to span the pre- and post-decimal columns.
2760   \end{center}
2761 \end{table}
2762 \blabla{5}{20}
2763 \begin{figure}
2764   \begin{center}
2765     \includegraphics[width=0.4\textwidth]{drexel-logo}
2766   \end{center}
2767   \caption{A figure float}
2768 \end{figure}
2769 \blabla{10}{20}
2770
2771 \part{Another Part}
2772 \chapter{Another Chapter}
2773 \blabla{30}{20}
2774 \chapter{Yet another Chapter}
2775 \blabla{30}{20}
2776 %</example-part>
2777 %    \end{macrocode}
2778 %
2779 %
2780 % \subsubsection{\BibTeX}
2781 %
2782 % What goes into the \BibTeX\ file |example-ref.bib|?
2783 % For more information, check out this 
2784 % \href{http://cmtw.harvard.edu/Documentation/TeX/Bibtex/Example.html}{basic tutorial}.
2785 % If you want to get deeper, take a look at
2786 % \href{http://www.ctan.org/tex-archive/info/bibtex/tamethebeast/}{Tame the BeaST}.
2787 % Other resources:
2788 % \href{http://www.andy-roberts.net/misc/latex/latextutorial3.html}{how the process works},
2789 %   \href{http://newton.ex.ac.uk/tex/pack/bibtex/btxdoc/node6.html}{entry types},
2790 %   \href{http://newton.ex.ac.uk/tex/pack/bibtex/btxdoc/node7.html}{fields},
2791 %   \href{http://en.wikipedia.org/wiki/BibTeX}{entries and fields},
2792 %   \href{http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html}{assorted style examples}, and
2793 %   \href{http://liinwww.ira.uka.de/bibliography/Bib.Format.html}{assorted \BibTeX tools}.
2794 %
2795 % Here is an example \BibTeX\ file to get you started.  We define
2796 % strings for the publishers, journals, and authors to avoid
2797 % duplication, minimize the risk of typos, etc.
2798 %
2799 %    \begin{macrocode}
2800 %<*example-bibtex-refs>
2801 %% Publishers
2802 @String{APS = "American Physical Society"}
2803
2804 %% Journals
2805 @String{SCI = "Science"}
2806
2807 %% Authors
2808 @String{MRief = "Rief, Matthias"}
2809 @String{MGautel = "Gautel, Mathias"}
2810 @String{FOesterhelt = "Oesterhelt, Filipp"}
2811 @String{JFernandez = "Fernandez, Julio M."}
2812 @String{HGaub = "Gaub, Hermann E."}
2813
2814 %% Articles
2815 @Article{rief97,
2816   author = MRief #" and "# MGautel #" and "# FOesterhelt #" and "#
2817            JFernandez #" and "# HGaub,
2818   title = "Reversible Unfolding of Individual Titin Immunoglobulin
2819            Domains by {AFM}",
2820   journal = SCI,
2821   volume =  276,
2822   number =  5315,
2823   pages =   "1109--1112",
2824   year =    1997,
2825   doi =     "10.1126/science.276.5315.1109",
2826   URL =     "http://www.sciencemag.org/cgi/content/abstract/276/5315/1109",
2827   eprint =  "http://www.sciencemag.org/cgi/reprint/276/5315/1109.pdf",
2828   mynote = "Seminal paper for force spectroscopy on Titin. Cited by
2829            Dietz '04 (ref 9) as an example of how unfolding large
2830            proteins is easily interpreted (vs.\ confusing unfolding in
2831            bulk), but Titin is a rather simple example of that, because
2832            of its globular-chain structure.",
2833 }
2834 %% ...
2835 %</example-bibtex-refs>
2836 %    \end{macrocode}
2837 %
2838 %
2839 % \subsubsection{Appendix}
2840 %
2841 %    \begin{macrocode}
2842 %<*example-appendix>
2843 \chapter{Some Appendix Heading}
2844 \blabla{10}{20}
2845 \chapter{Another Appendix Heading}
2846 \blabla{10}{20}
2847 %</example-appendix>
2848 %    \end{macrocode}
2849 %
2850 %
2851 % \subsubsection{\pkg{blabla}}
2852 %
2853 % Define the \pkg{blabla} package for generating dummy text.  This
2854 % will make it easier to generate reasonable exampes.
2855 %    \begin{macrocode}
2856 %<*blabla>
2857 \ProvidesPackage{blabla} [2010/01/11 1.0 Dummy text generation]
2858 \RequirePackage{forloop}[2006/09/18]
2859 %% http://www.ctan.org/tex-archive/macros/latex/contrib/forloop/
2860
2861 \newcounter{blabla@i}
2862 \newcounter{blabla@j}
2863 \newcommand{\blabla}[2]{
2864   \forloop{blabla@i}{0}{\value{blabla@i} < #1}{
2865     Bla
2866     \forloop{blabla@j}{0}{\value{blabla@j} < #2}{ bla }
2867     bla.\par
2868   }
2869 }
2870 %</blabla>
2871 %    \end{macrocode}
2872 %
2873 %
2874 % \Finale
2875 \endinput