]> git.lyx.org Git - features.git/commitdiff
method to avoid to use the end letter environment (patch by Jürgen)
authorUwe Stöhr <uwestoehr@web.de>
Wed, 6 Feb 2008 19:56:00 +0000 (19:56 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 6 Feb 2008 19:56:00 +0000 (19:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22811 a592a061-630c-0410-9148-cb99ea01b6c8

lib/layouts/scrlttr2.layout
lib/templates/koma-letter2.lyx

index b9b651a5377725950d83bfc42e211d286606d61d..48bf15d673cc3cdf115cf5c91f71d0e8db45102f 100644 (file)
@@ -31,16 +31,24 @@ Style Labeling
        EndPreamble
 End
 
+
 Style List
        Obsoletedby           Labeling
 End
 
 
+Preamble
+       \newif\ifletterclosed
+EndPreamble
+
 
 Style Address
        LatexType             Command
        LatexName             begin
        LatexParam            {letter}
+       Preamble
+               \AtEndDocument{\ifletterclosed\else\end{letter}\fi}
+       EndPreamble
        KeepEmpty             1
        LeftMargin            xxxxxxxxxxxx::xx
        LabelSep              xx
@@ -326,6 +334,9 @@ Style EndLetter
        Margin                Dynamic
        LatexType             Command
        LatexName             end{letter}
+       Preamble
+               \letterclosedtrue
+       EndPreamble
        KeepEmpty             1
        TopSep                1
        ParSkip               0.4
index 4070a3d215fc9d17e0bff9ba6abb14f4fc2bed09..357cc704e804383480648e0ec27e682ac2401779 100644 (file)
@@ -146,6 +146,7 @@ status collapsed
 
 \begin_layout Standard
 
+
 \backslash
 today
 \end_layout
@@ -186,7 +187,8 @@ Preamble
 status collapsed
 
 \begin_layout Standard
-http://www.ctan.org/tex-archive/macros/latex/contrib/supported/koma-script/scrguien.pdf
+http://www.ctan.org/tex-archive/macros/latex/contrib/supported/koma-script/scrguie
+n.pdf
 \end_layout
 
 \end_inset
@@ -208,18 +210,5 @@ s.: The blue colored items have to be before the address, the magenta colored
 The LyX Users
 \end_layout
 
-\begin_layout EndLetter
-\begin_inset Note Note
-status collapsed
-
-\begin_layout Standard
-keep this environment empty
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
 \end_body
 \end_document