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