--- /dev/null
+\NeedsTeXFormat{LaTeX2e}[2009/07/27]\r
+\ProvidesClass{comjnl}\r
+ [2009/07/27 v0.1c The Computer Journal class (DPC)]\r
+\def\CJ@err#1{\ClassError{cj}{#1}\@eha}\r
+\def\CJ@warn#1{\ClassWarningNoLine{cj}{#1}}\r
+\DeclareOption{10pt}{}\r
+\DeclareOption{11pt}{\CJ@warn{10pt used (not optional)}}\r
+\DeclareOption{12pt}{\CJ@warn{10pt used (not optional)}}\r
+\DeclareOption{twoside}{}\r
+\DeclareOption{twocolumn}{}\r
+\DeclareOption{onecolumn}{\CJ@warn{twocolumn used (not optional)}}\r
+\DeclareOption{mathptm}{%\r
+ \def\CJ@fonts{\RequirePackage{times,mathptm}}}\r
+\DeclareOption{mathtime}{%\r
+ \def\CJ@fonts{\RequirePackage{times,mathtime}}} %use for Mac\r
+% \def\CJ@fonts{\RequirePackage{times,mathtimy}}} %use for PC\r
+\DeclareOption{cmfonts}{%\r
+ \let\CJ@fonts\relax}\r
+\DeclareOption{epsfig}{\AtEndOfClass{\RequirePackage{epsfig}}}\r
+\ExecuteOptions{cmfonts,epsfig}\r
+\ProcessOptions\r
+\LoadClass[a4paper,twoside,twocolumn]{article}\r
+% tolerances\r
+\pretolerance=6000\r
+\tolerance=9500\r
+\hbadness=5000\r
+\vbadness=5000\r
+\topmargin=0\p@\r
+\emergencystretch=5pt\r
+\sloppy\r
+%\r
+\RequirePackage{rotating}\r
+\r
+\r
+\def\shortauthors#1{\gdef\@shortauthors{\scshape#1}}\r
+\def\title{\@dblarg\CJ@title}\r
+\def\CJ@title[#1]#2{%\r
+ \def\@title{#2}%\r
+ \def\@shorttitle{\scshape#1}}\r
+\def\@title{\CJ@warn{No title}}\r
+\def\@shorttitle{}\r
+\newcounter{affil}\r
+\newcounter{remaffil}\r
+\def\author#1{%\r
+ \g@addto@macro\@authors{%\r
+ \@andorcomma,{\ignorespaces#1\unskip\affil@mark}}%\r
+ \def\CJ@noaffil{\CJ@warn{No affiliation specified for #1}}}\r
+\def\CJ@noaffil{%\r
+ \CJ@err{No author specified}%\r
+ \global\let\@andorcomma\relax\r
+ \@gobbletwo}\r
+\def\@authors{\relax\@gobbletwo}\r
+\def\and{\CJ@err{\protect\and\space is not supported}}\r
+\def\@andorcomma#1#2\@andorcomma#3{%\r
+ \ifx#3\relax\r
+ \ifx#1\relax%\r
+ \let\@tempa\relax\r
+ \else\r
+ \def\@tempa{\space\andname\space #2\@gobbletwo}%\r
+ \fi\r
+ \else\r
+ \def\@tempa{#1 #2\@andorcomma#3}%\r
+ \fi\r
+ \@tempa}\r
+\def\affiliation#1{%\r
+ \def\@tempa{#1}%\r
+ \@tempswatrue\r
+ \@affils\r
+ \if@tempswa\r
+ \stepcounter{affil}\setcounter{remaffil}{\theaffil}%\r
+ \edef\@tempa##1{%\r
+ \noexpand\g@addto@macro\noexpand\@affils{%\r
+ \noexpand\doaffil{\theaffil}{##1}}}%\r
+ \@tempa{#1}%\r
+ \edef\@tempa{\noexpand\CJ@addaffil{\theaffil}}%\r
+ \fi\r
+ \expandafter\@tempa\@authors\relax\relax\r
+ \let\CJ@noaffil\relax}\r
+\let\@affils\@empty\r
+\def\CJ@addaffil#1#2\relax#3\relax{%\r
+ \def\@authors{#2\def\theaffil{#1}#3\relax}}\r
+\def\doaffil#1#2{%\r
+ \def\@tempb{#2}%\r
+ \ifx\@tempa\@tempb\r
+ \@tempswafalse\r
+ \def\@tempa{\CJ@addaffil{#1}}%\r
+ \fi}\r
+\def\address#1{%\r
+ \g@addto@macro\@authors{\textsuperscript{$*$}}%\r
+ \def\@address{#1}%\r
+ \def\address##1{%\r
+ \CJ@err{You may only specify one correspondence address}}}\r
+\def\@address{\CJ@warn{No correspondence address specified}}\r
+%\r
+%\r
+%%SDH David's \email puts email addresses at the bottom of the page--wrong!\r
+%\def\email#1{%\r
+% \g@addto@macro\@address{\endgraf\noindent(e-mail: #1)}%\r
+% \def\email##1{%\r
+% \CJ@err{You may only specify one correspondence email}}}\r
+\def\email#1{%\r
+\def\@email{Email: #1}%\r
+}\r
+%\r
+\let\affil@mark\@empty\r
+\def\keywords#1{%\r
+ \gdef\@keywords{%\r
+ \addvspace\medskipamount\r
+ \noindent\strut{\itshape Keywords:\/} \ignorespaces#1\unskip}}\r
+\def\@keywords{\ClassWarningNoLine{cj}{No keywords}}\r
+\def\received#1{%\r
+ \gdef\@received{\medskip\noindent\strut{\itshape Received #1}}}\r
+\def\@received{\ClassWarningNoLine{cj}{No received date}}\r
+\def\revised#1{%\r
+ \gdef\@revised{{\itshape; revised #1}}} %SDH\r
+\let\@revised\@empty\r
+\def\accepted#1{%\r
+ \gdef\@accepted{{\itshape; accepted #1}}}\r
+\def\@accepted{\CJ@warn{No accepted date}}\r
+\newbox\absbox\r
+\def\abstract{\lrbox\absbox\minipage{.75\textwidth}%\r
+ \hrule\@height.2pt\r
+ \medskip\r
+ \normalfont\bfseries\small\r
+ \leftskip\fill\r
+ \rightskip-\fill\r
+ \parfillskip\stretch2}\r
+\def\endabstract{\endminipage\endlrbox}\r
+\def\maketitle{{%\r
+ \long\def\@makefntext##1{\parindent 1em\noindent\r
+ \@textsuperscript{\normalfont\@thefnmark}##1}%\r
+ \twocolumn[%\r
+ \thispagestyle{title}\label{FirstPage}%\r
+ \normalfont\centering\r
+ \vspace{-\headheight}\vspace{-\voffset}\vspace{-12\p@}%\r
+ {\parbox[b]{.75\textwidth}{\centering\r
+ {\Huge\@title\par}%\r
+ \addvspace{17pt}% \r
+ \ifnum\c@affil>\@ne\r
+ \def\affil@mark{\textsuperscript{\theaffil}}%\r
+ \def\doaffil##1##2{\noindent\textsuperscript{##1}##2\par}%\r
+ \else\r
+ \def\doaffil##1##2{\noindent##2\par}%\r
+ \fi\r
+ \setcounter{affil}{1}%\r
+ \CJ@noaffil\r
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%\r
+ \global\c@footnote\@ne\r
+\ifnum\theremaffil>1 \typeout{caffil>1}\r
+ \setcounter{footnote}{\theremaffil}\r
+ \else \typeout{caffil not> 1}\r
+ \setcounter{footnote}{0}\fi\r
+ \def\@makefnmark{\@textsuperscript{\normalfont\@thefnmark}}%\r
+ {\large\scshape\@authors\@andorcomma\relax\@andorcomma\relax\par}%\r
+ \addvspace{15pt}% 75mm - 15.5pc - 12pt baseline from affils\r
+ {\small\itshape\@affils}\par %%SDH affils made italic--should really be addresses\r
+ {\small\itshape\@email}\par %%SDH Emails moved to correct place\r
+ \addvspace\bigskipamount\r
+ \usebox\absbox\par\r
+ \addvspace\bigskipamount\r
+ \small\itshape\r
+ \@keywords\par\r
+ \@received\@revised\@accepted\par\r
+ \addvspace\bigskipamount\r
+ }}%\r
+ \hrule\@height.5pt\r
+ \vspace{18pt}%\r
+ ]%\r
+ %{\def\thefootnote{\@fnsymbol\c@footnote}%\r
+ % \footnotetext[1]{\def\\{\unskip, \ignorespaces}\@address}%\r
+ % \@thanks}%\r
+ \suppressfloats[t]}%\r
+ \let\and\relax\r
+ \let\affiliation\relax\r
+ \let\author\relax\r
+ \let\@affils\relax\r
+ \let\keywords\relax\r
+ \let\@keywords\relax\r
+ \let\address\relax\r
+ \let\email\relax\r
+ \let\@address\relax\r
+ \let\maketitle\relax\r
+ \let\thanks\@gobble}\r
+\def\ps@cj{%\r
+ \def\@oddhead{%\r
+ \CJ@ruledhead\r
+ \relax\r
+ \@shorttitle\r
+ \thepage}%\r
+ \def\@evenhead{%\r
+ \vbox to \headheight{\vss\r
+ \let\textsuperscript\@gobble\r
+ \CJ@ruledhead\r
+ \thepage\r
+ % {\@authors\@andorcomma\relax\@andorcomma\relax}%\r
+ {\@shortauthors}%\r
+ \relax}}%\r
+ \def\@oddfoot{%\r
+ \CJ@ruledhead\relax{%\r
+ \textsc\journalname,\quad\volumename\space\@volumenumber,\quad\r
+ \numbername\space\@issuenumber,\quad\@volumeyear}\relax}%\r
+ \let\@evenfoot\@oddfoot}\r
+\def\ps@title{%\r
+ \def\@oddhead{%\r
+ \vbox to \headheight{%\r
+ \vfil\r
+ \hrule \@height.5pt\@width\textwidth\r
+ \vskip 14.5pt}}%\r
+ \let\@evenhead\@oddhead\r
+ \def\@oddfoot{%\r
+ \CJ@ruledhead\relax{%\r
+ \textsc\journalname,\quad\volumename\space\@volumenumber,\quad\r
+ \numbername\space\@issuenumber,\quad\@volumeyear}\relax}%\r
+ \let\@evenfoot\@oddfoot}\r
+\def\CJ@ruledhead#1#2#3{%\r
+ \vbox{%\r
+ \hrule \@height.5pt%\r
+ \hbox to\textwidth{%\r
+ \normalfont\vrule\@width\z@\@height 9.5pt\@depth 4.5pt%\r
+ \rlap{#1}%\r
+ {\hfil#2\hfil}%\r
+ \llap{#3}}%\r
+ \hrule\@height.5pt}}\r
+\ps@cj\r
+\def\@volumeyear{????}\r
+\def\@volumenumber{??}\r
+\def\@issuenumber{??}\r
+\def\@startpage{\pageref{FirstPage}}\r
+\def\@endpage{\pageref{LastPage}}\r
+\def\volumeyear#1{\gdef\@volumeyear{#1}}\r
+\def\volumenumber#1{\gdef\@volumenumber{#1}}\r
+\def\issuenumber#1{\gdef\@issuenumber{#1}}\r
+\def\startpage#1{\gdef\@startpage{#1}\c@page#1}\r
+\def\endpage#1{\gdef\@endpage{#1}}\r
+\def\lastpage@putlabel{%\r
+ \advance\c@page\m@ne\r
+ \immediate\write\@auxout{\string\r
+ \newlabel{LastPage}{{}{\thepage}}}%\r
+ \advance\c@page\@ne}\r
+\AtEndDocument{%\r
+ \clearpage\lastpage@putlabel}%\r
+\def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else\r
+ \advance\@enumdepth \@ne \r
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list\r
+ {\csname label\@enumctr\endcsname}{\usecounter\r
+ {\@enumctr}\def\makelabel##1{##1\hss}%\r
+ \labelsep=3\p@\parsep=0pt\listparindent=0pt\itemsep=0pt\partopsep=0pt\r
+ \rightmargin=0pt}\fi}\r
+%\r
+\def\itemize{\ifnum \@itemdepth >3 \@toodeep\else \advance\@itemdepth \@ne\r
+ \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%\r
+ \list{\csname\@itemitem\endcsname}{\def\makelabel##1{##1\hss}%\r
+ \labelsep=3\p@\parsep=0pt\listparindent=0pt\itemsep=0pt\partopsep=0pt\r
+ \rightmargin=0pt}\fi}\r
+%\r
+\setlength\parskip{0pt plus 0.1pt}\r
+\setlength\parindent{1em}\r
+\setlength\topsep{8pt plus 2pt minus 4pt}\r
+\setlength\partopsep{0pt plus 2pt}\r
+\setlength\itemsep{0pt plus 1pt}\r
+\def\@seccntformat#1{\csname the#1\endcsname.\quad}\r
+\def\section{%\r
+ \@startsection\r
+ {section}{1}{\z@}{-14\p@ \@plus -2\p@ \@minus -2\p@}%\r
+ {6\p@ plus 2\p@}{\normalfont\normalsize\bfseries\MakeUppercase}}\r
+\def\subsection{%\r
+ \@startsection\r
+ {subsection}{2}{\z@}{-14\p@ \@plus -2\p@ \@minus -2\p@}%\r
+ {6\p@ plus 2\p@}{\normalfont\normalsize\bfseries}}\r
+\def\subsubsection{%\r
+ \@startsection\r
+ {subsubsection}{3}{\z@}{-14\p@ \@plus -2\p@ \@minus-2\p@}%\r
+ {1sp}{\normalfont\normalsize\itshape}}\r
+\def\paragraph{%\r
+ \@startsection\r
+ {paragraph}{4}{\z@}{12\p@}%\r
+ {-1em}{\normalfont\normalsize\itshape}}\r
+\def\subparagraph{%\r
+ \@startsection\r
+ {paragraph}{5}{\z@}{12\p@}%\r
+ {-1em}{\normalfont\normalsize\itshape}}\r
+\setcounter{secnumdepth}{3}\r
+\setcounter{tocdepth}{2}\r
+\def\fps@eqnfloat{!tp}\r
+\def\ftype@eqnfloat{4}\r
+\newenvironment{eqnfloat}\r
+ {\@float{eqnfloat}}\r
+ {\end@float}\r
+\newenvironment{eqnfloat*}\r
+ {\@dblfloat{eqnfloat}}\r
+ {\end@dblfloat}\r
+\renewenvironment{table}\r
+ {\@float{table}\small\ignorespaces}\r
+ {\end@float}\r
+\renewenvironment{table*}\r
+ {\@dblfloat{table}\small\ignorespaces}\r
+ {\end@dblfloat}\r
+\long\def\@makecaption#1#2{%\r
+ \vskip\abovecaptionskip\r
+ \sbox\@tempboxa{{\bfseries\small#1.} \small#2}%\r
+ \ifdim \wd\@tempboxa >\hsize\r
+ {\bfseries\small#1.} \small#2\par\r
+ \else\r
+ \global \@minipagefalse\r
+ \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%\r
+ \fi\r
+ \vskip\belowcaptionskip}\r
+\def\fnum@figure{\MakeUppercase\figurename~\thefigure}\r
+\def\fnum@table{\MakeUppercase\tablename~\thetable}\r
+\r
+\RequirePackage{amsthm}\r
+\newtheoremstyle{theor}\r
+ {6pt}% above space (default)\r
+ {6pt}% below space\r
+ {\itshape}% body\r
+ {1em}% indent\r
+ {\scshape}% head\r
+ {.}% punct\r
+ { }% space\r
+ {}% custom\r
+\theoremstyle{theor}\r
+\r
+\newtheorem{definition}{Definition}[section]\r
+\def\thedefinition{\thesection.\arabic{definition}}\r
+\newtheorem{lemma}{Lemma}[section]\r
+\def\thelemma{\thesection.\arabic{lemma}}\r
+\newtheorem{proposition}{Proposition}[section]\r
+\def\theproposition{\thesection.\arabic{proposition}}\r
+\newtheorem{corollary}{Corollary}[section]\r
+\def\thecorollary{\thesection.\arabic{corollary}}\r
+\newtheorem{axiom}{Axiom}[section]\r
+\def\theaxiom{\thesection.\arabic{axiom}}\r
+\r
+\newtheoremstyle{remark}\r
+ {6pt}% above space (default)\r
+ {6pt}% below space\r
+ {\normalfont}% body\r
+ {1em}% indent\r
+ {\scshape}% head\r
+ {.}% punct\r
+ { }% space\r
+ {}% custom\r
+\theoremstyle{remark}\r
+\r
+\newtheorem{remark}{Remark}\r
+\newtheorem{example}{Example}\r
+\newtheorem{algorithm}{Algorithm}\r
+\r
+{\theoremstyle{theor}\r
+\newtheorem{theorem}{Theorem}[section]\r
+\def\thetheorem{\thesection.\arabic{theorem}}\r
+}\r
+\r
+\setlength\voffset{-1in}\r
+\setlength\hoffset{-1in}\r
+\setlength\paperheight{276mm}\r
+\setlength\paperwidth{210mm}\r
+\setlength\headsep{4mm}\r
+\setlength\topskip\baselineskip\r
+\setlength\marginparsep{1mm}\r
+\setlength\marginparwidth{5mm}\r
+\setlength\headheight{26mm}\r
+\setlength\topmargin{0mm}\r
+\setlength{\footskip}{10mm}\r
+\setlength\@tempdima{276mm}\r
+\addtolength\@tempdima{-\headheight}\r
+\addtolength\@tempdima{-\headsep}\r
+ \divide\@tempdima\baselineskip\r
+ \@tempcnta=\@tempdima\r
+ \setlength\textheight{\@tempcnta\baselineskip}\r
+\setlength\columnsep{2pc}\r
+\setlength\textwidth{42pc}\r
+\setlength\oddsidemargin\paperwidth\r
+\addtolength\oddsidemargin{-\textwidth}\r
+\setlength\oddsidemargin{.5\oddsidemargin}\r
+\setlength\evensidemargin\oddsidemargin\r
+\CJ@fonts\r
+\r
+\providecommand{\textsuperscript}[1]{%\r
+ \ensuremath{{}^{\mbox{\normalfont\scriptsize#1}}}}\r
+\providecommand{\@textsuperscript}[1]{%\r
+ \ensuremath{{}^{\mbox{\normalfont\scriptsize#1}}}}\r
+\providecommand\MakeUppercase[1]{%\r
+ \protected@edef\@tempa{\uppercase{#1}}\@tempa}\r
+\def\@sect#1#2#3#4#5#6[#7]#8{%\r
+ \ifnum #2>\c@secnumdepth\r
+ \let\@svsec\@empty\r
+ \else\r
+ \refstepcounter{#1}%\r
+ \protected@edef\@svsec{\@seccntformat{#1}\relax}%\r
+ \fi\r
+ \@tempskipa #5\relax\r
+ \ifdim \@tempskipa>\z@\r
+ \begingroup\r
+ #6{%\r
+ \@hangfrom{\hskip #3\relax\@svsec}%\r
+ \interlinepenalty \@M #8\@@par}%\r
+ \endgroup\r
+ \csname #1mark\endcsname{#7}%\r
+ \addcontentsline{toc}{#1}{%\r
+ \ifnum #2>\c@secnumdepth \else\r
+ \protect\numberline{\csname the#1\endcsname}%\r
+ \fi\r
+ #7}%\r
+ \else\r
+ \def\@svsechd{%\r
+ #6{\hskip #3\relax\r
+ \@svsec #8}%\r
+ \csname #1mark\endcsname{#7}%\r
+ \addcontentsline{toc}{#1}{%\r
+ \ifnum #2>\c@secnumdepth \else\r
+ \protect\numberline{\csname the#1\endcsname}%\r
+ \fi\r
+ #7}}%\r
+ \fi\r
+ \@xsect{#5}}\r
+\def\@ssect#1#2#3#4#5{%\r
+ \@tempskipa #3\relax\r
+ \ifdim \@tempskipa>\z@\r
+ \begingroup\r
+ #4{%\r
+ \@hangfrom{\hskip #1}%\r
+ \interlinepenalty \@M #5\@@par}%\r
+ \endgroup\r
+ \else\r
+ \def\@svsechd{#4{\hskip #1\relax #5}}%\r
+ \fi\r
+ \@xsect{#3}}\r
+\def\journalname{The Computer Journal}\r
+\def\copyrightname{Oxford University Press}\r
+\def\andname{and}\r
+\def\ppname{pp}\r
+\def\numbername{No.\@}\r
+\def\volumename{Vol.\@}\r
+\r
+%extra macros\r
+\r
+% Inserts space after macro unless followed by punctuation.\r
+\def\@xspace{%\r
+ \ifx\@let@token\bgroup\else%\r
+ \ifx\@let@token\egroup\else%\r
+ \ifx\@let@token\/\else%\r
+ \ifx\@let@token\ \else%\r
+ \ifx\@let@token~\else%\r
+ \ifx\@let@token.\else%\r
+ \ifx\@let@token!\else%\r
+ \ifx\@let@token,\else%\r
+ \ifx\@let@token:\else%\r
+ \ifx\@let@token;\else%\r
+ \ifx\@let@token?\else%\r
+ \ifx\@let@token'\else%\r
+ \ifx\@let@token)\else%\r
+ \ifx\@let@token-\else%\r
+ \ifx\@let@token$\else%\r
+ \ifx\@let@token/\else%\r
+ \space%\r
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}\r
+\newcommand{\xspace}{\futurelet\@let@token\@xspace}\r
+\r
+% Omit extra full stop after et al. if at end of sentence\r
+\def\@etstop{%\r
+ \ifx\@let@token.%\r
+ \else.%\r
+ \fi\xspace}\r
+\def\etstop{\futurelet\@let@token\@etstop}\r
+\def\etal{{\it et al}\etstop}\r
+\r
+\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}\r
+\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}\r
+\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}\r
+\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}\r
+\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}\r
+\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}\r
+\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}\r
+\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}\r
+\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}\r
+\DeclareMathAlphabet\mathbit\r
+ \encodingdefault\rmdefault\bfdefault\itdefault\r
+\DeclareOldFontCommand{\bi}{\normalfont\bfseries\itshape}{\mathbit}\r
+\r
+%Appendix commands\r
+\def\appendix{\@@par\r
+ \@addtoreset{table}{section} \r
+ \@addtoreset{figure}{section} \r
+ \@addtoreset{equation}{section} \r
+ \setcounter{section}{0}\r
+ \setcounter{subsection}{0}\r
+ \setcounter{subsubsection}{0}\r
+ \setcounter{equation}{0}\r
+ \setcounter{figure}{0}\r
+ \setcounter{table}{0}\r
+ \def\thesection{Appendix~\Alph{section}} \r
+\def\thelemma{\Alph{section}.\arabic{lemma}}\r
+\def\thedefinition{\Alph{section}.\arabic{definition}}\r
+\def\thetheorem{\Alph{section}.\arabic{theorem}}\r
+\def\theproposition{\Alph{section}.\arabic{proposition}}\r
+\def\thecorollary{\Alph{section}.\arabic{corollary}}\r
+\def\theaxiom{\Alph{section}.\arabic{axiom}}\r
+ \def\theequation{%\r
+ \Alph{section}.\arabic{equation}} \r
+ \def\thetable{% \r
+ \Alph{section}.\arabic{table}}\r
+ \def\thefigure{%\r
+ \Alph{section}.\arabic{figure}}\r
+}\r
+\r
+\newcommand{\centre}[2]{\multispan{#1}{\hfill #2\hfill}}\r
+\newcommand{\crule}[1]{\multispan{#1}{\hrulefill}}\r
+\r
+\def\lo#1{\llap{${}#1{}$}}\r
+\r
+\def\tabnote#1{\par\rlap{\begin{minipage}[l]{\hsize}\r
+\small#1\r
+\end{minipage}}\\}\r
+\r
+\def\lineup{\def\0{\hbox{\phantom{\small\rm 0}}}%\r
+ \def\m{\hbox{$\phantom{-}$}}%\r
+ \def\-{\llap{$-$}}}\r
+\r
+\newcommand{\ms}{\noalign{\vspace{3\p@ plus2\p@ minus1\p@}}}\r
+\newcommand{\ns}{\noalign{\vspace{-3\p@ plus-1\p@ minus-1\p@}}}\r
+\r
+%%%%%%%%%%%%%%%%%%%%%\r
+% Tables rules %\r
+%%%%%%%%%%%%%%%%%%%%%\r
+\r
+\newcommand{\boldarrayrulewidth}{1\p@} \r
+% Width of bold rule in tabular environment.\r
+\r
+\def\bhline{\noalign{\ifnum0=`}\fi\hrule \@height \r
+\boldarrayrulewidth \futurelet \@tempa\@xhline}\r
+\r
+\def\@xhline{\ifx\@tempa\hline\vskip \doublerulesep\fi\r
+ \ifnum0=`{\fi}}\r
+\r
+%\r
+% Rules for tables with extra space around\r
+%\r
+\newcommand{\br}{\ms\bhline\ms}\r
+\newcommand{\mr}{\ms\hline\ms}\r
+\r
+\newcommand{\case}[2]{{\textstyle\frac{#1}{#2}}}\r
+\r
+\newcommand{\ack}{\section*{Acknowledgements}}\r
+\newcommand{\ackn}{\section*{Acknowledgement}}\r
+\r
+% need to be explicit with `References' for \uppercase'ing\r
+\def\thebibliography#1{\section*{References}\small\list\r
+ {[\arabic{enumi}]}{\labelsep 0.5em%\r
+\hyphenpenalty=50\itemsep=-1pt\r
+ \settowidth\labelwidth{[#1]}\leftmargin\labelwidth\r
+ \advance\leftmargin\labelsep\r
+ \usecounter{enumi}}\r
+ \def\newblock{\hskip .14em plus .38em minus -.1em}\r
+ \sloppy\r
+ \sfcode`\.=1000\relax}\r
+\let\endthebibliography=\endlist\r
+\r
+\def\@cite#1#2{[{#1\if@tempswa , #2\fi}]}\r
+\def\@biblabel#1{[#1]}\r
+\r
+\let\origthebibliography\thebibliography\r
+\def\thebibliography#1{\origthebibliography{\hbox to 1em{\hss}}}\r
+\r
+\hyphenpenalty=20\r
+\renewcommand{\floatpagefraction}{0.95}\r
+\renewcommand{\dblfloatpagefraction}{0.95}\r
+\renewcommand{\topfraction}{0.95}\r
+\renewcommand{\dbltopfraction}{0.95}\r
+%\renewcommand{\topnumber}{3}\r
+%\renewcommand{\dbltopnumber}{3}\r
+\r
+\endinput\r
+%% End of file `cj.cls'.\r
--- /dev/null
+% cj.bst v1.1 2003-08-18
+% Antonio Vallecillo (av@lcc.uma.es)
+% Revision History:
+% v1.1 - First version (2003-08-18)
+%
+%======================================================================
+% EXAMPLES OF USE and NOTES ON "cj.bst"
+%
+% The following examples of BibTeX entries can be used for producing
+% references of journal articles, books, chapters, conferences,
+% and technical documents:
+%
+% -- journal article
+% @ARTICLE{CAN01,
+% author = {Carlos Canal and Lidia Fuentes and Ernesto Pimentel
+% and Jos\'e M. Troya and Antonio Vallecillo},
+% title = {Extending {CORBA} Interfaces with Protocols},
+% journal = cj,
+% year = 2001,
+% volume = 44,
+% number = 5,
+% pages = {448--462},
+% }
+%
+% -- book
+% @BOOK{Sowa2000,
+% author = {John F. Sowa},
+% title = {Knowledge Representation},
+% publisher = {Brooks/Cole},
+% year = 2000,
+% address = {Pacific Grove, CA},
+% }
+%
+% -- chapter
+% @Incollection{SZY00,
+% author = {Clemens Szyperski},
+% booktitle = {Foundations of Component-Based Systems},
+% title = {Components and the Way Ahead},
+% editor = {Gary T. Leavens and Murali Sitaraman},
+% publisher = {Cambridge University Press},
+% year = 2000,
+% address = {Cambrigde, UK},
+% }
+%
+% -- conference paper
+% @Inproceedings{cda-wordgraphs:97,
+% author = {M. Crochemore and R. Verin},
+% year = 1997,
+% title = {Direct construction of compact directed acyclic word graphs},
+% booktitle = {Proc. of CPM 97},
+% month = {12-14 August},
+% address = {Cambridge, MA},
+% pages = {192--211},
+% publisher = {Springer-Verlag, Berlin},
+% }
+%
+% -- technical document/standard
+% @MANUAL {Z.500,
+% author = {{ITU-T}},
+% organization = {International Telecommunications Union},
+% title = {Framework on formal methods in conformance testing},
+% year = 1997,
+% address = {Geneva, Switzerland},
+% note = {ITU-T Recommendation X.500},
+% number = {ITU-T X.500},
+% }
+%
+% Using the "cj.bst" style they produce, respectively:
+%
+% \bibitem{CAN01}
+% Canal, C., Fuentes, L., Pimentel, E., Troya, J.~M., and
+% Vallecillo, A. (2001)
+% Extending {CORBA} interfaces with protocols.
+% \newblock {\em The Computer Journal}, {\bf 44}, 448--462.
+%
+% \bibitem{Sowa2000}
+% Sowa, J.~F. (2000) {\em Knowledge Representation}.
+% Brooks/Cole, Pacific Grove, CA.
+%
+% \bibitem{SZY00}
+% Szyperski, C. (2000) Components and the way ahead.
+% \newblock In Leavens, G.~T. and Sitaraman, M. (eds.),
+% {\em Foundations of Component-Based Systems}.
+% Cambridge University Press, Cambrigde, UK.
+%
+% \bibitem{cda-wordgraphs:97}
+% Crochemore, M. and Verin, R. (1997) Direct construction of
+% compact directed acyclic word graphs.
+% \newblock {\em Proc. of CPM 97}, Cambridge, MA, 12-14 August,
+% pp. 192--211. Springer-Verlag, Berlin.
+%
+% \bibitem{Z.500}
+% ITU-T X.500 (1997) {\em Framework on formal methods in conformance testing}.
+% \newblock International Telecommunications Union.
+% \newblock Geneva, Switzerland.
+%
+% NOTES:
+% - In the "book", "Incollection", and "Technical Report" items,
+% the "address" field contains the publisher location.
+% - In the "Inproceedings" and "conference" BibTeX items, the "address"
+% field contains the conference location, so the publisher location
+% should be included in the "publisher" field.
+% - In "Inproceedings" and "conference" BibTeX items, the "month" field
+% should also contain the days of the conference, as indicated in the
+% example above.
+% - In the "Manual" BibTeX item, the "number" field should contain the
+% number of the technical document being referenced. This field will
+% be used as main index for the entry in the bibliography produced.
+% - A warning is generated if any of the fields shown for these examples
+% is missing.
+% - Some literals are avaliable for the most common journals and
+% editorials, as indicated by the following list of BibTeX macros
+%======================================================================
+
+% Literals for MONTHS
+
+MACRO {jan} {"January"}
+
+MACRO {feb} {"February"}
+
+MACRO {mar} {"March"}
+
+MACRO {apr} {"April"}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"June"}
+
+MACRO {jul} {"July"}
+
+MACRO {aug} {"August"}
+
+MACRO {sep} {"September"}
+
+MACRO {oct} {"October"}
+
+MACRO {nov} {"November"}
+
+MACRO {dec} {"December"}
+
+% Literals for JOURNALS
+
+MACRO {acmcs} {"ACM Computing Surveys"}
+
+MACRO {acta} {"Acta Informatica"}
+
+MACRO {cacm} {"Communications of the ACM"}
+
+MACRO {cj} {"The Computer Journal"}
+
+MACRO {ibmjrd} {"IBM Journal of Research and Development"}
+
+MACRO {ibmsj} {"IBM Systems Journal"}
+
+MACRO {ist} {"Information and Software Technology"}
+
+MACRO {ieeec} {"IEEE Computer"}
+
+MACRO {ieees} {"IEEE Software"}
+
+MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
+
+MACRO {ieeetc} {"IEEE Transactions on Computers"}
+
+MACRO {ieeetcad}
+ {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
+
+MACRO {ipl} {"Information Processing Letters"}
+
+MACRO {jacm} {"Journal of the ACM"}
+
+MACRO {jcss} {"Journal of Computer and System Sciences"}
+
+MACRO {jss} {"Journal of Systems and Software"}
+
+MACRO {scp} {"Science of Computer Programming"}
+
+MACRO {sicomp} {"SIAM Journal on Computing"}
+
+MACRO {spe} {"Software--Practice and Experience"}
+
+MACRO {tocs} {"ACM Transactions on Computer Systems"}
+
+MACRO {tods} {"ACM Transactions on Database Systems"}
+
+MACRO {tog} {"ACM Transactions on Graphics"}
+
+MACRO {toms} {"ACM Transactions on Mathematical Software"}
+
+MACRO {toois} {"ACM Transactions on Office Information Systems"}
+
+MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
+
+MACRO {tcs} {"Theoretical Computer Science"}
+
+% Literals for EDITORIALS
+
+MACRO {ACMP} {"ACM Press"}
+
+MACRO {ADDISON} {"Addison-Wesley"}
+
+MACRO {ADDISON-BOSTON} {"Addison-Wesley, Boston"}
+
+MACRO {CUP} {"Cambridge University Press"}
+
+MACRO {CUP-UK} {"Cambridge University Press, Cambridge, England"}
+
+MACRO {IEEE-CSP} {"IEEE Computer Society Press"}
+
+MACRO {ICP} {"Imperial College Press"}
+
+MACRO {ICP-UK} {"Imperial College Press, UK"}
+
+MACRO {KAP} {"Kluwer Academic Publishers"}
+
+MACRO {MIT} {"MIT Press"}
+
+MACRO {NH} {"North-Holland"}
+
+MACRO {OUP} {"Oxford University Press"}
+
+MACRO {OUP-UK} {"Oxford University Press, UK"}
+
+MACRO {PRENTICE} {"Prentice Hall"}
+
+MACRO {SPRINGER} {"Springer-Verlag"}
+
+MACRO {SPRINGER-BERLIN} {"Springer-Verlag, Berlin"}
+
+MACRO {SPRINGER-HEIDELBERG} {"Springer-Verlag, Heidelberg"}
+
+MACRO {SPRINGER-NY} {"Springer-Verlag, NY"}
+
+% Literals for SERIES
+
+MACRO {LNCS} {"Lecture Notes in Computer Science"}
+
+MACRO {LNAI} {"LNAI"}
+
+MACRO {ENTCS} {"Electronic Notes in Theoretical Computer Science"}
+
+%=================================================================
+%% Start of the cj.bst code
+
+ENTRY
+ { address
+ author
+ booktitle
+ chapter
+ edition
+ editor
+ howpublished
+ institution
+ journal
+ key
+ month
+ note
+ number
+ organization
+ pages
+ publisher
+ school
+ series
+ title
+ type
+ volume
+ year
+ }
+ {}
+ { label }
+
+INTEGERS { output.state before.all mid.sentence after.sentence after.block
+ doblank }
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+
+ #0 'doblank := % put a blank in output.nonnul if not zero
+}
+
+STRINGS { s t }
+
+FUNCTION {between}
+{ % what to do between output items
+ doblank #0 =
+ {" " * write$}
+ {write$}
+ if$
+}
+
+% from plain.bst (add periods after title, but also adds
+% commas in other places)
+FUNCTION {output.nonnull}
+{ 's :=
+ output.state mid.sentence =
+% { ", " * write$ }
+ { " " * write$ }
+ { output.state after.block =
+ { add.period$ write$
+ newline$
+ "\newblock " write$
+ }
+ { output.state before.all =
+ 'write$
+ { add.period$ " " * write$ }
+ if$
+ }
+ if$
+ mid.sentence 'output.state :=
+ }
+ if$
+ s
+}
+
+FUNCTION {output}
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.check}
+{ 't :=
+ duplicate$ empty$
+ { pop$ "empty " t * " in " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ "\bibitem{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
+FUNCTION {fin.entry}
+{ add.period$
+ write$
+ newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { "{\em " swap$ * "}" * }
+ if$
+}
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names} % needs a total rewrite using 'and' function
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {
+ s nameptr "{vv }{ll}{, f.}{, jj}" format.name$ 't := % de Geuzaine, C., jr
+% s nameptr "{vv }{ll}{ f.}{, jj}" format.name$ 't := % de Geuzaine C., jr
+% s nameptr "{ff }{vv }{ll}{, jj}" format.name$ 't := % Christophe de Geuzaine, jr
+% s nameptr "{f. }{vv }{ll}{, jj}" format.name$ 't := % C. de Geuzaine, jr
+% s nameptr "{vv }{ll}{, ff}{, jj}" format.name$ 't := % de Geuzaine, Christophe, jr
+% s nameptr "{vv }{ll}{, ff}{, jj}" format.name$ 't := % de Geuzaine, Christophe, jr
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { " et al." * }
+ { " and " * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+ { "" }
+ { author format.names }
+ if$
+}
+
+FUNCTION {format.editors}
+{
+ editor empty$
+ { "" }
+ { editor format.names
+ editor num.names$ #1 >
+ { " (eds.)" * }
+ { " (ed.)" * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.title}
+{ title empty$
+ { "" }
+ { title "t" change.case$ }
+ if$
+}
+
+FUNCTION {format.address}
+{ address empty$
+ { "" }
+ { ", " * address }
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { new.block
+ note }
+ if$
+}
+
+FUNCTION {n.dashify}
+{ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { "" }
+ { "there's a month but no year in " cite$ * warning$
+ month
+ }
+ if$
+ }
+ { month empty$
+ {"(" year ")" * * }
+% { month " " * year * }
+ {"(" year ")" * * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.month}
+{ month empty$
+ { "" }
+ { ", " * month }
+ if$
+}
+
+
+FUNCTION {format.btitle}
+{ title %emphasize
+}
+
+FUNCTION {tie.or.space.connect}
+{ duplicate$ text.length$ #3 <
+ { "~" }
+ { " " }
+ if$
+ swap$ * *
+}
+
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { series empty$
+ { "" }
+% { ", Vol. " * "{\bf " * volume "} of " * series * } %% No "vol."
+ { ", " * series ", " * "{\bf" * volume "}" * * }
+ if$
+ "volume and number" number either.or.check
+ }
+ if$
+}
+
+FUNCTION {format.chapter}
+{ chapter empty$
+ { "" }
+ { ", chapter" * chapter %tie.or.space.connect
+ }
+ if$
+}
+
+
+FUNCTION {format.number.series}
+{ volume empty$
+ { number empty$
+ { series field.or.null }
+ { series empty$
+ { "there's a number but no series in " cite$ * warning$ }
+ { ", " * series ", " * "{\bf" * number "}" * * }
+ if$
+ }
+ if$
+ }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.edition}
+{ edition empty$
+ { "" }
+ { output.state mid.sentence =
+ { ", " * edition "l" change.case$ " edition" * }
+ { ", " * edition "t" change.case$ " edition" * }
+ if$
+ }
+ if$
+}
+
+INTEGERS { multiresult }
+
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and
+ }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$
+ }
+ while$
+ multiresult
+}
+
+FUNCTION {format.pages}
+{ pages empty$
+ { "" }
+ { pages multi.page.check
+ { ", " * "pp." pages n.dashify tie.or.space.connect }
+ { "" pages tie.or.space.connect }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.vol.num.pages}
+{ volume empty$
+ { "empty volume in " cite$ * warning$
+ ", {\bf ?}"
+ }
+ { ", {\bf " * volume "}" * field.or.null
+ }
+ if$
+ number empty$
+ 'skip$
+ 'skip$
+ if$
+ pages empty$
+ 'skip$
+ { duplicate$ empty$
+ { pop$ format.pages }
+ { ", " * pages n.dashify * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { "chapter" }
+ { type "l" change.case$ }
+ if$
+ chapter tie.or.space.connect
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.in.ed.booktitle}
+{ booktitle empty$
+ { "" }
+ { editor empty$
+% { "In " booktitle emphasize *}
+ { booktitle emphasize }
+ { "In " format.editors * ", " * booktitle emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ { "all relevant fields are empty in " cite$ * warning$ }
+ 'skip$
+ if$
+}
+
+FUNCTION {format.thesis.type}
+{ type empty$
+ 'skip$
+ { pop$
+ type "t" change.case$
+ }
+ if$
+}
+
+FUNCTION {format.tr.type}
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+}
+
+FUNCTION {format.tr.number} %% old way
+{ type empty$
+ { "Technical Report" }
+ 'type
+ if$
+ number empty$
+ { "t" change.case$ }
+ { number tie.or.space.connect }
+ if$
+}
+
+FUNCTION {format.article.crossref}
+{ key empty$
+ { journal empty$
+ { "need key or journal for " cite$ * " to crossref " * crossref *
+ warning$
+ ""
+ }
+ { "In {\em " journal * "\/}" * }
+ if$
+ }
+ { "In " key * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.crossref.editor}
+{ editor #1 "{vv~}{ll}" format.name$
+ editor num.names$ duplicate$
+ #2 >
+ { pop$ " et~al." * }
+ { #2 <
+ 'skip$
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { " et~al." * }
+ { " and " * editor #2 "{vv~}{ll}" format.name$ * }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.book.crossref}
+{ volume empty$
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+ "In "
+ }
+ { "Volume" volume tie.or.space.connect
+ " of " *
+ }
+ if$
+ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { series empty$
+ { "need editor, key, or series for " cite$ * " to crossref " *
+ crossref * warning$
+ "" *
+ }
+ { "{\em " * series * "\/}" * }
+ if$
+ }
+ { key * }
+ if$
+ }
+ { format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {format.incoll.inproc.crossref}
+{ editor empty$
+ editor field.or.null author field.or.null =
+ or
+ { key empty$
+ { booktitle empty$
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
+ crossref * warning$
+ ""
+ }
+ { "In " booktitle * }
+ if$
+ }
+ { "In " key * }
+ if$
+ }
+ { "In " format.crossref.editor * }
+ if$
+ " \cite{" * crossref * "}" *
+}
+
+FUNCTION {article}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { journal emphasize "journal" output.check
+ format.vol.num.pages output
+ }
+ { format.article.crossref output.nonnull
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {book}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ crossref missing$
+ { "author and editor" editor either.or.check }
+ 'skip$
+ if$
+ }
+ if$
+ format.date "year" output.check
+ #1 'doblank := % remove blanks
+ format.btitle emphasize "title" output.check
+ format.edition output
+ crossref missing$
+ { format.bvolume output
+ format.number.series output
+ new.sentence
+ publisher "publisher" output.check
+ format.address "address" output.check
+ }
+ { new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+ format.note output
+ fin.entry
+ #0 'doblank := % blanks again TDS
+}
+
+FUNCTION {booklet}
+{ output.bibitem
+ format.authors output
+ format.date "year" output.check
+ format.title "title" output.check
+ howpublished address new.block.checkb
+ howpublished output
+ format.address output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+ author empty$
+ { format.editors "author and editor" output.check }
+ { format.authors output.nonnull
+ }
+ if$
+ format.date "year" output.check
+ format.btitle "title" output.check
+ new.sentence
+ format.in.ed.booktitle output
+ new.sentence
+ crossref missing$
+ { publisher output
+ format.address "address" output.check
+ }
+ { format.chapter.pages "chapter and pages" output.check
+ new.block
+ format.book.crossref output.nonnull
+ }
+ if$
+% format.edition output
+ format.note output
+ fin.entry
+}
+
+
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.address "address" output.check
+ format.month "month" output.check
+ format.bvolume output
+ format.number.series output
+ format.pages "pages" output.check
+ new.sentence
+ organization publisher new.sentence.checkb
+ organization output
+ publisher "publisher" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter output
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {incollection}
+%% same as "inproceedings, but without pages
+%% and the address means the publisher location, and therefore goes at the end.
+%% Useful for book chapters.
+%%
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ format.title "title" output.check
+ new.block
+ crossref missing$
+ { format.in.ed.booktitle "booktitle" output.check
+ format.chapter output
+ format.month output
+ format.bvolume output
+ format.number.series output
+%% format.chapter.pages "pages" output.check
+ format.pages output
+ new.sentence
+ organization publisher new.sentence.checkb
+ organization output
+ publisher "publisher" output.check
+ format.address "address" output.check
+ }
+ { format.incoll.inproc.crossref output.nonnull
+ format.chapter output
+ format.pages output
+ }
+ if$
+ format.note output
+ fin.entry
+}
+
+FUNCTION {conference} { incollection }
+
+FUNCTION {manual}
+{ output.bibitem
+ number empty$
+ { % original output
+ "empty number in " cite$ * warning$
+ author empty$
+ { organization empty$
+ 'skip$
+ { organization output.nonnull
+ address "address" output.check
+ }
+ if$
+ }
+ { format.authors output.nonnull }
+ if$
+ format.date "year" output.check
+ format.btitle emphasize "title" output.check
+ format.edition output
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ new.block
+ address "address" output.check
+ }
+ if$
+ format.note output
+ }
+ { % if number is not empty
+ number output
+ format.date "year" output.check
+ format.btitle emphasize "title" output.check
+ format.edition output
+ author empty$
+ { organization empty$
+ { address new.block.checka
+ address output
+ }
+ 'skip$
+ if$
+ }
+ { organization address new.block.checkb
+ organization output
+ new.block
+ address "address" output.check
+ }
+ if$
+ }
+ if$
+ fin.entry
+}
+
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ format.title "title" output.check
+ new.block
+ "Master's thesis." format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {masterthesis} { mastersthesis }
+
+FUNCTION {misc}
+{ output.bibitem
+ format.authors output
+ format.date output
+ title howpublished new.block.checkb
+ format.title output
+ howpublished new.block.checka
+ howpublished output
+ format.note output
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {phdthesis}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ format.btitle "title" output.check
+ new.block
+ "PhD thesis" format.thesis.type output.nonnull
+ school "school" output.check
+ address output
+ format.note output
+ fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+ editor empty$
+ { format.editors "editor" output.check
+ organization output
+ }
+ { format.editors output.nonnull }
+ if$
+ format.date "year" output.check
+ format.btitle emphasize "title" output.check
+ format.address "address" output.check
+ format.month "month" output.check
+ format.bvolume output
+ format.number.series output
+ new.sentence
+ organization publisher new.sentence.checkb
+ organization output
+ publisher "publisher" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+ author empty$
+ { number "number" output.check
+ format.date "year" output.check
+ format.title "title" output.check
+ add.period$
+ format.tr.type output
+ }
+ { format.authors "author" output.check
+ format.date "year" output.check
+ format.title "title" output.check
+ add.period$
+ format.tr.number "number" output.check %output.nonnull
+% format.tr.type output
+ }
+ if$
+ add.period$
+ institution "institution" output.check
+ format.address "address" output.check
+ format.note output
+ fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.authors "author" output.check
+ format.date "year" output.check
+ format.title "title" output.check
+ new.block
+ format.note "note" output.check
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+
+
+
+READ
+
+FUNCTION {begin.bib}
+{ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ "\begin{thebibliography}{99}"
+ write$ newline$
+}
+
+EXECUTE {begin.bib}
+
+EXECUTE {init.state.consts}
+
+ITERATE {call.type$}
+
+FUNCTION {end.bib}
+{ newline$
+ "\end{thebibliography}" write$ newline$
+}
+
+EXECUTE {end.bib}