]> git.lyx.org Git - features.git/commitdiff
jss.layout: remove superfluous Appendix style
authorUwe Stöhr <uwestoehr@lyx.org>
Wed, 27 May 2015 00:13:04 +0000 (02:13 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Wed, 27 May 2015 00:13:04 +0000 (02:13 +0200)
- remove also the new superfluous lyx2lyx code
- update the template file

lib/layouts/jss.layout
lib/lyx2lyx/lyx_2_2.py
lib/templates/JSS-article.lyx

index cbb36e1613933f207ca241f20b95406a98a7bc3f..0aab2aedb06d06306567cc63a3953be07569ddf5 100644 (file)
@@ -20,6 +20,8 @@ AddToPreamble
     %\usepackage{Sweave}
 EndPreamble
 
+NoStyle "Right Address"
+
 Style Section
        LabelString                     \thesection.
 End
@@ -227,22 +229,3 @@ Style "Code Output"
        LatexName                       CodeOutput
        LabelString                     "Code Output"
 End
-
-Style Appendix
-       LatexType                       Environment
-       LatexName                       appendix
-       Category                        BackMatter
-       TopSep                          0.6
-       BottomSep                       0.6
-       Margin                          First_Dynamic
-       Align                           Block
-       NextNoIndent            1
-       LabelType                       Above
-       LabelString                     "Appendix"
-       LabelSep                        M
-       LabelFont
-         Series                        Bold
-         Shape                         Up
-         Size                          large
-       EndFont
-End
index b977e698252cf36154bb20e0b99361b4256febf6..d9d64e6f8f2d211496f6dd85adec524c9b713130 100644 (file)
@@ -1375,8 +1375,7 @@ def revert_jss(document):
       m = 0
       j = 0
       k = 0
-      l = 0
-      while m != -1 or j != -1 or h != -1 or k != -1 or l != -1:
+      while m != -1 or j != -1 or h != -1 or k != -1:
         # \CodeChunk
         if h != -1:
           h = find_token(document.body, "\\begin_layout Code Chunk", h)
@@ -1423,17 +1422,6 @@ def revert_jss(document):
           document.body[k + 1 : k] = ["\\end_layout", "", "\\begin_layout Standard"]
           document.body[k : k + 1] = put_cmd_in_ert("\\begin{CodeOutput}")
           k = k + 1
-        if l != -1:
-          l = find_token(document.body, "\\begin_layout Appendix", l)
-        if l != -1:
-          endl = find_end_of_layout(document.body, l)
-          document.body[endl : endl + 1] = ["\\end_layout", "", "\\begin_layout Standard"]
-          document.body[endl + 3 : endl + 4] = put_cmd_in_ert("\\end{appendix}")
-          document.body[endl + 13 : endl + 13] = ["\\end_layout", ""]
-          document.body[l + 1 : l] = ["\\end_layout", "", "\\begin_layout Standard"]
-          document.body[l : l + 1] = put_cmd_in_ert("\\begin{appendix}")
-          document.body[l -1 : l] = ["", "\\begin_layout Standard"]
-          l = l + 1
 
 
 def convert_subref(document):
index fce934cf04c04fdacc328856e2f9e0262b2670a4..3a257956ed1fd258fd60e91dd8974ea3e3002a0f 100644 (file)
@@ -594,17 +594,14 @@ Writing several lines of code:
 
 \begin_deeper
 \begin_layout Standard Code
-
 first line of code
 \end_layout
 
 \begin_layout Standard Code
-
 second line of code
 \end_layout
 
 \begin_layout Standard Code
-
 third line of code
 \end_layout
 
@@ -619,27 +616,22 @@ Alternatively, you can distinguish between input and output code:
 
 \begin_deeper
 \begin_layout Code Input
-
 first line of input code
 \end_layout
 
 \begin_layout Code Input
-
 second line of input code
 \end_layout
 
 \begin_layout Code Output
-
 first line of output code
 \end_layout
 
 \begin_layout Code Output
-
 second line of output code
 \end_layout
 
 \begin_layout Code Output
-
 third line of output code
 \end_layout
 
@@ -652,8 +644,21 @@ Acknowledgments
 Here you can write some acknowledgments.
 \end_layout
 
-\begin_layout Appendix
-This is the appendix section
+\begin_layout Section
+\start_of_appendix
+This is the first appendix section
+\end_layout
+
+\begin_layout Subsection
+A subsection
+\end_layout
+
+\begin_layout Subsubsection
+A subsubsection
+\end_layout
+
+\begin_layout Standard
+some text
 \end_layout
 
 \end_body