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