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