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