% ---------------------------------------------------------------------------
% This is the LaTeX style file for ACL 2000 submissions. It is
% based on the ACL99 submissions file, which was in turn based on
% the EACL99 submissions file, which was in turn based on
% the COLING '98 submission file, which was in turn based on
% the aclap style, with an ID page from the aclsub style and some
% other slight modifications by George Foster.
% Modification for ANLP-NAACL 2000 by Janyce Wiebe and Tom O'Hara.
% Further modifications for ACL-2000 by Jonathan DeCristofaro.

% Note that reviewing for ACL 2000 is blind;
% You could include the author names in your .tex file using \author. 
% The style file will prevent the author names from being displayed on the
% title page.

% GJR - added proper latex2e template
%     - removed ref to "footheight", apparently unknown by latex2e
%     - added note about errors if cover-page fields are omitted.

% Here is a document template:
% \documentclass[]{article}
% \usepackage{aclsub}
% \title{Title}
% \id{Paper ID Code}
% \area{1 or 2 areas most closely matching the submission}
% \keywords{Up to 5 keywords specifying subject area}
% \whichsession{T1, T2, T3, T4, or G (choose one)?}
% \wordcount{number of words, excluding title page and references}
% \otherconferences{Other conferences paper is submitted to, if any}
% \summary{Short (no more than 5 lines) summary}
% \begin{document}
% \maketitle
% \bibliographystyle{acl}
% %...
% \bibliography{yourBibFile}
% \end{document}

% 
% or for earlier versions of latex:
%
% \documentstyle[12pt,aclsub]{article}
% \title{Title}
% % ... (as above)

% Here are some other things you might want to know:
%
% - \thanks won't work with this style
% - to have a figure or table span both columns, use \figure* or \table*
% - \cite produces citations like this: (Author, 1990)
%   \shortcite does this: (1990)
%   \newcite does this: Author (1990)
% GJR errors if they don't do all this:
% - all of the "\title", "\type", "\subject", "\id" and
%   "\conference" fields must be supplied.

\typeout{ACL 2000 submissions style}

% ---------------------------------------------------------------------------
% Physical page layout

\topmargin 0pt
\advance \topmargin by -\headheight
\advance \topmargin by -\headsep
     
\oddsidemargin 0pt
\evensidemargin \oddsidemargin
\marginparwidth 0.5in


%% uses stardard American margins
\setlength\textheight{9in} \setlength\textwidth{6.5in}

%GJR error in latex2e \setlength\footheight{0pt}   
\setlength\footskip{0.5in}

% ---------------------------------------------------------------------------
% Title Page.   Author is not included, since reviewing is blind.
\def\title#1{\gdef\@title{#1}}
\def\id#1{\gdef\@id{#1}}
\def\area#1{\gdef\@area{#1}}
\def\keywords#1{\gdef\@keywords{#1}}
\def\whichsession#1{\gdef\@whichsession{#1}}
\def\wordcount#1{\gdef\@wordcount{#1}}
\def\otherconferences#1{\gdef\@otherconferences{#1}}
\def\summary#1{\gdef\@summary{#1}}

\def\maketitle{\begingroup
 \newpage \global\@topnum\z@ \@makeidpage\thispagestyle{empty}
 \endgroup \let\makeidpage\relax \let\@makeidpage\relax}
\def\@makeidpage{\newpage
 \null
%%
%% single-space summary section;  ID code in header
 \spacing{1} \normalsize \vspace{-1.0in} \begin{flushright} \@id
 \end{flushright} \vspace{0in}
%%
  %% \vspace{-14mm}
\begin{center}
 {\Large\bf \@title \par}
 {\def\and{\unskip\enspace{\rm and}\enspace}%
  \def\And{\end{tabular}\hss \egroup \hskip 1in plus 2fil 
           \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}}%
  \def\AND{\end{tabular}\hss\egroup \hfil\hfil\egroup
          \vskip 0.25in plus 1fil minus 0.125in
           \hbox to \linewidth\bgroup \hfil\hfil
             \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}}
 \hbox to \linewidth\bgroup \hfil\hfil
   \hbox to 0pt\bgroup\hss 
        %       \begin{tabular}[t]{c}\@author 
    %                \end{tabular}
