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