% SALT LaTeX style.  Alexis Dimitriadis 2/28/99 (alexis.dimitriadis@let.uu.nl)
% For the proceedings of the Semantics and Lingistic Theory Conference.
%
% Revised 5/18/01: Changed name to reflect the fact that it works for
% any year (until the style sheet changes!).
% Also made inconsequential changes to the file.

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{salt}[2001/05/18 SALT Proceedings Style]


% Pass all other options to the parent class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}

\newcommand{\@sizeoption@err}{\ClassError{salt}
  {Cannot use size option \CurrentOption} 
  {The SALT style requires (and automatically loads) 12pt text}}

\DeclareOption{10pt}{\@sizeoption@err}
\DeclareOption{11pt}{\@sizeoption@err}

\ProcessOptions 
\LoadClass[12pt]{article}


% Use this file INSTEAD of the `article' class:
% \documentclass{salt}
%
% This class definition does not provide an example environment, or a
% bibliography.  
%
% TITLE BLOCK DIRECTIONS:
%
% To format your title and name, use the standard commands \title{...},
% \author{...}, the non-standard \affiliation{...}, and \maketitle.
%
% Use the standard command \thanks{...} if you want to provide an
% acknowledgements endnote in the title.  You can also call it as
% \acknowledge{...}.

% This file also defines the following for your convenience:
% \fourteenpoint  (actually same as \large)
% \twelvepoint	  (actually same as \normalsize)
% \tenpoint	

% When you need to skip one line, you can do it like this:
%    \vspace{\onelineskip}
% or \\[\onelineskip]
%

%  (End of the usage directions)


% SOME UTILITIES

\let\tenpoint=\footnotesize %  (used below). Defined as 10pt in art12.sty.
\let\twelvepoint=\normalsize
\let\fourteenpoint=\large
\let\bibfontsize=\twelvepoint

% Used in the section definitions
\newif\ifusingheadings
\def\fixitalic{\let\it=\itshape}

% This is what we use when the directions say to ``skip one line''.
% One actual line, but with a bit of flex to help things fit.
%
\newskip\onelineskip 
\onelineskip=\baselineskip \advance\onelineskip by 0pt plus 4pt minus 2pt

% Allow two tables at page bottom, not just one
\setcounter{bottomnumber}{2}


% 1. GENERAL INSTRUCTIONS

\pagestyle{empty}  % No headers/footers or page numbers


% 5. FONT 

\RequirePackage{times}


% 6. MARGINS

\topmargin = -0.5in	% top margin 1in
\textheight = 9in	% bottom margin 1in
\oddsidemargin = 0.5in	% left margin 1.5in
\evensidemargin = \oddsidemargin
\textwidth = 5.5in	% right margin 1.5in


% 7. TITLE

% Called by the standard \maketitle:
% Format title block, then save title and author for use in the headers.  
% Be VERY CAREFUL about modifying this, it's very tricky to get the spacing
% so it works right whether or not the title is followed by a section heading.
%
\def\@maketitle{{\centering \fourteenpoint\boldmath\bf\fixitalic \@title \par}%
  \vskip\onelineskip
  {\centering \twelvepoint\rm \def\and{and }\@author \par}%
  {\centering \twelvepoint\it \def\and{and }\@affiliation \par}%
	\vskip\onelineskip
  \global\everypar{\everypar{}\vskip 0pt\noindent}%  the spacing magic
  % Now fix things up for the page headers
  % (not used in this style, but they could be).
  \@ifundefined{@pgauthor}{\shortauthor{\@author}}{}%
  \@ifundefined{@pgtitle}{\shorttitle{\@title}}{}{}}

\def\affiliation#1{\gdef\@affiliation{#1}}
\def\@affiliation{\@latex@warning@no@line{No \noexpand\affiliation given}}

% Restore pagestyle to empty (if no headers) after \maketitle stupidly sets
% it to plain.  Also restore \thanks
\let\@sv@maketitle=\maketitle
\def\maketitle{\@sv@maketitle
	\ifusingheadings\else\thispagestyle{empty}\fi
	\let\thanks=\acknowledge}

% Set alternate author and title for headings (\maketitle disables \author,
% \title). 
%
\def\shortauthor#1{{\def\and{\& }\xdef\@pgauthor{\uppercase{#1}}}}
% suppress \thanks properly (eat the argument)
\def\shorttitle#1{{\def\thanks##1{}\xdef\@pgtitle{\uppercase{#1}}}}


% 8. TEXT 

\parindent=0.5in
\parskip=0pt


% 9. EXAMPLES
% Use your own example macros: Each example style must have its margins
% adjusted in a different way.  
%
% ``Example numbers should be at the left hand margin, not indented. Examples
% should start at the 0.5 inch position, i.e. in line with your indented
% paragraphs. In the case of several examples given under the same example
% number, we suggest indenting to 0.5 inches, giving the subexample letter
% (usually a., b., c., etc.), then indenting another 0.25 inches''

% (Your style will probably ignore the following settings:)

\leftmargini=0.5in
\leftmarginii=0.25in
\renewenvironment{quote}
               {\list{}{\leftmargin=0.5in \rightmargin\leftmargin}%
                \item[]}
               {\endlist}


% 10. SECTION HEADINGS
% Top-level section numbers and titles are 12pt bold.
% Subsections: 12pt, roman-font numbers, italic titles

\newif\ifsubsection
\def\section{\subsectionfalse\@startsection {section}{1}{\z@}%
  {-2\onelineskip}{\onelineskip}{\raggedright\twelvepoint\bf\boldmath
	\fixitalic}}

\def\any@subsection#1#2{\subsectiontrue\@startsection {#1}{#2}{\z@}%
  {-\onelineskip}{\onelineskip}{\raggedright\twelvepoint\it}}

\def\subsection{\any@subsection{subsection}{2}}
\def\subsubsection{\any@subsection{subsubsection}{3}}
\def\paragraph{\any@subsection{paragraph}{4}}
\def\subparagraph{\any@subsection{subparagraph}{5}}

% Set two spaces after section numbers.
% If it's a subsection, hack the font style to be roman
%
\def\@seccntformat#1{\ifsubsection\rm\fi\csname the#1\endcsname.~~} 


% ENDNOTES
% Use endnotes, not footnotes

\RequirePackage{endnotes}
\let\footnote=\endnote

\def\enotesize{\twelvepoint}

\def\notesname{Endnotes}
\def\enoteheading{\section*{\notesname}}
\def\enoteformat{\par\noindent\hbox to \parindent{\@theenmark.\hfill}%
  \ignorespaces }

% Handle acknowledgements as an endnote with no corresponding mark in the
% title
%
\long\def\acknowledge#1{\addtoendnotes{\par\noindent\hbox to \parindent
  {*\hfill}\ignorespaces #1}} 
\let\thanks=\acknowledge


% BIBLIOGRAPHY
% Each bibliography package has its own quirks; format your own.

\def\bibindent{0.5in}

