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