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