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