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