En attachement, celui d'Alain Castera qui fonctionne ici
(j'ai rajouté l'objet qui manquait) et un template.

Yann regarde s'il est possible de fusionner les deux
layouts (cf la discussion récente sur la liste).

-- 
Jean-Pierre



>>List-Subscribe: <mailto:[EMAIL PROTECTED]>
>>From: Roger Gadiou <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Subject: Re: layout lettre
>>Date: Mon, 2 Jul 2001 11:43:25 -0400
>>
>>Le Vendredi 29 Juin 2001 11:49, vous avez écrit :
>>> "Jean-Pierre.Chretien" wrote:
>>> > >>List-Subscribe: <mailto:[EMAIL PROTECTED]>
>>> > >>From: Roger Gadiou <[EMAIL PROTECTED]>
>>> > >>To: [EMAIL PROTECTED]
>>> > >>Subject: layout lettre
>>> > >>Date: Thu, 21 Jun 2001 09:56:16 -0400
>>> > >>
>>> > >>bonjour,
>>> > >>
>>> > >>je tente d'utiliser le layout lettre poste par yann morere sur cette
>>> > >> liste, mais latex bloque sur la definition du langage. en effet, en
>>> > >> utilisant le fichier exemple fourni avec le layout, j'obtiend le
>>> > >> message suivant :
>>> > >>
>>> > >>* Local config file frenchb.cfg used
>>> > >>*
>>> > >>(/usr/share/texmf/tex/generic/babel/frenchb.cfg))) (lettre.aux
>>> > >>! Undefined control sequence.
>>> > >>l.2 \select
>>> > >>           @language{francais}
>>> > >>
>>> > >>
>>> > >>faut-il installer autre chose que la classe lettre pour que ca
>>> > >> fonctionne ?
>>> > >>
>>> > >>merci d'avance pour votre aide,
>>> > >>
>>> > >>
>>> > >>--
>>> > >>GADIOU Roger
>>> > >>Laboratoire de Gestion des Risques et Environnement
>>> > >>25, rue de Chemnitz, 68200 MULHOUSE
>>> >
>>> > Manquerait-il le stdlettre.inc dans le répertoire des layouts ?
>>>
>>> normalement il etait dans le fichier que j'avais envoyé. Je pense plutot
>>> à un version de babel trop ancienne. j'ai renvoyé directement un
>>> soluce... sans réponse
>>>
>>desole d'avoir tarde a repondre, mais j'avais du laisser de cote ce probleme 
>>au profit d'autres plus urgents.
>>
>>j'utilise la version de babel installee avec ma distribution ( mandrake 8.0 
>>), il s'agit de la v3.7h, le fichier francais.sty est bien present et 
>>correspond bien au fichier accompagnant la reponse de Yann Morere. Enfin, 
>>j'utilise le package lettre v 2.342
>>
>>le fichier stdlettre.inc est lui aussi present dans le repertoire layouts. 
>>
>>Sinon, suivant la suggestion de Marc Van Droogenbroeck, j'ai essaye de 
>>supprimer le fichier lettre.aux avant la visualisation, dans ces conditions, 
>>lyx ne peut toujours pas visualiser. par contre je peut utiliser latex sur le 
>>fichier exporte lettre.tex mais le resultat n'est pas bon ( par exemple : le 
>>destinataire de la lettre a disparu ).
>>
>>enfin, si je selectionne le langage french, ca ne fonctionne pas non plus.
>>
>>j'ai pu constater que le fichier francais.ldf n'etait pas present dans le 
>>repertoire babel, mais son ajout n'a rien change. j'ai aussi constate que 
>>l'option francais dans le fichier babel.sty revoie au fichier frenchb.ldf. 
>>enfin, seuls french et frenchb apparaissent dans la selection de langage de 
>>lyx.
>>
>>voila, je continue mes essais ( un peu desordonnes je vous le concede ), et 
>>je reste ouvert a toute suggestion.
>>
>>merci encore pour votre aide
>>
>>
>>-- 
>>GADIOU Roger
>>Laboratoire de Gestion des Risques et Environnement
>>25, rue de Chemnitz, 68200 MULHOUSE
>>tel : 03 89 32 76 59 , fax : 03 89 32 76 61
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass{lettre (Francais)}
# French Letter textclass definition file. 
# Author : Alain Castera <[EMAIL PROTECTED]>
# Modifies only some things from letter.layout
# to use the lettre.cls class from Denis Megevand
# Support for «Objet» added by <[EMAIL PROTECTED]>




# Input general definitions
Input letter.layout


# (Re)define some stuff

Preamble
%% 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
        }
EndPreamble

# My Address style
Style MonAdresse
  Margin        Static
  LatexType     Command
  LatexName     address
  ParSkip       0.4
  BottomSep     1.5
  ParSep        1.5
  Align         Left
  AlignPossible     Left
End

# Sujet style definition
Style Objet
  Margin                Static
  LatexType             Command
  LatexName             conc
  LeftMargin            Objet::xx
  LabelSep              xx
  TopSep                0.4
  BottomSep             0.4
  ParSep                0.4
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Static
  LabelString           Objet:
  Spacing               Other 1.5

  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Latex               Latex
  EndFont
End

# City name style
Style Lieu
  Margin                Static
  LatexType             Command
  LatexName             lieu
  LeftMargin            Ville::xx
  LabelSep              xx
  TopSep                0.4
  BottomSep             0.4
  ParSep                0.4
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Static
  LabelString           Ville:
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Latex               Latex
  EndFont
