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