diff options
Diffstat (limited to '')
-rw-r--r-- | cmuthesis.cls | 242 | ||||
-rw-r--r-- | cmuthesis_template.tex | 138 |
2 files changed, 380 insertions, 0 deletions
diff --git a/cmuthesis.cls b/cmuthesis.cls new file mode 100644 index 0000000..f69d36d --- /dev/null +++ b/cmuthesis.cls @@ -0,0 +1,242 @@ +%% dkoes 5/10/2006 + +\LoadClassWithOptions{book} + + +%% dkoes - Here's a bunch of stuff taken from mjz-titlepage.sty that makes +% a pretty CMU techreport acceptable title page + +%% titlepage parameters +%% required: title, author, date, Year, trnumber, committee +%% optional: permission, support, disclaimer, keywords + +\def\title#1{\gdef\@title{#1}} +\def\author#1{\gdef\@author{#1}} +\def\date#1{\gdef\@date{#1}} +\def\Year#1{\gdef\@Year{#1}} +\def\trnumber#1{\gdef\@trnumber{#1}} +\def\committee#1{\gdef\@committee{#1}} +\def\permission#1{\gdef\@permission{#1}} +\def\support#1{\gdef\@support{#1}} +\def\disclaimer#1{\gdef\@disclaimer{#1}} +\def\keywords#1{\gdef\@keywords{#1}} + +\newsavebox{\@copyrightbox} +%\def\@copyrightnotice#1{{\small\sbox{\@copyrightbox}{#1}\ifthenelse{\lengthtest{\wd\@copyrightbox > \linewidth}}{\noindent #1 \par}{\begin{center} #1 \end{center}}}} +\def\@copyrightnotice#1{{\small\sbox{\@copyrightbox}{#1}\ifdim\wd\@copyrightbox>\linewidth \noindent #1 \par\else\begin{center} #1 \end{center}\fi}} + +\def\maketitle{ +\thispagestyle{empty} + +% calculate skip needed to ensure that title appears in the cut-out +\newlength{\@cutoutvskip} +\setlength{\@cutoutvskip}{2.1875 true in} % position of cut-out +\addtolength{\@cutoutvskip}{-1 true in} % printer margin +\addtolength{\@cutoutvskip}{-\topmargin} +\addtolength{\@cutoutvskip}{-\headheight} +\addtolength{\@cutoutvskip}{-\headsep} + +%% Centered things on the title page must be *physically* centered +%% on the page, so they line up with the cut-out window. So we hardwire +%% the margins for the title page so that left margin = right margin: +%% left margin = (8.5in - textwidth)/2 +\oddsidemargin=8.5in +\advance\oddsidemargin by -\textwidth +\oddsidemargin=.5\oddsidemargin +\advance\oddsidemargin by -1in % TeX sux +% +\let\footnoterule\relax +\vglue\@cutoutvskip +\begin{center} +%\begin{minipage}[t]{4.875in} % must be a minipage due to \thanks +\begin{minipage}[t]{4.8in} % hackery +\vbox to 2in{ +\vfill +\begin{center} +{\Large \strut \@title\par} +\vfill +{\large \begin{tabular}[t]{c}\@author\end{tabular}\par} +\vfill +{\sc \@trnumber\par} +\smallskip +{\large \@date\par} +\end{center} +\vfill} +\end{minipage} +\end{center} + +\vskip 3em + +\begin{center} + School of Computer Science \\ + Carnegie Mellon University \\ + Pittsburgh, PA 15213 +\end{center} + +\begin{center} + {\bf Thesis Committee:} \\ + \@committee +\end{center} +\vspace{1em} +\begin{center} + \em + Submitted in partial fulfillment of the requirements \\ + for the degree of Doctor of Philosophy. +\end{center} + + +\vfill + +\@ifundefined{@permission}{\@copyrightnotice{Copyright \copyright\ \@Year\ \@author}}{\@copyrightnotice{Copyright \copyright\ \@Year\ \@author. \@permission}} + +\@ifundefined{@support}{}{{\medskip\footnotesize\noindent\@support\par}} + +\@ifundefined{@disclaimer}{}{{\medskip\footnotesize\noindent\@disclaimer\par}} + +% keywords go at bottom of page ii (the rear of the titlepage) +% if keywords are omitted, this page is blank + +\clearpage +\thispagestyle{empty} +\@ifundefined{@keywords}{}{\vspace*{\fill} {\bf Keywords:} \@keywords} +\cleardoublepage +} + +\newenvironment{dedication} + {\cleardoublepage \thispagestyle{empty} \vspace*{\stretch{1}} \begin{center} \em} + {\end{center} \vspace*{\stretch{3}} \clearpage} + + +\newenvironment{psuedochapter}[1] + {\cleardoublepage + \thispagestyle{empty} + \vspace*{\stretch{1}} + \begin{center} \large {\bf #1} \end{center} +% \addcontentsline{toc}{chapter}{\numberline{}#1} --not yet mjz + \begin{quotation}} + {\end{quotation} + \vspace*{\stretch{3}} + \clearpage} + +\newenvironment{abstract} + {\begin{psuedochapter}{Abstract}}{\end{psuedochapter}} + +\newenvironment{acknowledgments} + {\begin{psuedochapter}{Acknowledgments}}{\end{psuedochapter}} + + + + + +%% dkoes - what follows is just a result of my personal style preferences +% most things are shamelessly ripped from various conference class files + +% Utilities +% --------- + + +\newcommand{\centeroncapheight}[1]{% + {\setbox\@tempboxa = \hbox{#1}% + \@measurecapheight{\@tempdima}% % Calculate ht(CAP) - ht(text) + \advance \@tempdima by -\ht\@tempboxa % ------------------ + \divide \@tempdima by 2 % 2 + \raise \@tempdima \box\@tempboxa}} + +\newbox{\@measbox} + +\def \@measurecapheight #1{% {\dimen} + \setbox\@measbox = \hbox{ABCDEFGHIJKLMNOPQRSTUVWXYZ}% + #1 = \ht\@measbox} + +\long\def \@titlefootnote #1#2{% + \insert\footins{% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore +%%% \protected@edef\@currentlabel{% +%%% \csname p@footnote\endcsname\@thefnmark}% + \color@begingroup + \def \@makefnmark {$^{#1}$}% + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#2\@finalstrut\strutbox}% + \color@endgroup}} + +% Lists +% ----- + +\setlength{\topsep}{1pt} + \setlength{\itemsep}{1pt} +\setlength{\parsep}{3pt} + +\renewcommand{\labelitemi}{{\small \centeroncapheight{\textbullet}}} +\renewcommand{\labelitemii}{\centeroncapheight{\rule{2.5pt}{2.5pt}}} +\renewcommand{\labelitemiii}{$-$} +\renewcommand{\labelitemiv}{{\Large \textperiodcentered}} + +\renewcommand{\@listi}{% + \leftmargin = \leftmargini + \listparindent = 0pt} + +\let \@listI = \@listi + +\renewcommand{\@listii}{% + \leftmargin = \leftmarginii + \topsep = 1pt + \labelwidth = \leftmarginii + \advance \labelwidth by -\labelsep + \listparindent = \parindent} + +\renewcommand{\@listiii}{% + \leftmargin = \leftmarginiii + \labelwidth = \leftmarginiii + \advance \labelwidth by -\labelsep + \listparindent = \parindent} + +\renewcommand{\@listiv}{% + \leftmargin = \leftmarginiv + \labelwidth = \leftmarginiv + \advance \labelwidth by -\labelsep + \listparindent = \parindent} + + +% A simple style file to provide a draft marking in the background of +% a file +% Thank you to Will Uther who provided the base code that I rolled +% into this package +% ChangeLog +% 1.1: shrunk and shifted the stamp so that it avoid the unprintable +% area at the top of the page +% 1.2 dkoes - made it big and rotated and light +% 1.3 dkoes - made it small, and unrotated since Jonathan Aldrich complained +\RequirePackage{graphicx} +\RequirePackage{eso-pic} +\RequirePackage{color} + +%Got this from Will (will@cs.cmu.edu) +%usage: \draftstamp{date}{label} +\newcommand{\draftstamp}[2]{\definecolor{DraftGrey}{gray}{0.7} + \ClearShipoutPicture\AddToShipoutPicture{ + \begin{minipage}[b][\paperheight][t]{\paperwidth} + \centering + \vspace{.4in} + \textcolor{DraftGrey}{\renewcommand{\baselinestretch}{1.0}\normalsize + \begin{tabular}{c} + #1 \\ + #2 + \end{tabular} + } + + \end{minipage} +}} + +% mainmatter is ignoring openany, fix +\renewcommand\mainmatter{% + \if@openright + \cleardoublepage + \else + \clearpage + \fi + \@mainmattertrue + \pagenumbering{arabic}} diff --git a/cmuthesis_template.tex b/cmuthesis_template.tex new file mode 100644 index 0000000..311b5bf --- /dev/null +++ b/cmuthesis_template.tex @@ -0,0 +1,138 @@ +%for a more compact document, add the option openany to avoid +%starting all chapters on odd numbered pages +\documentclass[12pt]{cmuthesis} + +% This is a template for a CMU thesis. It is 18 pages without any content :-) +% The source for this is pulled from a variety of sources and people. +% Here's a partial list of people who may or may have not contributed: +% +% bnoble = Brian Noble +% caruana = Rich Caruana +% colohan = Chris Colohan +% jab = Justin Boyan +% josullvn = Joseph O'Sullivan +% jrs = Jonathan Shewchuk +% kosak = Corey Kosak +% mjz = Matt Zekauskas (mattz@cs) +% pdinda = Peter Dinda +% pfr = Patrick Riley +% dkoes = David Koes (me) + +% My main contribution is putting everything into a single class files and small +% template since I prefer this to some complicated sprawling directory tree with +% makefiles. + +% some useful packages +\usepackage{times} +\usepackage{fullpage} +\usepackage{graphicx} +\usepackage{amsmath} +\usepackage[numbers,sort]{natbib} +\usepackage[backref,pageanchor=true,plainpages=false, pdfpagelabels, bookmarks,bookmarksnumbered, +%pdfborder=0 0 0, %removes outlines around hyper links in online display +]{hyperref} +\usepackage{subfigure} + +% Approximately 1" margins, more space on binding side +%\usepackage[letterpaper,twoside,vscale=.8,hscale=.75,nomarginpar]{geometry} +%for general printing (not binding) +\usepackage[letterpaper,twoside,vscale=.8,hscale=.75,nomarginpar,hmarginratio=1:1]{geometry} + +% Provides a draft mark at the top of the document. +\draftstamp{\today}{DRAFT} + +\begin {document} +\frontmatter + +%initialize page style, so contents come out right (see bot) -mjz +\pagestyle{empty} + +\title{ %% {\it \huge Thesis Proposal}\\ +{\bf Awesome Work in Computer Science}} +\author{Me} +\date{January 3006} +\Year{3006} +\trnumber{} + +\committee{ +Nearly Divine Personage, Chair \\ +Someone else \\ +Yet another person \\ +Someone from a strange and faraway land +} + +\support{} +\disclaimer{} + +% copyright notice generated automatically from Year and author. +% permission added if \permission{} given. + +\keywords{Stuff, More Stuff} + +\maketitle + +\begin{dedication} +For my dog +\end{dedication} + +\pagestyle{plain} % for toc, was empty + +%% Obviously, it's probably a good idea to break the various sections of your thesis +%% into different files and input them into this file... + +\begin{abstract} +A short summary. +\end{abstract} + +\begin{acknowledgments} +My advisor is cool. +\end{acknowledgments} + + + +\tableofcontents +\listoffigures +\listoftables + +\mainmatter + +%% Double space document for easy review: +%\renewcommand{\baselinestretch}{1.66}\normalsize + +% The other requirements Catherine has: +% +% - avoid large margins. She wants the thesis to use fewer pages, +% especially if it requires colour printing. +% +% - The thesis should be formatted for double-sided printing. This +% means that all chapters, acknowledgements, table of contents, etc. +% should start on odd numbered (right facing) pages. +% +% - You need to use the department standard tech report title page. I +% have tried to ensure that the title page here conforms to this +% standard. +% +% - Use a nice serif font, such as Times Roman. Sans serif looks bad. +% +% Other than that, just make it look good... + + +\chapter{Introduction} +\chapter{Conclusion} + +%\appendix +%\include{appendix} + +\backmatter + +%\renewcommand{\baselinestretch}{1.0}\normalsize + +% By default \bibsection is \chapter*, but we really want this to show +% up in the table of contents and pdf bookmarks. +\renewcommand{\bibsection}{\chapter{\bibname}} +%\newcommand{\bibpreamble}{This text goes between the ``Bibliography'' +% header and the actual list of references} +\bibliographystyle{plainnat} +\bibliography{register} %your bib file + +\end{document} |