% \iffalse meta-comment
%
% Copyright 1995 the CHI96 commitee and any individual authors
% listed elsewhere in this file.  All rights reserved.
%
% For further copyright information see the file legal.txt, and any
% other copyright notices in this file.
%
% This package is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%
% For error reports concerning UNCHANGED versions of this file no more
% than one year old, see bugs.txt.
%
% Please do not request updates from us directly.  Primary
% distribution is through the CTAN archives.
%
%
% IMPORTANT COPYRIGHT NOTICE:
%
% You are NOT ALLOWED to distribute this file alone.
% You are NOT ALLOWED to distribute this file alone.
%
% You are allowed to distribute this file under the condition that it is
% distributed together with all the files listed in manifest.txt.
%
% If you receive only some of these files from someone, complain!
%
% Permission is granted to copy this file to another file with a clearly
% different name and to customize the declarations in that copy to serve
% the needs of your installation, provided that you comply with
% the conditions in the file legal.txt.
%
% However, NO PERMISSION is granted to produce or to distribute a
% modified version of this file under its original name.
%
% You are NOT ALLOWED to change this file.
%
%
% \fi
% \CheckSum{144}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%
% \iffalse
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<*dtx>
\ProvidesFile{chi96.dtx}
%</dtx>
%<driver>\ProvidesFile{chi96.drv}
%<chi96>\ProvidesClass{chi96}
%<*chi96|dtx>
              [1995/11/14 1.1 CHI 96
%</chi96|dtx>
%<chi96>                       document class]
%<*driver>
              documentation]

