Jürgen Spitzmüller a écrit :
Jean-Pierre Chrétien wrote:
I'm fine with that,
You mean, approve the last patch, in the line "LyX does nothing to solve
what is understood as latex bugs"?
I'm fine with the patch, since at least it removes a rather ungly workaround.
But I'm waiting if there is some feedback from the letter author.
I wrote to the class author and tried to join him by phone without success.
Anyway, I reviewed the class code and it is clear that A4 settings are
hardcoded, that must be the reason why the optional papersize arguments
have beeen removed when shifting from lettre.sty to lettre.cls.
lettre.cls offers a tuning mechanism with so called .ins files (see default.ins
in the lettre directory). I guess that the best way for users living in an area
where A4paper is not the standard would be to tune default.ins as e.g.
letter.ins to control the letter layout if not satisfactory (the 3fold mark in
particular).
In the meantime, attached is a version of the patch enhanced with a warning
about this.
--
Jean-Pierre
--- lib/layouts/lettre.layout.orig 2010-11-22 09:10:41.000000000 +0100
+++ lib/layouts/lettre.layout 2010-11-22 09:14:12.000000000 +0100
@@ -22,7 +22,9 @@
# - margins set to dynamic to ensure alignment of line headings
# - categories
# - ordering control left at the beginning (any other way ?)
-
+# rev.4; J.-P. Chretien nov 2010
+# - remove \input{pdftexconfig.tex} workaround
+# (not needed if a4paper class option is not used)
Format 11
@@ -126,11 +128,6 @@
\fi % if needSendFax
} %findemessage
-% to get the specified pagesize
-% (workaround for an a4paper/lettre problem in pdf mode)
-\@ifpackageloaded{ifpdf}{}{\usepackage{ifpdf}}
-\ifpdf\input pdftexconfig.tex\fi
-
EndPreamble
# My Address style used to specify sender name and coordinates
--- lib/templates/lettre.lyx.orig 2010-11-22 09:11:08.000000000 +0100
+++ lib/templates/lettre.lyx 2011-01-31 11:36:36.000000000 +0100
@@ -1,4 +1,4 @@
-#LyX 1.6.8svn created this file. For more info see http://www.lyx.org/
+#LyX 1.6.9svn created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
@@ -19,7 +19,7 @@
\paperfontsize 11
\spacing single
\use_hyperref false
-\papersize a4paper
+\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
@@ -37,6 +37,7 @@
\tracking_changes false
\output_changes false
\author ""
+\author ""
\end_header
\begin_body
@@ -55,6 +56,39 @@
L'ordre des éléments est indifférent.
\end_layout
+\begin_layout Plain Layout
+La classe lettre ne connaît pas l'option a4paper, ne pas sélectionner
+\family sans
+Document\SpecialChar \menuseparator
+Paramètres\SpecialChar \ldots{}
+\SpecialChar \menuseparator
+Format de la page\SpecialChar \menuseparator
+Format\SpecialChar \menuseparator
+A4.
+\end_layout
+
+\begin_layout Plain Layout
+Si vous devez imprimer une lettre sur un format de papier différent de A4,
+ il vaut mieux modifier le fichier
+\family typewriter
+default.ins
+\family default
+ si la mise en page ne convient pas, en le renommant par exemple
+\family typewriter
+letter.ins
+\family default
+ (voir la documentation du paquetage lettre).
+ Le fichier
+\family typewriter
+default.ins
+\family default
+ se trouve dans le répertoire
+\family typewriter
+tex/latex/lettre
+\family default
+ de la distribution LaTeX.
+\end_layout
+
\end_inset
@@ -82,7 +116,7 @@
\begin_layout NoFax
\begin_inset Note Note
-status collapsed
+status open
\begin_layout Plain Layout
Ce style LyX est utile pour éviter qu'apparaissent les données implictes
@@ -177,11 +211,11 @@
\begin_layout EndOfMessage
\begin_inset Note Note
-status collapsed
+status open
\begin_layout Plain Layout
Marqueur de fin de lettre obligatoire (il peut y avoir plusieurs lettres
- dans le même fichier)
+ dans le même fichier).
\end_layout
\end_inset