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