>>Date: Fri, 07 Oct 2005 10:35:57 +0200
>>From: Mouvet Olivier <[EMAIL PROTECTED]>
>>To: lyx-question <lyx-fr@lists.lyx.org>
>>Subject: modèle en français.
>>
>>Bonjour,
>>
>>1.Voila, j'emploi Lyx très régulièrement mais, pour une fois, je voulais 
>>me servir d'un modéle pour faire un lettre.
>>
>>Plus tôt que de "chipoter" avec les différents menu et option, je me 
>>proposais d'essayer avec les modéles "tout fait".
>>Dans ma liste de modéle (voir ci-dessous), aucun ne répond à un format 
>>plus "Belge" (et j'imagine que c'est le même en France) pour écrire une 
>>lettre avec l'adresse expéditeur à gauche, l'adresse destinataire à 
>>droite, etc...

La classe latex lettre.cls  est dans la distribution (La)TeX standard.
IL faut un layout, j'utilise celui en p.j., avec le template correspondant.


>>2.Je voulais aussi savoir une chose, j'ai bien lu quelque part que Lyx 
>>(latex) employais des régles typographiques bien précise.

La)TeX a un ensemble de régles implicites, à l'origine conforme eux usages
anglo-saxons, et adaptées par les fichiers de configuration de babel.
Les classes implantent ensuite des régles spécifiques (articles de revues par 
exemple).

>> L'exemple du 
>>soulignement est terriblement parlant, en effet, dans de vrai 
>>publication les soulignements est quasi absent, livre technique, etc.... 

Le soulignement, comme l'absence de caractères sur les capitales est un reste
d'usages datant de la machine à écrire, qui ne pouvait faire ni les caractères 
gras,
ni les caractères imprimés, ni les capitales accentuées.

>>mais c régle typographique, on peut les trouver où ? Chez un imprimeur ? 
>>Elles sont les mêmes chez un imprimeur Belge, Français ou autre ?

En France le socle commun des usages typographiques est résumé ici
http://www.dsi.univ-paris5.fr/typo.html
Comme il est écrit française et non francophone, il doit exister un document 
similaire
en Belgique.

Ensuite chaque imprimeur personnalise ces usages (l'ensemble des usages 
typographiques 
qui garantissent la cohérence de l'apparence visuelle des différents documents 
s'appelle
il me semble la marche).

-- 
Jean-Pierre

#% 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
# (almost) nothing regarding fax, only letter
#---------------
# rev 1; A. Castera :
# A lot of LateX code added to avoid being bored by
# the imposed command order of the class letter (see comments
#---------------
#rev 2; A. Castera :
# further more LaTeX code to make tth happy
# with the class.(Following a request on 
# such kind of thing from lyx-users@lists.lyx.org)

#(pre)declarations (just to impose some order on the menus)
Style Standard
End
Style MonAdresse
End
Style Localisation
End
Style Telephone
End
Style NoTelephon
End
Style Fax
End
Style NoFax
End
Style Email
End
Style Lieu
End
Style NoLieu
End
Style Date
End
Style NoDate
End
Style Destinataire
End
Style Objet
End
Style VRef
End
Style NRef
End 
Style Accroche
End

# Input general definitions
Input letter.layout

#and now some more ordering
Style FormuleDePolitesse
End
Style Signature
End
Style cc
End
Style Post_Scriptum
End
Style incl
End


# here we go !

Preamble
%% A lot of newif 
%% to allow reorder commands and output them when needed only
 \newif\ifneedsendletter        % we started a letter
 \newif\ifneedsendfax           % we started a fax
 \newif\ifmonaddressused        % sender address specified
 \newif\ifmonlieuused           % city
 \newif\ifmonlocationused       % sender extra info (office, etc..)
 \newif\ifmontelephoneused      % sender phone # specified
 \newif\ifmonfaxused            % sender fax # specified
 \newif\ifmonemailused          % sender email address specified
 \newif\iflyxsigp               % first of up to 3 signatures
 \newif\iflyxsigs               % second signature
 \newif\iflyxsigt               % third one
 \newif\ifpsneeded              % post-scriptum
 \newif\ifccneeded              % carbon copy to somebody
 \newif\ifencneeded             % encluded items

