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