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