%% This file is `mla.cls'.  `mla.cls' provides a LaTeX class which
%% meets (or tries to meet) the MLA, Modern Language Association's
%% document layout specifications.
%%
%% Copyright 2003  Neal H. Walfield  <neal@cs.uml.edu>
%%
%% This file is based on `proc.cls' as distributed with the standard LaTeX
%% base system.  `proc.cls' is under the following copyright:
%%
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%% 
%% This file was generated from file(s) of the LaTeX base system.
%% --------------------------------------------------------------
%% 
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%% 
%% This file may only be distributed together with a copy of the LaTeX
%% base system. You may however distribute the LaTeX base system without
%% such generated files.
%% 
%% The list of all files belonging to the LaTeX base distribution is
%% given in the file `manifest.txt'. See also `legal.txt' for additional
%% information.
%% 
%% \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         \~}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]

\ProvidesClass{mla}
              [2003/02/02 v1.1
               Modern Language Association Madness]
% We only support letterpaper and a4paper.
\DeclareOption{a5paper}%
    {\ClassError{mla}{Option `a5paper' not supported}{}}
\DeclareOption{b5paper}%
    {\ClassError{mla}{Option `b5paper' not supported}{}}
\DeclareOption{legalpaper}%
    {\ClassError{mla}{Option `legalpaper' not supported}{}}
\DeclareOption{executivepaper}%
    {\ClassError{mla}{Option `executivepaper' not supported}{}}
\DeclareOption{landscape}%
    {\ClassError{mla}{Option `landscape' not supported}{}}

% Dictate a 12pt font,
\DeclareOption{10pt}%
    {\ClassError{mla}{Option `10pt' not supported}{}}
\DeclareOption{11pt}%
    {\ClassError{mla}{Option `11pt' not supported}{}}

% one side,
\DeclareOption{twoside}%
    {\ClassError{mla}{Option `twoside' not supported}{}}

% and only one column.
\DeclareOption{twocolumn}%
    {\ClassError{mla}{Option `twocolumn' not supported}{}}

\DeclareOption{titlepage}%
    {\ClassError{mla}{Option `titlepage' not supported}{}}

\PassOptionsToClass{letterpaper,oneside,onecolumn,final,12pt}{article}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass{article}

% Adjust the margins and the paper size.

% One inch on the top and bottom.
\setlength\textheight{\paperheight}
\addtolength\textheight{-1.75in}
\setlength\voffset{0in}
\setlength\topmargin{0in}
% Pedantically, \headheight should be height of `1' (or height of
% surname, which ever is taller), but this will do for all intents and
% purposes.
\setlength\headsep{.5in}
\addtolength\headsep{-\headheight}

% Text width.  This should be \paperwidth - 2in, but when laid out,
% that is not quite right.  Hand tuning this gives us the correct lay
% out.
\setlength\textwidth{\paperwidth}
\addtolength\textwidth{-1.75in}
% The margins are flush against the left side. -.125 for the
% compensation noted above.
\setlength\hoffset{-.125in}
\setlength\oddsidemargin{0in}
\setlength\evensidemargin{0in}
\setlength\marginparwidth{0in}
\setlength\marginparsep{0in}
\setlength\marginparpush{0in}

% Footers.
% Use the default for \footskip.

% The required headers and footers on each page.
\def\@oddhead{\normalfont\rightmark \hfil \@surname{} \thepage}
\def\@evenhead{\@oddhead}

\def\@oddfoot{\@empty}
\def\@evenfoot{\@empty}

% Double space everything.
\renewcommand{\baselinestretch}{2}

% .5 inch for indentation
\setlength{\parindent}{0.5in}

% \surname must be specified for the header.
\newcommand{\surname}[1]{\renewcommand{\@surname}{#1}}
  \newcommand{\@surname}{\ClassError{mla}%
    {No \noexpand\surname given}{}}


% Prepare the title section environment.
\def\maketitle{\par
 \begingroup
   % Change the footnote symbols for the title section.
   \renewcommand\thefootnote{\fnsymbol{footnote}}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
     \long\def\@makefntext##1{\parindent 1em\noindent
             \hb@xt@1.8em{%
                 \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
   \@maketitle%
   \@thanks
 \endgroup
 \setcounter{footnote}{0}}

% Variable which must be filled in for the title section and defaults
% as appropriate.
\renewcommand{\author}[1]{\renewcommand{\@author}{#1}}
  \renewcommand{\@author}{\ClassError{mla}%
    {No \noexpand\author given}{}}

\newcommand{\instructor}[1]{\renewcommand{\@instructor}{#1}}
  \newcommand{\@instructor}{\ClassError{mla}%
    {No \noexpand\instructor given}{}}

\newcommand{\course}[1]{\renewcommand{\@course}{#1}}
  \newcommand{\@course}{\ClassError{mla}%
    {No \noexpand\course given}{}}

\renewcommand{\title}[1]{\renewcommand{\@title}{#1}}
  \renewcommand{\@title}{\ClassError{mla}%
    {No \noexpand\title given}{}}

\def\date#1{\def\@date{#1}}
  \date{\today}

% Produce the header text.
\def\@maketitle{%
  \hsize\textwidth
  \linewidth\hsize
  \vfil
  \noindent \@author \par
  \noindent \@instructor \par
  \noindent \@course \par
  \noindent \@date \par
  \noindent
  \centering
  \@title \par}

% Referencing books, articles, poems, etc.
\newcommand{\book}[1]{\underline{#1}}
\newcommand{\play}[1]{\underline{#1}}
\newcommand{\longpoem}[1]{\underline{#1}}
\newcommand{\poem}[1]{\ClassError{mla}{\\poem is not a control sequence, use \\longpoem or \\shortpoem}}
\newcommand{\pamphlet}[1]{\underline{#1}}
\newcommand{\newspaper}[1]{\underline{#1}}
\newcommand{\periodical}[1]{\underline{#1}}
\newcommand{\magazine}[1]{\underline{#1}}
\newcommand{\film}[1]{\underline{#1}}
% Cf. tvepisode below.
\newcommand{\tvseries}[1]{\underline{#1}}
\newcommand{\album}[1]{\underline{#1}}
\newcommand{\ballet}[1]{\underline{#1}}
\newcommand{\opera}[1]{\underline{#1}}
\newcommand{\instrumentalcomposition}[1]{\underline{#1}}
\newcommand{\sculpture}[1]{\underline{#1}}
\newcommand{\painting}[1]{\underline{#1}}
\newcommand{\ship}[1]{\underline{#1}}
\newcommand{\aircraft}[1]{\underline{#1}}

% Newspaper, magazine or encyclopedia article
\newcommand{\article}[1]{``#1''}
\newcommand{\essay}[1]{``#1''}
\newcommand{\shortstory}[1]{``#1''}
\newcommand{\shortpoem}[1]{``#1''}
\newcommand{\tvepisode}[1]{``#1''}
\newcommand{\song}[1]{``#1''}
\newcommand{\lecture}[1]{``#1''}
\newcommand{\webpage}[1]{``#1''}

% Tables need alpha-numeric counters; figures are fine with arabic
% numbering.
\renewcommand\thetable{\@alpha\c@table}

% Footnotes
\renewcommand\footnoterule{\ \newline}
\renewcommand\footnotesize{\normalsize}

\renewcommand\@makefntext[1]{%
    \parindent 0.5in%
    \noindent%
    \lineskip \baselineskip
    \hb@xt@.5in{\hss\@makefnmark}#1}

\newenvironment{workcited}
	       {\section*{Work Cited}
		 \begin{flushleft}
		 \begin{list}{}{
		     \itemindent -.5in
		     \listparindent \itemindent
		     \rightmargin 0in
		     \leftmargin .5in}
		 \item}
	       {\end{list}\end{flushleft}}

\endinput
%%
%% End of file `mla.cls'.
