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