\hss\egroup
   \hfil\hfil\egroup
  }
 {\@date}
 \end{center} 
 {{\bf Paper ID Code:\ }\@id}\vskip -\baselineskip
 {{\bf Topic Area(s):\ }\@area}\vskip -\baselineskip
 {{\bf Keywords:\ }\@keywords}\vskip -\baselineskip
 {{\bf 
 Which Session: T1, T2, T3, T4, or G  
 (you must choose only one)?\ }\@whichsession}\vskip -\baselineskip
 {{\bf Word Count:\ }\@wordcount}\vskip -\baselineskip
 {{\bf Under consideration for other
 conferences (specify)?\ }\@otherconferences}
 \par\vspace{-1em}
 %% larger font for 'Abstract'; abstract 
 %% text not indented
 \vspace{2pc}
 {\bf\large Abstract\vspace{-1.5em}\vspace{0pt}}
 \normalsize
 \vspace{1pc}
 \par\noindent\@summary
\pagebreak
}


% ---------------------------------------------------------------------------
% We're never going to need a table of contents, so just flush it to
% save space --- suggested by drstrip@sandia-2
\def\addcontentsline#1#2#3{}


% ---------------------------------------------------------------------------
% bibliography

\def\thebibliography#1{\section*{References}
  \global\def\@listi{\leftmargin\leftmargini
               \labelwidth\leftmargini \advance\labelwidth-\labelsep
               \topsep 1pt plus 2pt minus 1pt
               \parsep 0.25ex plus 1pt \itemsep 0.25ex plus 1pt}
  \list {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
    \advance\leftmargin\labelsep\usecounter{enumi}}
    \def\newblock{\hskip .11em plus .33em minus -.07em}
    \sloppy
    \sfcode`\.=1000\relax}

\def\@up#1{\raise.2ex\hbox{#1}}

% most of cite format is from aclsub.sty by SMS

% don't box citations, separate with ; and a space
% also, make the penalty between citations negative: a good place to break
% changed comma back to semicolon pj 2/1/90
% \def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
% \def\@citea{}\@cite{\@for\@citeb:=#2\do
%   {\@citea\def\@citea{;\penalty\@citeseppen\ }\@ifundefined
%      {b@\@citeb}{{\bf ?}\@warning
%      {Citation `\@citeb' on page \thepage \space undefined}}%
% {\csname b@\@citeb\endcsname}}}{#1}}

% don't box citations, separate with ; and a space
% Replaced for multiple citations (pj) 
% don't box citations and also add space, semicolon between multiple citations
\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@cite{\@for\@citeb:=#2\do
     {\@citea\def\@citea{; }\@ifundefined
       {b@\@citeb}{{\bf ?}\@warning
        {Citation `\@citeb' on page \thepage \space undefined}}%
 {\csname b@\@citeb\endcsname}}}{#1}}

% Allow short (name-less) citations, when used in
% conjunction with a bibliography style that creates labels like
%       \citename{<NAMES>, }<YEAR>
% 
\let\@internalcite\cite
\def\cite{\def\citename##1{##1, }\@internalcite}
\def\shortcite{\def\citename##1{}\@internalcite}
\def\newcite{\leavevmode\def\citename##1{{##1} (}\@internalciteb}

% Macros for \newcite, which leaves name in running text, and is
% otherwise like \shortcite.
\def\@citexb[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  \def\@citea{}\@newcite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{;\penalty\@m\ }\@ifundefined
       {b@\@citeb}{{\bf ?}\@warning
       {Citation `\@citeb' on page \thepage \space undefined}}%
\hbox{\csname b@\@citeb\endcsname}}}{#1}}
\def\@internalciteb{\@ifnextchar [{\@tempswatrue\@citexb}{\@tempswafalse\@citexb[]}}

\def\@newcite#1#2{{#1\if@tempswa, #2\fi)}}

\def\@biblabel#1{\def\citename##1{##1}[#1]\hfill}

%%% More changes made by SMS (originals in latex.tex)
% Use parentheses instead of square brackets in the text.
\def\@cite#1#2{({#1\if@tempswa , #2\fi})}

% Don't put a label in the bibliography at all.  Just use the unlabeled format
% instead.
\def\thebibliography#1{\vskip\parskip%
\vskip\baselineskip%
\def\baselinestretch{1}%
\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi%
\vskip-\parskip%
\vskip-\baselineskip%
\section*{References\@mkboth
 {References}{References}}\list
 {}{\setlength{\labelwidth}{0pt}\setlength{\leftmargin}{\parindent}
 \setlength{\itemindent}{-\parindent}}
 \def\newblock{\hskip .11em plus .33em minus -.07em}
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax}
\let\endthebibliography=\endlist

% Allow for a bibliography of sources of attested examples
\def\thesourcebibliography#1{\vskip\parskip%
\vskip\baselineskip%
\def\baselinestretch{1}%
\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi%
\vskip-\parskip%
\vskip-\baselineskip%
\section*{Sources of Attested Examples\@mkboth
 {Sources of Attested Examples}{Sources of Attested Examples}}\list
 {}{\setlength{\labelwidth}{0pt}\setlength{\leftmargin}{\parindent}
 \setlength{\itemindent}{-\parindent}}
 \def\newblock{\hskip .11em plus .33em minus -.07em}
 \sloppy\clubpenalty4000\widowpenalty4000
 \sfcode`\.=1000\relax}
\let\endthesourcebibliography=\endlist

\def\@lbibitem[#1]#2{\item[]\if@filesw 
      { \def\protect##1{\string ##1\space}\immediate
        \write\@auxout{\string\bibcite{#2}{#1}}\fi\ignorespaces}}

\def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
       {\string\bibcite{#1}{\the\c@enumi}}\fi\ignorespaces}

% ---------------------------------------------------------------------------
% sections with less space
\def\section{\@startsection {section}{1}{\z@}{-2.0ex plus
    -0.5ex minus -.2ex}{1.5ex plus 0.3ex minus .2ex}{\large\bf\raggedright}}
\def\subsection{\@startsection{subsection}{2}{\z@}{-1.8ex plus
    -0.5ex minus -.2ex}{0.8ex plus .2ex}{\normalsize\bf\raggedright}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{1.5ex plus
   0.5ex minus .2ex}{0.5ex plus .2ex}{\normalsize\bf\raggedright}}
\def\paragraph{\@startsection{paragraph}{4}{\z@}{1.5ex plus
   0.5ex minus .2ex}{-1em}{\normalsize\bf}}
\def\subparagraph{\@startsection{subparagraph}{5}{\parindent}{1.5ex plus
   0.5ex minus .2ex}{-1em}{\normalsize\bf}}

% ---------------------------------------------------------------------------
% Footnotes
\footnotesep 6.65pt %
\skip\footins 9pt plus 4pt minus 2pt
\def\footnoterule{\kern-3pt \hrule width 5pc \kern 2.6pt }
\setcounter{footnote}{0}

% ---------------------------------------------------------------------------
% Spacing, borrowed from Fernando Pereira's acl '93 version

%---Set up double spacing

\def\baselinestretch{2}


%---New command "\setstretch" (slightly more mnemonic... and easier to type)

\def\setstretch#1{\renewcommand{\baselinestretch}{#1}}


%---Increase the space between last line of text and footnote rule.
%   This is a very untidy way to do it!

\skip\footins 20pt plus4pt minus4pt


%---Reset baselinestretch within footnotes and floats. Originally stolen
%   from Stanford thesis style.

\def\@xfloat#1[#2]{\ifhmode \@bsphack\@floatpenalty -\@Mii\else
   \@floatpenalty-\@Miii\fi\def\@captype{#1}\ifinner
      \@parmoderr\@floatpenalty\z@
    \else\@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
       \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
       \@tfor \@tempa :=#2\do
                        {\if\@tempa h\advance\@tempcnta \@ne\fi
                         \if\@tempa t\advance\@tempcnta \tw@\fi
                         \if\@tempa b\advance\@tempcnta 4\relax\fi
                         \if\@tempa p\advance\@tempcnta 8\relax\fi
         }\global\count\@currbox\@tempcnta}\@fltovf\fi
    \global\setbox\@currbox\vbox\bgroup 
    \def\baselinestretch{1}\small\normalsize
    \boxmaxdepth\z@
    \hsize\columnwidth \@parboxrestore}
\long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize
    \interlinepenalty\interfootnotelinepenalty 
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth \@parboxrestore
   \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
    {\rule{\z@}{\footnotesep}\ignorespaces
      #1\strut}}}

% Stolen from MIT.
%
% A single spaced quote (say) is done by surrounding singlespace with quote.
%
\def\singlespace{%
\vskip\parskip%
\vskip\baselineskip%
\def\baselinestretch{1}%
\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi%
\vskip-\parskip%
\vskip-\baselineskip%
}

\def\endsinglespace{\par}

%  spacing, doublespace and onehalfspace all are meant to INCREASE the
%  spacing (i.e. calling onehalfspace from within doublespace will not
%  produce a graceful transition between spacings)
%
\def\spacing#1{\par%
 \def\baselinestretch{#1}%
 \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi}

\def\endspacing{\par%
 \vskip \parskip%
 \vskip \baselineskip%
 \endgroup%
 \vskip -\parskip%
 \vskip -\baselineskip%
 \begingroup}

\def\onehalfspace{\spacing{1.5}}
\let\endonehalfspace=\endspacing

\def\doublespace{\spacing{2}}
\let\doublespace=\endspacing

% Fix up spacing before and after displayed math
% (arraystretch seems to do a fine job for inside LaTeX displayed math,
% since array and eqnarray seem to be affected as expected)
% Changing \baselinestretch and doing a font change also works if done here,
% but then you have to change @setsize to remove the call to @nomath)
%
\everydisplay{
   \abovedisplayskip \baselinestretch\abovedisplayskip%
   \belowdisplayskip \abovedisplayskip%
   \abovedisplayshortskip \baselinestretch\abovedisplayshortskip%
   \belowdisplayshortskip  \baselinestretch\belowdisplayshortskip}



% Lists and paragraphs
\parskip 12pt
\parindent 0pt
\topsep 4pt plus 1pt minus 2pt
\partopsep 1pt plus 0.5pt minus 0.5pt
\itemsep 2pt plus 1pt minus 0.5pt
\parsep 2pt plus 1pt minus 0.5pt

\leftmargin 2em \leftmargini\leftmargin \leftmarginii 2em
\leftmarginiii 1.5em \leftmarginiv 1.0em \leftmarginv .5em \leftmarginvi .5em
\labelwidth\leftmargini\advance\labelwidth-\labelsep \labelsep 5pt

\def\@listi{\leftmargin\leftmargini}
\def\@listii{\leftmargin\leftmarginii
   \labelwidth\leftmarginii\advance\labelwidth-\labelsep
   \topsep 2pt plus 1pt minus 0.5pt
   \parsep 1pt plus 0.5pt minus 0.5pt
   \itemsep \parsep}
\def\@listiii{\leftmargin\leftmarginiii
    \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
    \topsep 1pt plus 0.5pt minus 0.5pt 
    \parsep \z@ \partopsep 0.5pt plus 0pt minus 0.5pt
    \itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv
     \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
     \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
     \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}

\abovedisplayskip 7pt plus2pt minus5pt%
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip  0pt plus3pt%   
\belowdisplayshortskip  4pt plus3pt minus3pt%

% ---------------------------------------------------------------------------
% Less leading in most fonts (due to the narrow columns)
% The choices were between 1-pt and 1.5-pt leading
\def\@normalsize{\@setsize\normalsize{11pt}\xpt\@xpt}
\def\small{\@setsize\small{10pt}\ixpt\@ixpt}
\def\footnotesize{\@setsize\footnotesize{10pt}\ixpt\@ixpt}
\def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
\def\large{\@setsize\large{14pt}\xiipt\@xiipt}
\def\Large{\@setsize\Large{16pt}\xivpt\@xivpt}
\def\LARGE{\@setsize\LARGE{20pt}\xviipt\@xviipt}
\def\huge{\@setsize\huge{23pt}\xxpt\@xxpt}
\def\Huge{\@setsize\Huge{28pt}\xxvpt\@xxvpt}