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