End

#suppress City indication
Style NoLieu
  KeepEmpty             1
  LatexType             Command
  LatexName             nolieu
  LabelType             Static
  LeftMargin            NoLieuxx
  LabelString           NoLieu
  # label font definition
  LabelFont
    Series              Bold
    Latex               Latex
  EndFont
End

# date Style
Style Date
  Margin                Static
  LatexType             Command
  LatexName             date
  LeftMargin            Date::xx
  LabelSep              xx
  TopSep                0.4
  BottomSep             0.4
  ParSep                0.4
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Static
  LabelString           Date:
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Latex               Latex
  EndFont
End

#suppress date indication
Style NoDate
  KeepEmpty             1
  LatexType             Command
  LatexName             nodate
  LabelType             Static
  LeftMargin            NoDatexx
  LabelString           NoDate
  # label font definition
  LabelFont
    Series              Bold
    Latex               Latex
  EndFont
End

# location (i.e. office, department ...)
Style Localisation
  Margin                Static
  LatexType             Command
  LatexName             location
  LeftMargin            Location::xx
  LabelSep              xx
  TopSep                0.4
  BottomSep             0.4
  ParSep                0.4
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Static
  LabelString           Location:
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Latex               Latex
  EndFont
End

# telephone Style
Style Telephone
  Margin                Static
  LatexType             Command
  LatexName             telephone
  LeftMargin            Tel::xx
  LabelSep              xx
  TopSep                0.4
  BottomSep             0.4
  ParSep                0.4
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Static
  LabelString           Tel:
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Latex               Latex
  EndFont
End

#suppress telephone indication
Style NoTelephon
  KeepEmpty             1
  LatexType             Command
  LatexName             notelephone
  LabelType             Static
  LeftMargin            NoTelxx
  LabelString           NoTel
  # label font definition
  LabelFont
    Series              Bold
    Latex               Latex
  EndFont
End

# telefax Style
Style Fax
  Margin                Static
  LatexType             Command
  LatexName             fax
  LeftMargin            Fax::xx
  LabelSep              xx
  TopSep                0.4
  BottomSep             0.4
  ParSep                0.4
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Static
  LabelString           Fax:
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Latex               Latex
  EndFont
End

#suppress fax indication
Style NoFax
  KeepEmpty             1
  LatexType             Command
  LatexName             nofax
  LabelType             Static
  LeftMargin            NoFaxxx
  LabelString           NoFax
  # label font definition
  LabelFont
    Series              Bold
    Latex               Latex
  EndFont
End


# Email Style
Style Email
  Margin                Static
  LatexType             Command
  LatexName             email
  LeftMargin            Email::xx
  LabelSep              xx
  TopSep                0.4
  BottomSep             0.4
  ParSep                0.4
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Static
  LabelString           Email:
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Latex               Latex
  EndFont
End

Style Destinataire
  Margin                Right_Address_Box
  LatexType             Command
  LatexName             lettre
  Preamble
  \newcommand{\lettre}[1]
        { \findemessage 
          \begin{letter}{#1}
          \needsendlettertrue
        }
  EndPreamble
End

#As a temporary(?) trick 
Style FinDeFichier
  KeepEmpty             1
  LatexType             Command
  LatexName             findemessage
  LabelType             Static
  LabelString           Fin_du_fichier.
  LeftMargin            Fin_du_fichier.
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Latex               Latex
  EndFont
End

# Opening style definition

Style Accroche
  CopyStyle             Opening
  LeftMargin            Accroche::xx
  LabelString           Accroche:
End

# Signature style definition
Style Signature
  LeftMargin            Signature::xx
  LabelString           Signature:
  LatexName                     lyxsig
End


# Closing style definition
Style FormuleDePolitesse
  CopyStyle             Closing
  LeftMargin            Salutations::xx
  LabelString           Salutations:
  LatexType             Command
  LatexName             lyxclose
End

# encl style definition
Style incl
CopyStyle               encl
  LeftMargin            Ci-joint::xx
  LabelString           Ci-joint:
  LatexName                     lyxenc
End

#Carbon Copy
Style   cc
CopyStyle               cc 
  LeftMargin            Copies::xx
  LabelString           Copies:
  LatexName                     lyxcc
End

#Post Scriptum
Style Post_Scriptum
  Margin        Static
  LatexType         Command
  LatexName         lyxps
  LabelSep      xx
  LabelType     Static
  LeftMargin        P.S.::xx
  LabelString       P.S.:
  LatexName         lyxps
End


# now suppress unwanted styles
NoStyle My_Address
NoStyle Send_To_Address
NoStyle Opening
NoStyle Closing
NoStyle encl

#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 218
\textclass lettre
\language frenchb
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Destinataire

M.
 Martin
\newline 
Rue Truc
\newline 
XXXXX CHOSE VILLE
\layout MonAdresse

Mme Unetelle
\newline 
Rue Machin
\newline 
XXXXX VILLE CHOSE
\layout Date

27 juin 2001
\layout Lieu

Toulouse
\layout Telephone

xx.xx.xx.xx
\layout NoFax


\begin_inset Info
Attention: si on omet NoFax, le numéro de fax par défaut
de la classe s'imprime...
\end_inset 


\layout Accroche

Cher Monsieur,
\layout Objet

Transmission d'un document
\layout Signature

<ma signature>
\layout Standard

Blah blah blah...
\layout FormuleDePolitesse

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

Untel
\layout incl

copie du document xxx
\layout FinDeFichier

\the_end

Répondre à