├── thesis.pdf ├── fig └── ptlm.pdf ├── chapters ├── intro.tex └── background.tex ├── README.md ├── thesis.tex ├── gsasthesis.cls ├── references.bib └── acl_natbib.bst /thesis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lixin4ever/CUHK-PHD-Thesis-Template/HEAD/thesis.pdf -------------------------------------------------------------------------------- /fig/ptlm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lixin4ever/CUHK-PHD-Thesis-Template/HEAD/fig/ptlm.pdf -------------------------------------------------------------------------------- /chapters/intro.tex: -------------------------------------------------------------------------------- 1 | Introduction, motivation and big picture of your phd thesis 2 | 3 | \section{Contributions} 4 | The contributions of this dissertation are summarized as follows: 5 | \begin{itemize}[leftmargin=*] 6 | \item \textbf{Description of your first paper}\\ 7 | \item \textbf{Description of your second paper}\\ 8 | \item $\cdots$ 9 | \end{itemize} 10 | 11 | 12 | \section{Produced Publications} 13 | The research work of this dissertation has produced some direct and indirect publications as listed below: 14 | %\noindent \bullet xx \\ 15 | \begin{itemize} 16 | \item $\cdots$ 17 | \end{itemize} 18 | 19 | 20 | \section{Thesis Outline} 21 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CUHK-PHD-Thesis-Template 2 | This project is based on the template released by [Harvard Graduate School of Arts and Science](https://gsas.harvard.edu/) (Harvard GSAS) 3 | 4 | ## Environment 5 | * [Overleaf](https://www.overleaf.com/project) (recommended) 6 | * [TeXLive](http://tug.org/texlive/) + [Texstudio](http://texstudio.sourceforge.net/) + pdfLaTeX 7 | 8 | ## Usage 9 | * ``thesis.tex``: the entry point of the LaTeX project. 10 | * ``gsasthesis.cls``: supporting class file for the Harvard GSAS Ph.D. Thesis Template. Note that the settings of title page and committee page are put in this file and you can fill in your own information. 11 | * ``acl_natbib.bst``: bibliography style file from [Association for Computational Linguistics](https://www.aclweb.org/portal/) (ACL). 12 | * ``reference.bib``: bibliography file. 13 | * ``chapters``: content folder containing chapter files. 14 | * ``fig``: folder storing figure 15 | 16 | ## References 17 | * [https://github.com/kolesarm/harvard-gsas-thesis](https://github.com/kolesarm/harvard-gsas-thesis) 18 | * [https://2020.emnlp.org/call-for-papers#paper-submission-and-templates](https://2020.emnlp.org/call-for-papers#paper-submission-and-templates) 19 | * [https://gsas.harvard.edu/academics/dissertations](https://gsas.harvard.edu/academics/dissertations) 20 | -------------------------------------------------------------------------------- /chapters/background.tex: -------------------------------------------------------------------------------- 1 | \section{Unsupervised Language Model Pre-training} 2 | The advent of unsupervised Language Model (LM) pre-training has led to significant performance gains on a variety of language understanding~\citep{radford2018improving,devlin-etal-2019-bert,yang2019xlnet,clark2020electra} and language generation~\citep{radford2019language,dong2019unified} tasks. Typically, a deep Long Shot-Term Memory networks (LSTM)~\citep{hochreiter1997long,peters-etal-2018-deep} or Transformer~\citep{vaswani2017attention} is first pre-trained on large-scale corpus and then the contextualized embeddings from the pre-trained language model are provided for the downstream tasks in the manner of feature extraction or fine-tuning. 3 | 4 | 5 | \begin{sidewaysfigure} 6 | \centering 7 | \includegraphics[width=\textwidth]{fig/ptlm.pdf} 8 | \caption{Auto-regressive language modeling (left) and masked language modeling (right).} 9 | \label{fig:ptlm} 10 | \end{sidewaysfigure} 11 | 12 | Several pre-training techniques have been developed for generating general-purpose contextualized embeddings. \citet{peters-etal-2017-semi,peters-etal-2018-deep} employ two unidirectional LSTM LMs, namely, a forward left-to-right LM and a backward right-to-left LM, to encode bi-directional contexts and the pre-training is conducted via auto-regressive language modeling, as shown in the left part of Figure~\ref{fig:ptlm}. GPT~\citep{radford2018improving} and GPT-2~\citep{radford2019language} adopt the same auto-regressive pre-training objective but change to model sequential word flow with unidirectional Transformer. BERT~\citep{devlin-etal-2019-bert}, as well as its variants~\citep{conneau2019cross,liu2019roberta,wang2019structbert,joshi-etal-2020-spanbert}, propose to learn contextualized embeddings based on masked language modeling---reconstruct the masked input with the special \texttt{[MASK]} token and the surrounding context (see the right part of Figure~\ref{fig:ptlm}). In order to unify the auto-regressive pre-training and auto-encoding based pre-training, UniLM~\citep{dong2019unified} jointly optimizes the pre-training of Transformer with auto-regressive language modeling objective and masked language modeling objective. Similarly, XLNet~\citep{yang2019xlnet} designs permutation language modeling objective to capture the context information from all positions while preserving the temporal dependency among the predictions. MASS~\citep{song2019mass}, BART~\citep{lewis-etal-2020-bart} and T5~\citep{raffel2019exploring} are the initial attempts to pre-train sequence-to-sequence architecture and achieve promising results on machine translation and abstractive summarization. 13 | 14 | 15 | \section{Multilingual Language Model Pre-Training} 16 | Multilingual language model pre-training is a multilingual extension of language model pre-training, where the deep neural architecture~\citep{vaswani2017attention,peters-etal-2018-deep} is pre-trained on large-scale multilingual corpus, e.g., a collection of wikipedia documents in different languages. The yielding multilingual pre-trained language models (mPTLMs)~\citep{che-etal-2018-towards,devlin-etal-2019-bert,conneau2019cross,mulcaire-etal-2019-polyglot,conneau-etal-2020-unsupervised} have been regarded as the gold standard for a variety of unsupervised cross-lingual natural language understanding tasks~\citep{prettenhofer-stein-2010-cross,schwenk-li-2018-corpus,zeman-etal-2018-conll,liu-etal-2019-xqa}. The most impressive features of mPTLMs is that even performing cross-lingual transfer in a zero-shot manner---only fine-tune the mPTLMs on the source-language training data---it can still significantly outperform the existing works based on cross-lingual embeddings~\citep{mikolov2013exploiting,faruqui-dyer-2014-improving,smith2018offline} or machine translation~\citep{banea-etal-2008-multilingual,duh-etal-2011-machine}, as observed in~\citet{pires-etal-2019-multilingual,wu-dredze-2019-beto,keung-etal-2019-adversarial,artetxe-etal-2020-cross}. After being additionally trained on machine-translated data from source language, the cross-lingual performances of the cross-lingual models exploiting mPTLMs are further improved~\citep{huang-etal-2019-unicoder,conneau-etal-2020-unsupervised,cao2020multilingual}, especially on sequence classification~\citep{schwenk-li-2018-corpus} and sequence pair classification tasks~\citep{conneau-etal-2018-xnli,yang-etal-2019-paws}. 17 | -------------------------------------------------------------------------------- /thesis.tex: -------------------------------------------------------------------------------- 1 | \documentclass[11pt]{gsasthesis} % 10,11 and 12pt fonts allowed 2 | 3 | %%%%%%%%%%%%%%%% PACKAGES YOU PROBABLY WANT %%%%%%%%%%%%%%%% 4 | % Include packages you want. The gsasthesis style file already includes 5 | % packages "setspace" and "tocbibind". 6 | 7 | \usepackage{etex} % extend the number of registers 8 | 9 | % GSAS: "all margins should be at least 1 inch." 10 | \usepackage[margin={1.2in}]{geometry} 11 | % If you want asymmetric margins for two-sided documents, use the "twoside" 12 | % option, as in 13 | % \usepackage[top=1in,bottom=1.5in,left=1in,right=1.5in,twoside]{geometry} The 14 | % left and right options become inner and outer margins The default horizontal 15 | % latex margin ratio is 2:3. The default vertical top:bottom margin ratio is 2:3 16 | % also. You can also set it directly by passing the hmarginratio option to the 17 | % geometry package, as in 18 | % \usepackage[top=1in,left=1in,vmarginratio=2:3,hmarginratio=2:5,twoside]{geometry} 19 | 20 | % Appendix package. Not necessary, but it does make managing appendices easier 21 | \usepackage[titletoc]{appendix} 22 | 23 | %%%%%%%%%%%%%%%% PACKAGES MAY WANT %%%%%%%%%%%%%%%% 24 | 25 | % sideways tables and figures 26 | \usepackage{rotating} 27 | 28 | % tables that spill over multiple pages 29 | \usepackage{longtable} 30 | 31 | % references 32 | %\usepackage{natbib} 33 | 34 | \usepackage{comment} 35 | 36 | \usepackage{multirow, booktabs} 37 | \usepackage{amsmath} 38 | \usepackage{amssymb} 39 | \usepackage{amsfonts} 40 | \usepackage{makecell} 41 | 42 | \usepackage{enumitem} 43 | 44 | \usepackage{graphicx} 45 | \usepackage{soul} 46 | \usepackage[normalem]{ulem} 47 | \usepackage{subcaption} 48 | 49 | \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} 50 | \newcolumntype{C}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} 51 | 52 | \usepackage{CJKutf8} 53 | \usepackage{pifont} 54 | \newcommand{\xmark}{\ding{55}} 55 | 56 | \usepackage{rotating} 57 | \usepackage{pdflscape} 58 | 59 | % fonts that are nicer than defaults 60 | \usepackage[sc]{mathpazo} 61 | \usepackage{courier} 62 | 63 | % Use 8-bit encoding that has 256 glyphs, pretty please 64 | \usepackage[utf8]{inputenc} 65 | \usepackage[T1]{fontenc} 66 | 67 | % babel is required for blindtext, which generates random text 68 | \usepackage[english]{babel} 69 | \usepackage{blindtext} 70 | 71 | % math support 72 | \usepackage{amsmath} 73 | 74 | % Slightly tweak font spacing for aesthetics 75 | \usepackage{microtype} 76 | 77 | 78 | 79 | % You need the footmisc package with the stable option if you want to have 80 | % footnotes inside section titles, for example to say that a particular chapter 81 | % has been co-authored with someone. The multiple option ensures that there is a 82 | % comma between two consecutive footnotes 83 | \usepackage[stable,multiple]{footmisc} 84 | 85 | 86 | % Nicer captions 87 | \RequirePackage[font=small,format=plain,labelfont=bf,textfont=it]{caption} 88 | \addtolength{\abovecaptionskip}{1ex} 89 | \addtolength{\belowcaptionskip}{1ex} 90 | 91 | 92 | %%%%%%%%%%%%%%%% COMPULSORY FIELDS %%%%%%%%%%%%%%%% 93 | 94 | \title{Title of Your Ph.D. Thesis} % needs to match title on DAC 95 | \author{Your Name} % full name as it appears on your GSAS record, needs 96 | % to match name on DAC 97 | \degreename{Doctor of Philosophy} 98 | \degreefield{Systems Engineering and Engineering Management} % Official name of subject as listed in GSAS 99 | % handbook 100 | \department{Systems Engineering and Engineering Management} % official name of department 101 | \degreemonth{January} % Month of Defense (i.e. month when DAC was signed) 102 | \degreeyear{2021} % Year the DAC was signed 103 | \principaladvisor{Professor AA} 104 | 105 | % Optionally, you can add a second advisor, but you can't have three 106 | %\secondadvisor{Professor George Secondary} 107 | 108 | 109 | 110 | \begin{document} 111 | 112 | %%%%%%%%%%%%%%%% FRONTMATTER %%%%%%%%%%%%%%%% 113 | 114 | \pagenumbering{roman} % GSAS wants roman page numbers for frontmatter 115 | 116 | % the following four pages are required in that order. The first two pages are 117 | % not allowed to have page numbers, this is taken care of in the class file. 118 | \thesistitlepage 119 | %\copyrightpage 120 | \committeepage 121 | \begin{abstract} 122 | \end{abstract} 123 | 124 | \begin{cabstract} 125 | 126 | 127 | \end{cabstract} 128 | 129 | % Center headings for table of contents, LOT, and LOF and make them smaller so 130 | % that "Abstract", "Acknowledgments" and "Contents" all look alike. Comment out 131 | % if you want the default. If you want more control, use the "tocloft" package. 132 | \renewcommand{\contentsname}{\protect\centering\protect\Large Contents} 133 | \renewcommand{\listtablename}{\protect\centering\protect\Large List of Tables} 134 | \renewcommand{\listfigurename}{\protect\centering\protect\Large List of Figures} 135 | 136 | \tableofcontents % Table of contents 137 | 138 | % The rest of the front matter: Lists of tables, figures, dedication and 139 | % acknowledment is optional. Comment out whatever you don't like 140 | \listoftables 141 | \listoffigures 142 | \begin{acknowledgments} 143 | Acknowledgement here. 144 | 145 | %I would like to thank my thesis committee members for their valuable and constructive comments. Furthermore, I want to express my gratitude to the professors in the Department of Systems Engineering and Engineering Management. 146 | \end{acknowledgments} 147 | %\begin{dedication} 148 | % To my parents and my girl friend. 149 | %\end{dedication} 150 | 151 | 152 | %%%%%%%%%%%%%%%% MAIN BODY %%%%%%%%%%%%%%%% 153 | \pagenumbering{arabic} % reset page numbering and switch to arabic 154 | 155 | % Introductory chapter. Comment out if you don't have an intro chapter, but I 156 | % think most committees expect you to have one. 157 | % Don't number the intro chapter, but add to to the table of contents 158 | %\addcontentsline{toc}{chapter}{Introduction} 159 | \chapter{Introduction}\label{ch:intro} 160 | \input{chapters/intro} 161 | 162 | \chapter{Literature Review}\label{ch:background} 163 | \input{chapters/background} 164 | 165 | \chapter{Chapter 3}\label{ch:ate} 166 | 167 | \chapter{Chapter 4} 168 | 169 | \chapter{Chapter 5} 170 | 171 | \chapter{...} 172 | 173 | 174 | 175 | %%%%%%%%%%%%%%%% BACK MATTER %%%%%%%%%%%%%%%% 176 | 177 | % Put appendices, bibliography, and supplemental materials here 178 | 179 | % The bibliography may be single spaced within each entry, but must be 180 | % double-spaced between each entry. Most bibliography styles leave space between 181 | % entries, so that shouldn't be a problem. 182 | \begin{singlespacing} 183 | % I like "References" better than "Bibliography" 184 | \renewcommand{\bibname}{References} 185 | 186 | % Any bibliohgraphy style that leaves space between entries is fine 187 | \bibliographystyle{acl_natbib} 188 | %\bibliographystyle{ecca} 189 | \bibliography{references} 190 | \end{singlespacing} 191 | 192 | % Appendices from all chapters should go at the end 193 | %\input{appendix} 194 | 195 | \end{document} 196 | -------------------------------------------------------------------------------- /gsasthesis.cls: -------------------------------------------------------------------------------- 1 | % This is file `gsasthesis.cls', 2 | % 3 | % LaTeX2e class for publishing a PhD thesis according to Harvard GSAS 4 | % requirements: 5 | % 6 | % http://www.gsas.harvard.edu/images/stories/pdfs/form%20of%20dissertation.pdf 7 | % 8 | % Modifies appearance of standard report class. 9 | % 10 | % Author: Michal Kolesár 11 | % E-mail: kolesarmi at googlemail dot com 12 | % Disclaimer: not endorsed by Harvard, use at your own risk. 13 | 14 | 15 | % 1. Identification 16 | \NeedsTeXFormat{LaTeX2e} 17 | \ProvidesClass{gsasthesis} 18 | 19 | 20 | % 2. Load extra packages 21 | 22 | % Load the report class and send it all class options 23 | \LoadClassWithOptions{report} 24 | 25 | \RequirePackage{natbib} 26 | \RequirePackage{url} 27 | \usepackage{xcolor} 28 | \usepackage{hyperref} 29 | 30 | \definecolor{SchoolColor}{rgb}{0.6471, 0.1098, 0.1882} % Crimson 31 | \definecolor{chaptergrey}{rgb}{0.6471, 0.1098, 0.1882} % for chapter numbers 32 | \definecolor{citecolor}{rgb}{0.2, 0.2, 0.6} 33 | \definecolor{darkblue}{rgb}{0, 0, 0.5} 34 | 35 | %\definecolor{cuhkcolor}{rgb}{0.63, 0.36, 0.94}} 36 | 37 | %\definecolor{blue(pigment)}{rgb}{} 38 | 39 | \hypersetup{ 40 | colorlinks, 41 | citecolor=darkblue, 42 | filecolor=black, 43 | linkcolor=black, 44 | urlcolor=darkblue, 45 | } 46 | 47 | % Dissertation should be double-spaced throughout nodisplayskipstretch makes 48 | % sure equations are single-spaced. Otherwise array-like objects (say pmatrix) 49 | % look rather ugly. 50 | \RequirePackage[nodisplayskipstretch,doublespacing]{setspace} 51 | % This makes tables single-spaced by default. Since they are supposed to be 52 | % double-spaced unless they are too long, need to set double-spacing for tables 53 | % manually using \renewcommand{\arraystretch}{2} inside the table environment 54 | 55 | % Add references, to Table of Contents, but not TOC itself, or list of tables 56 | % and figures 57 | \RequirePackage[nottoc,notlot,notlof]{tocbibind} 58 | 59 | % 3. Required and Optional fields 60 | \newcommand\degreename[1]{\renewcommand\@degreename{#1}} 61 | \newcommand\@degreename{\ClassError{gsasthesis}{No \noexpand\degreename given}{}} 62 | 63 | \newcommand\degreefield[1]{\renewcommand\@degreefield{#1}} 64 | \newcommand\@degreefield{\ClassError{gsasthesis}{No \noexpand\degreefield given}{}} 65 | 66 | \newcommand\degreemonth[1]{\renewcommand\@degreemonth{#1}} 67 | \newcommand\@degreemonth{\ClassError{gsasthesis}{No \noexpand\degreemonth given}{}} 68 | 69 | \newcommand\degreeyear[1]{\renewcommand\@degreeyear{#1}} 70 | \newcommand\@degreeyear{\ClassError{gsasthesis}{No \noexpand\degreeyear given}{}} 71 | 72 | \newcommand\department[1]{\renewcommand\@department{#1}} 73 | \newcommand\@department{\ClassError{gsasthesis}{No \noexpand\department given}{}} 74 | 75 | \newcommand\principaladvisor[1]{\renewcommand\@principaladvisor{#1}} 76 | \newcommand\@principaladvisor{\ClassError{gsasthesis}{No \noexpand\principaladvisor given}{}} 77 | 78 | % Optional 79 | \newcommand\secondadvisor[1]{\newcommand\@secondadvisor{#1}} 80 | 81 | 82 | \newcommand{\committee}[1]{\def\@committee{#1}} 83 | \newcommand{\thecommittee}{\@committee} 84 | 85 | \committee{ 86 | \centering 87 | Professor AAA (Chair)\\ 88 | Professor BBB (Thesis Supervisor)\\ 89 | Professor CCC (Committee Member)\\ 90 | Professor DDD (External Examiner) 91 | %\end{flushleft} 92 | } 93 | 94 | \newcommand{\committeepage}{ 95 | \newpage 96 | \thispagestyle{empty} 97 | \vspace*{10mm} 98 | \begin{center} 99 | \vfill 100 | %\Large 101 | \underline{Thesis Assessment Committee} 102 | \vskip 1cm{ 103 | \thecommittee 104 | } 105 | \vfill 106 | \end{center} 107 | \par 108 | \vskip 1.5em 109 | } 110 | 111 | 112 | % 4. (Re)define commands and environments 113 | \newcommand{\thesistitlepage}{% 114 | \begin{titlepage} 115 | \thispagestyle{empty} 116 | \null\vfil 117 | %\addcontentsline{toc}{section}{Title Page} % seems silly to add it 118 | \begin{center} 119 | {\huge\bfseries{\@title}}\\[3em] 120 | %A dissertation presented\\ 121 | %by\\[2em] 122 | {\Large\bfseries\@author}\\[2em] 123 | %\\[2em] 124 | %{\large\@department}\\[2em] 125 | A Thesis Submitted in Partial Fulfillment \\ 126 | of the Requirements for the Degree of \\ 127 | \@degreename\\ 128 | in \\ 129 | {\@department}\\[4em] 130 | %in\\ 131 | %{\large\@department}\\[2em] 132 | %\@degreefield\\ 133 | The Chinese University of Hong Kong\\ 134 | \@degreemonth\ \@degreeyear 135 | \end{center} 136 | \vfil\null 137 | \end{titlepage} 138 | \addtocounter{page}{1} % titlepage is not numbered by default 139 | } 140 | 141 | \newcommand{\copyrightpage} 142 | { 143 | \thispagestyle{empty} 144 | \null\vfil 145 | \begin{center} 146 | \copyright\ \@degreeyear\ \@author\\ 147 | All rights reserved. 148 | \end{center} 149 | \vfil\null 150 | \clearpage 151 | } 152 | 153 | \renewenvironment{abstract}% 154 | { 155 | \clearpage 156 | % Standard spacing for the header 157 | \begin{spacing}{1.2} 158 | % \begin{center} 159 | % {\large\bfseries\@title} 160 | % \end{center} 161 | % \vspace{2em} 162 | \end{spacing} 163 | \addcontentsline{toc}{section}{Abstract} 164 | \chapter*{\abstractname} 165 | %\section*{\abstractname} 166 | }% 167 | 168 | \newenvironment{cabstract}% 169 | { 170 | \clearpage 171 | \begin{spacing}{1.2} 172 | \end{spacing} 173 | % Standard spacing for the header 174 | %\addcontentsline{toc}{section}{Chinese Abstract} 175 | \chapter*{\begin{CJK}{UTF8}{gbsn}摘要\end{CJK}} 176 | }% 177 | 178 | {\clearpage} 179 | 180 | % GSAS: "Table of contents, lists of figures and tables can be single-spaced". 181 | % Let's redefine them to be single-spaced. 182 | 183 | % Save the latex commands 184 | \let\LaTeXTOC\tableofcontents 185 | \let\LaTeXLOT\listoftables 186 | \let\LaTeXLOF\listoffigures 187 | 188 | % Redefine them 189 | \renewcommand{\tableofcontents}% 190 | { 191 | \begin{spacing}{1.2} % 1.2 looks nicer than 1 192 | \LaTeXTOC 193 | \end{spacing} 194 | } 195 | \renewcommand{\listoftables}% 196 | { 197 | \begin{spacing}{1.2} 198 | \LaTeXLOT 199 | \end{spacing} 200 | } 201 | \renewcommand{\listoffigures}% 202 | { 203 | \begin{spacing}{1.2} 204 | \LaTeXLOF 205 | \end{spacing} 206 | } 207 | 208 | 209 | \newenvironment{acknowledgments} 210 | { 211 | \clearpage 212 | \addcontentsline{toc}{section}{Acknowledgments} 213 | \section*{\centering Acknowledgments} 214 | } 215 | {\clearpage} 216 | 217 | \newenvironment{dedication} 218 | { 219 | \clearpage 220 | \par\vspace*{.2\textheight} 221 | \begin{quotation} 222 | } 223 | {\end{quotation}\clearpage} 224 | 225 | % 4. Odds and ends 226 | 227 | % Quotations should be single-spaced 228 | \expandafter\def\expandafter\quote\expandafter{\quote\singlespacing} 229 | \expandafter\def\expandafter\quotation\expandafter{\quotation\singlespacing} 230 | 231 | % Footnotes should single-spaced (setspace default), but there should be 232 | % double-spacing between footnotes. 233 | \setlength{\footnotesep}{0.8\baselineskip} 234 | 235 | % Indicate that LaTeX can stop reading this file. LaTeX will ignore anything 236 | % after this line. Not required, but good practice. 237 | \endinput 238 | -------------------------------------------------------------------------------- /references.bib: -------------------------------------------------------------------------------- 1 | @inproceedings{che-etal-2018-towards, 2 | title = "Towards Better {UD} Parsing: Deep Contextualized Word Embeddings, Ensemble, and Treebank Concatenation", 3 | author = "Che, Wanxiang and 4 | Liu, Yijia and 5 | Wang, Yuxuan and 6 | Zheng, Bo and 7 | Liu, Ting", 8 | booktitle = "Proceedings of CoNLL", 9 | year = "2018", 10 | url = "https://www.aclweb.org/anthology/K18-2005", 11 | doi = "10.18653/v1/K18-2005", 12 | pages = "55--64", 13 | } 14 | 15 | @article{radford2018improving, 16 | title={Improving language understanding by generative pre-training}, 17 | author={Radford, Alec and Narasimhan, Karthik and Salimans, Tim and Sutskever, Ilya}, 18 | url={https://www.cs.ubc.ca/~amuham01/LING530/papers/radford2018improving.pdf}, 19 | year={2018} 20 | } 21 | 22 | @article{wang2019structbert, 23 | title={Structbert: Incorporating language structures into pre-training for deep language understanding}, 24 | author={Wang, Wei and Bi, Bin and Yan, Ming and Wu, Chen and Bao, Zuyi and Xia, Jiangnan and Peng, Liwei and Si, Luo}, 25 | journal={arXiv preprint arXiv:1908.04577}, 26 | year={2019} 27 | } 28 | 29 | @article{raffel2019exploring, 30 | title={Exploring the limits of transfer learning with a unified text-to-text transformer}, 31 | author={Raffel, Colin and Shazeer, Noam and Roberts, Adam and Lee, Katherine and Narang, Sharan and Matena, Michael and Zhou, Yanqi and Li, Wei and Liu, Peter J}, 32 | journal={arXiv preprint arXiv:1910.10683}, 33 | year={2019} 34 | } 35 | 36 | @article{radford2019language, 37 | title={Language models are unsupervised multitask learners}, 38 | author={Radford, Alec and Wu, Jeffrey and Child, Rewon and Luan, David and Amodei, Dario and Sutskever, Ilya}, 39 | journal={OpenAI Blog}, 40 | volume={1}, 41 | number={8}, 42 | year={2019} 43 | } 44 | 45 | @inproceedings{conneau2019cross, 46 | title={Cross-lingual language model pretraining}, 47 | author={Conneau, Alexis and Lample, Guillaume}, 48 | booktitle={Proceedings of NeurIPS}, 49 | pages={7059--7069}, 50 | year={2019} 51 | } 52 | 53 | @inproceedings{dong2019unified, 54 | title={Unified language model pre-training for natural language understanding and generation}, 55 | author={Dong, Li and Yang, Nan and Wang, Wenhui and Wei, Furu and Liu, Xiaodong and Wang, Yu and Gao, Jianfeng and Zhou, Ming and Hon, Hsiao-Wuen}, 56 | booktitle={Proceedings of NeurIPS}, 57 | pages={13063--13075}, 58 | year={2019} 59 | } 60 | 61 | @article{hochreiter1997long, 62 | title={Long short-term memory}, 63 | author={Hochreiter, Sepp and Schmidhuber, J{\"u}rgen}, 64 | journal={Neural computation}, 65 | volume={9}, 66 | number={8}, 67 | pages={1735--1780}, 68 | year={1997} 69 | } 70 | 71 | @inproceedings{peters-etal-2017-semi, 72 | title = "Semi-supervised sequence tagging with bidirectional language models", 73 | author = "Peters, Matthew and 74 | Ammar, Waleed and 75 | Bhagavatula, Chandra and 76 | Power, Russell", 77 | booktitle = "Proceedings of ACL", 78 | year = "2017", 79 | url = "https://www.aclweb.org/anthology/P17-1161", 80 | doi = "10.18653/v1/P17-1161", 81 | pages = "1756--1765", 82 | } 83 | 84 | @inproceedings{peters-etal-2018-deep, 85 | title = "Deep Contextualized Word Representations", 86 | author = "Peters, Matthew and 87 | Neumann, Mark and 88 | Iyyer, Mohit and 89 | Gardner, Matt and 90 | Clark, Christopher and 91 | Lee, Kenton and 92 | Zettlemoyer, Luke", 93 | booktitle = "Proceedings of NAACL-HLT", 94 | year = "2018", 95 | url = "https://www.aclweb.org/anthology/N18-1202", 96 | doi = "10.18653/v1/N18-1202", 97 | pages = "2227--2237", 98 | } 99 | 100 | @article{liu2019roberta, 101 | title={Roberta: A robustly optimized bert pretraining approach}, 102 | author={Liu, Yinhan and Ott, Myle and Goyal, Naman and Du, Jingfei and Joshi, Mandar and Chen, Danqi and Levy, Omer and Lewis, Mike and Zettlemoyer, Luke and Stoyanov, Veselin}, 103 | journal={arXiv preprint arXiv:1907.11692}, 104 | year={2019} 105 | } 106 | 107 | @inproceedings{song2019mass, 108 | title={MASS: Masked Sequence to Sequence Pre-training for Language Generation}, 109 | author={Song, Kaitao and Tan, Xu and Qin, Tao and Lu, Jianfeng and Liu, Tie-Yan}, 110 | booktitle={Proceedings of ICML}, 111 | pages={5926--5936}, 112 | year={2019} 113 | } 114 | 115 | @inproceedings{conneau-etal-2018-xnli, 116 | title = "{XNLI}: Evaluating Cross-lingual Sentence Representations", 117 | author = "Conneau, Alexis and 118 | Rinott, Ruty and 119 | Lample, Guillaume and 120 | Williams, Adina and 121 | Bowman, Samuel and 122 | Schwenk, Holger and 123 | Stoyanov, Veselin", 124 | booktitle = "Proceedings of EMNLP", 125 | year = "2018", 126 | url = "https://www.aclweb.org/anthology/D18-1269", 127 | doi = "10.18653/v1/D18-1269", 128 | pages = "2475--2485", 129 | } 130 | 131 | @inproceedings{zeman-etal-2018-conll, 132 | title = "{C}o{NLL} 2018 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies", 133 | author = "Zeman, Daniel and 134 | Haji{\v{c}}, Jan and 135 | Popel, Martin and 136 | Potthast, Martin and 137 | Straka, Milan and 138 | Ginter, Filip and 139 | Nivre, Joakim and 140 | Petrov, Slav", 141 | booktitle = "Proceedings of CoNLL", 142 | year = "2018", 143 | url = "https://www.aclweb.org/anthology/K18-2001", 144 | doi = "10.18653/v1/K18-2001", 145 | pages = "1--21", 146 | } 147 | 148 | @inproceedings{lewis-etal-2020-bart, 149 | title = "{BART}: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension", 150 | author = "Lewis, Mike and 151 | Liu, Yinhan and 152 | Goyal, Naman and 153 | Ghazvininejad, Marjan and 154 | Mohamed, Abdelrahman and 155 | Levy, Omer and 156 | Stoyanov, Veselin and 157 | Zettlemoyer, Luke", 158 | booktitle = "Proceedings of ACL", 159 | year = "2020", 160 | url = "https://www.aclweb.org/anthology/2020.acl-main.703", 161 | doi = "10.18653/v1/2020.acl-main.703", 162 | pages = "7871--7880", 163 | } 164 | 165 | @inproceedings{conneau-etal-2020-unsupervised, 166 | title = "Unsupervised Cross-lingual Representation Learning at Scale", 167 | author = "Conneau, Alexis and 168 | Khandelwal, Kartikay and 169 | Goyal, Naman and 170 | Chaudhary, Vishrav and 171 | Wenzek, Guillaume and 172 | Guzm{\'a}n, Francisco and 173 | Grave, Edouard and 174 | Ott, Myle and 175 | Zettlemoyer, Luke and 176 | Stoyanov, Veselin", 177 | booktitle = "Proceedings of ACL", 178 | year = "2020", 179 | url = "https://www.aclweb.org/anthology/2020.acl-main.747", 180 | doi = "10.18653/v1/2020.acl-main.747", 181 | pages = "8440--8451", 182 | } 183 | 184 | @article{joshi-etal-2020-spanbert, 185 | title = "{S}pan{BERT}: Improving Pre-training by Representing and Predicting Spans", 186 | author = "Joshi, Mandar and 187 | Chen, Danqi and 188 | Liu, Yinhan and 189 | Weld, Daniel S. and 190 | Zettlemoyer, Luke and 191 | Levy, Omer", 192 | journal = "Transactions of the Association for Computational Linguistics", 193 | volume = "8", 194 | year = "2020", 195 | url = "https://www.aclweb.org/anthology/2020.tacl-1.5", 196 | doi = "10.1162/tacl_a_00300", 197 | pages = "64--77", 198 | } 199 | 200 | @inproceedings{devlin-etal-2019-bert, 201 | title = "{BERT}: Pre-training of Deep Bidirectional Transformers for Language Understanding", 202 | author = "Devlin, Jacob and 203 | Chang, Ming-Wei and 204 | Lee, Kenton and 205 | Toutanova, Kristina", 206 | booktitle = "Proceedings of NAACL-HLT", 207 | year = "2019", 208 | url = "https://www.aclweb.org/anthology/N19-1423", 209 | doi = "10.18653/v1/N19-1423", 210 | pages = "4171--4186", 211 | } 212 | 213 | @inproceedings{mulcaire-etal-2019-polyglot, 214 | title = "Polyglot Contextual Representations Improve Crosslingual Transfer", 215 | author = "Mulcaire, Phoebe and 216 | Kasai, Jungo and 217 | Smith, Noah A.", 218 | booktitle = "Proceedings of NAACL-HLT", 219 | year = "2019", 220 | url = "https://www.aclweb.org/anthology/N19-1392", 221 | doi = "10.18653/v1/N19-1392", 222 | pages = "3912--3918", 223 | } 224 | 225 | @inproceedings{yang2019xlnet, 226 | title={Xlnet: Generalized autoregressive pretraining for language understanding}, 227 | author={Yang, Zhilin and Dai, Zihang and Yang, Yiming and Carbonell, Jaime and Salakhutdinov, Russ R and Le, Quoc V}, 228 | booktitle={Proceedings of NeurIPS}, 229 | pages={5753--5763}, 230 | year={2019} 231 | } 232 | 233 | @inproceedings{vaswani2017attention, 234 | title={Attention is all you need}, 235 | author={Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and Uszkoreit, Jakob and Jones, Llion and Gomez, Aidan N and Kaiser, {\L}ukasz and Polosukhin, Illia}, 236 | booktitle={Proceedings of NeurIPS}, 237 | pages={5998--6008}, 238 | year={2017} 239 | } 240 | 241 | @inproceedings{yang-etal-2019-paws, 242 | title = "{PAWS}-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification", 243 | author = "Yang, Yinfei and 244 | Zhang, Yuan and 245 | Tar, Chris and 246 | Baldridge, Jason", 247 | booktitle = "Proceedings of EMNLP", 248 | year = "2019", 249 | url = "https://www.aclweb.org/anthology/D19-1382", 250 | doi = "10.18653/v1/D19-1382", 251 | pages = "3687--3692", 252 | } 253 | 254 | @inproceedings{huang-etal-2019-unicoder, 255 | title = "{U}nicoder: A Universal Language Encoder by Pre-training with Multiple Cross-lingual Tasks", 256 | author = "Huang, Haoyang and 257 | Liang, Yaobo and 258 | Duan, Nan and 259 | Gong, Ming and 260 | Shou, Linjun and 261 | Jiang, Daxin and 262 | Zhou, Ming", 263 | booktitle = "Proceedings of EMNLP", 264 | year = "2019", 265 | url = "https://www.aclweb.org/anthology/D19-1252", 266 | doi = "10.18653/v1/D19-1252", 267 | pages = "2485--2494", 268 | } 269 | 270 | @inproceedings{smith2018offline, 271 | title={Offline bilingual word vectors, orthogonal transformations and the inverted softmax}, 272 | author={Smith, Samuel L and Turban, David HP and Hamblin, Steven and Hammerla, Nils Y}, 273 | booktitle={Proceedings of ICLR}, 274 | year={2018} 275 | } 276 | 277 | @article{mikolov2013exploiting, 278 | title={Exploiting similarities among languages for machine translation}, 279 | author={Mikolov, Tomas and Le, Quoc V and Sutskever, Ilya}, 280 | journal={arXiv preprint arXiv:1309.4168}, 281 | year={2013} 282 | } 283 | 284 | @inproceedings{duh-etal-2011-machine, 285 | title = "Is Machine Translation Ripe for Cross-Lingual Sentiment Classification?", 286 | author = "Duh, Kevin and 287 | Fujino, Akinori and 288 | Nagata, Masaaki", 289 | booktitle = "Proceedings of ACL", 290 | year = "2011", 291 | url = "https://www.aclweb.org/anthology/P11-2075", 292 | pages = "429--433", 293 | } 294 | 295 | @inproceedings{faruqui-dyer-2014-improving, 296 | title = "Improving Vector Space Word Representations Using Multilingual Correlation", 297 | author = "Faruqui, Manaal and 298 | Dyer, Chris", 299 | booktitle = "Proceedings of EACL", 300 | year = "2014", 301 | url = "https://www.aclweb.org/anthology/E14-1049", 302 | doi = "10.3115/v1/E14-1049", 303 | pages = "462--471", 304 | } 305 | 306 | @inproceedings{cao2020multilingual, 307 | title={Multilingual Alignment of Contextual Word Representations}, 308 | author={Steven Cao and Nikita Kitaev and Dan Klein}, 309 | booktitle={Proceedings of ICLR}, 310 | year={2020}, 311 | url={https://openreview.net/forum?id=r1xCMyBtPS} 312 | } 313 | 314 | @inproceedings{banea-etal-2008-multilingual, 315 | title = "Multilingual Subjectivity Analysis Using Machine Translation", 316 | author = "Banea, Carmen and 317 | Mihalcea, Rada and 318 | Wiebe, Janyce and 319 | Hassan, Samer", 320 | booktitle = "Proceedings of EMNLP", 321 | year = "2008", 322 | url = "https://www.aclweb.org/anthology/D08-1014", 323 | pages = "127--135", 324 | } 325 | 326 | @inproceedings{pires-etal-2019-multilingual, 327 | title = "How Multilingual is Multilingual {BERT}?", 328 | author = "Pires, Telmo and 329 | Schlinger, Eva and 330 | Garrette, Dan", 331 | booktitle = "Proceedings of ACL", 332 | year = "2019", 333 | url = "https://www.aclweb.org/anthology/P19-1493", 334 | doi = "10.18653/v1/P19-1493", 335 | pages = "4996--5001" 336 | } 337 | 338 | @inproceedings{wu-dredze-2019-beto, 339 | title = "Beto, Bentz, Becas: The Surprising Cross-Lingual Effectiveness of {BERT}", 340 | author = "Wu, Shijie and 341 | Dredze, Mark", 342 | booktitle = "Proceedings of EMNLP", 343 | year = "2019", 344 | url = "https://www.aclweb.org/anthology/D19-1077", 345 | doi = "10.18653/v1/D19-1077", 346 | pages = "833--844", 347 | } 348 | 349 | @inproceedings{keung-etal-2019-adversarial, 350 | title = "Adversarial Learning with Contextual Embeddings for Zero-resource Cross-lingual Classification and {NER}", 351 | author = "Keung, Phillip and 352 | Lu, Yichao and 353 | Bhardwaj, Vikas", 354 | booktitle = "Proceedings of EMNLP", 355 | year = "2019", 356 | url = "https://www.aclweb.org/anthology/D19-1138", 357 | doi = "10.18653/v1/D19-1138", 358 | pages = "1355--1360", 359 | } 360 | 361 | @inproceedings{artetxe-etal-2020-cross, 362 | title = "On the Cross-lingual Transferability of Monolingual Representations", 363 | author = "Artetxe, Mikel and 364 | Ruder, Sebastian and 365 | Yogatama, Dani", 366 | booktitle = "Proceedings of ACL", 367 | year = "2020", 368 | url = "https://www.aclweb.org/anthology/2020.acl-main.421", 369 | doi = "10.18653/v1/2020.acl-main.421", 370 | pages = "4623--4637", 371 | } 372 | 373 | @inproceedings{liu-etal-2019-xqa, 374 | title = "{XQA}: A Cross-lingual Open-domain Question Answering Dataset", 375 | author = "Liu, Jiahua and 376 | Lin, Yankai and 377 | Liu, Zhiyuan and 378 | Sun, Maosong", 379 | booktitle = "Proceedings of ACL", 380 | year = "2019", 381 | url = "https://www.aclweb.org/anthology/P19-1227", 382 | doi = "10.18653/v1/P19-1227", 383 | pages = "2358--2368", 384 | } 385 | 386 | @inproceedings{schwenk-li-2018-corpus, 387 | title = "A Corpus for Multilingual Document Classification in Eight Languages", 388 | author = "Schwenk, Holger and 389 | Li, Xian", 390 | booktitle = "Proceedings of LREC", 391 | year = "2018", 392 | url = "https://www.aclweb.org/anthology/L18-1560", 393 | } 394 | 395 | @inproceedings{prettenhofer-stein-2010-cross, 396 | title = "Cross-Language Text Classification Using Structural Correspondence Learning", 397 | author = "Prettenhofer, Peter and 398 | Stein, Benno", 399 | booktitle = "Proceedings of ACL", 400 | year = "2010", 401 | url = "https://www.aclweb.org/anthology/P10-1114", 402 | pages = "1118--1127", 403 | } 404 | 405 | @inproceedings{clark2020electra, 406 | title={Electra: Pre-training text encoders as discriminators rather than generators}, 407 | author={Clark, Kevin and Luong, Minh-Thang and Le, Quoc V and Manning, Christopher D}, 408 | booktitle={Proceedings of ICLR}, 409 | url={https://openreview.net/forum?id=r1xMH1BtvB}, 410 | year={2020} 411 | } -------------------------------------------------------------------------------- /acl_natbib.bst: -------------------------------------------------------------------------------- 1 | %%% acl_natbib.bst 2 | %%% Modification of BibTeX style file acl_natbib_nourl.bst 3 | %%% ... by urlbst, version 0.7 (marked with "% urlbst") 4 | %%% See 5 | %%% Added webpage entry type, and url and lastchecked fields. 6 | %%% Added eprint support. 7 | %%% Added DOI support. 8 | %%% Added PUBMED support. 9 | %%% Added hyperref support. 10 | %%% Original headers follow... 11 | 12 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 13 | % 14 | % BibTeX style file acl_natbib_nourl.bst 15 | % 16 | % intended as input to urlbst script 17 | % $ ./urlbst --hyperref --inlinelinks acl_natbib_nourl.bst > acl_natbib.bst 18 | % 19 | % adapted from compling.bst 20 | % in order to mimic the style files for ACL conferences prior to 2017 21 | % by making the following three changes: 22 | % - for @incollection, page numbers now follow volume title. 23 | % - for @inproceedings, address now follows conference name. 24 | % (address is intended as location of conference, 25 | % not address of publisher.) 26 | % - for papers with three authors, use et al. in citation 27 | % Dan Gildea 2017/06/08 28 | % - fixed a bug with format.chapter - error given if chapter is empty 29 | % with inbook. 30 | % Shay Cohen 2018/02/16 31 | 32 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 | % 34 | % BibTeX style file compling.bst 35 | % 36 | % Intended for the journal Computational Linguistics (ACL/MIT Press) 37 | % Created by Ron Artstein on 2005/08/22 38 | % For use with for author-year citations. 39 | % 40 | % I created this file in order to allow submissions to the journal 41 | % Computational Linguistics using the package for author-year 42 | % citations, which offers a lot more flexibility than , CL's 43 | % official citation package. This file adheres strictly to the official 44 | % style guide available from the MIT Press: 45 | % 46 | % http://mitpress.mit.edu/journals/coli/compling_style.pdf 47 | % 48 | % This includes all the various quirks of the style guide, for example: 49 | % - a chapter from a monograph (@inbook) has no page numbers. 50 | % - an article from an edited volume (@incollection) has page numbers 51 | % after the publisher and address. 52 | % - an article from a proceedings volume (@inproceedings) has page 53 | % numbers before the publisher and address. 54 | % 55 | % Where the style guide was inconsistent or not specific enough I 56 | % looked at actual published articles and exercised my own judgment. 57 | % I noticed two inconsistencies in the style guide: 58 | % 59 | % - The style guide gives one example of an article from an edited 60 | % volume with the editor's name spelled out in full, and another 61 | % with the editors' names abbreviated. I chose to accept the first 62 | % one as correct, since the style guide generally shuns abbreviations, 63 | % and editors' names are also spelled out in some recently published 64 | % articles. 65 | % 66 | % - The style guide gives one example of a reference where the word 67 | % "and" between two authors is preceded by a comma. This is most 68 | % likely a typo, since in all other cases with just two authors or 69 | % editors there is no comma before the word "and". 70 | % 71 | % One case where the style guide is not being specific is the placement 72 | % of the edition number, for which no example is given. I chose to put 73 | % it immediately after the title, which I (subjectively) find natural, 74 | % and is also the place of the edition in a few recently published 75 | % articles. 76 | % 77 | % This file correctly reproduces all of the examples in the official 78 | % style guide, except for the two inconsistencies noted above. I even 79 | % managed to get it to correctly format the proceedings example which 80 | % has an organization, a publisher, and two addresses (the conference 81 | % location and the publisher's address), though I cheated a bit by 82 | % putting the conference location and month as part of the title field; 83 | % I feel that in this case the conference location and month can be 84 | % considered as part of the title, and that adding a location field 85 | % is not justified. Note also that a location field is not standard, 86 | % so entries made with this field would not port nicely to other styles. 87 | % However, if authors feel that there's a need for a location field 88 | % then tell me and I'll see what I can do. 89 | % 90 | % The file also produces to my satisfaction all the bibliographical 91 | % entries in my recent (joint) submission to CL (this was the original 92 | % motivation for creating the file). I also tested it by running it 93 | % on a larger set of entries and eyeballing the results. There may of 94 | % course still be errors, especially with combinations of fields that 95 | % are not that common, or with cross-references (which I seldom use). 96 | % If you find such errors please write to me. 97 | % 98 | % I hope people find this file useful. Please email me with comments 99 | % and suggestions. 100 | % 101 | % Ron Artstein 102 | % artstein [at] essex.ac.uk 103 | % August 22, 2005. 104 | % 105 | % Some technical notes. 106 | % 107 | % This file is based on a file generated with the package 108 | % by Patrick W. Daly (see selected options below), which was then 109 | % manually customized to conform with certain CL requirements which 110 | % cannot be met by . Departures from the generated file 111 | % include: 112 | % 113 | % Function inbook: moved publisher and address to the end; moved 114 | % edition after title; replaced function format.chapter.pages by 115 | % new function format.chapter to output chapter without pages. 116 | % 117 | % Function inproceedings: moved publisher and address to the end; 118 | % replaced function format.in.ed.booktitle by new function 119 | % format.in.booktitle to output the proceedings title without 120 | % the editor. 121 | % 122 | % Functions book, incollection, manual: moved edition after title. 123 | % 124 | % Function mastersthesis: formatted title as for articles (unlike 125 | % phdthesis which is formatted as book) and added month. 126 | % 127 | % Function proceedings: added new.sentence between organization and 128 | % publisher when both are present. 129 | % 130 | % Function format.lab.names: modified so that it gives all the 131 | % authors' surnames for in-text citations for one, two and three 132 | % authors and only uses "et. al" for works with four authors or more 133 | % (thanks to Ken Shan for convincing me to go through the trouble of 134 | % modifying this function rather than using unreliable hacks). 135 | % 136 | % Changes: 137 | % 138 | % 2006-10-27: Changed function reverse.pass so that the extra label is 139 | % enclosed in parentheses when the year field ends in an uppercase or 140 | % lowercase letter (change modeled after Uli Sauerland's modification 141 | % of nals.bst). RA. 142 | % 143 | % 144 | % The preamble of the generated file begins below: 145 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 146 | %% 147 | %% This is file `compling.bst', 148 | %% generated with the docstrip utility. 149 | %% 150 | %% The original source files were: 151 | %% 152 | %% merlin.mbs (with options: `ay,nat,vonx,nm-revv1,jnrlst,keyxyr,blkyear,dt-beg,yr-per,note-yr,num-xser,pre-pub,xedn,nfss') 153 | %% ---------------------------------------- 154 | %% *** Intended for the journal Computational Linguistics *** 155 | %% 156 | %% Copyright 1994-2002 Patrick W Daly 157 | % =============================================================== 158 | % IMPORTANT NOTICE: 159 | % This bibliographic style (bst) file has been generated from one or 160 | % more master bibliographic style (mbs) files, listed above. 161 | % 162 | % This generated file can be redistributed and/or modified under the terms 163 | % of the LaTeX Project Public License Distributed from CTAN 164 | % archives in directory macros/latex/base/lppl.txt; either 165 | % version 1 of the License, or any later version. 166 | % =============================================================== 167 | % Name and version information of the main mbs file: 168 | % \ProvidesFile{merlin.mbs}[2002/10/21 4.05 (PWD, AO, DPC)] 169 | % For use with BibTeX version 0.99a or later 170 | %------------------------------------------------------------------- 171 | % This bibliography style file is intended for texts in ENGLISH 172 | % This is an author-year citation style bibliography. As such, it is 173 | % non-standard LaTeX, and requires a special package file to function properly. 174 | % Such a package is natbib.sty by Patrick W. Daly 175 | % The form of the \bibitem entries is 176 | % \bibitem[Jones et al.(1990)]{key}... 177 | % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... 178 | % The essential feature is that the label (the part in brackets) consists 179 | % of the author names, as they should appear in the citation, with the year 180 | % in parentheses following. There must be no space before the opening 181 | % parenthesis! 182 | % With natbib v5.3, a full list of authors may also follow the year. 183 | % In natbib.sty, it is possible to define the type of enclosures that is 184 | % really wanted (brackets or parentheses), but in either case, there must 185 | % be parentheses in the label. 186 | % The \cite command functions as follows: 187 | % \citet{key} ==>> Jones et al. (1990) 188 | % \citet*{key} ==>> Jones, Baker, and Smith (1990) 189 | % \citep{key} ==>> (Jones et al., 1990) 190 | % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) 191 | % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) 192 | % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990) 193 | % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32) 194 | % \citeauthor{key} ==>> Jones et al. 195 | % \citeauthor*{key} ==>> Jones, Baker, and Smith 196 | % \citeyear{key} ==>> 1990 197 | %--------------------------------------------------------------------- 198 | 199 | ENTRY 200 | { address 201 | author 202 | booktitle 203 | chapter 204 | edition 205 | editor 206 | howpublished 207 | institution 208 | journal 209 | key 210 | month 211 | note 212 | number 213 | organization 214 | pages 215 | publisher 216 | school 217 | series 218 | title 219 | type 220 | volume 221 | year 222 | eprint % urlbst 223 | doi % urlbst 224 | pubmed % urlbst 225 | url % urlbst 226 | lastchecked % urlbst 227 | } 228 | {} 229 | { label extra.label sort.label short.list } 230 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } 231 | % urlbst... 232 | % urlbst constants and state variables 233 | STRINGS { urlintro 234 | eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl 235 | citedstring onlinestring linktextstring 236 | openinlinelink closeinlinelink } 237 | INTEGERS { hrefform inlinelinks makeinlinelink 238 | addeprints adddoiresolver addpubmedresolver } 239 | FUNCTION {init.urlbst.variables} 240 | { 241 | % The following constants may be adjusted by hand, if desired 242 | 243 | % The first set allow you to enable or disable certain functionality. 244 | #1 'addeprints := % 0=no eprints; 1=include eprints 245 | #1 'adddoiresolver := % 0=no DOI resolver; 1=include it 246 | #1 'addpubmedresolver := % 0=no PUBMED resolver; 1=include it 247 | #2 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs 248 | #1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles 249 | 250 | % String constants, which you _might_ want to tweak. 251 | "URL: " 'urlintro := % prefix before URL; typically "Available from:" or "URL": 252 | "online" 'onlinestring := % indication that resource is online; typically "online" 253 | "cited " 'citedstring := % indicator of citation date; typically "cited " 254 | "[link]" 'linktextstring := % dummy link text; typically "[link]" 255 | "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref 256 | "arXiv:" 'eprintprefix := % text prefix printed before eprint ref; typically "arXiv:" 257 | "https://doi.org/" 'doiurl := % prefix to make URL from DOI 258 | "doi:" 'doiprefix := % text prefix printed before DOI ref; typically "doi:" 259 | "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED 260 | "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref; typically "PMID:" 261 | 262 | % The following are internal state variables, not configuration constants, 263 | % so they shouldn't be fiddled with. 264 | #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink 265 | "" 'openinlinelink := % ditto 266 | "" 'closeinlinelink := % ditto 267 | } 268 | INTEGERS { 269 | bracket.state 270 | outside.brackets 271 | open.brackets 272 | within.brackets 273 | close.brackets 274 | } 275 | % ...urlbst to here 276 | FUNCTION {init.state.consts} 277 | { #0 'outside.brackets := % urlbst... 278 | #1 'open.brackets := 279 | #2 'within.brackets := 280 | #3 'close.brackets := % ...urlbst to here 281 | 282 | #0 'before.all := 283 | #1 'mid.sentence := 284 | #2 'after.sentence := 285 | #3 'after.block := 286 | } 287 | STRINGS { s t} 288 | % urlbst 289 | FUNCTION {output.nonnull.original} 290 | { 's := 291 | output.state mid.sentence = 292 | { ", " * write$ } 293 | { output.state after.block = 294 | { add.period$ write$ 295 | newline$ 296 | "\newblock " write$ 297 | } 298 | { output.state before.all = 299 | 'write$ 300 | { add.period$ " " * write$ } 301 | if$ 302 | } 303 | if$ 304 | mid.sentence 'output.state := 305 | } 306 | if$ 307 | s 308 | } 309 | 310 | % urlbst... 311 | % The following three functions are for handling inlinelink. They wrap 312 | % a block of text which is potentially output with write$ by multiple 313 | % other functions, so we don't know the content a priori. 314 | % They communicate between each other using the variables makeinlinelink 315 | % (which is true if a link should be made), and closeinlinelink (which holds 316 | % the string which should close any current link. They can be called 317 | % at any time, but start.inlinelink will be a no-op unless something has 318 | % previously set makeinlinelink true, and the two ...end.inlinelink functions 319 | % will only do their stuff if start.inlinelink has previously set 320 | % closeinlinelink to be non-empty. 321 | % (thanks to 'ijvm' for suggested code here) 322 | FUNCTION {uand} 323 | { 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file) 324 | FUNCTION {possibly.setup.inlinelink} 325 | { makeinlinelink hrefform #0 > uand 326 | { doi empty$ adddoiresolver uand 327 | { pubmed empty$ addpubmedresolver uand 328 | { eprint empty$ addeprints uand 329 | { url empty$ 330 | { "" } 331 | { url } 332 | if$ } 333 | { eprinturl eprint * } 334 | if$ } 335 | { pubmedurl pubmed * } 336 | if$ } 337 | { doiurl doi * } 338 | if$ 339 | % an appropriately-formatted URL is now on the stack 340 | hrefform #1 = % hypertex 341 | { "\special {html: }{" * 'openinlinelink := 342 | "\special {html:}" 'closeinlinelink := } 343 | { "\href {" swap$ * "} {" * 'openinlinelink := % hrefform=#2 -- hyperref 344 | % the space between "} {" matters: a URL of just the right length can cause "\% newline em" 345 | "}" 'closeinlinelink := } 346 | if$ 347 | #0 'makeinlinelink := 348 | } 349 | 'skip$ 350 | if$ % makeinlinelink 351 | } 352 | FUNCTION {add.inlinelink} 353 | { openinlinelink empty$ 354 | 'skip$ 355 | { openinlinelink swap$ * closeinlinelink * 356 | "" 'openinlinelink := 357 | } 358 | if$ 359 | } 360 | FUNCTION {output.nonnull} 361 | { % Save the thing we've been asked to output 362 | 's := 363 | % If the bracket-state is close.brackets, then add a close-bracket to 364 | % what is currently at the top of the stack, and set bracket.state 365 | % to outside.brackets 366 | bracket.state close.brackets = 367 | { "]" * 368 | outside.brackets 'bracket.state := 369 | } 370 | 'skip$ 371 | if$ 372 | bracket.state outside.brackets = 373 | { % We're outside all brackets -- this is the normal situation. 374 | % Write out what's currently at the top of the stack, using the 375 | % original output.nonnull function. 376 | s 377 | add.inlinelink 378 | output.nonnull.original % invoke the original output.nonnull 379 | } 380 | { % Still in brackets. Add open-bracket or (continuation) comma, add the 381 | % new text (in s) to the top of the stack, and move to the close-brackets 382 | % state, ready for next time (unless inbrackets resets it). If we come 383 | % into this branch, then output.state is carefully undisturbed. 384 | bracket.state open.brackets = 385 | { " [" * } 386 | { ", " * } % bracket.state will be within.brackets 387 | if$ 388 | s * 389 | close.brackets 'bracket.state := 390 | } 391 | if$ 392 | } 393 | 394 | % Call this function just before adding something which should be presented in 395 | % brackets. bracket.state is handled specially within output.nonnull. 396 | FUNCTION {inbrackets} 397 | { bracket.state close.brackets = 398 | { within.brackets 'bracket.state := } % reset the state: not open nor closed 399 | { open.brackets 'bracket.state := } 400 | if$ 401 | } 402 | 403 | FUNCTION {format.lastchecked} 404 | { lastchecked empty$ 405 | { "" } 406 | { inbrackets citedstring lastchecked * } 407 | if$ 408 | } 409 | % ...urlbst to here 410 | FUNCTION {output} 411 | { duplicate$ empty$ 412 | 'pop$ 413 | 'output.nonnull 414 | if$ 415 | } 416 | FUNCTION {output.check} 417 | { 't := 418 | duplicate$ empty$ 419 | { pop$ "empty " t * " in " * cite$ * warning$ } 420 | 'output.nonnull 421 | if$ 422 | } 423 | FUNCTION {fin.entry.original} % urlbst (renamed from fin.entry, so it can be wrapped below) 424 | { add.period$ 425 | write$ 426 | newline$ 427 | } 428 | 429 | FUNCTION {new.block} 430 | { output.state before.all = 431 | 'skip$ 432 | { after.block 'output.state := } 433 | if$ 434 | } 435 | FUNCTION {new.sentence} 436 | { output.state after.block = 437 | 'skip$ 438 | { output.state before.all = 439 | 'skip$ 440 | { after.sentence 'output.state := } 441 | if$ 442 | } 443 | if$ 444 | } 445 | FUNCTION {add.blank} 446 | { " " * before.all 'output.state := 447 | } 448 | 449 | FUNCTION {date.block} 450 | { 451 | new.block 452 | } 453 | 454 | FUNCTION {not} 455 | { { #0 } 456 | { #1 } 457 | if$ 458 | } 459 | FUNCTION {and} 460 | { 'skip$ 461 | { pop$ #0 } 462 | if$ 463 | } 464 | FUNCTION {or} 465 | { { pop$ #1 } 466 | 'skip$ 467 | if$ 468 | } 469 | FUNCTION {new.block.checkb} 470 | { empty$ 471 | swap$ empty$ 472 | and 473 | 'skip$ 474 | 'new.block 475 | if$ 476 | } 477 | FUNCTION {field.or.null} 478 | { duplicate$ empty$ 479 | { pop$ "" } 480 | 'skip$ 481 | if$ 482 | } 483 | FUNCTION {emphasize} 484 | { duplicate$ empty$ 485 | { pop$ "" } 486 | { "\emph{" swap$ * "}" * } 487 | if$ 488 | } 489 | FUNCTION {tie.or.space.prefix} 490 | { duplicate$ text.length$ #3 < 491 | { "~" } 492 | { " " } 493 | if$ 494 | swap$ 495 | } 496 | 497 | FUNCTION {capitalize} 498 | { "u" change.case$ "t" change.case$ } 499 | 500 | FUNCTION {space.word} 501 | { " " swap$ * " " * } 502 | % Here are the language-specific definitions for explicit words. 503 | % Each function has a name bbl.xxx where xxx is the English word. 504 | % The language selected here is ENGLISH 505 | FUNCTION {bbl.and} 506 | { "and"} 507 | 508 | FUNCTION {bbl.etal} 509 | { "et~al." } 510 | 511 | FUNCTION {bbl.editors} 512 | { "editors" } 513 | 514 | FUNCTION {bbl.editor} 515 | { "editor" } 516 | 517 | FUNCTION {bbl.edby} 518 | { "edited by" } 519 | 520 | FUNCTION {bbl.edition} 521 | { "edition" } 522 | 523 | FUNCTION {bbl.volume} 524 | { "volume" } 525 | 526 | FUNCTION {bbl.of} 527 | { "of" } 528 | 529 | FUNCTION {bbl.number} 530 | { "number" } 531 | 532 | FUNCTION {bbl.nr} 533 | { "no." } 534 | 535 | FUNCTION {bbl.in} 536 | { "in" } 537 | 538 | FUNCTION {bbl.pages} 539 | { "pages" } 540 | 541 | FUNCTION {bbl.page} 542 | { "page" } 543 | 544 | FUNCTION {bbl.chapter} 545 | { "chapter" } 546 | 547 | FUNCTION {bbl.techrep} 548 | { "Technical Report" } 549 | 550 | FUNCTION {bbl.mthesis} 551 | { "Master's thesis" } 552 | 553 | FUNCTION {bbl.phdthesis} 554 | { "Ph.D. thesis" } 555 | 556 | MACRO {jan} {"January"} 557 | 558 | MACRO {feb} {"February"} 559 | 560 | MACRO {mar} {"March"} 561 | 562 | MACRO {apr} {"April"} 563 | 564 | MACRO {may} {"May"} 565 | 566 | MACRO {jun} {"June"} 567 | 568 | MACRO {jul} {"July"} 569 | 570 | MACRO {aug} {"August"} 571 | 572 | MACRO {sep} {"September"} 573 | 574 | MACRO {oct} {"October"} 575 | 576 | MACRO {nov} {"November"} 577 | 578 | MACRO {dec} {"December"} 579 | 580 | MACRO {acmcs} {"ACM Computing Surveys"} 581 | 582 | MACRO {acta} {"Acta Informatica"} 583 | 584 | MACRO {cacm} {"Communications of the ACM"} 585 | 586 | MACRO {ibmjrd} {"IBM Journal of Research and Development"} 587 | 588 | MACRO {ibmsj} {"IBM Systems Journal"} 589 | 590 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"} 591 | 592 | MACRO {ieeetc} {"IEEE Transactions on Computers"} 593 | 594 | MACRO {ieeetcad} 595 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} 596 | 597 | MACRO {ipl} {"Information Processing Letters"} 598 | 599 | MACRO {jacm} {"Journal of the ACM"} 600 | 601 | MACRO {jcss} {"Journal of Computer and System Sciences"} 602 | 603 | MACRO {scp} {"Science of Computer Programming"} 604 | 605 | MACRO {sicomp} {"SIAM Journal on Computing"} 606 | 607 | MACRO {tocs} {"ACM Transactions on Computer Systems"} 608 | 609 | MACRO {tods} {"ACM Transactions on Database Systems"} 610 | 611 | MACRO {tog} {"ACM Transactions on Graphics"} 612 | 613 | MACRO {toms} {"ACM Transactions on Mathematical Software"} 614 | 615 | MACRO {toois} {"ACM Transactions on Office Information Systems"} 616 | 617 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} 618 | 619 | MACRO {tcs} {"Theoretical Computer Science"} 620 | FUNCTION {bibinfo.check} 621 | { swap$ 622 | duplicate$ missing$ 623 | { 624 | pop$ pop$ 625 | "" 626 | } 627 | { duplicate$ empty$ 628 | { 629 | swap$ pop$ 630 | } 631 | { swap$ 632 | pop$ 633 | } 634 | if$ 635 | } 636 | if$ 637 | } 638 | FUNCTION {bibinfo.warn} 639 | { swap$ 640 | duplicate$ missing$ 641 | { 642 | swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ 643 | "" 644 | } 645 | { duplicate$ empty$ 646 | { 647 | swap$ "empty " swap$ * " in " * cite$ * warning$ 648 | } 649 | { swap$ 650 | pop$ 651 | } 652 | if$ 653 | } 654 | if$ 655 | } 656 | STRINGS { bibinfo} 657 | INTEGERS { nameptr namesleft numnames } 658 | 659 | FUNCTION {format.names} 660 | { 'bibinfo := 661 | duplicate$ empty$ 'skip$ { 662 | 's := 663 | "" 't := 664 | #1 'nameptr := 665 | s num.names$ 'numnames := 666 | numnames 'namesleft := 667 | { namesleft #0 > } 668 | { s nameptr 669 | duplicate$ #1 > 670 | { "{ff~}{vv~}{ll}{, jj}" } 671 | { "{ff~}{vv~}{ll}{, jj}" } % first name first for first author 672 | % { "{vv~}{ll}{, ff}{, jj}" } % last name first for first author 673 | if$ 674 | format.name$ 675 | bibinfo bibinfo.check 676 | 't := 677 | nameptr #1 > 678 | { 679 | namesleft #1 > 680 | { ", " * t * } 681 | { 682 | numnames #2 > 683 | { "," * } 684 | 'skip$ 685 | if$ 686 | s nameptr "{ll}" format.name$ duplicate$ "others" = 687 | { 't := } 688 | { pop$ } 689 | if$ 690 | t "others" = 691 | { 692 | " " * bbl.etal * 693 | } 694 | { 695 | bbl.and 696 | space.word * t * 697 | } 698 | if$ 699 | } 700 | if$ 701 | } 702 | 't 703 | if$ 704 | nameptr #1 + 'nameptr := 705 | namesleft #1 - 'namesleft := 706 | } 707 | while$ 708 | } if$ 709 | } 710 | FUNCTION {format.names.ed} 711 | { 712 | 'bibinfo := 713 | duplicate$ empty$ 'skip$ { 714 | 's := 715 | "" 't := 716 | #1 'nameptr := 717 | s num.names$ 'numnames := 718 | numnames 'namesleft := 719 | { namesleft #0 > } 720 | { s nameptr 721 | "{ff~}{vv~}{ll}{, jj}" 722 | format.name$ 723 | bibinfo bibinfo.check 724 | 't := 725 | nameptr #1 > 726 | { 727 | namesleft #1 > 728 | { ", " * t * } 729 | { 730 | numnames #2 > 731 | { "," * } 732 | 'skip$ 733 | if$ 734 | s nameptr "{ll}" format.name$ duplicate$ "others" = 735 | { 't := } 736 | { pop$ } 737 | if$ 738 | t "others" = 739 | { 740 | 741 | " " * bbl.etal * 742 | } 743 | { 744 | bbl.and 745 | space.word * t * 746 | } 747 | if$ 748 | } 749 | if$ 750 | } 751 | 't 752 | if$ 753 | nameptr #1 + 'nameptr := 754 | namesleft #1 - 'namesleft := 755 | } 756 | while$ 757 | } if$ 758 | } 759 | FUNCTION {format.key} 760 | { empty$ 761 | { key field.or.null } 762 | { "" } 763 | if$ 764 | } 765 | 766 | FUNCTION {format.authors} 767 | { author "author" format.names 768 | } 769 | FUNCTION {get.bbl.editor} 770 | { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } 771 | 772 | FUNCTION {format.editors} 773 | { editor "editor" format.names duplicate$ empty$ 'skip$ 774 | { 775 | "," * 776 | " " * 777 | get.bbl.editor 778 | * 779 | } 780 | if$ 781 | } 782 | FUNCTION {format.note} 783 | { 784 | note empty$ 785 | { "" } 786 | { note #1 #1 substring$ 787 | duplicate$ "{" = 788 | 'skip$ 789 | { output.state mid.sentence = 790 | { "l" } 791 | { "u" } 792 | if$ 793 | change.case$ 794 | } 795 | if$ 796 | note #2 global.max$ substring$ * "note" bibinfo.check 797 | } 798 | if$ 799 | } 800 | 801 | FUNCTION {format.title} 802 | { title 803 | duplicate$ empty$ 'skip$ 804 | { "t" change.case$ } 805 | if$ 806 | "title" bibinfo.check 807 | } 808 | FUNCTION {format.full.names} 809 | {'s := 810 | "" 't := 811 | #1 'nameptr := 812 | s num.names$ 'numnames := 813 | numnames 'namesleft := 814 | { namesleft #0 > } 815 | { s nameptr 816 | "{vv~}{ll}" format.name$ 817 | 't := 818 | nameptr #1 > 819 | { 820 | namesleft #1 > 821 | { ", " * t * } 822 | { 823 | s nameptr "{ll}" format.name$ duplicate$ "others" = 824 | { 't := } 825 | { pop$ } 826 | if$ 827 | t "others" = 828 | { 829 | " " * bbl.etal * 830 | } 831 | { 832 | numnames #2 > 833 | { "," * } 834 | 'skip$ 835 | if$ 836 | bbl.and 837 | space.word * t * 838 | } 839 | if$ 840 | } 841 | if$ 842 | } 843 | 't 844 | if$ 845 | nameptr #1 + 'nameptr := 846 | namesleft #1 - 'namesleft := 847 | } 848 | while$ 849 | } 850 | 851 | FUNCTION {author.editor.key.full} 852 | { author empty$ 853 | { editor empty$ 854 | { key empty$ 855 | { cite$ #1 #3 substring$ } 856 | 'key 857 | if$ 858 | } 859 | { editor format.full.names } 860 | if$ 861 | } 862 | { author format.full.names } 863 | if$ 864 | } 865 | 866 | FUNCTION {author.key.full} 867 | { author empty$ 868 | { key empty$ 869 | { cite$ #1 #3 substring$ } 870 | 'key 871 | if$ 872 | } 873 | { author format.full.names } 874 | if$ 875 | } 876 | 877 | FUNCTION {editor.key.full} 878 | { editor empty$ 879 | { key empty$ 880 | { cite$ #1 #3 substring$ } 881 | 'key 882 | if$ 883 | } 884 | { editor format.full.names } 885 | if$ 886 | } 887 | 888 | FUNCTION {make.full.names} 889 | { type$ "book" = 890 | type$ "inbook" = 891 | or 892 | 'author.editor.key.full 893 | { type$ "proceedings" = 894 | 'editor.key.full 895 | 'author.key.full 896 | if$ 897 | } 898 | if$ 899 | } 900 | 901 | FUNCTION {output.bibitem.original} % urlbst (renamed from output.bibitem, so it can be wrapped below) 902 | { newline$ 903 | "\bibitem[{" write$ 904 | label write$ 905 | ")" make.full.names duplicate$ short.list = 906 | { pop$ } 907 | { * } 908 | if$ 909 | "}]{" * write$ 910 | cite$ write$ 911 | "}" write$ 912 | newline$ 913 | "" 914 | before.all 'output.state := 915 | } 916 | 917 | FUNCTION {n.dashify} 918 | { 919 | 't := 920 | "" 921 | { t empty$ not } 922 | { t #1 #1 substring$ "-" = 923 | { t #1 #2 substring$ "--" = not 924 | { "--" * 925 | t #2 global.max$ substring$ 't := 926 | } 927 | { { t #1 #1 substring$ "-" = } 928 | { "-" * 929 | t #2 global.max$ substring$ 't := 930 | } 931 | while$ 932 | } 933 | if$ 934 | } 935 | { t #1 #1 substring$ * 936 | t #2 global.max$ substring$ 't := 937 | } 938 | if$ 939 | } 940 | while$ 941 | } 942 | 943 | FUNCTION {word.in} 944 | { bbl.in capitalize 945 | " " * } 946 | 947 | FUNCTION {format.date} 948 | { year "year" bibinfo.check duplicate$ empty$ 949 | { 950 | } 951 | 'skip$ 952 | if$ 953 | extra.label * 954 | before.all 'output.state := 955 | after.sentence 'output.state := 956 | } 957 | FUNCTION {format.btitle} 958 | { title "title" bibinfo.check 959 | duplicate$ empty$ 'skip$ 960 | { 961 | emphasize 962 | } 963 | if$ 964 | } 965 | FUNCTION {either.or.check} 966 | { empty$ 967 | 'pop$ 968 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 969 | if$ 970 | } 971 | FUNCTION {format.bvolume} 972 | { volume empty$ 973 | { "" } 974 | { bbl.volume volume tie.or.space.prefix 975 | "volume" bibinfo.check * * 976 | series "series" bibinfo.check 977 | duplicate$ empty$ 'pop$ 978 | { swap$ bbl.of space.word * swap$ 979 | emphasize * } 980 | if$ 981 | "volume and number" number either.or.check 982 | } 983 | if$ 984 | } 985 | FUNCTION {format.number.series} 986 | { volume empty$ 987 | { number empty$ 988 | { series field.or.null } 989 | { series empty$ 990 | { number "number" bibinfo.check } 991 | { output.state mid.sentence = 992 | { bbl.number } 993 | { bbl.number capitalize } 994 | if$ 995 | number tie.or.space.prefix "number" bibinfo.check * * 996 | bbl.in space.word * 997 | series "series" bibinfo.check * 998 | } 999 | if$ 1000 | } 1001 | if$ 1002 | } 1003 | { "" } 1004 | if$ 1005 | } 1006 | 1007 | FUNCTION {format.edition} 1008 | { edition duplicate$ empty$ 'skip$ 1009 | { 1010 | output.state mid.sentence = 1011 | { "l" } 1012 | { "t" } 1013 | if$ change.case$ 1014 | "edition" bibinfo.check 1015 | " " * bbl.edition * 1016 | } 1017 | if$ 1018 | } 1019 | INTEGERS { multiresult } 1020 | FUNCTION {multi.page.check} 1021 | { 't := 1022 | #0 'multiresult := 1023 | { multiresult not 1024 | t empty$ not 1025 | and 1026 | } 1027 | { t #1 #1 substring$ 1028 | duplicate$ "-" = 1029 | swap$ duplicate$ "," = 1030 | swap$ "+" = 1031 | or or 1032 | { #1 'multiresult := } 1033 | { t #2 global.max$ substring$ 't := } 1034 | if$ 1035 | } 1036 | while$ 1037 | multiresult 1038 | } 1039 | FUNCTION {format.pages} 1040 | { pages duplicate$ empty$ 'skip$ 1041 | { duplicate$ multi.page.check 1042 | { 1043 | bbl.pages swap$ 1044 | n.dashify 1045 | } 1046 | { 1047 | bbl.page swap$ 1048 | } 1049 | if$ 1050 | tie.or.space.prefix 1051 | "pages" bibinfo.check 1052 | * * 1053 | } 1054 | if$ 1055 | } 1056 | FUNCTION {format.journal.pages} 1057 | { pages duplicate$ empty$ 'pop$ 1058 | { swap$ duplicate$ empty$ 1059 | { pop$ pop$ format.pages } 1060 | { 1061 | ":" * 1062 | swap$ 1063 | n.dashify 1064 | "pages" bibinfo.check 1065 | * 1066 | } 1067 | if$ 1068 | } 1069 | if$ 1070 | } 1071 | FUNCTION {format.vol.num.pages} 1072 | { volume field.or.null 1073 | duplicate$ empty$ 'skip$ 1074 | { 1075 | "volume" bibinfo.check 1076 | } 1077 | if$ 1078 | number "number" bibinfo.check duplicate$ empty$ 'skip$ 1079 | { 1080 | swap$ duplicate$ empty$ 1081 | { "there's a number but no volume in " cite$ * warning$ } 1082 | 'skip$ 1083 | if$ 1084 | swap$ 1085 | "(" swap$ * ")" * 1086 | } 1087 | if$ * 1088 | format.journal.pages 1089 | } 1090 | 1091 | FUNCTION {format.chapter} 1092 | { chapter empty$ 1093 | 'format.pages 1094 | { type empty$ 1095 | { bbl.chapter } 1096 | { type "l" change.case$ 1097 | "type" bibinfo.check 1098 | } 1099 | if$ 1100 | chapter tie.or.space.prefix 1101 | "chapter" bibinfo.check 1102 | * * 1103 | } 1104 | if$ 1105 | } 1106 | 1107 | FUNCTION {format.chapter.pages} 1108 | { chapter empty$ 1109 | 'format.pages 1110 | { type empty$ 1111 | { bbl.chapter } 1112 | { type "l" change.case$ 1113 | "type" bibinfo.check 1114 | } 1115 | if$ 1116 | chapter tie.or.space.prefix 1117 | "chapter" bibinfo.check 1118 | * * 1119 | pages empty$ 1120 | 'skip$ 1121 | { ", " * format.pages * } 1122 | if$ 1123 | } 1124 | if$ 1125 | } 1126 | 1127 | FUNCTION {format.booktitle} 1128 | { 1129 | booktitle "booktitle" bibinfo.check 1130 | emphasize 1131 | } 1132 | FUNCTION {format.in.booktitle} 1133 | { format.booktitle duplicate$ empty$ 'skip$ 1134 | { 1135 | word.in swap$ * 1136 | } 1137 | if$ 1138 | } 1139 | FUNCTION {format.in.ed.booktitle} 1140 | { format.booktitle duplicate$ empty$ 'skip$ 1141 | { 1142 | editor "editor" format.names.ed duplicate$ empty$ 'pop$ 1143 | { 1144 | "," * 1145 | " " * 1146 | get.bbl.editor 1147 | ", " * 1148 | * swap$ 1149 | * } 1150 | if$ 1151 | word.in swap$ * 1152 | } 1153 | if$ 1154 | } 1155 | FUNCTION {format.thesis.type} 1156 | { type duplicate$ empty$ 1157 | 'pop$ 1158 | { swap$ pop$ 1159 | "t" change.case$ "type" bibinfo.check 1160 | } 1161 | if$ 1162 | } 1163 | FUNCTION {format.tr.number} 1164 | { number "number" bibinfo.check 1165 | type duplicate$ empty$ 1166 | { pop$ bbl.techrep } 1167 | 'skip$ 1168 | if$ 1169 | "type" bibinfo.check 1170 | swap$ duplicate$ empty$ 1171 | { pop$ "t" change.case$ } 1172 | { tie.or.space.prefix * * } 1173 | if$ 1174 | } 1175 | FUNCTION {format.article.crossref} 1176 | { 1177 | word.in 1178 | " \cite{" * crossref * "}" * 1179 | } 1180 | FUNCTION {format.book.crossref} 1181 | { volume duplicate$ empty$ 1182 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ 1183 | pop$ word.in 1184 | } 1185 | { bbl.volume 1186 | capitalize 1187 | swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * 1188 | } 1189 | if$ 1190 | " \cite{" * crossref * "}" * 1191 | } 1192 | FUNCTION {format.incoll.inproc.crossref} 1193 | { 1194 | word.in 1195 | " \cite{" * crossref * "}" * 1196 | } 1197 | FUNCTION {format.org.or.pub} 1198 | { 't := 1199 | "" 1200 | address empty$ t empty$ and 1201 | 'skip$ 1202 | { 1203 | t empty$ 1204 | { address "address" bibinfo.check * 1205 | } 1206 | { t * 1207 | address empty$ 1208 | 'skip$ 1209 | { ", " * address "address" bibinfo.check * } 1210 | if$ 1211 | } 1212 | if$ 1213 | } 1214 | if$ 1215 | } 1216 | FUNCTION {format.publisher.address} 1217 | { publisher "publisher" bibinfo.warn format.org.or.pub 1218 | } 1219 | 1220 | FUNCTION {format.organization.address} 1221 | { organization "organization" bibinfo.check format.org.or.pub 1222 | } 1223 | 1224 | % urlbst... 1225 | % Functions for making hypertext links. 1226 | % In all cases, the stack has (link-text href-url) 1227 | % 1228 | % make 'null' specials 1229 | FUNCTION {make.href.null} 1230 | { 1231 | pop$ 1232 | } 1233 | % make hypertex specials 1234 | FUNCTION {make.href.hypertex} 1235 | { 1236 | "\special {html: }" * swap$ * 1238 | "\special {html:}" * 1239 | } 1240 | % make hyperref specials 1241 | FUNCTION {make.href.hyperref} 1242 | { 1243 | "\href {" swap$ * "} {\path{" * swap$ * "}}" * 1244 | } 1245 | FUNCTION {make.href} 1246 | { hrefform #2 = 1247 | 'make.href.hyperref % hrefform = 2 1248 | { hrefform #1 = 1249 | 'make.href.hypertex % hrefform = 1 1250 | 'make.href.null % hrefform = 0 (or anything else) 1251 | if$ 1252 | } 1253 | if$ 1254 | } 1255 | 1256 | % If inlinelinks is true, then format.url should be a no-op, since it's 1257 | % (a) redundant, and (b) could end up as a link-within-a-link. 1258 | FUNCTION {format.url} 1259 | { inlinelinks #1 = url empty$ or 1260 | { "" } 1261 | { hrefform #1 = 1262 | { % special case -- add HyperTeX specials 1263 | urlintro "\url{" url * "}" * url make.href.hypertex * } 1264 | { urlintro "\url{" * url * "}" * } 1265 | if$ 1266 | } 1267 | if$ 1268 | } 1269 | 1270 | FUNCTION {format.eprint} 1271 | { eprint empty$ 1272 | { "" } 1273 | { eprintprefix eprint * eprinturl eprint * make.href } 1274 | if$ 1275 | } 1276 | 1277 | FUNCTION {format.doi} 1278 | { doi empty$ 1279 | { "" } 1280 | { doiprefix doi * doiurl doi * make.href } 1281 | if$ 1282 | } 1283 | 1284 | FUNCTION {format.pubmed} 1285 | { pubmed empty$ 1286 | { "" } 1287 | { pubmedprefix pubmed * pubmedurl pubmed * make.href } 1288 | if$ 1289 | } 1290 | 1291 | % Output a URL. We can't use the more normal idiom (something like 1292 | % `format.url output'), because the `inbrackets' within 1293 | % format.lastchecked applies to everything between calls to `output', 1294 | % so that `format.url format.lastchecked * output' ends up with both 1295 | % the URL and the lastchecked in brackets. 1296 | FUNCTION {output.url} 1297 | { url empty$ 1298 | 'skip$ 1299 | { new.block 1300 | format.url output 1301 | format.lastchecked output 1302 | } 1303 | if$ 1304 | } 1305 | 1306 | FUNCTION {output.web.refs} 1307 | { 1308 | new.block 1309 | inlinelinks 1310 | 'skip$ % links were inline -- don't repeat them 1311 | { 1312 | output.url 1313 | addeprints eprint empty$ not and 1314 | { format.eprint output.nonnull } 1315 | 'skip$ 1316 | if$ 1317 | adddoiresolver doi empty$ not and 1318 | { format.doi output.nonnull } 1319 | 'skip$ 1320 | if$ 1321 | addpubmedresolver pubmed empty$ not and 1322 | { format.pubmed output.nonnull } 1323 | 'skip$ 1324 | if$ 1325 | } 1326 | if$ 1327 | } 1328 | 1329 | % Wrapper for output.bibitem.original. 1330 | % If the URL field is not empty, set makeinlinelink to be true, 1331 | % so that an inline link will be started at the next opportunity 1332 | FUNCTION {output.bibitem} 1333 | { outside.brackets 'bracket.state := 1334 | output.bibitem.original 1335 | inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and 1336 | { #1 'makeinlinelink := } 1337 | { #0 'makeinlinelink := } 1338 | if$ 1339 | } 1340 | 1341 | % Wrapper for fin.entry.original 1342 | FUNCTION {fin.entry} 1343 | { output.web.refs % urlbst 1344 | makeinlinelink % ooops, it appears we didn't have a title for inlinelink 1345 | { possibly.setup.inlinelink % add some artificial link text here, as a fallback 1346 | linktextstring output.nonnull } 1347 | 'skip$ 1348 | if$ 1349 | bracket.state close.brackets = % urlbst 1350 | { "]" * } 1351 | 'skip$ 1352 | if$ 1353 | fin.entry.original 1354 | } 1355 | 1356 | % Webpage entry type. 1357 | % Title and url fields required; 1358 | % author, note, year, month, and lastchecked fields optional 1359 | % See references 1360 | % ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm 1361 | % http://www.classroom.net/classroom/CitingNetResources.html 1362 | % http://neal.ctstateu.edu/history/cite.html 1363 | % http://www.cas.usf.edu/english/walker/mla.html 1364 | % for citation formats for web pages. 1365 | FUNCTION {webpage} 1366 | { output.bibitem 1367 | author empty$ 1368 | { editor empty$ 1369 | 'skip$ % author and editor both optional 1370 | { format.editors output.nonnull } 1371 | if$ 1372 | } 1373 | { editor empty$ 1374 | { format.authors output.nonnull } 1375 | { "can't use both author and editor fields in " cite$ * warning$ } 1376 | if$ 1377 | } 1378 | if$ 1379 | new.block 1380 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ 1381 | format.title "title" output.check 1382 | inbrackets onlinestring output 1383 | new.block 1384 | year empty$ 1385 | 'skip$ 1386 | { format.date "year" output.check } 1387 | if$ 1388 | % We don't need to output the URL details ('lastchecked' and 'url'), 1389 | % because fin.entry does that for us, using output.web.refs. The only 1390 | % reason we would want to put them here is if we were to decide that 1391 | % they should go in front of the rather miscellaneous information in 'note'. 1392 | new.block 1393 | note output 1394 | fin.entry 1395 | } 1396 | % ...urlbst to here 1397 | 1398 | 1399 | FUNCTION {article} 1400 | { output.bibitem 1401 | format.authors "author" output.check 1402 | author format.key output 1403 | format.date "year" output.check 1404 | date.block 1405 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1406 | format.title "title" output.check 1407 | new.block 1408 | crossref missing$ 1409 | { 1410 | journal 1411 | "journal" bibinfo.check 1412 | emphasize 1413 | "journal" output.check 1414 | possibly.setup.inlinelink format.vol.num.pages output% urlbst 1415 | } 1416 | { format.article.crossref output.nonnull 1417 | format.pages output 1418 | } 1419 | if$ 1420 | new.block 1421 | format.note output 1422 | fin.entry 1423 | } 1424 | FUNCTION {book} 1425 | { output.bibitem 1426 | author empty$ 1427 | { format.editors "author and editor" output.check 1428 | editor format.key output 1429 | } 1430 | { format.authors output.nonnull 1431 | crossref missing$ 1432 | { "author and editor" editor either.or.check } 1433 | 'skip$ 1434 | if$ 1435 | } 1436 | if$ 1437 | format.date "year" output.check 1438 | date.block 1439 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1440 | format.btitle "title" output.check 1441 | format.edition output 1442 | crossref missing$ 1443 | { format.bvolume output 1444 | new.block 1445 | format.number.series output 1446 | new.sentence 1447 | format.publisher.address output 1448 | } 1449 | { 1450 | new.block 1451 | format.book.crossref output.nonnull 1452 | } 1453 | if$ 1454 | new.block 1455 | format.note output 1456 | fin.entry 1457 | } 1458 | FUNCTION {booklet} 1459 | { output.bibitem 1460 | format.authors output 1461 | author format.key output 1462 | format.date "year" output.check 1463 | date.block 1464 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1465 | format.title "title" output.check 1466 | new.block 1467 | howpublished "howpublished" bibinfo.check output 1468 | address "address" bibinfo.check output 1469 | new.block 1470 | format.note output 1471 | fin.entry 1472 | } 1473 | 1474 | FUNCTION {inbook} 1475 | { output.bibitem 1476 | author empty$ 1477 | { format.editors "author and editor" output.check 1478 | editor format.key output 1479 | } 1480 | { format.authors output.nonnull 1481 | crossref missing$ 1482 | { "author and editor" editor either.or.check } 1483 | 'skip$ 1484 | if$ 1485 | } 1486 | if$ 1487 | format.date "year" output.check 1488 | date.block 1489 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1490 | format.btitle "title" output.check 1491 | format.edition output 1492 | crossref missing$ 1493 | { 1494 | format.bvolume output 1495 | format.number.series output 1496 | format.chapter "chapter" output.check 1497 | new.sentence 1498 | format.publisher.address output 1499 | new.block 1500 | } 1501 | { 1502 | format.chapter "chapter" output.check 1503 | new.block 1504 | format.book.crossref output.nonnull 1505 | } 1506 | if$ 1507 | new.block 1508 | format.note output 1509 | fin.entry 1510 | } 1511 | 1512 | FUNCTION {incollection} 1513 | { output.bibitem 1514 | format.authors "author" output.check 1515 | author format.key output 1516 | format.date "year" output.check 1517 | date.block 1518 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1519 | format.title "title" output.check 1520 | new.block 1521 | crossref missing$ 1522 | { format.in.ed.booktitle "booktitle" output.check 1523 | format.edition output 1524 | format.bvolume output 1525 | format.number.series output 1526 | format.chapter.pages output 1527 | new.sentence 1528 | format.publisher.address output 1529 | } 1530 | { format.incoll.inproc.crossref output.nonnull 1531 | format.chapter.pages output 1532 | } 1533 | if$ 1534 | new.block 1535 | format.note output 1536 | fin.entry 1537 | } 1538 | FUNCTION {inproceedings} 1539 | { output.bibitem 1540 | format.authors "author" output.check 1541 | author format.key output 1542 | format.date "year" output.check 1543 | date.block 1544 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1545 | format.title "title" output.check 1546 | new.block 1547 | crossref missing$ 1548 | { format.in.booktitle "booktitle" output.check 1549 | format.bvolume output 1550 | format.number.series output 1551 | format.pages output 1552 | address "address" bibinfo.check output 1553 | new.sentence 1554 | organization "organization" bibinfo.check output 1555 | publisher "publisher" bibinfo.check output 1556 | } 1557 | { format.incoll.inproc.crossref output.nonnull 1558 | format.pages output 1559 | } 1560 | if$ 1561 | new.block 1562 | format.note output 1563 | fin.entry 1564 | } 1565 | FUNCTION {conference} { inproceedings } 1566 | FUNCTION {manual} 1567 | { output.bibitem 1568 | format.authors output 1569 | author format.key output 1570 | format.date "year" output.check 1571 | date.block 1572 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1573 | format.btitle "title" output.check 1574 | format.edition output 1575 | organization address new.block.checkb 1576 | organization "organization" bibinfo.check output 1577 | address "address" bibinfo.check output 1578 | new.block 1579 | format.note output 1580 | fin.entry 1581 | } 1582 | 1583 | FUNCTION {mastersthesis} 1584 | { output.bibitem 1585 | format.authors "author" output.check 1586 | author format.key output 1587 | format.date "year" output.check 1588 | date.block 1589 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1590 | format.title 1591 | "title" output.check 1592 | new.block 1593 | bbl.mthesis format.thesis.type output.nonnull 1594 | school "school" bibinfo.warn output 1595 | address "address" bibinfo.check output 1596 | month "month" bibinfo.check output 1597 | new.block 1598 | format.note output 1599 | fin.entry 1600 | } 1601 | 1602 | FUNCTION {misc} 1603 | { output.bibitem 1604 | format.authors output 1605 | author format.key output 1606 | format.date "year" output.check 1607 | date.block 1608 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1609 | format.title output 1610 | new.block 1611 | howpublished "howpublished" bibinfo.check output 1612 | new.block 1613 | format.note output 1614 | fin.entry 1615 | } 1616 | FUNCTION {phdthesis} 1617 | { output.bibitem 1618 | format.authors "author" output.check 1619 | author format.key output 1620 | format.date "year" output.check 1621 | date.block 1622 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1623 | format.btitle 1624 | "title" output.check 1625 | new.block 1626 | bbl.phdthesis format.thesis.type output.nonnull 1627 | school "school" bibinfo.warn output 1628 | address "address" bibinfo.check output 1629 | new.block 1630 | format.note output 1631 | fin.entry 1632 | } 1633 | 1634 | FUNCTION {proceedings} 1635 | { output.bibitem 1636 | format.editors output 1637 | editor format.key output 1638 | format.date "year" output.check 1639 | date.block 1640 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1641 | format.btitle "title" output.check 1642 | format.bvolume output 1643 | format.number.series output 1644 | new.sentence 1645 | publisher empty$ 1646 | { format.organization.address output } 1647 | { organization "organization" bibinfo.check output 1648 | new.sentence 1649 | format.publisher.address output 1650 | } 1651 | if$ 1652 | new.block 1653 | format.note output 1654 | fin.entry 1655 | } 1656 | 1657 | FUNCTION {techreport} 1658 | { output.bibitem 1659 | format.authors "author" output.check 1660 | author format.key output 1661 | format.date "year" output.check 1662 | date.block 1663 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1664 | format.title 1665 | "title" output.check 1666 | new.block 1667 | format.tr.number output.nonnull 1668 | institution "institution" bibinfo.warn output 1669 | address "address" bibinfo.check output 1670 | new.block 1671 | format.note output 1672 | fin.entry 1673 | } 1674 | 1675 | FUNCTION {unpublished} 1676 | { output.bibitem 1677 | format.authors "author" output.check 1678 | author format.key output 1679 | format.date "year" output.check 1680 | date.block 1681 | title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst 1682 | format.title "title" output.check 1683 | new.block 1684 | format.note "note" output.check 1685 | fin.entry 1686 | } 1687 | 1688 | FUNCTION {default.type} { misc } 1689 | READ 1690 | FUNCTION {sortify} 1691 | { purify$ 1692 | "l" change.case$ 1693 | } 1694 | INTEGERS { len } 1695 | FUNCTION {chop.word} 1696 | { 's := 1697 | 'len := 1698 | s #1 len substring$ = 1699 | { s len #1 + global.max$ substring$ } 1700 | 's 1701 | if$ 1702 | } 1703 | FUNCTION {format.lab.names} 1704 | { 's := 1705 | "" 't := 1706 | s #1 "{vv~}{ll}" format.name$ 1707 | s num.names$ duplicate$ 1708 | #2 > 1709 | { pop$ 1710 | " " * bbl.etal * 1711 | } 1712 | { #2 < 1713 | 'skip$ 1714 | { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = 1715 | { 1716 | " " * bbl.etal * 1717 | } 1718 | { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ 1719 | * } 1720 | if$ 1721 | } 1722 | if$ 1723 | } 1724 | if$ 1725 | } 1726 | 1727 | FUNCTION {author.key.label} 1728 | { author empty$ 1729 | { key empty$ 1730 | { cite$ #1 #3 substring$ } 1731 | 'key 1732 | if$ 1733 | } 1734 | { author format.lab.names } 1735 | if$ 1736 | } 1737 | 1738 | FUNCTION {author.editor.key.label} 1739 | { author empty$ 1740 | { editor empty$ 1741 | { key empty$ 1742 | { cite$ #1 #3 substring$ } 1743 | 'key 1744 | if$ 1745 | } 1746 | { editor format.lab.names } 1747 | if$ 1748 | } 1749 | { author format.lab.names } 1750 | if$ 1751 | } 1752 | 1753 | FUNCTION {editor.key.label} 1754 | { editor empty$ 1755 | { key empty$ 1756 | { cite$ #1 #3 substring$ } 1757 | 'key 1758 | if$ 1759 | } 1760 | { editor format.lab.names } 1761 | if$ 1762 | } 1763 | 1764 | FUNCTION {calc.short.authors} 1765 | { type$ "book" = 1766 | type$ "inbook" = 1767 | or 1768 | 'author.editor.key.label 1769 | { type$ "proceedings" = 1770 | 'editor.key.label 1771 | 'author.key.label 1772 | if$ 1773 | } 1774 | if$ 1775 | 'short.list := 1776 | } 1777 | 1778 | FUNCTION {calc.label} 1779 | { calc.short.authors 1780 | short.list 1781 | "(" 1782 | * 1783 | year duplicate$ empty$ 1784 | short.list key field.or.null = or 1785 | { pop$ "" } 1786 | 'skip$ 1787 | if$ 1788 | * 1789 | 'label := 1790 | } 1791 | 1792 | FUNCTION {sort.format.names} 1793 | { 's := 1794 | #1 'nameptr := 1795 | "" 1796 | s num.names$ 'numnames := 1797 | numnames 'namesleft := 1798 | { namesleft #0 > } 1799 | { s nameptr 1800 | "{ll{ }}{ ff{ }}{ jj{ }}" 1801 | format.name$ 't := 1802 | nameptr #1 > 1803 | { 1804 | " " * 1805 | namesleft #1 = t "others" = and 1806 | { "zzzzz" * } 1807 | { t sortify * } 1808 | if$ 1809 | } 1810 | { t sortify * } 1811 | if$ 1812 | nameptr #1 + 'nameptr := 1813 | namesleft #1 - 'namesleft := 1814 | } 1815 | while$ 1816 | } 1817 | 1818 | FUNCTION {sort.format.title} 1819 | { 't := 1820 | "A " #2 1821 | "An " #3 1822 | "The " #4 t chop.word 1823 | chop.word 1824 | chop.word 1825 | sortify 1826 | #1 global.max$ substring$ 1827 | } 1828 | FUNCTION {author.sort} 1829 | { author empty$ 1830 | { key empty$ 1831 | { "to sort, need author or key in " cite$ * warning$ 1832 | "" 1833 | } 1834 | { key sortify } 1835 | if$ 1836 | } 1837 | { author sort.format.names } 1838 | if$ 1839 | } 1840 | FUNCTION {author.editor.sort} 1841 | { author empty$ 1842 | { editor empty$ 1843 | { key empty$ 1844 | { "to sort, need author, editor, or key in " cite$ * warning$ 1845 | "" 1846 | } 1847 | { key sortify } 1848 | if$ 1849 | } 1850 | { editor sort.format.names } 1851 | if$ 1852 | } 1853 | { author sort.format.names } 1854 | if$ 1855 | } 1856 | FUNCTION {editor.sort} 1857 | { editor empty$ 1858 | { key empty$ 1859 | { "to sort, need editor or key in " cite$ * warning$ 1860 | "" 1861 | } 1862 | { key sortify } 1863 | if$ 1864 | } 1865 | { editor sort.format.names } 1866 | if$ 1867 | } 1868 | FUNCTION {presort} 1869 | { calc.label 1870 | label sortify 1871 | " " 1872 | * 1873 | type$ "book" = 1874 | type$ "inbook" = 1875 | or 1876 | 'author.editor.sort 1877 | { type$ "proceedings" = 1878 | 'editor.sort 1879 | 'author.sort 1880 | if$ 1881 | } 1882 | if$ 1883 | #1 entry.max$ substring$ 1884 | 'sort.label := 1885 | sort.label 1886 | * 1887 | " " 1888 | * 1889 | title field.or.null 1890 | sort.format.title 1891 | * 1892 | #1 entry.max$ substring$ 1893 | 'sort.key$ := 1894 | } 1895 | 1896 | ITERATE {presort} 1897 | SORT 1898 | STRINGS { last.label next.extra } 1899 | INTEGERS { last.extra.num number.label } 1900 | FUNCTION {initialize.extra.label.stuff} 1901 | { #0 int.to.chr$ 'last.label := 1902 | "" 'next.extra := 1903 | #0 'last.extra.num := 1904 | #0 'number.label := 1905 | } 1906 | FUNCTION {forward.pass} 1907 | { last.label label = 1908 | { last.extra.num #1 + 'last.extra.num := 1909 | last.extra.num int.to.chr$ 'extra.label := 1910 | } 1911 | { "a" chr.to.int$ 'last.extra.num := 1912 | "" 'extra.label := 1913 | label 'last.label := 1914 | } 1915 | if$ 1916 | number.label #1 + 'number.label := 1917 | } 1918 | FUNCTION {reverse.pass} 1919 | { next.extra "b" = 1920 | { "a" 'extra.label := } 1921 | 'skip$ 1922 | if$ 1923 | extra.label 'next.extra := 1924 | extra.label 1925 | duplicate$ empty$ 1926 | 'skip$ 1927 | { year field.or.null #-1 #1 substring$ chr.to.int$ #65 < 1928 | { "{\natexlab{" swap$ * "}}" * } 1929 | { "{(\natexlab{" swap$ * "})}" * } 1930 | if$ } 1931 | if$ 1932 | 'extra.label := 1933 | label extra.label * 'label := 1934 | } 1935 | EXECUTE {initialize.extra.label.stuff} 1936 | ITERATE {forward.pass} 1937 | REVERSE {reverse.pass} 1938 | FUNCTION {bib.sort.order} 1939 | { sort.label 1940 | " " 1941 | * 1942 | year field.or.null sortify 1943 | * 1944 | " " 1945 | * 1946 | title field.or.null 1947 | sort.format.title 1948 | * 1949 | #1 entry.max$ substring$ 1950 | 'sort.key$ := 1951 | } 1952 | ITERATE {bib.sort.order} 1953 | SORT 1954 | FUNCTION {begin.bib} 1955 | { preamble$ empty$ 1956 | 'skip$ 1957 | { preamble$ write$ newline$ } 1958 | if$ 1959 | "\begin{thebibliography}{" number.label int.to.str$ * "}" * 1960 | write$ newline$ 1961 | "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi" 1962 | write$ newline$ 1963 | } 1964 | EXECUTE {begin.bib} 1965 | EXECUTE {init.urlbst.variables} % urlbst 1966 | EXECUTE {init.state.consts} 1967 | ITERATE {call.type$} 1968 | FUNCTION {end.bib} 1969 | { newline$ 1970 | "\end{thebibliography}" write$ newline$ 1971 | } 1972 | EXECUTE {end.bib} 1973 | %% End of customized bst file 1974 | %% 1975 | %% End of file `compling.bst'. 1976 | --------------------------------------------------------------------------------