[Distr-commits] r505 - branches/distr-2.2/pkg/SweaveListingUtils branches/distr-2.2/pkg/SweaveListingUtils/R branches/distr-2.2/pkg/SweaveListingUtils/chm branches/distr-2.2/pkg/SweaveListingUtils/inst/doc branches/distr-2.2/pkg/SweaveListingUtils/man pkg/SweaveListingUtils pkg/SweaveListingUtils/R pkg/SweaveListingUtils/inst/doc pkg/SweaveListingUtils/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 15 01:28:58 CEST 2009


Author: ruckdeschel
Date: 2009-07-15 01:28:57 +0200 (Wed, 15 Jul 2009)
New Revision: 505

Added:
   branches/distr-2.2/pkg/SweaveListingUtils/inst/doc/exam00.tex
   branches/distr-2.2/pkg/SweaveListingUtils/inst/doc/preamble2.tex
   pkg/SweaveListingUtils/inst/doc/exam00.tex
   pkg/SweaveListingUtils/inst/doc/preamble2.tex
Modified:
   branches/distr-2.2/pkg/SweaveListingUtils/NAMESPACE
   branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingOptions.R
   branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingUtils.R
   branches/distr-2.2/pkg/SweaveListingUtils/R/keywordsStyle.R
   branches/distr-2.2/pkg/SweaveListingUtils/chm/00Index.html
   branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingOptions.html
   branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingPreparations.html
   branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.chm
   branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.hhp
   branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.toc
   branches/distr-2.2/pkg/SweaveListingUtils/chm/lstinputSourceFromRForge.html
   branches/distr-2.2/pkg/SweaveListingUtils/chm/lstset.html
   branches/distr-2.2/pkg/SweaveListingUtils/chm/taglist.html
   branches/distr-2.2/pkg/SweaveListingUtils/inst/doc/ExampleSweaveListingUtils.Rnw
   branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingOptions.Rd
   branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd
   branches/distr-2.2/pkg/SweaveListingUtils/man/lstinputSourceFromRForge.Rd
   branches/distr-2.2/pkg/SweaveListingUtils/man/lstset.Rd
   branches/distr-2.2/pkg/SweaveListingUtils/man/taglist.Rd
   pkg/SweaveListingUtils/DESCRIPTION
   pkg/SweaveListingUtils/R/SweaveListingOptions.R
   pkg/SweaveListingUtils/R/SweaveListingUtils.R
   pkg/SweaveListingUtils/R/keywordsStyle.R
   pkg/SweaveListingUtils/inst/doc/ExampleSweaveListingUtils.Rnw
   pkg/SweaveListingUtils/inst/doc/preambleExp.tex
   pkg/SweaveListingUtils/man/SweaveListingOptions.Rd
   pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd
   pkg/SweaveListingUtils/man/lstinputSourceFromRForge.Rd
   pkg/SweaveListingUtils/man/lstset.Rd
   pkg/SweaveListingUtils/man/taglist.Rd
Log:
fixed a few bugs in SweaveListingUtils 
+ now can specify styles for Sinput, Soutput, Scode, separately as Rin, Rout, Rcode
+ colors now have suffice color, i.e. Rcomment -> Rcommentcolor, Rout -> Routcolor
+ linewidth is now read from getOption("width")
+ included an example with escape sequences in vignette
+ included an example with framed code in vignette
+ fixed mis-spelled Frank Harre_ll_

Modified: branches/distr-2.2/pkg/SweaveListingUtils/NAMESPACE
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/NAMESPACE	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/NAMESPACE	2009-07-14 23:28:57 UTC (rev 505)
@@ -1,5 +1,6 @@
 import("startupmsg")
