%% LyX 1.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[frenchb]{lettre}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
%% to allow reorder commands when needed
 \newif\ifneedsendletter
 \newif\ifneedsendfax
%% Sometimes you don't want a closing
 \def\Lyclose{}
%% automatic assignment of signatures (only one Signature Style
 \long\def\lyxsig#1{
 \@ifundefined{Lysigp}{\def\Lysigp{#1}}
        {\@ifundefined{Lysigs}{\def\Lysigs{#1}}{\def\Lysigt{#1}}}
 }
 \long\def\lyxsigp#1{\def\Lysigp{#1}}
 \long\def\lyxsigs#1{\def\Lysigs{#1}}
 \long\def\lyxsigt#1{\def\Lysigt{#1}}
%% 
 \long\def\lyxclose#1{\def\Lyclose{#1}}
 \long\def\lyxsubj#1{\def\Lysubj{#1}}
 \long\def\lyxps#1{\def\Lyps{#1}}
 \long\def\lyxenc#1{\def\Lyenc{#1}}
 \long\def\lyxmenc{\def\Lymenc{\menc}}
 \long\def\lyxcc#1{\def\Lycc{#1}}
 \newcommand{\findemessage}
        { 
          \ifneedsendletter
          \@ifundefined{Lysigp}{\name{}}{\signature{\Lysigp}} 
      \@ifundefined{Lysigs}{}{\secondsignature{\Lysigs}}
          \@ifundefined{Lysigt}{}{\thirdsignature{\Lysigt}} 
          \closing{\Lyclose}
      \@ifundefined{Lyps}{}{\ps{P.S. : }{\Lyps}}
      \@ifundefined{Lycc}{}{\cc{\Lycc}}
      \@ifundefined{Lyenc}{}{\encl{\Lyenc}}
          \end{letter}
          \needsendletterfalse 
          \fi
          \ifneedsendfax \end{telefax}
          \needsendfaxfalse 
          \fi
        }
 \newcommand{\lettre}[1]
       { \findemessage 
         \begin{letter}{#1}
         \needsendlettertrue
       }

\makeatother
\begin{document}

\lettre{M. Martin\\
Rue Truc\\
XXXXX CHOSE VILLE}


\address{Mme Unetelle\\
Rue Machin\\
XXXXX VILLE CHOSE}


\date{27 juin 2001}


\lieu{Toulouse}


\telephone{xx.xx.xx.xx}


\nofax{}


\opening{Cher Monsieur,}


\conc{Transmission d'un document}


\lyxsig{<ma signature>}

Blah blah blah...


\lyxclose{Je vous tiendrai informé et je vous prie d'agréer, Cher Monsieur,
l'expression de mes salutations cordiales.}


\lyxcc{Untel}


\lyxenc{copie du document xxx}


\findemessage{}
\end{document}
