I prefer normalsize roman font and red (like beamer pause/endFrame) or blue
(like pagebreak).

That will be the attached, which has the following style entry:


Style SplitLayout
        KeepEmpty             1
        Margin                Dynamic
        LatexType             Paragraph
        LatexName             dummy
        ParIndent             MM
        Align                 Block
        AlignPossible         Block
        LabelType             Static
        LabelString           "--- Split Layout ---"
        LabelFont
          Family              Roman
          Series              Medium
          Size                Normal
          Color               Blue
        EndFont
End

Jose, OK to commit?

Bo
Index: src/Buffer.cpp
===================================================================
--- src/Buffer.cpp	(revision 18726)
+++ src/Buffer.cpp	(working copy)
@@ -142,7 +142,7 @@
 
 namespace {
 
-int const LYX_FORMAT = 271;
+int const LYX_FORMAT = 272;
 
 } // namespace anon
 
Index: lib/lyx2lyx/LyX.py
===================================================================
--- lib/lyx2lyx/LyX.py	(revision 18726)
+++ lib/lyx2lyx/LyX.py	(working copy)
@@ -77,7 +77,7 @@
                    ("1_2",     [220], generate_minor_versions("1.2" , 4)),
                    ("1_3",     [221], generate_minor_versions("1.3" , 7)),
                    ("1_4", range(222,246), generate_minor_versions("1.4" , 4)),
-                   ("1_5", range(246,272), generate_minor_versions("1.5" , 0))]
+                   ("1_5", range(246,273), generate_minor_versions("1.5" , 0))]
 
 
 def formats_list():
Index: lib/lyx2lyx/lyx_1_5.py
===================================================================
--- lib/lyx2lyx/lyx_1_5.py	(revision 18726)
+++ lib/lyx2lyx/lyx_1_5.py	(working copy)
@@ -1656,7 +1656,53 @@
     else:
         del document.header[i]
 
+def revert_splitlayout(document):
+    r''' Revert SplitLayout to a lyx node
+From
 
+\begin_layout SplitLayout
+something
+\end_layout
+
+to
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+end evironmnet
+\end_layout
+
+\end_inset
+something
+
+\end_layout
+
+    '''
+
+    i = 0
+    while True:
+        i = find_token(document.body, r'\begin_layout SplitLayout', i)
+        if i == -1:
+            break
+        j = find_end_of_layout(document.body, i + 1)
+        if j == -1:
+            # this should not happen
+            break
+        document.body[i : j + 1] = [r'\begin_layout Standard',
+                                    r'\begin_inset Note Note',
+                                    'status open',
+                                    '',
+                                    r'\begin_layout Standard',
+                                    'Split Layout',
+                                    r'\end_layout',
+                                    '',
+                                    r'\end_inset'] + \
+                                    document.body[ i + 1 : j] + \
+                                    ['',
+                                    r'\end_layout'
+                                    ]
 ##
 # Conversion hub
 #
@@ -1687,10 +1733,12 @@
            [268, []],
            [269, []],
            [270, []],
-           [271, [convert_ext_font_sizes]]
+           [271, [convert_ext_font_sizes]],
+           [272, []],
           ]
 
 revert =  [
+           [271, [revert_splitlayout]],
            [270, [revert_ext_font_sizes]],
            [269, [revert_beamer_alert, revert_beamer_structure]],
            [268, [revert_preamble_listings_params, revert_listings_inset, revert_include_listings]],
Index: lib/layouts/stdlayouts.inc
===================================================================
--- lib/layouts/stdlayouts.inc	(revision 18726)
+++ lib/layouts/stdlayouts.inc	(working copy)
@@ -61,5 +61,20 @@
 End
 
 
-
-
+Style SplitLayout
+	KeepEmpty             1
+	Margin                Dynamic
+	LatexType             Paragraph
+	LatexName             dummy
+	ParIndent             MM
+	Align                 Block
+	AlignPossible         Block
+	LabelType             Static
+	LabelString           "--- Split Layout ---"
+	LabelFont
+	  Family              Roman
+	  Series              Medium
+	  Size                Normal
+	  Color               Blue
+	EndFont
+End
Index: lib/doc/UserGuide.lyx
===================================================================
--- lib/doc/UserGuide.lyx	(revision 18726)
+++ lib/doc/UserGuide.lyx	(working copy)
@@ -1,5 +1,5 @@
 #LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
-\lyxformat 263
+\lyxformat 272
 \begin_document
 \begin_header
 \textclass scrbook
@@ -91,8 +91,9 @@
 \paperpagestyle default
 \tracking_changes false
 \output_changes false
-\author "usti"
-\author "Uwe Stöhr"
+\author "Bo Peng" 
+\author "usti" 
+\author "Uwe Stöhr" 
 \end_header
 
 \begin_body
@@ -9278,6 +9279,28 @@
 
 \end_layout
 
+\begin_layout Standard
+In case that you want to start a new list immediately after a list, you
+ can use the 
+\family sans
+SplitStyle
+\family default
+ environment to separate them.
+ For example
+\end_layout
+
+\begin_layout Enumerate
+item1
+\end_layout
+
+\begin_layout SplitLayout
+
+\end_layout
+
+\begin_layout Enumerate
+another item1
+\end_layout
+
 \begin_layout Subsection
 Some Examples
 \end_layout
Index: development/FORMAT
===================================================================
--- development/FORMAT	(revision 18726)
+++ development/FORMAT	(working copy)
@@ -1,5 +1,9 @@
 LyX file-format changes
 -----------------------
+2007-06-07 Bo Peng <[EMAIL PROTECTED]>
+	* format incremented to 272: add SplitLayout environment to 
+		split consecutive layouts such as enumerate and definition
+
 2007-05-15 José Matos <[EMAIL PROTECTED]>
 	* format incremented to 271: extended textclasses accept the
         normal font sizes: 10, 11 and 12pt.

Reply via email to