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