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