-export("taglist", "lstset", "lstsetR", "lstsetRd", 
+export("taglist", "lstset", "lstsetR", "lstsetRd",
+       "lstsetRin", "lstsetRout", "lstsetRcode", 
        "SweaveListingPreparations", "readSourceFromRForge",
        "copySourceFromRForge", "lstinputSourceFromRForge", 
        "readPkgVersion",  "SweaveListingOptions",

Modified: branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingOptions.R
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingOptions.R	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingOptions.R	2009-07-14 23:28:57 UTC (rev 505)
@@ -8,7 +8,7 @@
 Rset = list("fancyvrb" = "true", "escapechar" = "`",
         "language" = "R", "basicstyle" = "{\\color{Rcolor}\\small}",
         "keywordstyle" = "{\\bf\\color{Rcolor}}",
-        "commentstyle" = "{\\color{Rcomment}\\ttfamily\\itshape}",
+        "commentstyle" = "{\\color{Rcommentcolor}\\ttfamily\\itshape}",
         "literate" = paste("{<-}{{$\\leftarrow$}}2",
                            "{<<-}{{$\\twoheadleftarrow$}}2",#"%\n",
                            "{~}{{$\\sim$}}1", "{<=}{{$\\leq$}}2",#"%\n",
@@ -23,11 +23,16 @@
              "basicstyle" = "{\\color{black}\\footnotesize}",
                "commentstyle" = "{\\ttfamily\\itshape}",
                "alsolanguage" = "R"),
+Rin = list("style" = "Rstyle", "fancyvrb" = "true",
+           "basicstyle" = "\\color{Rcolor}\\small"),
+Rout = list("fancyvrb" = "false", "basicstyle" = "\\color{Routcolor}\\small"),
+Rcode = list("style" = "Rstyle", "fancyvrb" = "true",
+             "fontshape"= "sl", "basicstyle" = "\\color{Rcolor}"),
 Rcolor  = c(0,0.5,0.5),
 RRecomdcolor  = c(0,0.6,0.4),
-Rbcolor  = c(0,0.6,0.6),
-Rout     = c(0.461,0.039,0.102),
-Rcomment = c(0.101,0.043,0.432),
+Rbcolor       = c(0,0.6,0.6),
+Routcolor     = c(0.461,0.039,0.102),
+Rcommentcolor = c(0.101,0.043,0.432),
 pkv = "2.0.2",
 pkg = "distr",
 Keywordstyle = "{\\bf}",
@@ -39,7 +44,10 @@
 base.url = paste("http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/",
                             "*checkout*/pkg/", sep = ""),
 addRset = TRUE,
-addRdset = TRUE
+addRdset = TRUE,
+addRinset = TRUE,
+addRoutset = TRUE,
+addRcodeset = TRUE
 )
 
 SweaveListingOptions <- function(...) {

Modified: branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingUtils.R
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingUtils.R	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingUtils.R	2009-07-14 23:28:57 UTC (rev 505)
@@ -40,14 +40,14 @@
 }
 
 
-print.taglist <- function(x, LineLength = 80, offset.start = 0,
+print.taglist <- function(x, LineLength = getOption("width"), offset.start = 0,
                           withFinalLineBreak = TRUE, first.print = NULL, ...){
    xc <- as.character(deparse(substitute(x)))
    ll <- length(x)
    LineL <- max(LineLength-2,0)
    LineBreak <- NULL
    mi50 <- min(LineLength,50)
-   maL <- max(3*LineLength,80)
+   maL <- max(3*LineLength,getOption("width"))
    if(ll){
       offS <- paste(rep(" ", offset.start), collapse = "")
       for(i in 1:ll){
@@ -100,14 +100,14 @@
   return(invisible())
 }
 
-lstset <- function(taglist, LineLength = 80, startS = "\\lstset{"){
+lstset <- function(taglist, LineLength = getOption("width"), startS = "\\lstset{"){
    print(taglist, LineLength = LineLength, offset.start = nchar(startS),
          withFinalLineBreak = FALSE, first.print = startS)
    cat("}%\n")
    return(invisible())
 }
 
-lstsetR <- function(Rset = NULL, LineLength = 80,
+lstsetR <- function(Rset = NULL, LineLength = getOption("width"),
                     add = getSweaveListingOption("addRset"), startS = "\\lstset{"){
    if(add){
        Rset0 <- getSweaveListingOption("Rset")
@@ -123,7 +123,7 @@
    return(invisible())
 }
 
-lstsetRd <- function(Rdset = NULL, LineLength = 80,
+lstsetRd <- function(Rdset = NULL, LineLength = getOption("width"),
                     add = getSweaveListingOption("addRdset"), startS = "\\lstset{"){
    if(add){
        Rdset0 <- getSweaveListingOption("Rdset")
@@ -139,20 +139,71 @@
    return(invisible())
 }
 
+lstsetRin <- function(Rinset = NULL, LineLength = getOption("width"),
+                    add = getSweaveListingOption("addRinset"),
+                    startS = "\\lstdefinestyle{Rinstyle}{"){
+   if(add){
+       Rinset0 <- getSweaveListingOption("Rin")
+       if(length(Rinset)){
+          newnms <- names(Rinset)
+          oldnms <- names(Rinset0)
+          ooldnms <- oldnms[! (oldnms %in% newnms)]
+          Rinset <- c(Rinset, Rinset0[ooldnms])
+       }else Rinset <- Rinset0
+   }
+   if(!is(Rinset, "taglist")) Rinset <- taglist(list=Rinset)
+   lstset(Rinset, LineLength = LineLength, startS = startS)
+   return(invisible())
+}
+lstsetRout <- function(Routset = NULL, LineLength = getOption("width"),
+                    add = getSweaveListingOption("addRoutset"),
+                    startS = "\\lstdefinestyle{Routstyle}{"){
+   if(add){
+       Routset0 <- getSweaveListingOption("Rout")
+       if(length(Routset)){
+          newnms <- names(Routset)
+          oldnms <- names(Routset0)
+          ooldnms <- oldnms[! (oldnms %in% newnms)]
+          Routset <- c(Routset, Routset0[ooldnms])
+       }else Routset <- Routset0
+   }
+   if(!is(Routset, "taglist")) Routset <- taglist(list=Routset)
+   lstset(Routset, LineLength = LineLength, startS = startS)
+   return(invisible())
+}
+lstsetRcode <- function(Rcodeset = NULL, LineLength = getOption("width"),
+                    add = getSweaveListingOption("addRcodeset"),
+                    startS = "\\lstdefinestyle{Rcodestyle}{"){
+   if(add){
+       Rcodeset0 <- getSweaveListingOption("Rcode")
+       if(length(Rcodeset)){
+          newnms <- names(Rcodeset)
+          oldnms <- names(Rcodeset0)
+          ooldnms <- oldnms[! (oldnms %in% newnms)]
+          Rcodeset <- c(Rcodeset, Rcodeset0[ooldnms])
+       }else Rcodeset <- Rcodeset0
+   }
+   if(!is(Rcodeset, "taglist")) Rcodeset <- taglist(list=Rcodeset)
+   lstset(Rcodeset, LineLength = LineLength, startS = startS)
+   return(invisible())
+}
 
 SweaveListingPreparations <- function(
    withOwnFileSection = FALSE,
    withVerbatim = FALSE,
    gin = TRUE,
    ae = TRUE,
-   LineLength = 80,
+   LineLength = getOption("width"),
    Rset = getSweaveListingOption("Rset"), 
    Rdset = getSweaveListingOption("Rdset"), 
-   Rcolor = getSweaveListingOption("Rcolor"), 
+   Rin = getSweaveListingOption("Rin"),
+   Rout = getSweaveListingOption("Rout"),
+   Rcode = getSweaveListingOption("Rcode"),
+   Rcolor = getSweaveListingOption("Rcolor"),
    RRecomdcolor = getSweaveListingOption("RRecomdcolor"),
    Rbcolor = getSweaveListingOption("Rbcolor"),
-   Rout = getSweaveListingOption("Rout"),
-   Rcomment = getSweaveListingOption("Rcomment"), 
+   Routcolor = getSweaveListingOption("Routcolor"),
+   Rcommentcolor = getSweaveListingOption("Rcommentcolor"),
    pkg = getSweaveListingOption("pkg"), 
    pkv = getSweaveListingOption("pkv"), 
    lib.loc = NULL){
@@ -177,8 +228,8 @@
 cat("\\definecolor{Rcolor}{rgb}{",paste(Rcolor,collapse=", "),"}\n", sep = "")
 cat("\\definecolor{RRecomdcolor}{rgb}{",paste(RRecomdcolor,collapse=", "),"}\n", sep = "")
 cat("\\definecolor{Rbcolor}{rgb}{",paste(Rbcolor,collapse=", "),"}\n", sep = "")
-cat("\\definecolor{Rout}{rgb}{",paste(Rout,collapse=", "),"}\n", sep = "")
-cat("\\definecolor{Rcomment}{rgb}{",paste(Rcomment,collapse=", "),"}\n", sep = "")
+cat("\\definecolor{Routcolor}{rgb}{",paste(Routcolor,collapse=", "),"}\n", sep = "")
+cat("\\definecolor{Rcommentcolor}{rgb}{",paste(Rcommentcolor,collapse=", "),"}\n", sep = "")
 cat(line)
 writeLines(readLines(file.path(system.file(package = "SweaveListingUtils", 
                                       lib.loc = lib.loc),
@@ -191,6 +242,11 @@
     SweaveListingoptions("addRset" = FALSE, "addRdset" = FALSE)
 cat("\\global\\def\\Rlstset{\\lstset{style=Rstyle}}%\n")
 cat("\\global\\def\\Rdlstset{\\lstset{style=Rdstyle}}%\n")
+cat(line)
+cat("\\global\\def\\Rinlstset{\\lstset{style=Rinstyle}}%\n")
+cat("\\global\\def\\Routlstset{\\lstset{style=Routstyle}}%\n")
+cat("\\global\\def\\Rcodelstset{\\lstset{style=Rcodestyle}}%\n")
+cat(line)
 if(!withOwnFileSection)
    cat("\\Rlstset\n")
 cat(line,"%copying relevant parts of Sweave.sty\n",line,"%\n", sep = "")
@@ -230,33 +286,35 @@
 cat("%\n  {formatcom=\\color{Rcolor}\\lstset{fancyvrb=true,escapechar='}}\n")
 }else{
 #### Thanks to Andrew Ellis !!
-cat("\\lstnewenvironment{Sinput}")
-cat("%\n  {", # "\\Rlstset",
-           "\\Rlstset\\lstset{basicstyle=\\color{Rcolor}\\small,fancyvrb=true}}")
-cat("%\n  {", # "\\Rlstset",
-           "}\n")
+#cat("\\lstdefinestyle{Rinstyle}",
+#    "{style=Rstyle,fancyvrb=true,basicstyle=\\color{Rcolor}\\small}}%\n")
+lstset(taglist(list=Rin), LineLength=LineLength, startS = "\\lstdefinestyle{RinstyleO}{")
+lstsetRin(Rin=Rin, LineLength=LineLength)
+cat("\\lstnewenvironment{Sinput}{\\Rinlstset}{\\Rlstset}\n")
 }
 if(withVerbatim["Soutput"]){
 cat("\\DefineVerbatimEnvironment{Soutput}{Verbatim}")
 cat("%\n  {formatcom=\\color{Rout}\\small\\lstset{fancyvrb=false}}\n")
 }else{
 #### Thanks to Andrew Ellis !!
-cat("\\lstnewenvironment{Soutput}")
-cat("%\n  {", # "\\Rlstset",
-           "\\lstset{fancyvrb=false,basicstyle=\\color{Rout}\\small}}")
-cat("%\n  {", # "\\Rlstset",
-           "}\n")
+lstset(taglist(list=Rout), LineLength=LineLength,
+       startS = "\\lstdefinestyle{RoutstyleO}{")
+lstsetRout(Rout=Rout, LineLength=LineLength)
+#cat("\\lstdefinestyle{Routstyle}",
+#    "{fancyvrb=false,basicstyle=\\color{Rout}\\small}}%\n")
+cat("\\lstnewenvironment{Soutput}{\\Routlstset}{\\Rlstset}\n")
 }
 if(withVerbatim["Scode"]){
 cat("\\DefineVerbatimEnvironment{Scode}{Verbatim}")
 cat("%\n  {fontshape=sl,formatcom=\\color{Rcolor}\\lstset{fancyvrb=true}}\n")
 }else{
 #### Thanks to Andrew Ellis !!
-cat("\\lstnewenvironment{Scode}")
-cat("%\n  {", # "\\Rlstset",
-           "\\lstset{fontshape=sl,basicstyle=\\color{Rcolor}\\small,fancyvrb=true}}")
-cat("%\n  {", # "\\Rlstset",
-           "}\n")
+lstset(taglist(list=Rcode), LineLength=LineLength,
+       startS = "\\lstdefinestyle{RcodestyleO}{")
+lstsetRcode(Rcode=Rcode, LineLength=LineLength)
+#cat("\\lstdefinestyle{Rcodestyle}",
+#    "{style=Rstyle,fancyvrb=true,fontshape=sl,basicstyle=\\color{Rcolor}}%\n")
+cat("\\lstnewenvironment{Scode}{\\Rcodelstset}{\\Rlstset}\n")
 }
 }
 cat(line)
@@ -315,7 +373,7 @@
 
 lstinputSourceFromRForge <- function(PKG, TYPE, FILENAME, PROJECT, from, to,
                                  offset.before = 0, offset.after = 0,
-                                 LineLength = 80,
+                                 LineLength = getOption("width"),
                                  withLines = ifelse(TYPE=="R", TRUE, FALSE),
                                  fromRForge = getSweaveListingOption("fromRForge"),
                                  base.url = getSweaveListingOption("base.url")){

Modified: branches/distr-2.2/pkg/SweaveListingUtils/R/keywordsStyle.R
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/R/keywordsStyle.R	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/R/keywordsStyle.R	2009-07-14 23:28:57 UTC (rev 505)
@@ -51,7 +51,7 @@
         cat("% --------------------------\n% Registration of package ",pkg,
              BaseOrRec,
             "\n% --------------------------\n",
-            "\\lstset{morekeywords={[",num+2,"]", sep = "")
+            "\\lstdefinestyle{Rstyle}{morekeywords={[",num+2,"]", sep = "")
         ml <- length(kwd); m1 <- ml%/%5; m2 <- ml%%5
         kwd[ml] <- paste(kwd[ml],"%",sep="")
         if(length(kwd)){

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/00Index.html
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/00Index.html	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/00Index.html	2009-07-14 23:28:57 UTC (rev 505)
@@ -15,6 +15,10 @@
 <table width="100%">
 <tr><td width="25%"><a href="0SweaveListingUtils-package.html">SweaveListingUtils-package</a></td>
 <td>Package SweaveListingUtils</td></tr>
+<tr><td width="25%"><a href="SweaveListingOptions.html">addRdset</a></td>
+<td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
+<tr><td width="25%"><a href="SweaveListingOptions.html">addRset</a></td>
+<td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">base.url</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="changeKeywordstyles.html">changeKeywordstyles</a></td>
@@ -43,8 +47,14 @@
 <td>lstsetLanguage</td></tr>
 <tr><td width="25%"><a href="lstset.html">lstsetR</a></td>
 <td>lstset and friends</td></tr>
+<tr><td width="25%"><a href="lstset.html">lstsetRcode</a></td>
+<td>lstset and friends</td></tr>
 <tr><td width="25%"><a href="lstset.html">lstsetRd</a></td>
 <td>lstset and friends</td></tr>
+<tr><td width="25%"><a href="lstset.html">lstsetRin</a></td>
+<td>lstset and friends</td></tr>
+<tr><td width="25%"><a href="lstset.html">lstsetRout</a></td>
+<td>lstset and friends</td></tr>
 <tr><td width="25%"><a href="SweaveListingMASK.html">MASKING</a></td>
 <td>Masking of/by other functions in package "SweaveListingUtils"</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">overwrite</a></td>
@@ -57,9 +67,11 @@
 <td>S3 class taglist</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">Rbcolor</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
+<tr><td width="25%"><a href="SweaveListingOptions.html">Rcode</a></td>
+<td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">Rcolor</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
-<tr><td width="25%"><a href="SweaveListingOptions.html">Rcomment</a></td>
+<tr><td width="25%"><a href="SweaveListingOptions.html">Rcommentcolor</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">Rdset</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
@@ -69,8 +81,12 @@
 <td>readSourceFromRForge</td></tr>
 <tr><td width="25%"><a href="library.html">require</a></td>
 <td>Loading Packages with registering symbols for TeX package 'listing'</td></tr>
+<tr><td width="25%"><a href="SweaveListingOptions.html">Rin</a></td>
+<td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">Rout</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
+<tr><td width="25%"><a href="SweaveListingOptions.html">Routcolor</a></td>
+<td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">Rset</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="setToBeDefinedPkgs.html">setToBeDefinedPkgs</a></td>

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingOptions.html
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingOptions.html	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingOptions.html	2009-07-14 23:28:57 UTC (rev 505)
@@ -10,10 +10,13 @@
 <param name="keyword" value="R:   getSweaveListingOption">
 <param name="keyword" value="R:   Rset">
 <param name="keyword" value="R:   Rdset">
+<param name="keyword" value="R:   Rin">
+<param name="keyword" value="R:   Rout">
+<param name="keyword" value="R:   Rcode">
 <param name="keyword" value="R:   Rcolor">
 <param name="keyword" value="R:   Rbcolor">
-<param name="keyword" value="R:   Rout">
-<param name="keyword" value="R:   Rcomment">
+<param name="keyword" value="R:   Routcolor">
+<param name="keyword" value="R:   Rcommentcolor">
 <param name="keyword" value="R:   pkg">
 <param name="keyword" value="R:   pkv">
 <param name="keyword" value="R:   Keywordstyle">
@@ -23,6 +26,8 @@
 <param name="keyword" value="R:   inSweave">
 <param name="keyword" value="R:   fromRForge">
 <param name="keyword" value="R:   base.url">
+<param name="keyword" value="R:   addRset">
+<param name="keyword" value="R:   addRdset">
 <param name="keyword" value=" Function to change the global options of the package &lsquo;SweaveListingUtils&rsquo;">
 </object>
 
@@ -96,13 +101,30 @@
 <code>        "commentstyle" = "\\ttfamily\\itshape",</code><br>
 <code>        "alsolanguage" = "R")</code>
 </dd>
+<dt>Rin:</dt><dd>default setting for \lstdefinestyle-definition of <code>Rinstyle</code> (for <font face="Courier New,Courier" color="#666666"><b>R</b></font> input),
+default value is<br>
+<code>list("style" = "Rstyle", "fancyvrb" = "true",</code><br>
+<code>        "basicstyle" = "\\color{Rcolor}\\small")</code>
+</dd>
+<dt>Rout:</dt><dd>default setting for \lstdefinestyle-definition of <code>Routstyle</code> (for <font face="Courier New,Courier" color="#666666"><b>R</b></font> output),
+default value is<br>
+<code>list("fancyvrb" = "false", "basicstyle" = "\\color{Rout}\\small")</code>
+</dd>
+<dt>Rcode:</dt><dd>default setting for \lstdefinestyle-definition of <code>Rcodestyle</code> (for <font face="Courier New,Courier" color="#666666"><b>R</b></font> code),
+default value is<br>
+<code>list("style" = "Rstyle", "fancyvrb" = "true",</code><br>
+<code>        "basicstyle" = "\\color{Rcolor}\\small")</code>
+<code>        "fontshape"= "sl", "basicstyle" = "\\color{Rcolor}")</code>
+</dd>
 <dt>Rcolor:</dt><dd>default setting for color of R-code in rgb-coordinates; 
 defaults to <code>c(0,0.5,0.5)</code></dd>
+<dt>RRecomdcolor:</dt><dd>default setting for color of R-code from recommended packages in rgb-coordinates;
+defaults to <code>c(0,0.6,0.4)</code></dd>
 <dt>Rbcolor:</dt><dd>default setting for color of R-code symbols of intermediate packages
-in rgb-coordinates;  defaults to <code>c(0,0.4,0.4)</code></dd>
-<dt>Rout:</dt><dd>default setting for color of R-output in rgb-coordinates; 
+in rgb-coordinates;  defaults to <code>c(0,0.6,0.6)</code></dd>
+<dt>Routcolor:</dt><dd>default setting for color of R-output in rgb-coordinates;
 defaults to <code>c(0.461,0.039,0.102)</code></dd>
-<dt>Rcomment:</dt><dd>default setting for color of R-comments in rgb-coordinates; 
+<dt>Rcommentcolor:</dt><dd>default setting for color of R-comments in rgb-coordinates;
 defaults to <code>c(0.101,0.043,0.432)</code></dd>
 <dt>pkv:</dt><dd>default setting for package version as character; 
 defaults to <code>"2.0.2"</code></dd>
@@ -128,7 +150,17 @@
 "http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/*checkout*/pkg/"
 </dd>
 
-<p>
+
+<dt>addRset:</dt><dd>logical; default for argument <code>add</code> in command <code>Rset</code>;
+defaults to <code>TRUE</code></dd>
+<dt>addRdset:</dt><dd>logical; default for argument <code>add</code> in command <code>Rdset</code>;
+defaults to <code>TRUE</code></dd>
+<dt>addRinset:</dt><dd>logical; default for argument <code>add</code> in command
+<code>Rinset</code>; defaults to <code>TRUE</code></dd>
+<dt>addRoutset:</dt><dd>logical; default for argument <code>add</code> in command
+<code>Routset</code>; defaults to <code>TRUE</code></dd>
+<dt>addRcodeset:</dt><dd>logical; default for argument <code>add</code> in command
+<code>Rcodeset</code>; defaults to <code>TRUE</code></dd>
 </dl>
 
 <h3>Author(s)</h3>

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingPreparations.html
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingPreparations.html	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingPreparations.html	2009-07-14 23:28:57 UTC (rev 505)
@@ -25,18 +25,21 @@
 
 <pre>
 SweaveListingPreparations(
-   withOwnFileSection = FALSE,  
-   withVerbatim = FALSE, 
-   withSchunkDef = TRUE, 
+   withOwnFileSection = FALSE,
+   withVerbatim = FALSE,
    gin = TRUE,
    ae = TRUE,
-   LineLength = 80,
+   LineLength = getOption("width"),
    Rset = getSweaveListingOption("Rset"),
    Rdset = getSweaveListingOption("Rdset"),
+   Rin = getSweaveListingOption("Rin"),
+   Rout = getSweaveListingOption("Rout"),
+   Rcode = getSweaveListingOption("Rcode"),
    Rcolor = getSweaveListingOption("Rcolor"),
-   Rbcolor = getSweaveListingOption("Rbcolor"), 
-   Rout = getSweaveListingOption("Rout"),
-   Rcomment = getSweaveListingOption("Rcomment"),
+   RRecomdcolor = getSweaveListingOption("RRecomdcolor"),
+   Rbcolor = getSweaveListingOption("Rbcolor"),
+   Routcolor = getSweaveListingOption("Routcolor"),
+   Rcommentcolor = getSweaveListingOption("Rcommentcolor"),
    pkg = getSweaveListingOption("pkg"),
    pkv = getSweaveListingOption("pkv"),
    lib.loc = NULL)
@@ -67,9 +70,6 @@
 based on 'listings' command 'lstnewenvironment';
 this option is due to a suggestion by
 Andrew Ellis (thank you!).</td></tr>
-<tr valign="top"><td><code>withSchunkDef</code></td>
-<td>
-logical: should environment <code>Schunk</code> be defined?</td></tr>
 <tr valign="top"><td><code>gin</code></td>
 <td>
 logical: shall we use <code>gin</code></td></tr>
@@ -85,22 +85,36 @@
 <tr valign="top"><td><code>Rdset</code></td>
 <td>
 list or taglist; defaults to global option  <code>"Rdset"</code></td></tr>
+<tr valign="top"><td><code>Rin</code></td>
+<td>
+list or taglist; format string for <font face="Courier New,Courier" color="#666666"><b>R</b></font> input code; defaults to global option  <code>"Rin"</code></td></tr>
+<tr valign="top"><td><code>Rout</code></td>
+<td>
+list or taglist; format string for <font face="Courier New,Courier" color="#666666"><b>R</b></font> output code; defaults to global option  <code>"Rout"</code></td></tr>
+<tr valign="top"><td><code>Rcode</code></td>
+<td>
+list or taglist; format string for <font face="Courier New,Courier" color="#666666"><b>R</b></font> code; defaults to global option  <code>"Rcode"</code></td></tr>
 <tr valign="top"><td><code>Rcolor</code></td>
 <td>
-numeric of length 3; defaults to global option  <code>"Rcolor"</code>;
+numeric of length 3; [color for R-input-code] defaults to global option  <code>"Rcolor"</code>;
 rgb coordinates of the color in which to print R-code</td></tr>
+<tr valign="top"><td><code>RRecomdcolor</code></td>
+<td>
+numeric of length 3; [color for R-symbols from recommended packages]
+defaults to global option  <code>"RRecomdcolor"</code>;
+rgb coordinates of the color in which to print R-code</td></tr>
 <tr valign="top"><td><code>Rbcolor</code></td>
 <td>
-numeric of length 3; defaults to global option  <code>"Rbcolor"</code>;
+numeric of length 3; [color for R-symbols from intermediate packages] defaults to global option  <code>"Rbcolor"</code>;
 rgb coordinates of the color in which to print <font face="Courier New,Courier" color="#666666"><b>R</b></font> keywords
 induced by intermediate packages.</td></tr>
-<tr valign="top"><td><code>Rout</code></td>
+<tr valign="top"><td><code>Routcolor</code></td>
 <td>
-numeric of length 3; defaults to global option  <code>"Rout"</code>;
+numeric of length 3; [color for R-output-code] defaults to global option  <code>"Rout"</code>;
 rgb coordinates of the color in which to print R output</td></tr>
-<tr valign="top"><td><code>Rcomment</code></td>
+<tr valign="top"><td><code>Rcommentcolor</code></td>
 <td>
-numeric of length 3; defaults to global option <code>"Rcomment"</code>;
+numeric of length 3; [color for R-comments] defaults to global option <code>"Rcomment"</code>;
 rgb coordinates of the color in which to print comments
 in R-code</td></tr>
 <tr valign="top"><td><code>pkg</code></td>

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.chm
===================================================================
(Binary files differ)

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.hhp
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.hhp	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.hhp	2009-07-14 23:28:57 UTC (rev 505)
@@ -18,11 +18,13 @@
 SweaveListingPreparations.html
 changeKeywordstyles.html
 copySourceFromRForge.html
+isBaseOrRecommended.html
 library.html
 lstinputSourceFromRForge.html
 lstset.html
 lstsetLanguage.html
 readPackageVersion.html
 readSourceFromRForge.html
+setBaseOrRecommended.html
 setToBeDefinedPkgs.html
 taglist.html

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.toc
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.toc	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.toc	2009-07-14 23:28:57 UTC (rev 505)
@@ -14,6 +14,14 @@
 <param name="Local" value="0SweaveListingUtils-package.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="addRdset">
+<param name="Local" value="SweaveListingOptions.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="addRset">
+<param name="Local" value="SweaveListingOptions.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="base.url">
 <param name="Local" value="SweaveListingOptions.html">
 </OBJECT>
@@ -70,10 +78,22 @@
 <param name="Local" value="lstset.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="lstsetRcode">
+<param name="Local" value="lstset.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="lstsetRd">
 <param name="Local" value="lstset.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="lstsetRin">
+<param name="Local" value="lstset.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
+<param name="Name" value="lstsetRout">
+<param name="Local" value="lstset.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="MASKING">
 <param name="Local" value="SweaveListingMASK.html">
 </OBJECT>
@@ -98,11 +118,15 @@
 <param name="Local" value="SweaveListingOptions.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Rcode">
+<param name="Local" value="SweaveListingOptions.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="Rcolor">
 <param name="Local" value="SweaveListingOptions.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
-<param name="Name" value="Rcomment">
+<param name="Name" value="Rcommentcolor">
 <param name="Local" value="SweaveListingOptions.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
@@ -122,10 +146,18 @@
 <param name="Local" value="library.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Rin">
+<param name="Local" value="SweaveListingOptions.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="Rout">
 <param name="Local" value="SweaveListingOptions.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Routcolor">
+<param name="Local" value="SweaveListingOptions.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="Rset">
 <param name="Local" value="SweaveListingOptions.html">
 </OBJECT>

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/lstinputSourceFromRForge.html
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/lstinputSourceFromRForge.html	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/lstinputSourceFromRForge.html	2009-07-14 23:28:57 UTC (rev 505)
@@ -26,7 +26,7 @@
 <pre>
 lstinputSourceFromRForge(PKG, TYPE, FILENAME, PROJECT, from, to,
                          offset.before = 0, offset.after = 0,
-                         LineLength = 80,
+                         LineLength = getOption("width"),
                          withLines = ifelse(TYPE=="R", TRUE, FALSE),
                          fromRForge = getSweaveListingOption("fromRForge"),
                          base.url = getSweaveListingOption("base.url"))
@@ -69,7 +69,7 @@
 <tr valign="top"><td><code>LineLength</code></td>
 <td>
 <code>numeric</code> number of characters per line;
-defaults to 80;</td></tr>
+defaults to getOption("width");</td></tr>
 <tr valign="top"><td><code>withLines</code></td>
 <td>
 logical; shall line-numbers be issued</td></tr>

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/lstset.html
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/lstset.html	2009-07-07 21:41:19 UTC (rev 504)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/lstset.html	2009-07-14 23:28:57 UTC (rev 505)
@@ -8,6 +8,9 @@
 <param name="keyword" value="R:   lstset">
 <param name="keyword" value="R:   lstsetRd">
 <param name="keyword" value="R:   lstsetR">
+<param name="keyword" value="R:   lstsetRin">
+<param name="keyword" value="R:   lstsetRout">
+<param name="keyword" value="R:   lstsetRcode">
 <param name="keyword" value=" lstset and friends">
 </object>
 
@@ -25,9 +28,17 @@
 <h3>Usage</h3>
 
 <pre>
-lstset(taglist, LineLength = 80, startS = "\\lstset{")
-lstsetR(Rset = NULL, LineLength = 80, add = TRUE, startS = "\\lstset{")
-lstsetRd(Rdset = NULL, LineLength = 80, add = TRUE, startS = "\\lstset{")
+lstset(taglist, LineLength = getOption("width"), startS = "\\lstset{")
+lstsetR(Rset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRset"),
+        startS = "\\lstset{")
+lstsetRd(Rdset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRdset"),
+         startS = "\\lstset{")
+lstsetRin(Rinset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRinset"),
+        startS = "\\lstdefinestyle{Rinstyle}{")
+lstsetRout(Routset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRoutset"),
+        startS = "\\lstdefinestyle{Routstyle}{")
+lstsetRcode(Rcodeset = NULL, LineLength = getOption("width"), add = getSweaveListingOption("addRcodeset"),
+        startS = "\\lstdefinestyle{Rcodestyle}{")
 </pre>
 
 
@@ -37,7 +48,7 @@
 <tr valign="top"><td><code>LineLength</code></td>
 <td>
 <code>numeric</code> number of characters per line for lstset and friends;
-defaults to 80</td></tr>
+defaults to getOption("width")</td></tr>
 <tr valign="top"><td><code>taglist</code></td>
 <td>
 S3-object of class <code>taglist</code>; arguments for
@@ -47,9 +58,24 @@
 object of S3-class <code>taglist</code> or named <code>list</code> of 
 <code>character</code>s; the listings settings for R-code
 (for <CODE>\lstset</CODE>); defaults to <code>NULL</code>.</td></tr>
+<tr valign="top"><td><code>Rinset</code></td>
+<td>
+object of S3-class <code>taglist</code> or named <code>list</code> of
+<code>character</code>s; the listings settings for R-code in
+environment <code>Sinput</code>; defaults to <code>NULL</code>.</td></tr>
+<tr valign="top"><td><code>Routset</code></td>
+<td>
+object of S3-class <code>taglist</code> or named <code>list</code> of
+<code>character</code>s; the listings settings for R-code in
+environment <code>Soutput</code>; defaults to <code>NULL</code>.</td></tr>
+<tr valign="top"><td><code>Rcodeset</code></td>
+<td>
+object of S3-class <code>taglist</code> or named <code>list</code> of
+<code>character</code>s; the listings settings for R-code in
+environment <code>Scode</code>; defaults to <code>NULL</code>.</td></tr>
 <tr valign="top"><td><code>Rdset</code></td>
 <td>
-object of S3-class <code>taglist</code> or named <code>list</code> of 
+object of S3-class <code>taglist</code> or named <code>list</code> of
 <code>character</code>s;
 the listings settings for Rd-code
 (for <CODE>\lstset</CODE>); defaults to <code>NULL</code>.</td></tr>
@@ -85,7 +111,10 @@
 specifically for R code, it uses 
 <a href="SweaveListingOptions.html">getSweaveListingOption("Rset")</a>,
 and for Rd code, it 
-<a href="SweaveListingOptions.html">getSweaveListingOption("Rdset")</a>,
+<a href="SweaveListingOptions.html">getSweaveListingOption("Rdset")</a>;
+<code>lstsetRin</code>, <code>lstsetRout</code>, and <code>lstsetRcode</code>
+are corresponding specialized commands for 'listings' environments
+<code>Sinput</code>, <code>Soutput</code>, and <code>Scode</code>, respectively.
 </p>
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/distr -r 505


More information about the Distr-commits mailing list