├── .gitignore ├── yale_thesis.pdf ├── LICENSE.txt ├── README.txt ├── yale_thesis.tex ├── yalephd.cls └── abbrvunsrt.bst /.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.dvi 3 | *.lof 4 | *.log 5 | *.lot 6 | *.ps 7 | *.toc -------------------------------------------------------------------------------- /yale_thesis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/acerjan/yale_phd_thesis_template/HEAD/yale_thesis.pdf -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | This project is freely available and may be used as is or altered locally 2 | by anyone. 3 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | This Github Repository is for a latex template and class file for 2 | a PhD dissertation at Yale University. 3 | -------------------------------------------------------------------------------- /yale_thesis.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | % yale_thesis.tex 3 | % Alexander Cerjan 4 | % 2014/04/07 5 | % 6 | % A bare, sample template for a Yale PhD thesis using yalephd.cls 7 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8 | 9 | \documentclass[letterpaper,11pt]{yalephd} 10 | % remove draft option for final printing. 11 | % font size must be between 10pt-12pt. 12 | 13 | \usepackage{geometry} % you need this for yalephd.cls to work. 14 | \usepackage{graphicx} % you probably want the rest of these. 15 | \usepackage{dcolumn} 16 | \usepackage{bm} 17 | \usepackage{amsmath} 18 | \usepackage{amsfonts} 19 | \usepackage{amssymb} 20 | \usepackage{appendix} 21 | \usepackage{comment} 22 | \usepackage{cite} 23 | \usepackage{notoccite} 24 | 25 | \bibliographystyle{abbrvunsrt} 26 | 27 | \begin{document} 28 | 29 | % Need to define title before the abstract. 30 | \title{Title Goes Here} % capitalize the first letter in every word except conjunctions and prepositions 31 | \author{Your name} 32 | \advisor{Your advisor's name} 33 | \date{Month, year you'll receive your degree, like ``June, 2021''} % usually not \today. 34 | 35 | % All the stuff at the front of your thesis. 36 | \frontmatter 37 | 38 | \begin{abstract} 39 | Abstract goes here. Limit 750 words. 40 | \end{abstract} 41 | 42 | 43 | \maketitle 44 | \makecopyright{2021} % change as needed. 45 | \tableofcontents 46 | \listoffigures % remove this if you have no figures. 47 | \listoftables % remove this if you have no tables. 48 | 49 | \chapter{Acknowledgements} % this needs to be before \mainmatter. 50 | A lot of people are awesome. Probably your family, friends, 51 | advisor, and that one super special high school teacher who 52 | believed in you. 53 | 54 | % Starts proper arabic numbering of pages and chapters. 55 | \mainmatter 56 | 57 | \chapter{Introduction} 58 | Your first chapter is probably an introduction. But who knows. Check out Eq.\ (\ref{that_right_triangle_rule})! 59 | Note that after Eq.\ and Fig.\ you want to use `.\textbackslash' to use a single sized space. Otherwise, 60 | latex will interpret it as the end of a sentence and put additional white space in between `Eq.' and 61 | `(\ref{that_right_triangle_rule})'. 62 | 63 | \begin{equation} 64 | a^2 + b^2 = c^2 \label{that_right_triangle_rule} 65 | \end{equation} 66 | 67 | \chapter{A new chapter} 68 | Your second chapter probably has novel material in it. hopefully. 69 | 70 | % Add additional \chapter{}s as necessary. 71 | 72 | % use \cite{} to cite a reference in your bibliography file. 73 | % use \ref{} to reference a \label{} from an equation, figure, or table. 74 | 75 | % for sets of equations use align or gather: 76 | %\begin{align} 77 | %\end{align} 78 | 79 | % for long equations, use multline. 80 | 81 | % for figures: 82 | %\begin{figure}[ht] 83 | %\centering 84 | %\includegraphics[width=.45\textwidth]{name_of_figure.eps} 85 | %\caption{A caption! \label{a_figure}} 86 | %\end{figure} 87 | 88 | % for tables: 89 | %\begin{table} 90 | %\begin{tabular}{c|c|c} 91 | % 1 & 2 & 3 \\ 92 | %\hline 93 | %\end{tabular} 94 | %\caption{Another caption! \label{a_table}} 95 | %\end{table} 96 | 97 | % Only call appendix once, here. 98 | \appendix 99 | 100 | \chapter{Stuff} 101 | If you need an appendix, it will go here. 102 | 103 | \begin{align} 104 | a^n + b^n &\ne c^n \\ 105 | n &> 2 106 | \end{align} 107 | 108 | \chapter{More stuff} 109 | A second appendix. Look at you, you over achiever. 110 | 111 | % Any chapters such as End Notes go after this. 112 | \backmatter 113 | 114 | \bibliography{name_of_your_bibtex_file} 115 | % for your own sake, use a bibtex file, so all of the numbering of references will be done 116 | % automatically. 117 | 118 | \end{document} 119 | -------------------------------------------------------------------------------- /yalephd.cls: -------------------------------------------------------------------------------- 1 | % yalephd.cls 2 | % 3 | % By Alexander Cerjan 4 | % 2014/04/07 5 | % This file may still be freely used and modified by anyone. 6 | % 7 | % Updated \advisor command to actually work. 8 | % 9 | % ORIGINAL HEADER FOLLOWS 10 | % 11 | % LaTeX2e document class that meets format requirements (as of March 12 | % 2000) for a doctoral dissertation to be submitted to Yale University, 13 | % Graduate School of Arts and Sciences. 14 | % 15 | % Version 1.0 1996/03/15 Initial release (as yalethesis.cls) 16 | % 17 | % James Szinger, Yale ACS/SECF, March 1996 18 | % James.Szinger@Yale.Edu 19 | % 20 | % Version 2.0 2000/03/15 Minor changes in Yale GS requirements. 21 | % 22 | % Una Smith, Dept. of Ecology and Evolutionary Biology, March 2000 23 | % una.smith@yale.edu 24 | % 25 | % Version 3.0 2012/03/15: 26 | % 27 | % mythesis.cls, modified from yalephd.cls 28 | % 29 | % By Andrew Goldstone http://andrewgoldstone.com 30 | % This file may be freely used and modified by anyone. 31 | % 32 | % Last change: March 10, 2012: 33 | % These introductory comments added. 34 | % 35 | % END OF ORIGINAL HEADER 36 | % 37 | % My modifications 2009/06/03 38 | % Cleaned up the layout code by using the geometry package. 39 | % Added correct footnote format. 40 | % Changed \makecopyright to take one argument, the year; fall 41 | % dissertations should have be copyright next year, not this year. 42 | % Layout should be in conformity with the October 2006 Yale GSAS 43 | % "Preparation and Submission of the Doctoral Dissertation." 44 | % 45 | 46 | % 47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 48 | % 49 | % User documentation: 50 | % 51 | % First, get a copy of the booklet "Preparation and submission of the 52 | % Doctoral Dissertation" from the Graduate School. Then, ask your 53 | % department and advisor if there any other requirements. 54 | % 55 | % This class conforms to the Graduate School's current requirements 56 | % (as of March 2000), in the sense that it was accepted without any 57 | % quibbles. However, requirements change, so check the fine print. 58 | % Also, some departments may have additional requirements which are 59 | % not included in this class. 60 | % 61 | % Since ultimate responsibility rests with you, the candidate, you 62 | % should verify that the resulting dissertation meets requirements of 63 | % your department and the Graduate School. 64 | % 65 | % 12pt type is easiest to read. Please be kind to your readers. 66 | % 67 | % Here's an outline of how to use this class in the file example.tex: 68 | % 69 | % The preamble should use the \author command to set the author's 70 | % name, the \date command to set the month and year the degree will be 71 | % awarded, and the \advisor command to set the name of the dissertation 72 | % advisor. 73 | % 74 | % The front matter should have (in this order): 75 | % abstract 76 | % title page 77 | % copyright notice page 78 | % table of contents 79 | % list of figures, if any (order of lists is optional) 80 | % list of tables, if any 81 | % acknowledgments (optional) 82 | % glossary (optional) 83 | % 84 | % A dedication may also be included in the front matter, presumably 85 | % after the copyright notice page and before the table of contents. 86 | % 87 | % The abstract environment and the \maketitle command of the standard 88 | % LaTeX book class are redefined to meet Graduate School requirements. 89 | % A \makecopyright command is provide to create the copright notice. 90 | % 91 | % The body is standard LaTeX stuff. 92 | % 93 | % The appendices (if any) and bibliography are the end matter. The 94 | % style of the bibliography is left to you. 95 | % 96 | % There is a new class option 'draft' which you may find useful. It 97 | % places on the title page and in the page headings the current date 98 | % and a message indicating that the copy is a draft. This is helpful 99 | % when you're editing and have several drafts scattered about. 100 | % 101 | % Summary: 102 | % 103 | % Just like the book document class but 104 | % 105 | % class options: draft adds `draft of \today' to page heading 106 | % and title page 107 | % twopage, twocolumn, landscape and papersize 108 | % options are ignored 109 | % 110 | % abstract environment redefined to have Yale heading. 111 | % 112 | % \maketitle produces Yale title page 113 | % 114 | % \mainmatter resets paging for the body. 115 | % 116 | % \advisor command to set the name of the dissertation advisor 117 | % 118 | % \makecopyright{YEAR} command to produce the copyright page. 119 | % 120 | % The standard \date command should be used to set the month and year 121 | % the degree is to be awarded. 122 | % 123 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 124 | % 125 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 126 | \ProvidesClass{yalephd}[2009/06/01 Yale doctoral dissertation 127 | class, modified by AG] 128 | 129 | % Warn user that the following options are ignored because they 130 | % are disallowed by the Yale Graduate School: 131 | % 132 | \DeclareOption{legalpaper}{\PackageWarning{yalephd}% 133 | {Option `\CurrentOption' ignored. Must use `letterpaper'.}} 134 | \DeclareOption{executivepaper}{\PackageWarning{yalephd}% 135 | {Option `\CurrentOption' ignored. Must use `letterpaper'.}} 136 | \DeclareOption{a4paper}{\PackageWarning{yalephd}% 137 | {Option `\CurrentOption' ignored. Must use `letterpaper'.}} 138 | \DeclareOption{a5paper}{\PackageWarning{yalephd}% 139 | {Option `\CurrentOption' ignored. Must use `letterpaper'.}} 140 | \DeclareOption{b5paper}{\PackageWarning{yalephd}% 141 | {Option `\CurrentOption' ignored. Must use `letterpaper'.}} 142 | \DeclareOption{twoside}{\PackageWarning{yalephd}% 143 | {Option `\CurrentOption' ignored. Must use `oneside'.}} 144 | \DeclareOption{twocolumn}{\PackageWarning{yalephd}% 145 | {Option `\CurrentOption' ignored. Must use `onecolumn'.}} 146 | \DeclareOption{landscape}{\PackageWarning{yalephd}% 147 | {Option `\CurrentOption' ignored. Must use `portrait'.}} 148 | \DeclareOption{notitlepage}{\PackageWarning{yalephd}% 149 | {Option `\CurrentOption' ignored. Must use `titlepage'.}} 150 | \DeclareOption{openright}{\PackageWarning{yalephd}% 151 | {Option `\CurrentOption' ignored. Must use `openany'.}} 152 | 153 | % Class option for draft mode -- Puts Date on page headings. 154 | \newif\ifdraft\draftfalse 155 | \DeclareOption{draft}{\drafttrue} 156 | 157 | % What to do with other options? Pass them on to book.cls. 158 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} 159 | 160 | \PassOptionsToClass{onecolumn}{book} 161 | \PassOptionsToClass{oneside}{book} 162 | \PassOptionsToClass{letterpaper}{book} 163 | \PassOptionsToClass{openany}{book} 164 | 165 | \ProcessOptions\relax 166 | 167 | \LoadClass{book} 168 | 169 | 170 | %-------------------------------------------------------------------- 171 | % Physical layout of the page: 1.5" left margin, all others 1". 172 | % Double spacing, including between (but not within) footnotes. 173 | % Chicago-style footnote format: the number within the note is 174 | % not superscript. 175 | %-------------------------------------------------------------------- 176 | 177 | % In the book class, first pages of chapters and title pages 178 | % automatically invoke the plain page style. But actually I'm fine with 179 | % those pages and the rest of the body having the same page style, with 180 | % the number at bottom center. 181 | 182 | \pagestyle{plain} 183 | 184 | \RequirePackage{geometry} 185 | \geometry{left=1.5 in, right=1 in, top=1 in,bottom=1.0 in,nohead,footskip=0.5 in} 186 | 187 | 188 | \RequirePackage{setspace} 189 | \doublespacing 190 | 191 | \renewcommand\@makefntext[1]{% 192 | \parindent 1em% 193 | \@thefnmark.~#1% 194 | \vspace{1em}} 195 | 196 | % All section headings at normal size font, with spacing copied from the 197 | % book.cls defaults for subsubsection 198 | 199 | %\renewcommand\section{\@startsection{section}% 200 | %{1}{0 in}% 201 | %{-3.25ex\@plus -1ex \@minus -.2ex}% 202 | %{1.5ex \@plus .2ex}% 203 | %{\normalfont\normalsize\bfseries}} 204 | 205 | 206 | 207 | %-------------------------------------------------------------------- 208 | % Define abstract environment, because book class doesn't have one. 209 | %-------------------------------------------------------------------- 210 | 211 | \newenvironment{abstract}{% 212 | \begin{titlepage}% 213 | \pagestyle{empty}% 214 | \begin{center} 215 | {Abstract}\par\bigskip 216 | {\@title}\par\bigskip 217 | \@author \\ 218 | \the\year 219 | \end{center}% 220 | }{\end{titlepage}} 221 | 222 | 223 | %-------------------------------------------------------------------- 224 | % \advisor{} 225 | %-------------------------------------------------------------------- 226 | 227 | \gdef\@advisorline{No advisor given} 228 | \newcommand{\advisor}[1]{\gdef\@advisorline{#1}} 229 | 230 | %-------------------------------------------------------------------- 231 | % Customize \maketitle 232 | %-------------------------------------------------------------------- 233 | 234 | \renewcommand\maketitle{\begin{titlepage}% 235 | \null \vskip 40\p@ 236 | \begin{center}% 237 | {\large \@title \par}% 238 | \vfil 239 | \begin{singlespace} 240 | {\large 241 | A Dissertation\\ 242 | Presented to the Faculty of the Graduate School\\ 243 | of\\ 244 | Yale University\\ 245 | in Candidacy for the Degree of\\ 246 | Doctor of Philosophy\par\vfil\vskip 6ex% 247 | by\\ 248 | \@author\par\vskip 1.5em% 249 | Dissertation Director: \@advisorline\par 250 | }\vskip 1.5em% 251 | {\large \@date \par 252 | \ifdraft Draft of \today\par\fi 253 | }% 254 | \end{singlespace} 255 | \end{center} 256 | \end{titlepage}% 257 | \global\let\maketitle\relax 258 | \global\let\title\relax 259 | \global\let\author\relax 260 | \global\let\advisor\relax 261 | \global\let\date\relax 262 | \global\let\and\relax 263 | \pagestyle{plain} % Page numbers at bottom center. 264 | \pagenumbering{roman} % roman numerals. 265 | \addtocounter{page}{1} %This is page i, but not shown -- Next page is ii. 266 | } 267 | 268 | 269 | %-------------------------------------------------------------------- 270 | % \makecopyright 271 | %-------------------------------------------------------------------- 272 | 273 | \newcommand{\makecopyright}[1]{% 274 | \hbox{\hfil}\vspace{4in}\begin{center} 275 | Copyright \copyright\ #1 by \@author \\ 276 | All rights reserved. 277 | \end{center} 278 | \clearpage 279 | }% 280 | 281 | 282 | % EOF 283 | -------------------------------------------------------------------------------- /abbrvunsrt.bst: -------------------------------------------------------------------------------- 1 | % Altered by Alex Cerjan for abbreviations and unsorted behavior. 2 | 3 | % BibTeX standard bibliography style `unsrt' 4 | % Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later. 5 | % Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik. 6 | % Unlimited copying and redistribution of this file are permitted as long as 7 | % it is unmodified. Modifications (and redistribution of modified versions) 8 | % are also permitted, but only if the resulting file is renamed to something 9 | % besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst. 10 | % This restriction helps ensure that all standard styles are identical. 11 | % The file btxbst.doc has the documentation for this style. 12 | 13 | ENTRY 14 | { address 15 | author 16 | booktitle 17 | chapter 18 | edition 19 | editor 20 | howpublished 21 | institution 22 | journal 23 | key 24 | month 25 | note 26 | number 27 | organization 28 | pages 29 | publisher 30 | school 31 | series 32 | title 33 | type 34 | volume 35 | year 36 | } 37 | {} 38 | { label } 39 | 40 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } 41 | 42 | FUNCTION {init.state.consts} 43 | { #0 'before.all := 44 | #1 'mid.sentence := 45 | #2 'after.sentence := 46 | #3 'after.block := 47 | } 48 | 49 | STRINGS { s t } 50 | 51 | FUNCTION {output.nonnull} 52 | { 's := 53 | output.state mid.sentence = 54 | { ", " * write$ } 55 | { output.state after.block = 56 | { add.period$ write$ 57 | newline$ 58 | "\newblock " write$ 59 | } 60 | { output.state before.all = 61 | 'write$ 62 | { add.period$ " " * write$ } 63 | if$ 64 | } 65 | if$ 66 | mid.sentence 'output.state := 67 | } 68 | if$ 69 | s 70 | } 71 | 72 | FUNCTION {output} 73 | { duplicate$ empty$ 74 | 'pop$ 75 | 'output.nonnull 76 | if$ 77 | } 78 | 79 | FUNCTION {output.check} 80 | { 't := 81 | duplicate$ empty$ 82 | { pop$ "empty " t * " in " * cite$ * warning$ } 83 | 'output.nonnull 84 | if$ 85 | } 86 | 87 | FUNCTION {output.bibitem} 88 | { newline$ 89 | "\bibitem{" write$ 90 | cite$ write$ 91 | "}" write$ 92 | newline$ 93 | "" 94 | before.all 'output.state := 95 | } 96 | 97 | FUNCTION {fin.entry} 98 | { add.period$ 99 | write$ 100 | newline$ 101 | } 102 | 103 | FUNCTION {new.block} 104 | { output.state before.all = 105 | 'skip$ 106 | { after.block 'output.state := } 107 | if$ 108 | } 109 | 110 | FUNCTION {new.sentence} 111 | { output.state after.block = 112 | 'skip$ 113 | { output.state before.all = 114 | 'skip$ 115 | { after.sentence 'output.state := } 116 | if$ 117 | } 118 | if$ 119 | } 120 | 121 | FUNCTION {not} 122 | { { #0 } 123 | { #1 } 124 | if$ 125 | } 126 | 127 | FUNCTION {and} 128 | { 'skip$ 129 | { pop$ #0 } 130 | if$ 131 | } 132 | 133 | FUNCTION {or} 134 | { { pop$ #1 } 135 | 'skip$ 136 | if$ 137 | } 138 | 139 | FUNCTION {new.block.checka} 140 | { empty$ 141 | 'skip$ 142 | 'new.block 143 | if$ 144 | } 145 | 146 | FUNCTION {new.block.checkb} 147 | { empty$ 148 | swap$ empty$ 149 | and 150 | 'skip$ 151 | 'new.block 152 | if$ 153 | } 154 | 155 | FUNCTION {new.sentence.checka} 156 | { empty$ 157 | 'skip$ 158 | 'new.sentence 159 | if$ 160 | } 161 | 162 | FUNCTION {new.sentence.checkb} 163 | { empty$ 164 | swap$ empty$ 165 | and 166 | 'skip$ 167 | 'new.sentence 168 | if$ 169 | } 170 | 171 | FUNCTION {field.or.null} 172 | { duplicate$ empty$ 173 | { pop$ "" } 174 | 'skip$ 175 | if$ 176 | } 177 | 178 | FUNCTION {emphasize} 179 | { duplicate$ empty$ 180 | { pop$ "" } 181 | { "{\em " swap$ * "}" * } 182 | if$ 183 | } 184 | 185 | INTEGERS { nameptr namesleft numnames } 186 | 187 | FUNCTION {format.names} 188 | { 's := 189 | #1 'nameptr := 190 | s num.names$ 'numnames := 191 | numnames 'namesleft := 192 | { namesleft #0 > } 193 | { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := 194 | nameptr #1 > 195 | { namesleft #1 > 196 | { ", " * t * } 197 | { numnames #2 > 198 | { "," * } 199 | 'skip$ 200 | if$ 201 | t "others" = 202 | { " et~al." * } 203 | { " and " * t * } 204 | if$ 205 | } 206 | if$ 207 | } 208 | 't 209 | if$ 210 | nameptr #1 + 'nameptr := 211 | namesleft #1 - 'namesleft := 212 | } 213 | while$ 214 | } 215 | 216 | FUNCTION {format.authors} 217 | { author empty$ 218 | { "" } 219 | { author format.names } 220 | if$ 221 | } 222 | 223 | FUNCTION {format.editors} 224 | { editor empty$ 225 | { "" } 226 | { editor format.names 227 | editor num.names$ #1 > 228 | { ", editors" * } 229 | { ", editor" * } 230 | if$ 231 | } 232 | if$ 233 | } 234 | 235 | FUNCTION {format.title} 236 | { title empty$ 237 | { "" } 238 | { title "t" change.case$ } 239 | if$ 240 | } 241 | 242 | FUNCTION {n.dashify} 243 | { 't := 244 | "" 245 | { t empty$ not } 246 | { t #1 #1 substring$ "-" = 247 | { t #1 #2 substring$ "--" = not 248 | { "--" * 249 | t #2 global.max$ substring$ 't := 250 | } 251 | { { t #1 #1 substring$ "-" = } 252 | { "-" * 253 | t #2 global.max$ substring$ 't := 254 | } 255 | while$ 256 | } 257 | if$ 258 | } 259 | { t #1 #1 substring$ * 260 | t #2 global.max$ substring$ 't := 261 | } 262 | if$ 263 | } 264 | while$ 265 | } 266 | 267 | FUNCTION {format.date} 268 | { year empty$ 269 | { month empty$ 270 | { "" } 271 | { "there's a month but no year in " cite$ * warning$ 272 | month 273 | } 274 | if$ 275 | } 276 | { month empty$ 277 | 'year 278 | { month " " * year * } 279 | if$ 280 | } 281 | if$ 282 | } 283 | 284 | FUNCTION {format.btitle} 285 | { title emphasize 286 | } 287 | 288 | FUNCTION {tie.or.space.connect} 289 | { duplicate$ text.length$ #3 < 290 | { "~" } 291 | { " " } 292 | if$ 293 | swap$ * * 294 | } 295 | 296 | FUNCTION {either.or.check} 297 | { empty$ 298 | 'pop$ 299 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 300 | if$ 301 | } 302 | 303 | FUNCTION {format.bvolume} 304 | { volume empty$ 305 | { "" } 306 | { "volume" volume tie.or.space.connect 307 | series empty$ 308 | 'skip$ 309 | { " of " * series emphasize * } 310 | if$ 311 | "volume and number" number either.or.check 312 | } 313 | if$ 314 | } 315 | 316 | FUNCTION {format.number.series} 317 | { volume empty$ 318 | { number empty$ 319 | { series field.or.null } 320 | { output.state mid.sentence = 321 | { "number" } 322 | { "Number" } 323 | if$ 324 | number tie.or.space.connect 325 | series empty$ 326 | { "there's a number but no series in " cite$ * warning$ } 327 | { " in " * series * } 328 | if$ 329 | } 330 | if$ 331 | } 332 | { "" } 333 | if$ 334 | } 335 | 336 | FUNCTION {format.edition} 337 | { edition empty$ 338 | { "" } 339 | { output.state mid.sentence = 340 | { edition "l" change.case$ " edition" * } 341 | { edition "t" change.case$ " edition" * } 342 | if$ 343 | } 344 | if$ 345 | } 346 | 347 | INTEGERS { multiresult } 348 | 349 | FUNCTION {multi.page.check} 350 | { 't := 351 | #0 'multiresult := 352 | { multiresult not 353 | t empty$ not 354 | and 355 | } 356 | { t #1 #1 substring$ 357 | duplicate$ "-" = 358 | swap$ duplicate$ "," = 359 | swap$ "+" = 360 | or or 361 | { #1 'multiresult := } 362 | { t #2 global.max$ substring$ 't := } 363 | if$ 364 | } 365 | while$ 366 | multiresult 367 | } 368 | 369 | FUNCTION {format.pages} 370 | { pages empty$ 371 | { "" } 372 | { pages multi.page.check 373 | { "pages" pages n.dashify tie.or.space.connect } 374 | { "page" pages tie.or.space.connect } 375 | if$ 376 | } 377 | if$ 378 | } 379 | 380 | FUNCTION {format.vol.num.pages} 381 | { volume field.or.null 382 | number empty$ 383 | 'skip$ 384 | { "(" number * ")" * * 385 | volume empty$ 386 | { "there's a number but no volume in " cite$ * warning$ } 387 | 'skip$ 388 | if$ 389 | } 390 | if$ 391 | pages empty$ 392 | 'skip$ 393 | { duplicate$ empty$ 394 | { pop$ format.pages } 395 | { ":" * pages n.dashify * } 396 | if$ 397 | } 398 | if$ 399 | } 400 | 401 | FUNCTION {format.chapter.pages} 402 | { chapter empty$ 403 | 'format.pages 404 | { type empty$ 405 | { "chapter" } 406 | { type "l" change.case$ } 407 | if$ 408 | chapter tie.or.space.connect 409 | pages empty$ 410 | 'skip$ 411 | { ", " * format.pages * } 412 | if$ 413 | } 414 | if$ 415 | } 416 | 417 | FUNCTION {format.in.ed.booktitle} 418 | { booktitle empty$ 419 | { "" } 420 | { editor empty$ 421 | { "In " booktitle emphasize * } 422 | { "In " format.editors * ", " * booktitle emphasize * } 423 | if$ 424 | } 425 | if$ 426 | } 427 | 428 | FUNCTION {empty.misc.check} 429 | { author empty$ title empty$ howpublished empty$ 430 | month empty$ year empty$ note empty$ 431 | and and and and and 432 | { "all relevant fields are empty in " cite$ * warning$ } 433 | 'skip$ 434 | if$ 435 | } 436 | 437 | FUNCTION {format.thesis.type} 438 | { type empty$ 439 | 'skip$ 440 | { pop$ 441 | type "t" change.case$ 442 | } 443 | if$ 444 | } 445 | 446 | FUNCTION {format.tr.number} 447 | { type empty$ 448 | { "Technical Report" } 449 | 'type 450 | if$ 451 | number empty$ 452 | { "t" change.case$ } 453 | { number tie.or.space.connect } 454 | if$ 455 | } 456 | 457 | FUNCTION {format.article.crossref} 458 | { key empty$ 459 | { journal empty$ 460 | { "need key or journal for " cite$ * " to crossref " * crossref * 461 | warning$ 462 | "" 463 | } 464 | { "In {\em " journal * "\/}" * } 465 | if$ 466 | } 467 | { "In " key * } 468 | if$ 469 | " \cite{" * crossref * "}" * 470 | } 471 | 472 | FUNCTION {format.crossref.editor} 473 | { editor #1 "{vv~}{ll}" format.name$ 474 | editor num.names$ duplicate$ 475 | #2 > 476 | { pop$ " et~al." * } 477 | { #2 < 478 | 'skip$ 479 | { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = 480 | { " et~al." * } 481 | { " and " * editor #2 "{vv~}{ll}" format.name$ * } 482 | if$ 483 | } 484 | if$ 485 | } 486 | if$ 487 | } 488 | 489 | FUNCTION {format.book.crossref} 490 | { volume empty$ 491 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ 492 | "In " 493 | } 494 | { "Volume" volume tie.or.space.connect 495 | " of " * 496 | } 497 | if$ 498 | editor empty$ 499 | editor field.or.null author field.or.null = 500 | or 501 | { key empty$ 502 | { series empty$ 503 | { "need editor, key, or series for " cite$ * " to crossref " * 504 | crossref * warning$ 505 | "" * 506 | } 507 | { "{\em " * series * "\/}" * } 508 | if$ 509 | } 510 | { key * } 511 | if$ 512 | } 513 | { format.crossref.editor * } 514 | if$ 515 | " \cite{" * crossref * "}" * 516 | } 517 | 518 | FUNCTION {format.incoll.inproc.crossref} 519 | { editor empty$ 520 | editor field.or.null author field.or.null = 521 | or 522 | { key empty$ 523 | { booktitle empty$ 524 | { "need editor, key, or booktitle for " cite$ * " to crossref " * 525 | crossref * warning$ 526 | "" 527 | } 528 | { "In {\em " booktitle * "\/}" * } 529 | if$ 530 | } 531 | { "In " key * } 532 | if$ 533 | } 534 | { "In " format.crossref.editor * } 535 | if$ 536 | " \cite{" * crossref * "}" * 537 | } 538 | 539 | FUNCTION {article} 540 | { output.bibitem 541 | format.authors "author" output.check 542 | new.block 543 | format.title "title" output.check 544 | new.block 545 | crossref missing$ 546 | { journal emphasize "journal" output.check 547 | format.vol.num.pages output 548 | format.date "year" output.check 549 | } 550 | { format.article.crossref output.nonnull 551 | format.pages output 552 | } 553 | if$ 554 | new.block 555 | note output 556 | fin.entry 557 | } 558 | 559 | FUNCTION {book} 560 | { output.bibitem 561 | author empty$ 562 | { format.editors "author and editor" output.check } 563 | { format.authors output.nonnull 564 | crossref missing$ 565 | { "author and editor" editor either.or.check } 566 | 'skip$ 567 | if$ 568 | } 569 | if$ 570 | new.block 571 | format.btitle "title" output.check 572 | crossref missing$ 573 | { format.bvolume output 574 | new.block 575 | format.number.series output 576 | new.sentence 577 | publisher "publisher" output.check 578 | address output 579 | } 580 | { new.block 581 | format.book.crossref output.nonnull 582 | } 583 | if$ 584 | format.edition output 585 | format.date "year" output.check 586 | new.block 587 | note output 588 | fin.entry 589 | } 590 | 591 | FUNCTION {booklet} 592 | { output.bibitem 593 | format.authors output 594 | new.block 595 | format.title "title" output.check 596 | howpublished address new.block.checkb 597 | howpublished output 598 | address output 599 | format.date output 600 | new.block 601 | note output 602 | fin.entry 603 | } 604 | 605 | FUNCTION {inbook} 606 | { output.bibitem 607 | author empty$ 608 | { format.editors "author and editor" output.check } 609 | { format.authors output.nonnull 610 | crossref missing$ 611 | { "author and editor" editor either.or.check } 612 | 'skip$ 613 | if$ 614 | } 615 | if$ 616 | new.block 617 | format.btitle "title" output.check 618 | crossref missing$ 619 | { format.bvolume output 620 | format.chapter.pages "chapter and pages" output.check 621 | new.block 622 | format.number.series output 623 | new.sentence 624 | publisher "publisher" output.check 625 | address output 626 | } 627 | { format.chapter.pages "chapter and pages" output.check 628 | new.block 629 | format.book.crossref output.nonnull 630 | } 631 | if$ 632 | format.edition output 633 | format.date "year" output.check 634 | new.block 635 | note output 636 | fin.entry 637 | } 638 | 639 | FUNCTION {incollection} 640 | { output.bibitem 641 | format.authors "author" output.check 642 | new.block 643 | format.title "title" output.check 644 | new.block 645 | crossref missing$ 646 | { format.in.ed.booktitle "booktitle" output.check 647 | format.bvolume output 648 | format.number.series output 649 | format.chapter.pages output 650 | new.sentence 651 | publisher "publisher" output.check 652 | address output 653 | format.edition output 654 | format.date "year" output.check 655 | } 656 | { format.incoll.inproc.crossref output.nonnull 657 | format.chapter.pages output 658 | } 659 | if$ 660 | new.block 661 | note output 662 | fin.entry 663 | } 664 | 665 | FUNCTION {inproceedings} 666 | { output.bibitem 667 | format.authors "author" output.check 668 | new.block 669 | format.title "title" output.check 670 | new.block 671 | crossref missing$ 672 | { format.in.ed.booktitle "booktitle" output.check 673 | format.bvolume output 674 | format.number.series output 675 | format.pages output 676 | address empty$ 677 | { organization publisher new.sentence.checkb 678 | organization output 679 | publisher output 680 | format.date "year" output.check 681 | } 682 | { address output.nonnull 683 | format.date "year" output.check 684 | new.sentence 685 | organization output 686 | publisher output 687 | } 688 | if$ 689 | } 690 | { format.incoll.inproc.crossref output.nonnull 691 | format.pages output 692 | } 693 | if$ 694 | new.block 695 | note output 696 | fin.entry 697 | } 698 | 699 | FUNCTION {conference} { inproceedings } 700 | 701 | FUNCTION {manual} 702 | { output.bibitem 703 | author empty$ 704 | { organization empty$ 705 | 'skip$ 706 | { organization output.nonnull 707 | address output 708 | } 709 | if$ 710 | } 711 | { format.authors output.nonnull } 712 | if$ 713 | new.block 714 | format.btitle "title" output.check 715 | author empty$ 716 | { organization empty$ 717 | { address new.block.checka 718 | address output 719 | } 720 | 'skip$ 721 | if$ 722 | } 723 | { organization address new.block.checkb 724 | organization output 725 | address output 726 | } 727 | if$ 728 | format.edition output 729 | format.date output 730 | new.block 731 | note output 732 | fin.entry 733 | } 734 | 735 | FUNCTION {mastersthesis} 736 | { output.bibitem 737 | format.authors "author" output.check 738 | new.block 739 | format.title "title" output.check 740 | new.block 741 | "Master's thesis" format.thesis.type output.nonnull 742 | school "school" output.check 743 | address output 744 | format.date "year" output.check 745 | new.block 746 | note output 747 | fin.entry 748 | } 749 | 750 | FUNCTION {misc} 751 | { output.bibitem 752 | format.authors output 753 | title howpublished new.block.checkb 754 | format.title output 755 | howpublished new.block.checka 756 | howpublished output 757 | format.date output 758 | new.block 759 | note output 760 | fin.entry 761 | empty.misc.check 762 | } 763 | 764 | FUNCTION {phdthesis} 765 | { output.bibitem 766 | format.authors "author" output.check 767 | new.block 768 | format.btitle "title" output.check 769 | new.block 770 | "PhD thesis" format.thesis.type output.nonnull 771 | school "school" output.check 772 | address output 773 | format.date "year" output.check 774 | new.block 775 | note output 776 | fin.entry 777 | } 778 | 779 | FUNCTION {proceedings} 780 | { output.bibitem 781 | editor empty$ 782 | { organization output } 783 | { format.editors output.nonnull } 784 | if$ 785 | new.block 786 | format.btitle "title" output.check 787 | format.bvolume output 788 | format.number.series output 789 | address empty$ 790 | { editor empty$ 791 | { publisher new.sentence.checka } 792 | { organization publisher new.sentence.checkb 793 | organization output 794 | } 795 | if$ 796 | publisher output 797 | format.date "year" output.check 798 | } 799 | { address output.nonnull 800 | format.date "year" output.check 801 | new.sentence 802 | editor empty$ 803 | 'skip$ 804 | { organization output } 805 | if$ 806 | publisher output 807 | } 808 | if$ 809 | new.block 810 | note output 811 | fin.entry 812 | } 813 | 814 | FUNCTION {techreport} 815 | { output.bibitem 816 | format.authors "author" output.check 817 | new.block 818 | format.title "title" output.check 819 | new.block 820 | format.tr.number output.nonnull 821 | institution "institution" output.check 822 | address output 823 | format.date "year" output.check 824 | new.block 825 | note output 826 | fin.entry 827 | } 828 | 829 | FUNCTION {unpublished} 830 | { output.bibitem 831 | format.authors "author" output.check 832 | new.block 833 | format.title "title" output.check 834 | new.block 835 | note "note" output.check 836 | format.date output 837 | fin.entry 838 | } 839 | 840 | FUNCTION {default.type} { misc } 841 | 842 | MACRO {jan} {"January"} 843 | 844 | MACRO {feb} {"February"} 845 | 846 | MACRO {mar} {"March"} 847 | 848 | MACRO {apr} {"April"} 849 | 850 | MACRO {may} {"May"} 851 | 852 | MACRO {jun} {"June"} 853 | 854 | MACRO {jul} {"July"} 855 | 856 | MACRO {aug} {"August"} 857 | 858 | MACRO {sep} {"September"} 859 | 860 | MACRO {oct} {"October"} 861 | 862 | MACRO {nov} {"November"} 863 | 864 | MACRO {dec} {"December"} 865 | 866 | MACRO {acmcs} {"ACM Computing Surveys"} 867 | 868 | MACRO {acta} {"Acta Informatica"} 869 | 870 | MACRO {cacm} {"Communications of the ACM"} 871 | 872 | MACRO {ibmjrd} {"IBM Journal of Research and Development"} 873 | 874 | MACRO {ibmsj} {"IBM Systems Journal"} 875 | 876 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"} 877 | 878 | MACRO {ieeetc} {"IEEE Transactions on Computers"} 879 | 880 | MACRO {ieeetcad} 881 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} 882 | 883 | MACRO {ipl} {"Information Processing Letters"} 884 | 885 | MACRO {jacm} {"Journal of the ACM"} 886 | 887 | MACRO {jcss} {"Journal of Computer and System Sciences"} 888 | 889 | MACRO {scp} {"Science of Computer Programming"} 890 | 891 | MACRO {sicomp} {"SIAM Journal on Computing"} 892 | 893 | MACRO {tocs} {"ACM Transactions on Computer Systems"} 894 | 895 | MACRO {tods} {"ACM Transactions on Database Systems"} 896 | 897 | MACRO {tog} {"ACM Transactions on Graphics"} 898 | 899 | MACRO {toms} {"ACM Transactions on Mathematical Software"} 900 | 901 | MACRO {toois} {"ACM Transactions on Office Information Systems"} 902 | 903 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} 904 | 905 | MACRO {tcs} {"Theoretical Computer Science"} 906 | 907 | READ 908 | 909 | STRINGS { longest.label } 910 | 911 | INTEGERS { number.label longest.label.width } 912 | 913 | FUNCTION {initialize.longest.label} 914 | { "" 'longest.label := 915 | #1 'number.label := 916 | #0 'longest.label.width := 917 | } 918 | 919 | FUNCTION {longest.label.pass} 920 | { number.label int.to.str$ 'label := 921 | number.label #1 + 'number.label := 922 | label width$ longest.label.width > 923 | { label 'longest.label := 924 | label width$ 'longest.label.width := 925 | } 926 | 'skip$ 927 | if$ 928 | } 929 | 930 | EXECUTE {initialize.longest.label} 931 | 932 | ITERATE {longest.label.pass} 933 | 934 | FUNCTION {begin.bib} 935 | { preamble$ empty$ 936 | 'skip$ 937 | { preamble$ write$ newline$ } 938 | if$ 939 | "\begin{thebibliography}{" longest.label * "}" * write$ newline$ 940 | } 941 | 942 | EXECUTE {begin.bib} 943 | 944 | EXECUTE {init.state.consts} 945 | 946 | ITERATE {call.type$} 947 | 948 | FUNCTION {end.bib} 949 | { newline$ 950 | "\end{thebibliography}" write$ newline$ 951 | } 952 | 953 | EXECUTE {end.bib} 954 | --------------------------------------------------------------------------------