% \iffalse -*-tex-*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% $Id: wacai2012.cls,v 1.5 2003/02/24 14:31:47 beaufils Exp $
%
% Une classe de document pour les articles publies dans les actes
% de la conference WACAI 2012
%
% Quelques idees viennent de la feuille de style de LFA'02 qui est elle meme
% accessible la : 
%
%    http://www.lirmm.fr/lfa02/Format/lfa02.sty
%
% Copyright (c) 2003 Comite d'organisation de MFI'03
% Les quolibets et autres insultes sont a envoyer a bruno.beaufils@lifl.fr
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \fi

\def\fileversion{v6}
\def\filedate{2003/02/24}
\def\docdate{}

\NeedsTeXFormat{LaTeX2e}

\ProvidesClass{wacai2012}[\filedate%
\space LaTeX2e document class^^J%
\space ==========(\fileversion\space B. BEAUFILS, LIFL)==========]

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions

\LoadClass{article}
\RequirePackage[latin1]{inputenc}
\RequirePackage[english,francais]{babel}
\RequirePackage{graphicx}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Format des pages
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% A4
\setlength\paperheight{297mm}
\setlength\paperwidth{210mm}

% Position sur la feuille
\hoffset        0mm
\voffset        0.46mm

% Zone de texte
\textheight     24cm
\textwidth      17cm

% Rien en haut
\topmargin      0mm
\headheight     0mm
\headsep        0mm

% Marges horizontales
\evensidemargin -0.57cm
\oddsidemargin  -0.57cm
\marginparsep   10pt
\marginparwidth 20pt

% Double-colonne
\twocolumn

% Separateurs en mode double colonnes
\columnsep      .9cm

% Espacement des listes
\leftmargini    2em
\leftmarginv    .5em
\leftmarginvi   .5em

% Pas de decalage de paragraphe
\parindent      0em

% Espacement entre paragraphe
\parskip        10pt plus 2pt minus 1pt

% Toutes les pages ont la meme zone d'occupation
\flushbottom

% On reste *cool* sur la gestion des espaces
\sloppy

% Pas de numerotation des pages
\pagestyle{empty}
\let\old@maketitle\maketitle
\renewcommand{\maketitle}{\old@maketitle\thispagestyle{empty}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Changement de polices
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\ttdefault}{pcr}

\renewcommand{\encodingdefault}{T1}

\normalfont\selectfont

\renewcommand{\normalsize}{\@setfontsize\normalsize\@xiipt{12}
  \abovedisplayskip 10pt plus2pt minus5pt%
  \belowdisplayskip \abovedisplayskip%
  \abovedisplayshortskip \z@ plus3pt%
  \belowdisplayshortskip 6pt plus 3pt minus 3pt%
  \let\@listi\@listI%
}
\renewcommand{\small}{\@setfontsize\small\@xpt{10}}
\renewcommand{\large}{\@setfontsize\large\@xiipt{14}}
\renewcommand{\Large}{\@setfontsize\Large\@xivpt{16}}
\renewcommand{\LARGE}{\@setfontsize\LARGE\@xivpt{16}}
\renewcommand{\huge}{\@setfontsize\huge\@xviipt{18}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Sectionnement
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\section{%
  \@startsection{section}
                {1}%
                {\z@}%
                {-1ex plus -.2ex minus -.2ex}%
                {1ex plus .2ex}%
                {\Large\bf}%
}
\def\subsection{%
  \@startsection{subsection}%
                {2}%
                {\z@}%
                {-1ex plus -.2ex minus -.2ex}%
                {1ex plus .2ex}%
                {\large\bf}%
}
\renewcommand{\subsubsection}[1]{\paragraph*{\bf #1.}}
\def\paragraph{%
  \@startsection{paragraph}%
                {4}%
                {\z@}%
                {-1ex plus -.2ex minus -.2ex}%
                {-1em}%
                {\small\bf}%
}
\def\subparagraph{%
  \@startsection{subparagraph}%
                {4}%
                {\parindent}%
                {-1ex plus -.2ex minus -.2ex}%
                {-1em}%
                {\normalsize\bf}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Titre
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newsavebox{\@titre}
\newcommand{\titre}[1]{%
  \savebox{\@titre}%
          {{\LARGE\bfseries\parbox{\textwidth}{\centering#1}}}
}

\newsavebox{\@auteurs}
\newcommand{\auteur}[2]{%
  \begin{lrbox}{\@auteurs}
    \usebox{\@auteurs}
    \begin{tabular}[t]{c}
      {\small #1}\\
      {\small\ttfamily #2}
    \end{tabular}
  \end{lrbox}
}

\newsavebox{\@institutions}
\newif\ifplusieurs@institutions
\plusieurs@institutionsfalse
\newlength{\my@height}
\newlength{\my@depth}
\newcommand{\institution}[1]{%
  \begin{lrbox}{\@institutions}
    \begin{tabular}[t]{c}
      \ifplusieurs@institutions
        \settoheight{\my@height}{\usebox{\@institutions}}
        \settodepth{\my@depth}{\usebox{\@institutions}}
        \addtolength{\my@depth}{.5em}
        \raisebox{0pt}[\my@height][\my@depth]{\usebox{\@institutions}}\\
      \fi
      {\small
        \begin{tabular}[t]{c}
          #1
        \end{tabular}
      }
    \end{tabular}
  \end{lrbox}
  \plusieurs@institutionstrue                     
}

\renewcommand{\@maketitle}{%
  \begin{center}
    {\usebox{\@titre}\par}%
    \vskip 1em%
    {\usebox{\@auteurs}\par}%
    \vskip .7em%
    {\usebox{\@institutions}}%
  \end{center}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Resume et mots-cles
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newenvironment{resume}%
{%
  \parskip 0pt plus .5pt minus .1pt\small%
  \small{\centering\textbf{R\'esum\'e~:}\par}
}
{\par}

\renewenvironment{abstract}%
{%
  \smallskip\parskip 0pt plus .5pt minus .1pt\small%
  {\centering\textbf{Abstract:}\par}
}
{\par}

\newcommand{\motscles}[1]{%
  {\parskip 5pt plus .1pt minus .1pt\small\textbf{Mots-cl\'es~:} #1\par}}
\newcommand{\keywords}[1]{%
  {\parskip 5pt plus .1pt minus .1pt\small\textbf{Keywords:} #1\par}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