%% To help tex->html
 \newif\iftth
 \newif\iftthdate
   
%% should be changed to something like
%% \begin{htmlonly} \end{htmlonly} to make it available to latex2html

%% I had a lot of troubles getting multiple signatures (each one being 
%% eventually complex,i.e. multiline) properly aligned on html. So I 
%% used boxes in a tabular as a workaround
 \iftth
    \newsavebox{\sigp} % to save the first signature
    \newsavebox{\sigs} % the second
    \newsavebox{\sigt} % the third
    \newsavebox{\tthdate} % a bad trick to manage dates
 \fi

%% Sometimes you don't want a closing ("formule de politesse"),
%% but the package still needs it. Use a void macro instead of a newif
 \newcommand{\Lyclose}{}
%% 


 %% here is the real stuff : ouput the commands in the "proper" order
 \newcommand{\findemessage}
  { 
    \ifneedsendletter %% did we start a letter ?
      \iftth
        \closing{\Lyclose}
      \fi       % iftth
      \iflyxsigp \signature{\Lysigp} \else \name{} \fi
      \iflyxsigs \secondsignature{\Lysigs} \fi
      \iflyxsigt \thirdsignature{\Lysigt} \fi   
      \iftth %% Ugly, I know
        \iflyxsigp
          \begin{tabular}{ p{5cm} p{5cm} p{5cm} p{5cm} }
            \parbox{50mm}{{\hfill}} &
            \parbox{50mm}{\sigp} &
            \parbox{50mm}{\sigs} & 
            \parbox{50mm}{\sigt} \\
          \end{tabular}
          \bigskip{}
        \fi     % if lyxsigp
      \fi       %% iftth
      \lyxsigpfalse
      \lyxsigsfalse
      \lyxsigtfalse
      \iftth
      \else  %% (latex, not tth) 
        \closing{\Lyclose}
      \fi       % iftth
      \ifpsneeded \ps{P.S. : }{\Lyps} \psneededfalse \fi
      \ifccneeded \cc{\Lycc} \ccneededfalse \fi
      \ifencneeded \encl{\Lyenc} \encneededfalse \fi
      \end{letter}
      \needsendletterfalse %% done with letter
    \fi         % if needSendLetter
      \ifneedsendfax \end{telefax} %% nothing provided yet for telefax !
      \needsendfaxfalse 
    \fi         % if needSendFax
  }     %findemessage

EndPreamble

