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