%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%  LaTeX french specific class <http://www.freesoftware.fsf.org/latexfr>
%  
%  %NAME%    : Lettre à la française
%  %AUTHOR%  : Philippe Roy
%  %EMAIL%   : ph_roy@toutdoux.org
%  %VERSION% : 1.0 (20/12/2000)
%
%     Copyright owned by AUTHOR
%
%     This program is free software; you can redistribute it and/or modify
%     it under the terms of the GNU General Public License as published by
%     the Free Software Foundation; either version 2 of the License, or
%     (at your option) any later version.
%
%     This program 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.  See the
%     GNU General Public License for more details.
%
%     You should have received a copy of the GNU General Public License
%     along with this program; if not, write to the Free Software
%     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
%
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ChangeLog
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 20/12/2001 philou : Ajout des \raggedright, merci à François Désarménien <francois@fdesar.net>
% 20/12/2001 philou : Ajout des fonctions dans destinataire et signature

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bugs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Underfull hbox ? -> t gentil, mais mon papier s'imprime

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliothèques
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}[1998/12/01]
\ProvidesClass{lettre}[2000/06/20 v1.0 Lettre]

\LoadClass[12pt,a4paper]{article}
\RequirePackage[french]{babel}
\RequirePackage[T1]{fontenc}
\RequirePackage[latin1]{inputenc}
\RequirePackage[french]{layout}
\RequirePackage{color}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mise en page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\setlength{\textwidth}{19cm}           %Largeur du corps
%\setlength{\textheight}{27.7cm}        %Hauteur du corps
\setlength{\textwidth}{420pt}           %Largeur du corps
\setlength{\textheight}{680pt}          %Hauteur du corps
\setlength{\oddsidemargin}{1cm}         %Marge gauche
\setlength{\marginparsep}{0cm}          %Séparation droite entre corps et marge de notes
\setlength{\marginparwidth}{0cm}        %Largeur de la marge de notes

\setlength{\topmargin}{0cm}             %Marge haute
\setlength{\headheight}{0cm}            %Hauteur de l'entête
\setlength{\headsep}{0cm}               %Séparation basse entre corps et pied de page
\setlength{\footskip}{0cm}              %Hauteur du pied de page
\setlength{\hoffset}{-30pt}             %Bords gauche imprimeur
\setlength{\voffset}{-30pt}             %Bords haut imprimeur

\pagestyle{empty}       

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% En-tête
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand {\CoordonneesData}{\mbox{}}
\newcommand {\Coordonnees}[1]{\renewcommand{\CoordonneesData}{#1}}

\newcommand {\DestinataireData}{\mbox{}}
\newcommand {\Destinataire}[1]{\renewcommand{\DestinataireData}{#1}}

\newcommand {\ReferenceData}{\mbox{}}
\newcommand {\Reference}[1]{\renewcommand{\ReferenceData}{#1}}

\newcommand {\AttentionData}{\mbox{}}
\newcommand {\Attention}[1]{\renewcommand{\AttentionData}{#1}}
\newcommand {\AttentionFonctionData}{\mbox{}}
\newcommand {\AttentionFonction}[1]{\renewcommand{\AttentionFonctionData}{#1}}

\newcommand {\OuvertureData}{\mbox{}}
\newcommand {\Ouverture}[1]{\renewcommand{\OuvertureData}{#1}}

\newcommand {\DateData}{\mbox{}}
\newcommand {\Date}[1]{\renewcommand{\DateData}{#1}}


\newcommand {\FaireEntete}
{
        \begin{tabbing}
                \mbox{ 
                        % Coordonnées
                        \makebox[10cm][l]{
                        \begin{minipage}{10cm}\raggedright
                                \CoordonneesData
                        \end{minipage}}

                        % Destinataire
                        \makebox[10cm][l]{
                        \begin{minipage}{10cm}\raggedright
                                ~\\~\\~\\~\\
                                \DestinataireData\\~\\
                                \DateData
                        \end{minipage}}

                }
        \end{tabbing}
        ~\\

        % Ma très chère ...
        \begin{tabbing}
                \hspace{1cm}\= \kill
                \> \ReferenceData\\~\\
		\> \AttentionData\\
		\> \AttentionFonctionData\\~\\
		\> \OuvertureData\\~\\
        \end{tabbing}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fermeture
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand {\FermetureData}{\mbox{}}
\newcommand {\Fermeture}[1]{\renewcommand{\FermetureData}{#1}}

\newcommand {\SignatureData}{\mbox{}}
\newcommand {\Signature}[1]{\renewcommand{\SignatureData}{#1}}
\newcommand {\SignatureFonctionData}{\mbox{}}
\newcommand {\SignatureFonction}[1]{\renewcommand{\SignatureFonctionData}{#1}}

\newcommand {\FaireFermeture}
{
        ~\\
        % Ma très chère ...
        \begin{tabbing}
                \hspace{1cm}\= \hspace{10cm}\= \kill
                \> \FermetureData\\~\\~\\~\\~\\~\\~\\
                \> \> \SignatureData\\
                \> \> \SignatureFonctionData\\
        \end{tabbing}
}