# My Address style used to specify sender name and coordinates
Style MonAdresse
  Margin        Static
  LatexType     Command
  LatexName     Monaddress
  ParSkip       0.4
  BottomSep     1.5
  ParSep        1.5
  Align         Left
  AlignPossible     Left
  Preamble
   \newcommand{\Monaddress}[1]{ % will save the info for future use
        \monaddressusedtrue
        \providecommand{\lyaddress}{\relax}
        \renewcommand{\lyaddress}{\address{#1}}
        }
    \iftth %% tex->html converters do not know this package
       \newcommand{\address}[1]{\mbox{#1}\par}
    \fi
  EndPreamble
End

# City name style
Style Lieu
  Margin                Static
  LatexType             Command
  LatexName             Monlieu
  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
    Color               red
  EndFont
  Preamble
   \newcommand{\Monlieu}[1]{   % will save the info for future use
        \monlieuusedtrue
        \providecommand{\lylieu}{\relax}
        \renewcommand{\lylieu}{\lieu{#1}}
        }
    \iftth %% tex->html converters do not know this package
      \newcommand{\lieu}[1]{
        \iftthdate {\raggedleft #1,\tthdate}
        \else {\raggedleft #1,\today} 
        \fi
       }
    \fi
        
  EndPreamble

End

#suppress City indication
Style NoLieu
  KeepEmpty             1
  LatexType             Command
  LatexName             Monnolieu
  LabelType             Static
  LeftMargin            NoLieuxx
  LabelString           NoLieu
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont

  Preamble
   \newcommand{\Monnolieu}{
        \monlieuusedtrue
        \providecommand{\lylieu}{\relax}
        \renewcommand{\lylieu}{\nolieu{}}
        }
   \iftth %% tex->html converters do not know this package
     \newcommand{\nolieu}[1][nowhere]{
        \iftthdate {\raggedleft \tthdate}
        \else {\raggedleft \today} 
        \fi
        }
   \fi
  EndPreamble
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
    Color               red
  EndFont
  Preamble
    \iftth %% tex->html converters do not know this package
     \renewcommand{\date}[1]{
        \sbox{\tthdate}{#1}
        \tthdatetrue
        }
    \fi
  EndPreamble

End

#suppress date indication
Style NoDate
  KeepEmpty             1
  LatexType             Command
  LatexName             nodate
  LabelType             Static
  LeftMargin            NoDatexx
  LabelString           NoDate
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont
  Preamble
    \iftth %% tex->html converters do not know this package
     \newcommand{\nodate}{
        \sbox{\tthdate}{ }
        \tthdatetrue
     }
    \fi
  EndPreamble
End

# location (i.e. office, department ...)
Style Localisation
  Margin                Static
  LatexType             Command
  LatexName             Monlocation
  LeftMargin            Bureau::xx
  LabelSep              xx
  TopSep                0.4
  BottomSep             0.4
  ParSep                0.4
  Align                 Block
  AlignPossible         Block, Left
  LabelType             Static
  LabelString           Bureau:
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont
  Preamble
   \newcommand{\Monlocation}[1]{ % will save the info for future use
        \monlocationusedtrue
        \providecommand{\lylocation}{\relax}
        \renewcommand{\lylocation}{\location{#1}}
        }
    \iftth %% tex->html converters do not know this package
      \newcommand{\location}[1]{ #1}
    \fi
  EndPreamble


End

# telephone Style
Style Telephone
  Margin                Static
  LatexType             Command
  LatexName             Montelephone
  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
    Color               red
  EndFont
  Preamble
    \newcommand{\Montelephone}[1]{ % will save the info for future use
        \montelephoneusedtrue
        \providecommand{\lytelephone}{\relax}
        \renewcommand{\lytelephone}{\telephone{#1}}
       }
    \iftth %% tex->html converters do not know this package
      \newcommand{\telephone}[1]{Tel : #1\par}
    \fi
  EndPreamble

End

#suppress telephone indication
Style NoTelephon
  KeepEmpty             1
  LatexType             Command
  LatexName             Monnotelephone
  LabelType             Static
  LeftMargin            NoTelxx
  LabelString           NoTel
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont
  Preamble
   \newcommand{\Monnotelephone}{
        \montelephoneusedtrue
        \providecommand{\lytelephone}{\relax}
        \renewcommand{\lytelephone}{\notelephone{}}
        }
    \iftth %% tex->html converters do not know this package
      \newcommand{\notelephone}[1][tele]{}
    \fi
  EndPreamble

End

# telefax Style
Style Fax
  Margin                Static
  LatexType             Command
  LatexName             Monfax
  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
    Color               red
  EndFont
  Preamble
   \newcommand{\Monfax}[1]{ % will save the info for future use
        \monfaxusedtrue
        \providecommand{\lyfax}{\relax}
        \renewcommand{\lyfax}{\fax{#1}}
        }
    \iftth %% tex->html converters do not know this package
      \newcommand{\fax}[1]{Fax : #1\par}
    \fi
  EndPreamble
End

#suppress fax indication
Style NoFax
  KeepEmpty             1
  LatexType             Command
  LatexName             Monnofax
  LabelType             Static
  LeftMargin            NoFaxxx
  LabelString           NoFax
   # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont
  Preamble
   \newcommand{\Monnofax}{
        \monfaxusedtrue
        \providecommand{\lyfax}{\relax}
        \renewcommand{\lyfax}{\nofax{}}
        }
    \iftth %% tex->html converters do not know this package
      \newcommand{\nofax}[1][fax]{}
    \fi
  EndPreamble

End


# Email Style
Style Email
  Margin                Static
  LatexType             Command
  LatexName             Monemail
  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
    Color               red
  EndFont
  Preamble
   \newcommand{\Monemail}[1]{ % will save the info for future use
        \monemailusedtrue
        \providecommand{\lyemail}{\relax}
        \renewcommand{\lyemail}{\email{#1}}
        }
    \iftth %% tex->html converters do not know this package
      \newcommand{\email}[1]{email : #1\par}
    \fi

  EndPreamble
End

# Objet Style
Style Objet
  CopyStyle             Email
  LatexType             Command
  LatexName             conc
  LeftMargin            Objet::xx
  LabelString           Objet:
  Preamble
    \iftth %% tex->html converters do not know this package
    \newcommand{\conc}[1]{
        Objet : #1 \par
        }
    \fi
  EndPreamble
End

# VRef Style
Style VRef
  CopyStyle             Email
  LatexType             Command
  LatexName             Vref
  LeftMargin            V/Ref::xx
  LabelString           V/Ref:
  Preamble
    \iftth %% tex->html converters do not know this package
    \newcommand{\Vref}[1]{
        V/Ref : #1 \par
        }
    \fi
  EndPreamble
End

# NRef Style
Style NRef
  CopyStyle             Email
  LatexType             Command
  LatexName             Nref
  LeftMargin            N/Ref::xx
  LabelString           N/Ref:
  Preamble
    \iftth %% tex->html converters do not know this package
    \newcommand{\Nref}[1]{
        N/Ref : #1 \par
        }
    \fi
  EndPreamble
End

Style Destinataire
  Margin                Right_Address_Box
  LatexType             Command
  LatexName             lettre
  Preamble
  \iftth %% tex->html converters do not know this package
    \newcommand{\toaddress}[1]
      { \newsavebox{\dest}
        \sbox{\dest}{\centering #1}
        {\raggedleft{\dest}\par}
      }
    \newenvironment{letter}[1]{}{}
  \fi   %% if tth
  \newcommand{\lettre}[1] { %% organized as expected by the package
          \findemessage   %% if we already started a letter or a fax
          \begin{letter}{#1} %% now the new one
          \ifmonaddressused
          \lyaddress{}
          \fi
          \ifmonlocationused
          \lylocation{}
          \fi
          \ifmonlieuused
          \lylieu{}
          \fi
          \ifmontelephoneused
          \lytelephone{}
          \fi
          \ifmonfaxused
          \lyfax{}
          \fi
          \ifmonemailused
          \lyemail{}
          \fi
          \needsendlettertrue
          \iftth  %% tth does not know letter, so let it output the address
            \toaddress{#1}
          \fi
        }
  EndPreamble
End

#As a temporary(?) trick the last(only?) letter of the file must be processed
# and to allow changing sender address, location,etc.. in between 2 letters
Style FinDeMessage
  KeepEmpty             1
  LatexType             Command
  LatexName             findemessage
  LabelType             Static
  LabelString           Fin_du_message.
  LeftMargin            Fin_du_message.
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont
End

Style FinDeFicher
  CopyStyle             FinDeMessage
End

# Opening style definition

Style Accroche
  CopyStyle             Opening
  LeftMargin            Accroche::xx
  LabelString           Accroche:
  Preamble
    \iftth %% tex->html converters do not know this package
      \newcommand{\opening}[1]{{\qquad #1}}
    \fi
  EndPreamble
End

# Signature style definition
Style Signature
  LeftMargin            Signature::xx
  LabelString           Signature:
  LatexType             Command
  LatexName             lyxsig
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont
  Preamble
      %% automatic assignment of signatures
      %% there is only 1 Signature style, but multiple latex commands
       \newcommand{\lyxsig}[1]{
         \iflyxsigs %% the second sig. exists, so this one is the third
           \providecommand{\Lysigt}{\relax}
           \renewcommand{\Lysigt}{#1}
           \lyxsigttrue
          \else                 %% if lyxsigs exist
            \iflyxsigp          %% the second one
              \providecommand{\Lysigs}{\relax}
              \renewcommand{\Lysigs}{#1}
              \lyxsigstrue
             \else              %% the first one
               \providecommand{\Lysigp}{\relax}
               \renewcommand{\Lysigp}{#1}
               \lyxsigptrue
             \fi                %% if lyxsidp exist
          \fi                   %% if lyxsigs exist
        }
        \iftth %% just save to dedicated box
           \newcommand{\signature}[1]
              { 
               \sbox{\sigp}{{#1}}
              }
           \newcommand{\secondsignature}[1]
              {
               \sbox{\sigs}{{#1}} 
              }
           \newcommand{\thirdsignature}[1]
              { 
               \sbox{\sigt}{{#1}} 
              }
        \fi
  EndPreamble
End


# Closing style definition
Style FormuleDePolitesse
  CopyStyle             Closing
  LeftMargin            Salutations::xx
  LabelString           Salutations:
  LatexType             Command
  LatexName             lyxclose
  Preamble
    \newcommand{\lyxclose}[1]{\renewcommand{\Lyclose}{#1}}
    \iftth %% tex->html converters do not know this package
      \newcommand{\closing}[1]{#1\par}
    \fi
  EndPreamble
End

# encl style definition
Style incl
CopyStyle               encl
  LeftMargin            Ci-joint::xx
  LabelString           Ci-joint:
  LatexName             lyxenc
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont
  Preamble
    \newcommand{\lyxenc}[1]{
         \providecommand{\Lyenc}{\relax}
         \renewcommand{\Lyenc}{#1} 
         \encneededtrue
        }
    \iftth %% tex->html converters do not know this package
      \newcommand{\encl}[1]{p.j. : #1 \par}
    \fi
  EndPreamble
End

#Carbon Copy
Style   cc
  LatexType             Command
  LatexName             lyxcc
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont
  Preamble
    \newcommand{\lyxcc}[1]{
         \providecommand{\Lycc}{\relax}
         \renewcommand{\Lycc}{#1} 
         \ccneededtrue
        }
    \iftth %% tex->html converters do not know this package
      \newcommand{\cc}[1]{cc : #1 \par} 
    \fi
  EndPreamble
End

#Post Scriptum
Style Post_Scriptum
  Margin        Static
  LatexType         Command
  LatexName         lyxps
  LabelSep      xx
  LabelType     Static
  LeftMargin        P.S.::xx
  LabelString       P.S.:
  # label font definition
  LabelFont 
    Series              Bold
    Shape               Italic
    Color               red
  EndFont
  Preamble
    \newcommand{\lyxps}[1]{
         \providecommand{\Lyps}{\relax}
         \renewcommand{\Lyps}{#1} 
         \psneededtrue
        }
    \iftth %% tex->html converters do not know this package
      \newcommand{\ps}[2]{#1 #2 \par} 
    \fi
  EndPreamble
End


# now suppress unwanted styles
NoStyle My_Address
NoStyle Send_To_Address
NoStyle Opening
NoStyle Closing
NoStyle encl
NoStyle Location
#NoStyle Address
#NoStyle Right_Address

Attachment: modelettre.lyx
Description: modelettre.lyx

Répondre à