]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/sweave.module
Update layouts
[lyx.git] / lib / layouts / sweave.module
index 7b466ddb08f02decce0c3157ccceb5570ef52e20..9d4d10fd975465ae2a8cc78aaad1b403ee0e9311 100644 (file)
@@ -1,17 +1,20 @@
-#\DeclareLyXModule[sweave->latex]{Sweave}
+#\DeclareLyXModule[sweave->latex,fancyvrb.sty]{Sweave}
+#\DeclareCategory{Literate Programming}
 #DescriptionBegin
-#Allows to use the statistical language S/R as a literate programming tool via Sweave package.
-#See sweave.lyx in examples.
+#Allows to use the statistical language S/R as a literate programming tool via the Sweave() function.
+#For more info see Help > Specific Manuals > Sweave.
 #DescriptionEnd
-#Category: literate
 #Excludes: lilypond
 
+Format 103
 
-# To add :
-# - \setkeys{Gin}{width=0.8\textwidth} How to add such a "beast"? This is used to define
-#   the size of produced plots.
+Input litinsets.inc
+
+Counter chunk
+       GuiName "Knitr Chunk"
+    InitialValue 2
+End
 
-Format 35
 OutputType             literate
 OutputFormat           sweave
 
@@ -19,36 +22,12 @@ ClassOptions
        Other          "noae"
 End
 
-Preamble
+AddToPreamble
        <<echo=F>>=
-         if(exists("ls.enc")) options(encoding=ls.enc)
+         if(exists(".orig.enc")) options(encoding = .orig.enc)
        @
 EndPreamble
 
-Style Chunk
-       Category              Sweave
-       LatexType             Paragraph
-       LatexName             dummy
-       Margin                static
-       Align                 Left
-       AlignPossible         Block, Left, Right, Center
-       NewLine               0
-       FreeSpacing           1
-       PassThru              1
-       ParbreakIsNewline     1
-       Spellcheck            0
-       ## What is LabelType used for?
-       LabelType             Static
-       TextFont
-         Color               latex
-         Family              Typewriter
-       EndFont
-End
-
-Style Scrap
-       ObsoletedBy           Chunk
-End
-
 InsetLayout "Flex:Sweave Options"
        LabelString           "Sweave opts"
        LatexType             Command
@@ -69,6 +48,8 @@ InsetLayout "Flex:Sweave Options"
        Spellcheck            0
        FreeSpacing           true
        ForceLTR              true
+       AddToToc              literate
+       IsTocCaption          0
 End
 
 InsetLayout "Flex:S/R expression"
@@ -113,4 +94,6 @@ InsetLayout "Flex:Sweave Input File"
        Spellcheck            0
        FreeSpacing           true
        ForceLTR              true
+       AddToToc              literate
+       IsTocCaption          1
 End