]> git.lyx.org Git - wiki-uploads.git/blob - Layouts/frletter/frletter.cls
Import uploads from wiki
[wiki-uploads.git] / Layouts / frletter / frletter.cls
1 %%%%%%%%%% frletter.cls %%%%%%%%%%
2 % The original beletter class is in the public domain. So is frletter.
3 %
4 % This code is unsupported, and comes with no warranty.
5 % The original beletter class was written by James Kilfiger and Frank Lenaerts, 
6 % to meet the specifications for formatting Belgium letters recommended by
7 % Frank's wife.
8 % It can be used in place of the standard LaTeX class
9 %
10 % The frletter class was contributed by Liviu Andronic. It tries to hack further
11 % the letter class and make it conform to the French typesetting conventions. 
12 % The frletter class consists of cosmetical modifications applied to the 
13 % beletter class, according to what I understand as French conventions for 
14 % writing letters. Please consider that I am neither a French native, nor a 
15 % LaTeX expert. 
16 %
17 % You will also find layout files for both beletter and frletter classes on the Lyx 
18 % Wiki. Both are ugly hacks inputting the letter layout, but they work and I'm OK 
19 % with it. There you will also find corresponding Lyx templates. 
20 %
21 % If you are on the look for a class trully specialized on typesetting French
22 % letters, check the lettre class developed by Denis Mégevand from the 
23 % Observatoire de Genève. There is no corresponding Lyx layout (not to the best 
24 % of my knowledge).
25 \NeedsTeXFormat{LaTeX2e}
26 \ProvidesClass{frletter}[22/10/2007 French Letter Class]
27 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
28 \ProcessOptions\relax
29 \LoadClass{letter}
30 % changed the opening
31 \renewcommand*{\opening}[1]{%
32   \thispagestyle{firstpage}%
33   \ifx\@empty\fromaddress
34   \else  %if there is a from address
35     \noindent\begin{tabular}[t]{@{}l@{}}%
36       \fromaddress
37     \end{tabular}\par%
38   \fi 
39 %% My trial and error on the "send to address"; seems to work
40     {\raggedleft\begin{tabular}{l@{}}\ignorespaces
41       \toname\\ \toaddress \\*[2\parskip]%
42       \@date \end{tabular}\par}%
43   \vspace{2\parskip}%
44   #1\par\nobreak
45   \vspace{2\parskip}%
46 }
47
48 %%% Change these!!, or let babel change them for you.
49 %%% Consider using \usepackage[francais]{babel} in the LaTeX Preamble
50 \renewcommand*{\ccname}{cc}
51 \renewcommand*{\enclname}{}
52 \renewcommand*{\pagename}{}
53 \renewcommand*{\headtoname}{}
54
55 % reverted to the original letter closing; 
56 % uncomment the following lines to use the beletter closing style
57 %\renewcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
58 %  \stopbreaks
59 %  \vspace{2\parskip}%
60 %  \vspace{2\parskip}%
61 %  \noindent
62 %  \ifx\@empty\fromaddress\else
63 %  \hspace*{\longindentation}\fi
64 %  \parbox{\indentedwidth}{\raggedright
65 %       \ignorespaces #1\\[6\medskipamount]%
66 %       \ifx\@empty\fromsig
67 %           \fromname
68 %       \else \fromsig \fi\strut}%
69 %   \par}
70
71 \renewcommand*{\cc}[1]{%
72   \par\noindent
73   \parbox[t]{\textwidth}{%
74     \@hangfrom{\normalfont\ccname}%
75     \ignorespaces #1\strut}\par}
76 \endinput