]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/scrlttr2.layout
Allow literate documents other than noweb to work out of the box. Currently
[lyx.git] / lib / layouts / scrlttr2.layout
index 613686d164271fba5880619cae252ad79b404216..fa9a9c8680e67d041dde6277e66d187dc3ae341c 100644 (file)
@@ -2,8 +2,9 @@
 #  \DeclareLaTeXClass[scrlttr2]{letter (KOMA-Script v.2)}
 # KOMA scrlettr2 textclass definition file.
 # Juergen Spitzmueller <j.spitzmueller@gmx.de>, 2003/2/17.
+# Uwe Stöhr <uwestoehr@web.de>, 2008/2/03.
 
-Format 5
+Format 11
 Style Standard
        LatexName             dummy
        ParSep                0.4
@@ -13,7 +14,7 @@ End
 Input stdlists.inc
 Input stdlayouts.inc
 Input stdcounters.inc
-
+Input stdinsets.inc
 
 Style Description
        LabelFont
@@ -30,19 +31,23 @@ Style Labeling
        EndPreamble
 End
 
+
 Style List
        Obsoletedby           Labeling
 End
 
 
+Preamble
+       \newif\ifletterclosed
+EndPreamble
+
 
 Style Address
        LatexType             Command
        LatexName             begin
        LatexParam            {letter}
-       #Ugly hack!
        Preamble
-       \AtEndDocument{\end{letter}}
+               \AtEndDocument{\ifletterclosed\else\end{letter}\fi}
        EndPreamble
        KeepEmpty             1
        LeftMargin            xxxxxxxxxxxx::xx
@@ -53,7 +58,6 @@ Style Address
        Align                 Left
        LabelType             Static
        LabelString           "Address:"
-
        LabelFont
          Series              Bold
          Shape               Italic
@@ -76,7 +80,6 @@ Style NextAddress
        Align                 Left
        LabelType             Static
        LabelString           "Next Address:"
-
        LabelFont
          Series              Bold
          Shape               Italic
@@ -98,7 +101,6 @@ Style Opening
        Align                 Left
        LabelType             Static
        LabelString           "Opening:"
-
        LabelFont
          Series              Bold
          Shape               Italic
@@ -143,7 +145,7 @@ Style Name
        LatexName             setkomavar
        LatexParam            {fromname}
        KeepEmpty             1
-       LeftMargin            xxxxxxxxxxxx::xx
+       LeftMargin            xxxxxxxxxxxxxxxxx::xx
        LabelSep              xx
        TopSep                0.4
        BottomSep             0.4
@@ -326,3 +328,24 @@ Style Invoice
        LatexParam            {invoice}
        LabelString           "Invoice no.:"
 End
+
+
+Style EndLetter
+       Margin                Dynamic
+       LatexType             Command
+       LatexName             end{letter}
+       Preamble
+               \letterclosedtrue
+       EndPreamble
+       KeepEmpty             1
+       TopSep                1
+       ParSkip               0.4
+       Align                 Block
+       LabelSep              xx
+       LabelType             Static
+       LabelString           "End of letter"
+       LabelFont
+         Series              Bold
+         Color               Green
+       EndFont
+End