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