\newcommand*{\Lopt}[1]{\textsf {#1}}
\newcommand*{\BibTeX}{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em\TeX}}

\documentclass{ltxdoc}
\begin{document}
 \DocInput{chi96.dtx}
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{chi96.dtx}
%
% \title{Package `chi96' for \LaTeXe\thanks{This
%    file has version number \fileversion, last revised \filedate.}}
%
% \author{%
% Copyright (C) 1995 by Thomas Schulze
% }
% \date{\filedate}
% \maketitle
% \tableofcontents
%
% \StopEventually{}    ^^A
%
% \section{Abstract}
%    Most of this file is a variation of the standard document class
%    |article|.
%    Altogether it implements a class which
%    meets the formatting requirements for CHI 96. It is
%    strongly advised to be used whenever an author wants to send
%    his/her work as a submission to CHI 96. This documentation
%    does \textit{not} follow these guidelines, it is conformant to
%    standard \LaTeXe{} documentation. See the enclosed file
%    \texttt{96pubsf.tex} for an example of a CHI 96 formatted document.
%
%    Note: We do not provide a conforming \BibTeX{} style file. We really
%    think its not worth the time. Use the |thebibliography| environment
%    for your (probably and/or hopefully) short bibliography.
%
%    Another note: Currently we have no method for automatic placement
%    of the copyright box (the last 2.5cm of the left column on the first
%    page). Look into the example file, we implemented it with a
%    carefully placed |\vspace*{2.5cm}| command. A possible solution
%    is beeing thought of and will maybe included in the next
%    version.
%
% \section{Declaration of Options}
%
%  \subsection{Multicols option}
%
%    The option \Lopt{multicols} controls wether we use the \textit{multicols}
%    package to get balanced columns but with some problems with the
%    |title|-command. When not given we use plain old |twocolumn| as
%    an option to the underlying |article|-class. This can not balance
%    the columns on the last page.
%    \begin{macrocode}
\newif\if@multicols
\@multicolsfalse
\DeclareOption{multicols}{
 \@multicolstrue}
%    \end{macrocode} 
%
%  \subsection{Psfonts option}
%
%    The option \Lopt{psfonts} tries to use Postscript fonts. As specified
%    in |96pubsf| plain text shall be typeset using the font~\textit{Times}
%    or \textit{Times New Roman}. 
%    \begin{macrocode}
\newif\if@psfonts
\@psfontsfalse
%
\DeclareOption{psfonts}{
 \@psfontstrue}
%    \end{macrocode}
%
%  \subsection{Font sizes}
%
%    CHI 96 requires conforming articles to be written in a 10pt font.
%    We don't want the author to override it, so we just spit out a
%    message and ignore the offending font size command.
%    \begin{macrocode}
\DeclareOption{11pt}{\ClassWarning{chi96}{%
  CHI 96 does not allow the use of fonts in size 11pt.\MessageBreak
  We will continue with size 10pt.}}
\DeclareOption{12pt}{\ClassWarning{chi96}{%
  CHI 96 does not allow the use of fonts in size 12pt.\MessageBreak
  We will continue with size 10pt.}}
%    \end{macrocode}
%
%  \subsection{Titlepage}
%
%    We do not permit the optional separat \Lopt{titlepage} of the
%    article class. So, we issue a warning and ignore the request.
%    \begin{macrocode}
\DeclareOption{titlepage}{\Classwarning{chi96}{%
  CHI 96 does not allow the use of a separate titlepage.\MessageBreak
  We will ignore your request.}}
%    \end{macrocode}
%
%  \subsection{Other options}
%
%    Every other option will be passed to our parent class, |article|.
%    This \textit{may} not be the right behaviour for every option.
%    If you encounter problems or if an option disagrees with CHI~96
%    guidelines, please send me a message.
%    \begin{macrocode}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
%    \end{macrocode}
%
% \section{Execution of Options}
%
%    Here we execute the default options to initialize certain
%    variables. Note for Europeans and other people outside
%    US: Its perfectly legal to use A4 paper or something else.
%    We take care for the position of your text on the physical
%    paper, so go ahead, use A4 (even A3 could be used).
%    \begin{macrocode}
\ExecuteOptions{letterpaper,final}
%    \end{macrocode}
%
%    Now we are ready to process the users option.
%    The |\ProcessOptions| command causes the execution of the code
%    for every option \Lopt{FOO} which is declared and for which the user typed
%    the \Lopt{FOO} option in his |\documentclass| command.
%    For every option \Lopt{BAR} he typed,
%    which is not declared, the option is assumed to be a global option.
%    \begin{macrocode}
\ProcessOptions
%    \end{macrocode}
%
%  \section{Loading Classes}
%
%    The CHI 96 class is derived from the \LaTeXe{} standard class
%    |article|. We load it after all options are processed to
%    let it take use of the other options. And of course, we modify
%    certain things to match the required layout.
%    \begin{macrocode}
\if@multicols
 \LoadClass[10pt]{article}
\else
 \LoadClass[10pt,twocolumn]{article}
\fi
%    \end{macrocode}
%
%  \section{Loading Packages}
%
%    The CHI 96 formatting guidelines suggest a twocolumn format with
%    balanced paragraphs. So we may need the presence of the package
%    |multicol|, which will do that job automagically. We use it
%    automagically by using the document hooks for switching multi
%    columns on or off. This is a sub-optimal solution. Note: You have to
%    specify the |\title| and |\author| in the preamble of your file.
%    The |\date| command is ignored, anyway.
%    \begin{macrocode}
\if@multicols
 \RequirePackage{multicol}
 \AtBeginDocument{\maketitle\begin{multicols}{2}}
 \AtEndDocument{\end{multicols}}
\fi
%    \end{macrocode}
%
%    If the user requested the use of Postscript fonts we load the |times|
%    package.
%    \begin{macrocode}
\if@psfonts
 \RequirePackage{times}
\fi
%    \end{macrocode}
%
% \section{Document Layout}
%
%    In this section we are finally dealing with the nasty typographical
%    details. 
%
% \subsection{Font Sizes}
%    
%    The title shall be printed in 18pt Bold.
%    \begin{macrocode}
\newcommand\TLARGE{\@setfontsize\LARGE{18}{24}}
%    \end{macrocode}
%
% \subsection{Page numbering}
%    
%    The page numbers will be inserted by the publisher, so we don't need
%    any.
%    \begin{macrocode}
\pagestyle{empty}
%    \end{macrocode}
%
% \subsection{Paragraphing}
%
% \begin{macro}{\parindent}
% \begin{macro}{\parskip}
%    We want no parindent.
%    |\parskip| gives the extra vertical space between paragraphs. We
%    want some  extra space.    
%    \begin{macrocode}
\parindent0pt
\setlength\parskip{\p@ \@plus \p@}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\parsep}
% \begin{macro}{\itemsep}
% \begin{macro}{\partopsep}
% \begin{macro}{\topsep}
%    As a special case we deal with |\parsep|, the extra space between
%    paragraphs in an |itemize| environment, |\itemsep|, the extra
%    space between items, |\topsep|, the extra space at the beginning
%    of an |itemize| environment and |\partopsep|.
%    \begin{macrocode}
\setlength\topsep{0pt}
\setlength\partopsep{0pt}
\setlength\parsep{0pt}
\setlength\itemsep{0pt}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Page Layout}
%
%    All margin dimensions are measured from a point one inch from the
%    top and lefthand side of the page, since this is the default margin
%    of allmost any printer driver.
%
% \subsubsection{The dimension of text}
%
% \begin{macro}{\textwidth}
%    The standard classes do calculate the |\textwidth| depending on
%    the font size and the paper used. CHI 96 requieres the font size
%    to be 10pt, and all material on the page have a width of 18cm (7in).
%    We modify the textwidth a little bit to be a whole number of points.
%    \begin{macrocode}
\setlength{\textwidth}{7in}% aka 18cm
\@settopoint\textwidth
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\columnsep}
%    There shall be a space of .32in, aka 0.81cm, between two columns.
%    \begin{macrocode}
\setlength{\columnsep}{.32in}% aka .81cm
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\textheight}
%    The |\textheight| is required by CHI 96 to be fixed, too.
%    \begin{macrocode}
\setlength{\textheight}{9.25in}% aka 23.5cm
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{thepage}
%    We want no page numbers. Nowhere!
%    \begin{macrocode}
\let\thepage\relax
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{Headings}
%
% \begin{macro}{\headheight}
% \begin{macro}{\headsep}
%    We do not use headings at all, so we define them to be empty.
%    \begin{macrocode}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsubsection{Footings}
%
% \begin{macro}{\footskip}
%    We don't want no footings, too. Note, this will only be sufficiant
%    for \LaTeXe{}. 
%    \begin{macrocode}
\setlength{\footskip}{0in}
%    \end{macrocode}
% \end{macro}
%
%
% \subsubsection{Margins}
%
% \begin{macro}{\oddsidemargin}
% \begin{macro}{\topmargin}
%    Since the material on each page should be centered we have to take
%    the papersize into account. We center the text on the page, by
%    calculating the difference between |\textwidth| and
%    |\paperwidth|. Half of that difference is than used for
%    the margin (thus |\oddsidemargin| is |1in| less).
%
%    \begin{macrocode}
\setlength\@tempdima        {\paperwidth}
\addtolength\@tempdima      {-7in}
\setlength\oddsidemargin    {.5\@tempdima}
\addtolength\oddsidemargin  {-1in}
%    \end{macrocode}
%
%    The |\topmargin| shall be .75in (1.9cm). (Absolute value, no
%    1in default margin\dots)
%    \begin{macrocode}
\setlength\topmargin{.75in}
\addtolength\topmargin{-1in}
%    \end{macrocode}
%
% \end{macro}
% \end{macro}
%
% \subsection{Sections}

%    We don't want no numbering of |\section|, |\subsection| and the like.
%    In order to do so we set |\secnumdepth| to $0$.
%    \begin{macrocode}
\setcounter{secnumdepth}{0}
%    \end{macrocode}
%
%    And because we use non-standard font sizes and spaces for the sections,
%    we have to redefine the |\section| style commands, too.
%    The |article| class uses a little to much space after the sectionline.
%    Note: On most standard \LaTeXe installations you will be notified
%    that there is no |\itshape|-ed font in this size and \LaTeXe{} will use
%    a |\slshape|-ed instead. However, when using Postscript fonts you will
%    probably have such a font.
%
%    \begin{macrocode}
\renewcommand\section{\@startsection{section}{1}{\z@}%
                                   {-2ex \@plus -.1ex \@minus -.1ex}%
                                   {.1ex \@minus .1ex}%
                                   {\normalfont\normalsize\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{1}{\z@}%
                                     {-2ex \@plus -.1ex \@minus -.1ex}%
                                     {.1ex \@minus .1ex}%
                                     {\normalfont\normalsize\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{1}{0pt}%
                                     {-2ex \@plus -.1ex \@minus -.1ex}%
                                     {.1ex \@minus .1ex}%
                                     {\normalfont\normalsize\itshape}}
%    \end{macrocode}
%
% \section{Document Markup}
%
% \subsection{The title}
%    We need to change the title a little bit.
%
%    There is no way this can be a seperate titlepage because
%    the CHI 96 guidelines don't want one. So we provide just
%    a new |\@maketitle| command.
%
% \begin{macro}{\@maketitle}
%    This macro takes care of formatting the title information when we
%    have no separate title page.
%
%    We always start a new page, leave some white space and center the
%    information. The title is set in a |\TLARGE\bfseries| font, the author
%    names and the rest in a |\large| font. Note, for CHI 96 the author names
%    should be |\bfseries|, too, but without changing the |\author| command
%    this belongs to the author!
%    \begin{macrocode}
\def\@maketitle{%
  \newpage
  \null
  \begin{center}%
    {\TLARGE\bfseries \@title \par}%
    \vskip 3em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
  \end{center}%
  \par
  \vskip 0.5em}
%    \end{macrocode}
% \end{macro}
%
% \subsection{The bibliography}
%
% \begin{macro}{\refname}
%    Since section titles shall be all uppercase, we need
%    to redefine the |\refname| macro, automatically set
%    by the |\begin{thebibliography}| command
%    \begin{macrocode}
\renewcommand{\refname}{REFERENCES}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@biblabel}
%    We want no [] around the numbers.
%    \begin{macrocode}
\renewcommand*{\@biblabel}[1]{#1\hfill}
%    \end{macrocode}
% \end{macro}
%
%
%    And that's it. Happy \TeX ing.
%
% \Finale
%
\endinput

