From: W. Trevor King Date: Sat, 9 Jan 2010 23:38:20 +0000 (-0500) Subject: Began versioning X-Git-Tag: 0.2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=88bd1134a740f794dc390ccd63bb88aaf76f5e1e;p=drexel-thesis.git Began versioning --- e8f34117ea7c521a34278ba82a105e78dbebaec4 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..808d673 --- /dev/null +++ b/Makefile @@ -0,0 +1,51 @@ +all : drexel-thesis.pdf drexel-thesis.cls main.pdf bibmain.pdf + +drexel-thesis.pdf : drexel-thesis.dtx + pdflatex $< + makeindex drexel-thesis.glo -s gglo.ist -o drexel-thesis.gls + pdflatex $< + +drexel-thesis.cls main.tex part1.tex bibmain.tex bibpart1 references.bib : \ + drexel-thesis.ins drexel-thesis.dtx + pdflatex $< + +main.pdf : main.tex part1.tex + pdflatex $< + pdflatex $< + +bibmain.pdf : bibmain.tex bibpart1.tex references.bib + pdflatex $< + bibtex bibmain + pdflatex $< + pdflatex $< + +temp-clean : + rm -f *.aux *.log *.out *.lof *.lot *.toc \ + *.ilg *.glo *.gls *.idx *.ind \ + *.bbl *.blg *.dvi drexel-thesis + +semi-clean : temp-clean + rm -f *.bib *.tex + +clean : semi-clean + rm -f *.cls drexel-thesis.pdf main.pdf bibmain.pdf \ + drexel-thesis.tar.gz + +dist : drexel-thesis.tar.gz + +CLASS_FILES = Makefile README drexel-thesis.dtx drexel-thesis.ins \ + drexel-thesis.cls drexel-thesis.pdf +MAIN_FILES = main.tex part1.tex appendixA.tex drexel-logo.pdf main.pdf +BIBMAIN_FILES = bibmain.tex bibpart1.tex references.bib appendixA.tex \ + bibmain.pdf + +drexel-thesis.tar.gz : $(CLASS_FILES) $(MAIN_FILES) $(BIBMAIN_FILES) + rm -f $@ + mkdir drexel-thesis + cp -p $(CLASS_FILES) drexel-thesis/ + mkdir drexel-thesis/main + cp -p $(MAIN_FILES) drexel-thesis/main/ + mkdir drexel-thesis/bibmain + cp -p $(BIBMAIN_FILES) drexel-thesis/bibmain/ + tar -chozf $@ drexel-thesis + rm -rf drexel-thesis diff --git a/README b/README new file mode 100644 index 0000000..4a8b379 --- /dev/null +++ b/README @@ -0,0 +1,18 @@ +The LaTeX class drexel-thesis is distributed in the docstrip file + drexel-thesis.dtx +with the install file + drexel-thesis.ins +For more information on the docstrip format, see + http://www.ctan.org/tex-archive/info/dtxtut/ + http://www.ctan.org/tex-archive/macros/latex/base/ + +To generate the class file drexel-thesis.cls, the template files, the +pdf documentation, and a bunch of intermediate files, run + make +in this directory. You'll need to install drexel-thesis.cls somewhere +in your texmf tree (or just dump it into the top level of your thesis +directory). Running + make temp-clean +will get rid of the intermediate files. + +Happy TeXing! diff --git a/drexel-logo.pdf b/drexel-logo.pdf new file mode 100644 index 0000000..e3865a0 Binary files /dev/null and b/drexel-logo.pdf differ diff --git a/drexel-thesis.dtx b/drexel-thesis.dtx new file mode 100644 index 0000000..416973e --- /dev/null +++ b/drexel-thesis.dtx @@ -0,0 +1,1979 @@ +% \def\fileversion{0.2} +% \def\filedate{2010/01/09} +% \iffalse meta-comment +%\def\fileversion{0.2} +%\def\filedate{2010/01/09} +% +% Copyright (C) 2010 W. Trevor King, Daniel J. Cross, T. Tsankov, and +% R. Rojas. +% ------------------------------------------------------- +% +% This file may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in: +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% Based on Scott Pakin's dtxtut/cskeleton.dtx +% http://www.ctan.org/tex-archive/info/dtxtut/ +% +% \fi +% +% \iffalse meta-comment +%<*driver> +\ProvidesFile{drexel-thesis.dtx} +% +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesClass{drexel-thesis} +% [\filedate\ \fileversion\ Drexel Thesis] +% +% Code for the .ini driver, see section "2.1 The driver file" of doc.dtx. +%<*driver> +\documentclass{ltxdoc} +\usepackage[colorlinks=true]{hyperref} +% +% Include some useful commands from |xkeyval|'s ||. +%<*driver> +\usepackage{xcolor} +\usepackage{listings} +\lstnewenvironment{command}{% + \lstset{columns=flexible,frame=single,backgroundcolor=\color{blue!20},% + xleftmargin=\fboxsep,xrightmargin=\fboxsep,escapeinside=`',gobble=1}}{} +\lstnewenvironment{example}{% + \lstset{basicstyle=\footnotesize\ttfamily,columns=flexible,frame=single,% + backgroundcolor=\color{yellow!20},xleftmargin=\fboxsep,% + xrightmargin=\fboxsep,gobble=1}}{} +% +% \TeX's arguments aren't optional/mandatory, but they do use brackets +% and braces. +%<*driver> +\newcommand{\bracearg}[1]{\marg{#1}} +\newcommand{\brackarg}[1]{\oarg{#1}} +% +% Define a quick and dirty version of |xkeyval|'s |\DescribeOptions|. +%<*driver> +\newenvironment{option}[1]{\begin{macro}{#1}} + {\end{macro}} +% +%<*driver> +\makeatletter +\def\DescribeOption#1{\leavevmode\@bsphack + \marginpar{\raggedleft\PrintDescribeOption{#1}}% + \SpecialOptionIndex{#1}\@esphack\ignorespaces} +\def\PrintDescribeOption#1{\strut\emph{option}\\\MacroFont #1\ } +\def\SpecialOptionIndex#1{\@bsphack + \index{#1\actualchar{\protect\ttfamily#1} + (option)\encapchar usage}% + \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar + usage}\@esphack} +\def\DescribeOptions#1{\leavevmode\@bsphack + \marginpar{\raggedleft\strut\emph{options}% + \@for\@tempa:=#1\do{% + \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa + }}\@esphack\ignorespaces} +\makeatother +% +%<*driver> +\EnableCrossrefs +\RecordChanges +\EnableCrossrefs +\begin{document} + \DocInput{drexel-thesis.dtx} +\end{document} +% +% \fi +% +% \CheckSum{0} +% +% \CharacterTable +% {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 +% 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 +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% +% \changes{0.1}{2006/01/18}{Rewrite by Daniel J.~Cross} +% \changes{0.2}{2010/01/09}{W.~Trevor King transitioned from thesis.cls +% to drexel-thesis.dtx and did a good deal of reorganizing.} +% +% \MakeShortVerb{\|} +% \newcommand{\pkg}[1]{\textsf{#1}} +% \newcommand{\cls}[1]{\textsf{#1}} +% ^^A\newcommand{\BibTeX}{{\sc Bib}\TeX} +% +% \title{The \textsf{drexel-thesis} class\thanks{This document +% corresponds to \textsf{drexel-thesis}~\fileversion, dated \filedate.}} +% \author{W.~Trevor King \\\texttt{wking@drexel.edu} +% \and Daniel J.~Cross \and T.~Tsankov \and R.~Rojas.} +% \date{\filedate} +% +% \maketitle +% +% \section{Introduction} +% +% This package defines a \LaTeX\ thesis class for Drexel University +% conforming to the +% \href{http://www.library.drexel.edu/files/services_documents/thesismanual.pdf} +% {Drexel University Thesis Manual version 2009/06/01}. +% +% \section{Usage} +% +% To write a thesis, you load the Drexel thesis definitions by loading +% the \pkg{drexel-thesis} class at the beginning of your +% \LaTeX\ document with the |\documentclass| command. For example, +% \begin{example} +% \documentclass{drexel-thesis} +% \end{example} +% +% \subsection{Options} +% +% \DescribeOptions{final,draft} +% The default option (selected if not options are passed) is |final| +% mode, which has all the proper formatting and spacing for your final +% product. The other main option is |draft| mode, which reduces all +% the spacing in the document, so might be helpful when printing out +% drafts (saves paper). +% +% |final| mode corresponds to (with Thesis Manual chapter and verse)\\ +% \begin{tabular}{r p{0.8\textwidth}} +% |oneside| & 1.5 Library Submission Information, Print +% Version: ``All copies must be: \ldots Typed/printed on only one +% side of the page (not double-sided).'' \\ +% |finalspace| & Assorted single, double, and triple spacing +% directives. \\ +% |dottedtoc| & From the example on p17. +% \end{tabular} +% +% |draft| mode corresponds to \\ +% \begin{tabular}{r p{0.8\textwidth}} +% |twoside| & Save space. \\ +% |draftspace| & Save space. \\ +% |dottedtoc| & Might as well be consistent with |final|. +% \end{tabular} +% +% \DescribeOption{finalspace} +% Loosen spacing. +% +% \DescribeOption{draftspace} +% Tighten spacing. +% +% \DescribeOptions{dottedtoc,boldtoc, +% dottedpart,boldpart, +% dottedchapter,boldchapter} +% These options change how the relevant TOC lines are printed +% \LaTeX\ defaults to bold but not dots. The |*toc| options set all +% of the types. For example, |boldtoc| is equivalent to +% |boldchapter,boldpart|. +% +% \subsubsection{Interesting \cls{book} options} +% +% \DescribeOption{oneside} +% Setup output for one-sided printing. +% +% \DescribeOption{twoside} +% Setup output for two-sided printing. +% +% \DescribeOption{leqno} +% |leqno| places the numbering of formulae on the left hand side +% instead of the right. +% +% \DescribeOption{fleqn} +% |fleqn| typesets displayed formulae left-aligned instead of +% centered. +% +% +% \subsection{Macros} +% +% \begin{command} +% `\cs{author}\marg{name}' +% \end{command} +% \DescribeMacro{\author} +% Use this macro to set your full name to \meta{name}, including +% your middle initial or name. For example +% \begin{example} +% \name{Richard P. Feynman} +% \end{example} +% See the Manual 3.1 p8. +% +% \begin{command} +% `\cs{title}\marg{title}' +% \end{command} +% \DescribeMacro{\title} +% Use this macro to set your thesis title to \meta{name}. For example +% \begin{example} +% \title{A New Approach to Quantum Theory} +% \end{example} +% See the Manual p16. +% +% \begin{command} +% `\cs{advisor}\marg{name}' +% \end{command} +% \DescribeMacro{\advisor} +% Use this macro to set your advisor's name to \meta{name}. For +% example +% \begin{example} +% \advisor{John A. Wheeler, Ph.D.} +% \end{example} +% See the Manual 3.1 p8. +% +% \begin{command} +% `\cs{month}\marg{month}' +% `\cs{year}\marg{year}' +% \end{command} +% \DescribeMacro{\defmonth} +% \DescribeMacro{\defyear} +% Use these macros to set the month with \meta{month} (spelled out) +% and year with \meta{year} (four digits) of your thesis defense. For +% example +% \begin{example} +% \defmonth{June} +% \defyear{1942} +% \end{example} +% See the Manual 3.1 p8. +% The |def| in |\def*| avoids collisions with the plain \TeX\ +% |\month| and |\year| (see the +% \href{http://www.tug.org/utilities/plain/cseq.html#month-rp}{month} +% and +% \href{http://www.tug.org/utilities/plain/cseq.html#year-rp}{year} +% entries in the HTML version of David Bausum's \emph{TeX Reference +% Manual}). +% +% \begin{command} +% `\cs{degree}\marg{degree}' +% \end{command} +% \DescribeMacro{\degree} +% Set your target degree with \meta{degree}. From the Manual 3.1 p8. +% \begin{quote} +% Write out the name of the degree for which you are a candidate. +% All Ph.D.\ candidates must use |Doctor of Philosophy|. All +% Master's degree candidates should use the precise degree name +% (e.g., |Master of Science in Mechanical Engineering|). +% \end{quote} +% So, for a Ph.D candidate, +% \begin{example} +% \degree{Doctor of Philosophy} +% \end{example} +% +% \begin{command} +% `\cs{tableofcontents}' +% \end{command} +% \DescribeMacro{\tableofcontents} +% Write the table of contents (Manual 3.5 p9). You can control the +% verbosity by setting |\tocdepth| according to the following table +% (\href{http://www.image.ufl.edu/help/latex/intext.shtml}{source}). \\ +% \begin{tabular}{l l l} +% Depth in document & Section Command & Depth for |\secnumdepth| Command \\ +% -1 & |\part| & 1 \\ +% 0 & |\chapter| & 2 \\ +% 1 & |\section| & 3 \\ +% 2 & |\subsection| & 4 \\ +% 3 & |\subsubsection| & 5 \\ +% 4 & |\paragraph| & 6 \\ +% 5 & |\subparagraph| & 7 +% \end{tabular} \\ +% For example, to expose everything down to and including the +% |\subsection| level, you would add +% \begin{example} +% \setcounter{tocdepth}{2} +% \end{example} +% to your preamble (the section before |\begin{document}|, not the +% |preamble| environment discussed below). +% +% Note that the Manual 3.5 p9 requires ``List chapter titles and at +% least the first and second order subdivisions.'', which corresponds +% to a |\tocdepth| of at least 2. +% +% \begin{command} +% `\cs{blanklines}\marg{num}' +% \end{command} +% \DescribeMacro{\blanklines} +% Insert \meta{num} blank lines. For example +% \begin{example} +% \blanklines{2} +% \end{example} +% The skipped lines are always \emph{single spaced} lines, regardless +% of the current line spacing in the environment calling this macro. +% +% +% \subsection{Environments} +% +% \DescribeEnv{preamble} +% Generalize the |\frontmatter| for the thesis, setting up page +% numbering, including the title page, copyright page etc. The +% |preamble| environment should contain the following elements +% (in order, see the Manual p8) +% \begin{itemize} +% \item |dedication| environment (optional) +% \item |acknowledgments| environment (optional) +% \item |\tableofcontents| +% \item |\listoftables| +% \item |\listoffigures| +% \item |abstract| environment +% \end{itemize} +% This will take care of everything from the title page (Manual 3.1), +% up through the blank page before the text (Manual 3.9). +% +% \DescribeEnv{dedications} +% Set the dedications text. +% Highlights from the Manual 3.3 p9: +% \begin{quote} +% The |Dedications| page is optional. +% \end{quote} +% +% \DescribeEnv{acknowledgments} +% Set the acknowledgments text. +% Highlights from the Manual 3.4 p9: +% \begin{quote} +% The |Acknowledgments| page is optional, but most theses do +% include a brief statement of thanks or recognition of any special +% assistance. +% \end{quote} +% +% \DescribeEnv{abstract} +% Set the thesis abstract text. In the Thesis Manual, see section 3.8 +% Abstract (p10) for details, p20 for an example. +% +% Highlights from the Manual: +% \begin{quote} +% The abstract is a summary that allows readers to determine the +% value of reading the full thesis. It should include a statement +% of the problem, an outline of procedures or methods, and a summary +% of results and conclusions. +% \end{quote} +% \begin{itemize} +% \item Word limits: 600 for a Master's thesis, 350 for a Ph.D.\ thesis. +% \end{itemize} +% +% \DescribeEnv{thesis} +% Set the thesis text. In the Thesis Manual, see section 3.10 Thesis +% (p11) for details. +% +% Highlights from the Manual: +% \begin{quote} +% Divide the text into its major parts/chapters/subsections. No +% fixed arrangement is necessary. The major parts may contain such +% subjects as introduction, general argument, description of +% experimental procedures, research methods, discussion, summary, +% conclusions, recommendations, and other pertinent topics that are +% necessary for a complete understanding on the part of a +% sophisticated or professional reader. +% \end{quote} +% +% \DescribeEnv{vita} +% Set the thesis vita text (Ph.D.\ only). See the Manual 3.15 p12, +% ``Vita'', for details. +% +% Highlights from the Manual: +% \begin{quote} +% The Vita is a biography of the student written in the third person +% in either essay or outline form. It should include the full name, +% place and date of birth (optional), country of citizenship +% (optional), institutions attended, degrees and honors received, +% titles of publications, teaching and professional experience, and +% other pertinent data. The Vita must be one page or less. +% \end{quote} +% +% +% \subsection{Hints} +% +% +% \subsubsection{Package installation} +% \label{sec:dependencies} +% +% All the packages this class depends on must be installed somewhere +% in your texmf tree (they probably already are). If not, you will +% recieve warning messages on compilation such as +% \begin{example} +% ! LaTeX Error: File `missing-package.sty' not found. +% \end{example} +% You should then install the missing package(s) using your operating +% systems package manager, or grab the missing package from +% \href{http://www.ctan.org/}{CTAN}, and install them following TODO. +% +% +% \subsubsection{Tables and Figures} +% +% From the Manual 2.3 p6, ``Tables and Figures'', +% \begin{quote} +% Place figure captions below figures. +% Place table captions above tables. +% \end{quote} +% so make sure the |\caption| command is in the appropriate location. +% For example +% \begin{example} +% \begin{table} +% \caption{Some caption text} +% \begin{tabular}{...} +% ... +% \end{tabular} +% \end{table} +% \end{example} +% or +% \begin{example} +% \begin{float} +% \includegraphics{...} +% \caption{Some caption text} +% \end{float} +% \end{example} +% Note that you'll want to use the +% \href{http://www.ctan.org/tex-archive/macros/latex/required/graphics/}{\pkg{graphicx}} +% package to define the |\includegraphics| macro. For more useful +% float information, see the +% \href{http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions}{\LaTeX wikibook page}. +% +% +% \subsubsection{Citations} +% +% I highly recommend using \BibTeX\ and +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/natbib/}{\pkg{natbib}}. +% See Section \ref{sec:natbib-example} for a simple example. +% +% Suggested options:\\ +% \begin{tabular}{r p{0.8\textwidth}} +% |super| & selects citations in superscript mode. \\ +% |sort&compress| & automatically sorts and compresses compound +% citations (|\pcite{a,b,...}|). +% \end{tabular} +% +% +% \subsubsection{References} +% +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/cleveref/}{\pkg{cleveref}}. +% Is a wonderful tool for easy, consistent crosslinking. The manual is also very good. +% +% +% \subsubsection{Hyperlinks} +% +% \cls{drexel-thesis} loads +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/}{\pkg{hyperref}}. +% with the options:\\ +% \begin{tabular}{r p{0.8\textwidth}} +% |colorlinks| & color the link letters instead of drawing colored boxes. \\ +% \end{tabular} +% +% If running with a pdftex-based driver, |\author|, |\title|, and +% |\degree| automatically set |pdfauthor|, |pdftitle|, and +% |pdfsubject| respectively. You can use the |\hypersetup| macro to +% set options overriding these defaults. +% +% +% \StopEventually{\pagebreak\PrintChanges} +% +% +% \section{Implementation} +% \iffalse meta-comment +%<*class> +% \fi +% +% For simplicity, we'll derive everything from the standard \cls{book} +% class. +% +% +% \subsection{Option Processing} +% +% Include +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/xkeyval/}{\pkg{xkeyval}} +% for easier option parsing. If the package is not installed on your system, +% see Section \ref{sec:dependencies} for installation instructions. +% \begin{macrocode} +\RequirePackage{xkeyval} +% \end{macrocode} +% +% Define some booleans to store option states +% \begin{macrocode} +\newif\if@mainmatter \@mainmattertrue +\newif\if@dottedchapter +\newif\if@boldchapter +\newif\if@boldpart +\newif\if@dottedpart +\newif\if@appendix +\newif\if@final \@finalfalse +% \end{macrocode} +% +% Define some strings to store option arguments +% \begin{macrocode} +\newcommand{\@advisor}{ } +\newcommand{\def@month}{ } +\newcommand{\def@year}{ } +\newcommand{\@degree}{ } +% \end{macrocode} +% \begin{option}{finalspace} +% \begin{macrocode} +\DeclareOptionX{finalspace}{ + \setlength\overfullrule{0pt} + \def\@csp{2} % content page spacing + \def\@ssp{1} % single space + \def\@dsp{2} % double space + \def\@tsp{3} % triple space + \@finaltrue +} +% \end{macrocode} +% \end{option} +% \begin{option}{draftspace} +% \begin{macrocode} +\DeclareOptionX{draftspace}{ + \setlength\overfullrule{5pt} + \def\@csp{1} % content page spacing + \def\@ssp{1} % single space + \def\@dsp{1} % double space + \def\@tsp{2} % triple space + \@finalfalse +} +% \end{macrocode} +% \end{option} +% +% \begin{option}{dottedpart} +% \begin{macrocode} +\DeclareOptionX{dottedpart}{\@dottedparttrue} +% \end{macrocode} +% \end{option} +% \begin{option}{dottedchapter} +% \begin{macrocode} +\DeclareOptionX{dottedchapter}{\@dottedchaptertrue} +% \end{macrocode} +% \end{option} +% \begin{option}{boldpart} +% \begin{macrocode} +\DeclareOptionX{boldpart}{\@boldparttrue} +% \end{macrocode} +% \end{option} +% \begin{option}{boldchapter} +% \begin{macrocode} +\DeclareOptionX{boldchapter}{\@boldchaptertrue} +% \end{macrocode} +% \end{option} +% \begin{option}{dottedtoc} +% \begin{macrocode} +\DeclareOptionX{dottedtoc}{ + \setkeys{drexel-thesis.cls}{dottedpart} + \setkeys{drexel-thesis.cls}{dottedchapter} +} +% \end{macrocode} +% \end{option} +% \begin{option}{boldtoc} +% \begin{macrocode} +\DeclareOptionX{boldtoc}{ + \setkeys{drexel-thesis.cls}{boldpart} + \setkeys{drexel-thesis.cls}{boldchapter} +} +% \end{macrocode} +% \end{option} +% +% Define the book options that |final| and |draft| need to access. +% \begin{option}{oneside} +% \begin{macrocode} +\DeclareOptionX{oneside}{\PassOptionsToClass{oneside}{book}} +% \end{macrocode} +% \end{option} +% +% \begin{option}{twoside} +% \begin{macrocode} +\DeclareOptionX{twoside}{\PassOptionsToClass{twoside}{book}} +% \end{macrocode} +% \end{option} +% +% \begin{option}{final} +% \begin{macrocode} +\DeclareOptionX{final}{ + \setkeys{drexel-thesis.cls}{oneside} + \setkeys{drexel-thesis.cls}{finalspace} + \setkeys{drexel-thesis.cls}{dottedtoc} +} +% \end{macrocode} +% \end{option} +% +% \begin{option}{draft} +% \begin{macrocode} +\DeclareOptionX{draft}{ + \setkeys{drexel-thesis.cls}{twoside} + \setkeys{drexel-thesis.cls}{draftspace} + \setkeys{drexel-thesis.cls}{dottedtoc} +} +% \end{macrocode} +% \end{option} +% +% Use the default \cls{book} implementation for any remaining options +% including |oneside|, |twoside|, |leqno|, |fleqn|, +% \ldots. +% \begin{macrocode} +\DeclareOptionX*{\PassOptionsToClass{\CurrentOption}{book}} +% \end{macrocode} +% +% Execute the default options +% \begin{macrocode} +\ExecuteOptionsX{final} +% \end{macrocode} +% +% Process options and load the book class +% \begin{macrocode} +\ProcessOptionsX\relax +\LoadClass{book} +% \end{macrocode} +% +% +% \subsection{Internal package includes} +% +% Include some other packages we'll need. If the package is not +% installed on your system, see Section \ref{sec:dependencies} for +% installation instructions. +% +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/setspace/}{\pkg{setspace}} +% for double spacing. +% \begin{macrocode} +\RequirePackage{setspace} +% \end{macrocode} +% +% \href{http://www.ctan.org/tex-archive/macros/latex/required/graphics/}{\pkg{graphicx}} + +% \href{http://www.ctan.org/tex-archive/macros/latex/required/tools/}{\pkg{calc}} +% for |\blanklines| macro. +% \begin{macrocode} +\RequirePackage{calc} +% \end{macrocode} +% +% Setup page margins with the +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/geometry/}{\pkg{geometry}} +% package. From the Manual p5: +% \begin{itemize} +% \item The left margin must be at least 1 1/2'' (1.5 inches) +% throughout the document. +% \item All other margins (top, bottom, and right) must be at least 1''. +% \end{itemize} +% And from the Manual 1.5 p4, Print Version: +% ``The paper size must be 8 1/2'' x 11''{}''. +% \begin{macrocode} +\RequirePackage[letterpaper,margin=1in,bindingoffset=0.5in]{geometry} +% [2008/12/21 v4.2 Page Geometry] +% \end{macrocode} +% Note that we include the \pkg{geometry} package after loading \cls{book} to +% override the margin manipulation that takes place in \cls{book}. +% +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/}{\pkg{fancyhdr}} +% for correct page numbering and fancy headers. +% \begin{macrocode} +\RequirePackage{fancyhdr} +% \end{macrocode} +% Setup the standard |fancy| format. |\leftmark| is the higher level +% mark, see |\chaptermark| below. |\rightmark| is the lower level +% mark, see |\sectionmark| below. +% \begin{macrocode} +\pagestyle{fancy} +\fancyhf{} +\fancyhead[LE,RO]{\slshape\rightmark} +\fancyhead[LO,RE]{\slshape\leftmark} +\fancyfoot[LE,RO]{\thepage} +% \end{macrocode} +% Override the |plain| format (for chapter pages, etc.). +% \begin{macrocode} +\fancypagestyle{plain}{ + \fancyhf{} + \renewcommand{\headrulewidth}{0pt} + \fancyfoot[LE,RO]{\thepage} +} +% \end{macrocode} +% +% Setup colon rather than period separated chapter marks, overriding +% \cls{book}'s |\chaptermark|. +% \begin{macrocode} +\renewcommand\chaptermark[1]{% + \markboth {\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \@chapapp\ \thechapter: \ % + \fi + \fi + #1}}{}} +% \begin{macrocode} +% +% Setup space rather than period separated section marks, overriding +% \cls{book}'s |\sectionmark|. +% \begin{macrocode} +\renewcommand{\sectionmark}[1]{% + \markright {\MakeUppercase{% + \ifnum \c@secnumdepth >\z@ + \thesection \ % + \fi + #1}}} +% \end{macrocode} +% +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/}{\pkg{ifpdf}} +% for detecting PDF drivers. We use it to configure \pkg{hyperref} below. +% \begin{macrocode} +\RequirePackage{ifpdf} +% \end{macrocode} +% +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/}{\pkg{hyperref}} +% for hyperlinks. Not strictly necessary, but I can't imagine a +% thesis without it. +% \begin{macrocode} +\RequirePackage{hyperref} +% \end{macrocode} +% Nobody likes the default colored boxes. Color the text itself. +% \begin{macrocode} +\hypersetup{colorlinks} +% \end{macrocode} +% If we're writing a PDF, we set the |pdfauthor|, etc.\ arguments in +% |\author|, etc.\ to avoid using |\AtBeginDocument| or some such. +% +% +% \subsection{Macros} +% +% \begin{macro}{\author} +% Override |latex.ltx|'s |\author| to set \pkg{hyperref}'s |pdfauthor|. +% \begin{macrocode} +\renewcommand{\author}[1]{ + \gdef\@author{#1} + \ifpdf \hypersetup{pdfauthor={\@author}} \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\title} +% Override |latex.ltx|'s |\title| to set \pkg{hyperref}'s |pdftitle|. +% \begin{macrocode} +\renewcommand{\title}[1]{ + \gdef\@title{#1} + \ifpdf \hypersetup{pdftitle={\@title}} \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\advisor} +% \begin{macrocode} +\newcommand{\advisor}[1]{\renewcommand{\@advisor}{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\defmonth} +% \begin{macrocode} +\newcommand{\defmonth}[1]{\renewcommand{\def@month}{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\defyear} +% \begin{macrocode} +\newcommand{\defyear}[1]{\renewcommand{\def@year}{#1}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\degree} +% \begin{macrocode} +\newcommand{\degree}[1]{ + \renewcommand{\@degree}{#1} + \ifpdf \hypersetup{pdfsubject={\@degree}} \fi +} +% \hypersetup{pdfauthor={\@author}} +% \hypersetup{pdftitle={\@title}} +% \hypersetup{pdfstartview=FitH} +% } +% \end{macrocode} +% \end{macro} +% +% Set the official names of the various sections encountered +% \begin{macro}{\dedicationsname} +% From the Manual 3.3 p9, ``The heading |Dedications| must appear at +% the top of the page.'' +% \begin{macrocode} +\newcommand\dedicationsname{Dedications} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\acknowledgmentsname} +% From the Manual 3.4 p9, ``The heading |Acknowledgments| must appear +% at the top of the page.'' +% \begin{macrocode} +\newcommand\acknowledgmentsname{Acknowledgments} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\contentsname} +% From the Manual 3.5 p9, ``The heading |Table of Contents| must +% appear at the top of the page.'' Override \cls{book}'s definition. +% \begin{macrocode} +\renewcommand\contentsname{Table of Contents} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\listtablename} +% From the Manual 3.6 p10, ``The heading |List of Tables| must appear +% at the top of the page.'' +% Override \cls{book}'s definition. +% \begin{macrocode} +\renewcommand\listtablename{List of Tables} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\listfigurename} +% From the Manual 3.7 p10, ``The heading |List of Figures| must appear +% at the top of the page.'' +% Override \cls{book}'s definition. +% \begin{macrocode} +\renewcommand\listfigurename{List of Figures} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\abstractname} +% From the Manual 3.8 p10, ``The following heading must be centered at +% the top of the first page: |Abstract|\ldots'' +% \begin{macrocode} +\newcommand\abstractname{Abstract} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\bibname} +% From the Manual 3.13 p12, ``The heading |Bibliography| (or +% |List of References|) must appear at the top of first page.'' +% Override \cls{book}'s definition. +% \begin{macrocode} +\renewcommand\bibname{Bibliography} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\appendixname} +% From the Manual 3.14 p12, ``Number the appendicies consecutively +% either alphabetically or numerically (|Appendix A|, |Appendix B|\ldots +% or |Appendix 1|, |Appendix 2|\ldots).'' +% Override \cls{book}'s definition. +% \begin{macrocode} +\renewcommand\appendixname{Appendix} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\vitaname} +% From the Manual 3.15 p13, ``The heading |Vita| must appear at the +% top of the page.'' +% \begin{macrocode} +\newcommand\vitaname{Vita} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\blankpage} +% Insert a blank page without numbering (except in draft mode). +% \begin{macrocode} +\newcommand\blankpage{% + \if@final + \newpage + \thispagestyle{empty} + \hphantom{0} + \newpage + \else\fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\blanklines} +% Insert number of blank lines, protecting against external |spacing| +% environments. Requires \pkg{calc} for the multiplication. +% \begin{macrocode} +\newlength\blanklines@length +\newcommand{\blanklines}[1]{% + \begin{spacing}{1} + \setlength{\blanklines@length}{\baselineskip * {#1}} + \vspace{\blanklines@length} + \end{spacing} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\maketitle} +% Automate the creation of the title page. +% From Manual 3.1 p8, ``Title Page'', and the example on p16. +% \begin{itemize} +% \item This page is counted but not numbered (it counts as page i, +% but should not have a page number). TODO: How is this implemented? +% \end{itemize} +% Override \cls{book}'s definition. +% \begin{macrocode} +\renewcommand\maketitle{ + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \begin{titlepage}% + \ifpdf + \pdfbookmark[-1]{Frontmatter}{frontmatter} + \pdfbookmark[0]{Title Page}{title} + \fi + \null\vfil + \begin{center}% + \begin{spacing}{\@tsp} + {\bf \@title \par}% + \end{spacing} + \begin{spacing}{\@dsp} + A Thesis\\ + Submitted to the Faculty\\ + of\\ + Drexel University\\ + by\\ + \@author \\ + in partial fulfillment of the\\ + requirements for the degree\\ + of\\ + \@degree\\ + \def@month\ \def@year + \end{spacing} + \end{center}\par + \vfil\null + \end{titlepage}% + \setcounter{footnote}{0}% + \global\let\maketitle\relax + \global\let\and\relax +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\makecopyright} +% Automate the creation of the copyright page. +% From Manual 3.2 p9, ``Copyright Page''. +% \begin{itemize} +% \item Include a copyright page with the following information: a +% copyright notice, full legal name of author, and date of +% publication on file. +% \item This page is neither counted nor numbered. +% \end{itemize} +% \begin{macrocode} +\newcommand\makecopyright{% + \newpage + \ifpdf \pdfbookmark[0]{Copyright Page}{copyright} \fi + \null\vfil + \begin{center} + \copyright \def@year\\ + \@author. All Rights Reserved. + \end{center} +\vfil\null +% \end{macrocode} +% |\thispagestyle{empty}| turns off page numbering for the current +% page. See +% \href{http://www.personal.ceu.hu/tex/pagestyl.htm#pgstyle}{here}. +% \begin{macrocode} +\thispagestyle{empty} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tableofcontents} +% Automate the creation of the table of contents. +% From Manual 3.5 p9, ``Table of Contents'', and the example on p17. +% \begin{itemize} +% \item Do not list any sections that precede the +% |Table of Contents| (e.g.\ |Dedications|, |Acknowledgments|). Do +% not list the |Table of Contents| itself. +% \item These pages are counted and numbered in lowercase Roman numerals. +% \end{itemize} +% Override \cls{book}'s definition. +% \begin{macrocode} +\renewcommand\tableofcontents{% + \newpage + \ifpdf + \phantomsection + \pdfbookmark[0]{\contentsname}{tableofcontents} + \fi + \chapter*{\contentsname} + \@mkboth{\MakeUppercase\contentsname}% + {\MakeUppercase\contentsname}% + \@starttoc{toc}% +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Environments} +% +% \begin{environment}{preamble} +% \begin{macrocode} +\newenvironment{preamble}{% + \cleardoublepage + \@mainmatterfalse + \pagenumbering{roman} +% \end{macrocode} +% From Manual 3.1 p8, ``Title Page''. +% \begin{macrocode} + \maketitle +% \end{macrocode} +% From Manual 3.2 p9, ``Copyright Page''. +% \begin{macrocode} + \makecopyright +}{% +% \end{macrocode} +% From the Manual 3.9, p11: +% \begin{quote} +% Include a blank page (with no page number) before the first page +% of text. The blank page is neither numbered nor counted. +% \end{quote} +% \begin{macrocode} + \blankpage +} +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{dedications} +% From the Manual 3.3 p9 +% \begin{itemize} +% \item The heading |Dedications| must appear at the top of the +% page. The heading must be bold, centered, and without +% punctuation. +% \item This page is counted and numbered in lowercase Roman numerals. +% \end{itemize} +% \begin{macrocode} +\newenvironment{dedications}{% + \newpage + \ifpdf + \phantomsection + \pdfbookmark[0]{\dedicationsname}{dedications} + \fi + \chapter*{\dedicationsname} + \begin{spacing}{\@dsp} +}{% + \end{spacing} +} +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{acknowledgments} +% From the Manual 3.4 p9 +% \begin{itemize} +% \item The heading |Acknowledgments| must appear at the top of the +% page. The heading must be bold, centered, and without +% punctuation. +% \item This page is counted and numbered in lowercase Roman numerals. +% \end{itemize} +% \begin{macrocode} +\newenvironment{acknowledgments}{% + \newpage + \ifpdf + \phantomsection + \pdfbookmark[0]{\acknowledgmentsname}{acknowledgments} + \fi + \chapter*{\acknowledgmentsname} + \begin{spacing}{\@dsp} +}{% + \end{spacing} +} +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{abstract} +% \begin{macrocode} +\newenvironment{abstract}{% + \newpage + \thispagestyle{plain}% + \global\@topnum\z@ + \phantomsection + \addcontentsline{toc}{chapter}{\abstractname} + \vspace*{50\p@}% +% \end{macrocode} +% From the Manual 3.9 p10 ``The following heading must be centered at +% the top of the page'': +% \begin{center} +% Abstract \\ +% Full Title of Dissertation or Thesis \\ +% Author's Name as it appears on the Dissertation or Thesis +% \end{center} +% In the example on p20, they list the advisor's name after the +% author, but that is not specified in the text on p10. +% +% On p20, ``These pages are numbered using lowercase Roman numerals. +% Note that the heading is single spaced, but the abstract is double +% spaced.'' +% \begin{macrocode} + \begin{spacing}{\@ssp} + \begin{center} + {\large \bfseries \abstractname \par} +%% \@endparpenalty\@M + \@title\\ + \@author\\ + \@advisor\\ + \end{center} + \end{spacing} + \blanklines{2} + \begin{spacing}{\@dsp} + \@nobreaktrue + \@afterindentfalse + \@afterheading +}{% + \end{spacing}\vfill\null +} +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{thesis} +% From the Manual 3.10 p11 +% \begin{itemize} +% \item The pages are counted and numbered in Arabic numerals. +% \end{itemize} +% \begin{macrocode} +\newenvironment{thesis}{% + \mainmatter + \begin{spacing}{\@dsp} +}{% + \end{spacing} + \newpage + \ifpdf + \phantomsection + \pdfbookmark[-1]{Backmatter}{backmatter} + \fi +} +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{vita} +% From the Manual 3.15 p13 +% \begin{itemize} +% \item The heading |Vita| must appear at the top of the page. The +% heading must be bold, centered, and without punctuation. +% \item The Vita text should begin four spaces below the heading. +% \item List the Vita separately in the Table of Contents. +% \item The page is counted and numbered in Arabic numerals. +% \end{itemize} +% \begin{macrocode} +\newenvironment{vita}{% + \newpage + \phantomsection + \addcontentsline{toc}{chapter}{\vitaname} + \chapter*{\vitaname} + \blanklines{1} + \begin{spacing}{\@dsp} +}{% + \end{spacing} +} +% \end{macrocode} +% \end{environment} +% +% +% \subsection{Adjust from the \LaTeX/\cls{book} defaults} +% +% +% |\intextsep| sets the space left on top and bottom of an in-text +% float (see +% \href{http://www.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html}{here}). +% \begin{macrocode} +\setlength\intextsep{30pt} +% \end{macrocode} +% +% +% \subsubsection{Part and chapter headings} +% +% Override \cls{book}'s |\makechapterhead|. +% From the Manual 3.11 p11. +% \begin{quote} +% Chapter headings must be bold and centered. +% The chapter number and title must be on the same line, separated +% by a colon or period, as shown in the example below: +% \begin{center} +% CHAPTER 1: INTRODUCTION +% \end{center} +% Headings must not be larger than 12 points. +% Headings must be single spaced. +% \end{quote} +% \begin{macrocode} +\def\@makechapterhead#1{% + \vspace*{50\p@}% +% \end{macrocode} +% Replaced |\normalfont| with |\reset@font| (TODO: why?). +% \begin{macrocode} + {\parindent \z@ \raggedright \reset@font + \ifnum \c@secnumdepth >\m@ne +% \end{macrocode} +% Removed |\if@mainmatter| conditional guarding this indented section +% (TODO: why?). +% \begin{macrocode} + \par\nobreak + \vskip 20\p@ + \fi + \interlinepenalty\@M +% \end{macrocode} +% Ensure single spacing, and ensure the chapter heading will have a +% centered, |\large|, bold \emph{Chapter \#: Title} or \emph{Appendix +% \#: Title} format (as opposed to \cls{book}'s unaligned, |\Huge|, +% bold \emph{Title}). +% \begin{macrocode} + \begin{spacing}{\@ssp} + \center \large \bfseries \@chapapp{} \thechapter: #1\par\nobreak + \blanklines{2} + \end{spacing} + } +} +% \end{macrocode} +% +% Override \cls{book}'s |\@makeschapterhead|. TODO: Why? +% \begin{macrocode} +\def\@makeschapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright +% \end{macrocode} +% Replaced |\normalfont| with |\reset@font| (TODO: why?). +% \begin{macrocode} + \reset@font + \interlinepenalty\@M +% \end{macrocode} +% Ensure single spacing. +% \begin{macrocode} + \begin{spacing}{\@ssp} +% \end{macrocode} +% Replaced |\Huge| with |\center \large| +% \begin{macrocode} + \center \large \bfseries #1\par\nobreak +% \end{macrocode} +% Replaced |\vskip 40\p@| with |\blanklines{2}| +% \begin{macrocode} + \blanklines{2} + \end{spacing} + } +} +% \end{macrocode} +% +% Override \cls{book}'s |\section|, replacing |\Large| with |\large|. +% \begin{macrocode} +\renewcommand\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\large\bfseries}} +% \end{macrocode} +% +% Fix |\@ssect| and |\@sect| from |latex.ltx| to give single spaced +% headings. These macros are defined in |ltsect.dtx| +% (\href{http://www.ctan.org/tex-archive/macros/latex/base/}{\pkg{\LaTeX\ base}})), +% but the documentation there is not great. +% \begin{command} +% `\cs{@ssect}\bracearg{INDENT}\bracearg{BEFORESKIP}\bracearg{AFTERSKIP}' +% `~~\bracearg{STYLE}\bracearg{ARG}' +% `\cs{@sect}\bracearg{NAME}\bracearg{LEVEL}\bracearg{INDENT}\bracearg{BEFORESKIP}' +% `~~\bracearg{AFTERSKIP}\bracearg{STYLE}\brackarg{ARG1}\bracearg{ARG2}' +% \end{command} +% By comparison to \cls{book}'s |\@part| and |\@spart| (see below), I +% imagine they have something to do with formatting section names. +% \begin{macrocode} +\def\@ssect#1#2#3#4#5{% + \@tempskipa #3\relax + \ifdim \@tempskipa>\z@ + \begingroup + \begin{spacing}{\@ssp} + #4{% + \@hangfrom{\hskip #1}% + \interlinepenalty \@M #5\@@par}% + \endgroup + \end{spacing} + \else + \def\@svsechd{#4{\hskip #1\relax #5}}% + \fi + \@xsect{#3}} +% \end{macrocode} +% Now for |\@sect|. +% \begin{macrocode} +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\@seccntformat{#1}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + \begin{spacing}{\@ssp} + #6{% + \@hangfrom{\hskip #3\relax\@svsec}% + \interlinepenalty \@M #8\@@par}% + \end{spacing} + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \@svsec #8}% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}}% + \fi + \@xsect{#5}} +% \end{macrocode} +% +% Override \cls{book}'s |\@part| and |\@spart|, replacing |\Huge| with +% |\large|. From |classes.dtx|, |\@part| formats the title of the part, +% and |\@spart| formats the title of a starred part. +% \begin{macrocode} +\def\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \large\bfseries \partname\nobreakspace\thepart + \par + \vskip 20\p@ + \fi + \large \bfseries #2\par}% + \@endpart} +\def\@spart#1{% + {\centering + \interlinepenalty \@M + \normalfont + \large \bfseries #1\par}% + \@endpart} +% \end{macrocode} +% +% +% \subsubsection{Adding TOC entries and blank pages} +% +% Override \cls{book}'s |\listoffigures|, selecting the false branch +% of the |\if@twocolumn| conditionals, adding a line to the table of +% contents, and clearing the page. +% \begin{macrocode} +%the figure list command +\renewcommand\listoffigures{% + \newpage + \phantomsection + \addcontentsline{toc}{chapter}{\listfigurename} + \chapter*{\listfigurename}% + \@mkboth{\MakeUppercase\listfigurename}% + {\MakeUppercase\listfigurename}% + \@starttoc{lof}% +} +% \end{macrocode} +% +% Override \cls{book}'s |\listoftables|, selecting the false branch +% of the |\if@twocolumn| conditionals, adding a line to the table of +% contents, and clearing the page. +% \begin{macrocode} +\renewcommand\listoftables{% + \newpage + \phantomsection + \addcontentsline{toc}{chapter}{\listtablename} + \chapter*{\listtablename}% + \@mkboth{\MakeUppercase\listtablename}% + {\MakeUppercase\listtablename}% + \@starttoc{lot}% +} +% \end{macrocode} +% +% Override |latex.ltx|'s |\bibliography|, adding a line to the table +% of contents. +% \begin{macrocode} +\def\bibliography#1{% + \addcontentsline{toc}{chapter}{\bibname} + \if@filesw + \immediate\write\@auxout{\string\bibdata{#1}}% + \fi + \@input@{\jobname.bbl} +} +% \end{macrocode} +% +% Add a terminal blank page (when |\if@final| is true) +% From the Manual 3.16 p13 +% \begin{quote} +% Include a blank page (with no page number) at the end of the +% thesis or dissertation. The blank page is neither counted nor +% numbered. +% \end{quote} +% \begin{macrocode} +\AtEndDocument{\blankpage} +% \end{macrocode} +% +% +% \subsubsection{Captioning} +% +% These are to get spacing right after table captions and make the +% spacing around floats symmetrical. First, set |\if@table| in the +% |table| environments. +% \begin{macrocode} +\newif\if@table \@tablefalse +\renewenvironment{table} + {\@tabletrue\@float{table}} + {\end@float\@tablefalse} +\renewenvironment{table*} + {\@tabletrue\@dblfloat{table}} + {\end@dblfloat\@tablefalse} +% \end{macrocode} +% Now override \cls{book}'s |\@makecaption|, adding two |\if@table| +% conditionals, which swap |\abovecaptionskip| and |\belowcaptionskip| +% for tables (where the caption is above the float body). With our +% implementation, |\belowcaptionskip| \emph{always} gives the distance +% between the caption and the text, and |\abovecaptionskip| +% \emph{always} gives the distance between the caption and the float +% body. +% +% We also replace the caption lead-in |#1: #2| with +% |\small{\bfseries#1:} #2|. +% \begin{macrocode} +\newlength\@tempcapskip +\long\def\@makecaption#1#2{% + \if@table + \@tempcapskip\abovecaptionskip + \abovecaptionskip\belowcaptionskip + \belowcaptionskip\@tempcapskip + \fi + \vskip\abovecaptionskip + \sbox\@tempboxa{\small{\bfseries#1:} #2}% + \ifdim \wd\@tempboxa >\hsize + {\small{\bfseries#1:} #2\par} + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip + \if@table + \@tempcapskip\belowcaptionskip + \belowcaptionskip\abovecaptionskip + \abovecaptionskip\@tempcapskip + \fi +} +% \end{macrocode} +% +% +% \subsubsection{Adjust table of contents} +% +% From the \LaTeX\ base class documentation (|classes.dtx| in +% \href{http://www.ctan.org/tex-archive/macros/latex/base/}{\pkg{\LaTeX\ base}}) +% \begin{quote} +% The command |\contentsline{|\meta{name}|}| expands to +% |\l@|\meta{name}. So, to specify the table of contents, we must +% define |\l@chapter|, \ldots +% \end{quote} +% +% Override \cls{book}'s |\l@chapter| for printing TOC entries, adding +% |spacing| environments to ensure single spacing, only using bold if +% |\if@boldchapter| is true, handling |\if@dottedchapter|. +% \begin{macrocode} +\renewcommand*\l@chapter[2]{% + \begin{spacing}{\@ssp} + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% +% \end{macrocode} +% Don't handle spacing here; use the spacing environment at the end of +% the macro. +% \begin{macrocode} +% \vskip 1.0em \@plus\p@ + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode + \if@boldchapter + \bfseries + \fi + \advance\leftskip\@tempdima + \hskip -\leftskip +% \end{macrocode} +% Insert |\if@dottedchapter| block into |#1\nobreak\hfil \nobreak...|. +% \begin{macrocode} + #1\nobreak + \if@dottedchapter + \leaders\hbox{$\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$} + \else\fi +% \end{macrocode} +% Insert |\if@dottedchapter| block into |#1\nobreak\hfil \nobreak...|. +% \begin{macrocode} + \hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \penalty\@highpenalty +% \end{macrocode} +% Add a content-page-spacing blank after this entry. +% \begin{macrocode} + \begin{spacing}{\@csp}\par\end{spacing} + \endgroup + \fi + \end{spacing} +} +% \end{macrocode} +% +% Add |\l@appendix|, identical to our |\l@chapter|, except for +% setting |\@tempdima| to 6.5em rather than 1.5em. TODO: Why? +% TODO: Consolidate to \l@chapapp[3] calls. +% \begin{macrocode} +\newcommand*\l@appendix[2]{% + \begin{spacing}{\@ssp} + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% +% \vskip 1.0em \@plus\p@ + \setlength\@tempdima{6.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode + \if@boldchapter + \bfseries + \fi + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak + \if@dottedchapter + \leaders\hbox{$\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$} + \else\fi + \hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \penalty\@highpenalty + \begin{spacing}{\@csp}\par\end{spacing} + \endgroup + \fi + \end{spacing} +} +% \end{macrocode} +% +% Add |\l@part|, identical to our |\l@chapter|, except for +% setting |\@tempdima| to 6.5em rather than 1.5em. TODO: Why? +% TODO: Consolidate to \l@chapapp[3] calls. +% \begin{macrocode} +\renewcommand*\l@part[2]{% + \begin{spacing}{\@ssp} + \ifnum \c@tocdepth >-2\relax + \addpenalty{-\@highpenalty}% +% \end{macrocode} +% Don't handle spacing here; use the spacing environment at the end of +% the macro. +% \begin{macrocode} +% \addvspace{2.25em \@plus\p@}% + \setlength\@tempdima{3em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + {\leavevmode +% \end{macrocode} +% Replace |\large \bfseries| with |\if@boldpart...|, so the parts are +% the same size as the other entries, and bolding obeys |if@boldpart|. +% \begin{macrocode} + \if@boldpart + \bfseries + \fi + #1 +% \end{macrocode} +% Insert |\if@dottedpart| between |#1| and |\hfil|. +% \begin{macrocode} + \if@dottedpart + \leaders\hbox{$\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$} + \fi + \hfil \hb@xt@\@pnumwidth{\hss #2}}\par + \nobreak + \global\@nobreaktrue + \everypar{\global\@nobreakfalse\everypar{}}% +% \end{macrocode} +% Add a content-page-spacing blank after this entry. +% \begin{macrocode} + \begin{spacing}{\@csp}\par\end{spacing} + \endgroup + \fi + \end{spacing} +} +% \end{macrocode} +% +% Override |latex.ltx|'s |\dottedtocline|, adding some |spacing| +% environments. TODO: reasoning. +% \begin{macrocode} +\def\@dottedtocline#1#2#3#4#5{% + \begin{spacing}{\@ssp} + \ifnum #1>\c@tocdepth \else + \vskip \z@ \@plus.2\p@ + {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip + {#4}\nobreak + \leaders\hbox{$\m@th + \mkern \@dotsep mu\hbox{.}\mkern \@dotsep + mu$}\hfill + \nobreak + \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}% + \par\begin{spacing}{\@csp}\par\end{spacing}}% + \fi + \end{spacing} +} +% \end{macrocode} +% +% Override \cls{book}'s (or \pkg{hyperref}'s) |\appendix|, adding +% |\@appendixtrue|. This gets |\if@appendix| working in our +% |\chapter| definition below. +% \begin{macrocode} +\let\DUT@appendix\appendix +\renewcommand\appendix{% + \@appendixtrue% + \DUT@appendix +} +% \end{macrocode} +% +% Override \cls{book}'s |\chapter|, selecting the false branch of the +% |\if@twocolumn| conditional and adding an |\if@appendix| +% conditional. After |\appendix| (when |\if@mainmatter| and +% |\if@appendix| are both true), we generate table of content entries +% such as \emph{Appendix A: Chapter Title} rather than the standard +% \emph{Chapter Title}. |\thechapter| (defined in \cls{book}) is the +% appendix letter (e.g.\ |A|). |\@chapapp{}| (also defined in +% \cls{book}) Was redefined in |\appendix| (above) as |\appendixname|. +% Before |\appendix|, we reproduce the \cls{book} behavior. +% \begin{macrocode} +\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \if@appendix + \addcontentsline{toc}{appendix}% + {\protect\numberline{\@chapapp{} \thechapter:}#1}% + \else + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \@makechapterhead{#2}% + \@afterheading} +% \end{macrocode} +% +% +% \iffalse meta-comment +% +% \fi +% +% +% \section{Templates} +% +% \subsection{Simple} +% +% \subsubsection{Main} +% +% \iffalse meta-comment +%<*template-main> +% \fi +% \begin{quote} \hrule \begin{verbatim} +%% See drexel-thesis.pdf for details. +\documentclass{drexel-thesis} + +%% Enter the appropriate information here +\author{Johny Henry} % Fullname +\title{Inadequacies of Steam-Driven Boring Machines} % Title Of Thesis +\defmonth{July} % Name of the month of you defense +\defyear{1872} % Year you are defending +\degree{Doctor of Philosophy} % Should be fine +\advisor{C \& O Railroad, Ph.D.} % Put Advisor's full name, degree + +\usepackage{graphicx} % to include images + +\begin{document} +\begin{preamble} + +\begin{dedications} % OPTIONAL +Type dedications here +\end{dedications} + +\begin{acknowledgments} % OPTIONAL +Type acknowledgments here +\end{acknowledgments} + +\tableofcontents +%% Include these following commands only if you have tables or figures. +%% Tables should come before figures. +\listoftables +\listoffigures + +\begin{abstract} +Type abstract here +\end{abstract} +\end{preamble} + +\begin{thesis} +%% Use include statements to include your main thesis code +%% from seperate files. +\include{part1} +\end{thesis} + +%% unsrt style give references in order of citation +\bibliographystyle{unsrt} +\phantomsection +\addcontentsline{toc}{chapter}{\bibname} +\begin{thebibliography}{9} +% widest label (above "9"), when printed, as wide as widest entry label. +\bibitem{lamport94} + Leslie Lamport, + \emph{\LaTeX: A Document Preparation System}. + Addison Wesley, Massachusetts, + 2nd Edition, + 1994. +%... +\end{thebibliography} + +\appendix +%% include files with your appendicies (if any) here +\include{appendixA} + +\begin{vita} % Ph.D. only. See Thesis Manual for details. +Vita text. +\end{vita} + +\end{document} +% \end{verbatim} \hrule \end{quote} +% \iffalse meta-comment +% +% \fi +% +% \subsubsection{Part} +% +% \iffalse meta-comment +%<*template-part> +% \fi +% \begin{quote} \hrule \begin{verbatim} +\part{A Part Heading} +\chapter{A Chapter Heading} +\section{A Section Heading} +The following sectioning commands are available: +\begin{quote} + part \\ + chapter \\ + section \\ + subsection \\ + subsubsection \\ + paragraph \\ + subparagraph +\end{quote} +\begin{table} + \caption{A table float} + \begin{center} + \begin{tabular}{r@{.}l r@{.}l r@{.}l} + \multicolumn{2}{c}{Time (s)} & + \multicolumn{2}{c}{John Henry (m)} & + \multicolumn{2}{c}{Steam drill (m)} \\ + 0&0 & 0&0 & 0&0 \\ + 10&0 & 4&3 & 3&75 \\ + 30&0 & 11&9 & 10&1 \\ + \ldots + \end{tabular} + \end{center} +\end{table} +Bla bla bla (text to test table/figure spacing) + +Bla bla bla + +Bla bla bla + +Bla bla bla + +Bla bla bla + +Bla bla bla + +Bla bla bla +\begin{figure} + \begin{center} + \includegraphics[width=0.4\textwidth]{drexel-logo} + \end{center} + \caption{A figure float} +\end{figure} +Bla bla bla (text to test table/figure spacing) + +Bla bla bla + +Bla bla bla + +Bla bla bla + +Bla bla bla + +Bla bla bla + +Bla bla bla +% \end{verbatim} \hrule \end{quote} +% \iffalse meta-comment +% +% \fi +% +% Note the strange |r@{.}l| notation in the |\tabular| column +% definition. This allows for numbers aligned at the decimal point +% (see \href{http://www.stat.unipg.it/tex-man/ltx-68.html}{here}). +% +% |\multicolumn{num_cols}{alignment}{contents}| allows the headings +% to span the pre- and post-decimal columns. +% +% +% \subsubsection{Appendix} +% +% \iffalse meta-comment +%<*template-appendix> +% \fi +% \begin{quote} \hrule \begin{verbatim} +\chapter{Some Appendix Heading} +Bla Bla Bla +\chapter{Another Appendix Heading} +Bla Bla Bla +% \end{verbatim} \hrule \end{quote} +% \iffalse meta-comment +% +% \fi +% +% +% \subsection{\BibTeX/\pkg{natbib}} +% \label{sec:natbib-example} +% +% \subsubsection{Main} +% +% \iffalse meta-comment +%<*template-bibtex-main> +% \fi +% \begin{quote} \hrule \begin{verbatim} +%% See drexel-thesis.pdf for details. +\documentclass{drexel-thesis} + +%% Enter the appropriate information here +\author{Johny Henry} % Fullname +\title{Inadequacies of Steam-Driven Boring Machines} % Title Of Thesis +\defmonth{July} % Name of the month of you defense +\defyear{1872} % Year you are defending +\degree{Doctor of Philosophy} % Should be fine +\advisor{C \& O Railroad, Ph.D.} % Put Advisor's full name, degree + +\usepackage[super,sort&compress]{natbib} % fancy citation extensions +%% super selects citations in superscript mode. +%% sort&compress automatically sorts and compresses compound citations: +%% \pcite{a,b,...} +\bibliographystyle{plainnat} + +\begin{document} +\begin{preamble} + +\begin{dedications} % OPTIONAL +Type dedications here +\end{dedications} + +\begin{acknowledgments} % OPTIONAL +Type acknowledgments here +\end{acknowledgments} + +\tableofcontents +%% Include these following commands only if you have tables or figures. +%% Tables should come before figures. +\listoftables +\listoffigures + +\begin{abstract} +Type abstract here +\end{abstract} +\end{preamble} + +\begin{thesis} +%% Use include statements to include your main thesis code +%% from seperate files. +\include{bibpart1} +\end{thesis} + +\bibliography{references} + +\appendix +%% include files with your appendicies (if any) here +\include{appendixA} + +\begin{vita} % Ph.D. only. See Thesis Manual for details. +Vita text. +\end{vita} + +\end{document} +% \end{verbatim} \hrule \end{quote} +% \iffalse meta-comment +% +% \fi +% +% \subsubsection{Part} +% +% You can cite your references with \pkg{natbib}'s |\citet| and +% |\citep| macros. See +% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/natbib/}{the \pkg{natbib} manual} +% for details. +% +% \iffalse meta-comment +%<*template-bibtex-part> +% \fi +% \begin{quote} \hrule \begin{verbatim} +\part{A Part Heading} +\chapter{A Chapter Heading} +\section{A Section Heading} +Here we have a text citation \citet{rief97} followed by a +parenthetical citation\citep{rief97}. +% \end{verbatim} \hrule \end{quote} +% \iffalse meta-comment +% +% \fi +% +% \subsubsection{Bib} +% +% What goes into the \BibTeX\ file |references.bib|? +% For more information, check out this +% \href{http://cmtw.harvard.edu/Documentation/TeX/Bibtex/Example.html}{basic tutorial}. +% If you want to get deeper, take a look at +% \href{http://www.ctan.org/tex-archive/info/bibtex/tamethebeast/}{Tame the BeaST}. +% Other resources: +% \href{http://www.andy-roberts.net/misc/latex/latextutorial3.html}{how the process works}, +% \href{http://newton.ex.ac.uk/tex/pack/bibtex/btxdoc/node6.html}{entry types}, +% \href{http://newton.ex.ac.uk/tex/pack/bibtex/btxdoc/node7.html}{fields}, +% \href{http://en.wikipedia.org/wiki/BibTeX}{entries and fields}, +% \href{http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html}{assorted style examples}, and +% \href{http://liinwww.ira.uka.de/bibliography/Bib.Format.html}{assorted \BibTeX tools}. +% +% Here is an example \BibTeX\ file to get you started. We define +% strings for the publishers, journals, and authors to avoid +% duplication and minimize the risk of typos, etc. +% +% \iffalse meta-comment +%<*template-bibtex-refs> +% \fi +% \begin{quote} \hrule \begin{verbatim} +%% Publishers +@String{APS = "American Physical Society"} + +%% Journals +@String{SCI = "Science"} + +%% Authors +@String{MRief = "Rief, Matthias"} +@String{MGautel = "Gautel, Mathias"} +@String{FOesterhelt = "Oesterhelt, Filipp"} +@String{JFernandez = "Fernandez, Julio M."} +@String{HGaub = "Gaub, Hermann E."} + +%% Articles +@Article{rief97, + author = MRief #" and "# MGautel #" and "# FOesterhelt #" and "# + JFernandez #" and "# HGaub, + title = "Reversible Unfolding of Individual Titin Immunoglobulin + Domains by {AFM}", + journal = SCI, + volume = 276, + number = 5315, + pages = "1109--1112", + year = 1997, + doi = "10.1126/science.276.5315.1109", + URL = "http://www.sciencemag.org/cgi/content/abstract/276/5315/1109", + eprint = "http://www.sciencemag.org/cgi/reprint/276/5315/1109.pdf", + mynote = "Seminal paper for force spectroscopy on Titin. Cited by + Dietz '04 (ref 9) as an example of how unfolding large + proteins is easily interpreted (vs.\ confusing unfolding in + bulk), but Titin is a rather simple example of that, because + of its globular-chain structure.", +} +%% ... +% \end{verbatim} \hrule \end{quote} +% \iffalse meta-comment +% +% \fi +% +% \Finale +\endinput diff --git a/drexel-thesis.ins b/drexel-thesis.ins new file mode 100644 index 0000000..5a66f8a --- /dev/null +++ b/drexel-thesis.ins @@ -0,0 +1,64 @@ +%% +%% Copyright (C) 2010 W. Trevor King +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX version +%% 2003/12/01 or later. +%% +%% Based on Scott Pakin's dtxtut/cskeleton.ins +%% http://www.ctan.org/tex-archive/info/dtxtut/ +%% + +\input docstrip.tex +\keepsilent + +\usedir{tex/latex/drexel-thesis} + +\preamble + +This is a generated file. + +Copyright (C) 2010 W. Trevor King + +This file may be distributed and/or modified under the conditions of +the LaTeX Project Public License, either version 1.3 of this license +or (at your option) any later version. The latest version of this +license is in: + + http://www.latex-project.org/lppl.txt + +and version 1.3 or later is part of all distributions of LaTeX version +2003/06/01 or later. + +\endpreamble + +\generate{\file{drexel-thesis.cls}{\from{drexel-thesis.dtx}{class}} + \file{main.tex}{\from{drexel-thesis.dtx}{template-main}} + \file{part1.tex}{\from{drexel-thesis.dtx}{template-part}} + \file{appendixA.tex}{\from{drexel-thesis.dtx}{template-appendix}} + \file{bibmain.tex}{\from{drexel-thesis.dtx}{template-bibtex-main}} + \file{bibpart1.tex}{\from{drexel-thesis.dtx}{template-bibtex-part}} + \file{references.bib}{\from{drexel-thesis.dtx}{template-bibtex-refs}}} + +\obeyspaces +\Msg{*************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* drexel-thesis.cls *} +\Msg{* *} +\Msg{* To produce the documentation run the file *} +\Msg{* drexel-thesis.dtx through LaTeX. *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{*************************************************************} + +\endbatchfile