% uist04.sty
%
% Originally developed by Stephane Chatty [chatty@dgac.fr].
% Modifications by Steve Feiner [feiner@cs.columbia.edu] noted with SKF.
%
% uist04.sty is to be used like this:
%
% \documentclass{article}
% \usepackage{times}
% \usepackage{uist04}
% \begin{document}
% \title{Your Title}
% \author{Your name and address}
% \maketitle
% \abstract
% Your abstract goes here.
% \keywords Your, keywords, go, here, separated, by, commas
% \section{INTRODUCTION}
% Etc., etc. . . .
% \end{document}
%
% I was not able to redefine the output routine in order to
% make the two columns of the last page equal in length.
% To do that, add a \linebreak (to justify the current line)
% and \newpage (to start a new column)
% at the right place in the text on your last page.

\typeout{Style "UIST '04" <22 March 2004>.}

% SKF: Changed pagestyle default to empty
% change this to \pagestyle{plain} to temporarily add page numbers
\pagestyle{empty}

% fonts for headings in Helvetica. Edit if you have no such fonts
\newfont{\helvix}{phvr at 9pt} % roman9
\newfont{\helvixb}{phvb at 9pt} % bold9
\newfont{\helvixo}{phvro at 9pt} % italic9
\newfont{\helvxviiib}{phvb at 18pt} % bold18
\def\Large{\@setsize\Large{14pt}\xiipt\@xiipt}

% slight change to line spacing
\def\@normalsize{\@setsize\normalsize{11pt}\xpt\@xpt
\abovedisplayskip 10pt plus2pt minus5pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6pt plus3pt
minus3pt\let\@listi\@listI}

% redefined to avoid parskip after section headings
\def\@xsect#1{\@tempskipa #1\relax
      \ifdim \@tempskipa>\z@
       \par \nobreak
       \vskip \@tempskipa
       \vskip-\parskip % added
       \@afterheading
    \else \global\@nobreakfalse \global\@noskipsectrue
       \everypar{\if@noskipsec \global\@noskipsecfalse
                   \clubpenalty\@M \hskip -\parindent
                   \begingroup \@svsechd \endgroup \unskip
                   \hskip -#1
                  \else \clubpenalty \@clubpenalty
                    \everypar{}\fi}\fi\ignorespaces}


% all these are redefined to adjust headings style

\def\section{
  \@startsection{section}{1}{\z@}{-0.01ex plus -.2ex}{.01ex plus
.2ex}{\helvixb}
}

\def\subsection{
  \@startsection{subsection}{2}{\z@}{-0.01ex plus -.2ex}{.01ex plus
.2ex}{\helvixb}
}

\def\subsubsection{
  \@startsection{subsubsection}{3}{\z@}{0.01ex plus .2ex}{-1em}{\helvixo}
}

\def\paragraph{
  \@startsection{paragraph}{4}{\z@}{0ex plus .2ex}{-1em}{\helvixb}
}

\def\subparagraph{
  \@startsection{subparagraph}{4}{\parindent}{0ex plus .2ex}{-1em}{\helvixo}
}

% separation between paragraphs
\parskip 1.75ex plus 1pt

% indentation of paragraphs
\parindent 0pt

% SKF: Section numbers may be optionally used for UIST!
% no section level is numbered
\setcounter{secnumdepth}{0}

% abstract is just another section
\def\abstract{\section*{ABSTRACT}}

% SKF: keywords is a paragraph
\def\keywords{\paragraph{KEYWORDS:}}	% SKF

% redefined maketitle to eliminate \thispagestyle{plain} and add the copyright box
\newif\if@copyright
\@copyrighttrue

\def\nocopyright{\@copyrightfalse}

\def\maketitle{\par
 \begingroup
 \def\thefootnote{\fnsymbol{footnote}}
 \def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}
 \if@twocolumn
   \twocolumn[\@maketitle]
 \else
   \global\@topnum\z@
   \@maketitle
 \fi
%%% SKF: If you want to disable the copyright box (e.g., for an IEEE
%%% publication), then comment out all lines from here up to the
%%% line labeled ``End of copyright box''
%%%
%%% SKF: NOTE: Assume that \textfloatsep is 20pt.  Therefore height of picture
%%% 	  must be 2.54cm - 20pts = 1.84cm
%%%

\if@copyright
 \begin{figure}[b]
 \setlength{\unitlength}{1cm}
 \begin{picture}(8.5,1.84) %% SKF: Compensate for \textfloatsep in height!!!
 \end{picture}
 \end{figure}
\fi
%%% End of copyright box
 \@thanks
 \endgroup
 \setcounter{footnote}{0}
 \let\maketitle\relax
 \let\@maketitle\relax
 \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}

% redefined title presentation
\def\@maketitle{
% \vbox to 2.5in{
  \begin{center}
 {\helvxviiib\baselineskip 20pt \@title \par}
 \vskip 1.5em
 {%\lineskip .5em
 \large 
 \begin{tabular}[t]{c}%
 \@author
 \end{tabular}\par}%
 \end{center}
 \vskip 5ex
%\vfill}
}

% default definition for \author
\def\authorname#1{\gdef\@authorname{#1}}
\gdef\@authorname{Author Name}

\def\authoraddr#1{\gdef\@authoraddr{#1}}
\gdef\@authoraddr{Author Affiliation\\Street Name\\City}

\author{
  \begin{tabular}{c}
  {\em\@authorname}\\[.4cm]
  \@authoraddr
  \end{tabular}
}

% redefinition of itemize  %% SKF: Modified to indent all lines past 1st.
 \def\itemize{\ifnum \@itemdepth >3 \@toodeep\else \advance\@itemdepth \@ne
 \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
 \list{\csname\@itemitem\endcsname}{\topsep -.5\parskip\parsep 0pt%
 \itemsep 0pt\itemindent 0pt\labelwidth
1ex\def\makelabel##1{\hss\llap{##1}}}\fi}
 \leftmargini 2ex	%% SKF
 \leftmarginii 2ex	%% SKF


% redefinition of captions
\long\def\@makecaption#1#2{
 \vskip 4pt
 \@tempdima\hsize
  \advance\@tempdima -1cm
 \setbox\@tempboxa\hbox{\helvix #1: #2}
 \ifdim \wd\@tempboxa >\@tempdima
     {\advance\leftskip .5cm \advance\rightskip .5cm\helvix\baselineskip 10pt
#1: #2\par} % SKF: added baselineskip
  \else
     {\centering \hbox to\@tempdima{\hfil\box\@tempboxa\hfil}}
 \fi}

% redefined bibliography stuff to change the heading and the labels
\def\@biblabel#1{#1.\hfill}

\def\thebibliography#1{\section*{REFERENCES\@mkboth{REFERENCES}{REFERENCES}}
  \list{\arabic{enumi}.}{
    \settowidth\labelwidth{[#1]}
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \topsep\z@
    \parskip\z@
    \partopsep\z@
    \usecounter{enumi}}
 \def\newblock{\hskip .11em plus .33em minus .07em}
 \sloppy
 \clubpenalty4000
 \widowpenalty4000
 \sfcode`\.=1000\relax}

% misc. style parameters
\twocolumn
\flushbottom
\columnsep .8cm		% SKF: Changed from .85cm
\textheight 23.5cm
\textwidth 17.8cm	% SKF: Changed from 17.85cm
\headheight 0pt
\headsep 0pt
\topmargin -.25in
\oddsidemargin -.25in
\evensidemargin -.25in
\textfloatsep 20pt	% SKF: Assume 20pts, so copyright box is right size
\def\baselinestretch{.916666}
