[Distr-commits] r529 - branches/distr-2.2/pkg/SweaveListingUtils/R branches/distr-2.2/pkg/SweaveListingUtils/chm branches/distr-2.2/pkg/SweaveListingUtils/man branches/distr-2.2/pkg/distr/chm pkg/SweaveListingUtils pkg/SweaveListingUtils/R pkg/SweaveListingUtils/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 19 01:41:19 CEST 2009


Author: ruckdeschel
Date: 2009-08-19 01:41:18 +0200 (Wed, 19 Aug 2009)
New Revision: 529

Modified:
   branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingOptions.R
   branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingUtils.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.toc
   branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingOptions.Rd
   branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd
   branches/distr-2.2/pkg/distr/chm/Distr.chm
   pkg/SweaveListingUtils/DESCRIPTION
   pkg/SweaveListingUtils/R/SweaveListingOptions.R
   pkg/SweaveListingUtils/R/SweaveListingUtils.R
   pkg/SweaveListingUtils/man/SweaveListingOptions.Rd
   pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd
Log:
SweaveListingPreparations() gains arguments fileCommand and pkgCommand to define TeX macros \file \pkg;
correspondingly, there are new SweaveListingOptions...

Modified: branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingOptions.R
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingOptions.R	2009-08-18 22:14:44 UTC (rev 528)
+++ branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingOptions.R	2009-08-18 23:41:18 UTC (rev 529)
@@ -49,7 +49,9 @@
 addRdset = TRUE,
 addRinset = TRUE,
 addRoutset = TRUE,
-addRcodeset = TRUE
+addRcodeset = TRUE,
+fileCommand = "\\def\\file#1{{\\tt #1}}",
+pkgCommand = "\\def\\pkg#1{{\\tt \"#1\"}}"
 )
 
 SweaveListingOptions <- function(...) {

Modified: branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingUtils.R
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingUtils.R	2009-08-18 22:14:44 UTC (rev 528)
+++ branches/distr-2.2/pkg/SweaveListingUtils/R/SweaveListingUtils.R	2009-08-18 23:41:18 UTC (rev 529)
@@ -212,6 +212,8 @@
    Rcommentcolor = getSweaveListingOption("Rcommentcolor"),
    pkg = getSweaveListingOption("pkg"), 
    pkv = getSweaveListingOption("pkv"), 
+   fileCommand = getSweaveListingOption("fileCommand"),
+   pkgCommand = getSweaveListingOption("pkgCommand"),
    lib.loc = NULL){
 
 sws <- .SweaveListingOptions
@@ -325,8 +327,8 @@
 cat(line)
 cat("\\let\\code\\lstinline\n")
 cat("\\def\\Code#1{{\\tt\\color{Rcolor} #1}}\n")
-cat("\\def\\file#1{{\\tt #1}}\n")
-cat("\\def\\pkg#1{{\\tt \"#1\"}}\n")
+cat(fileCommand,"\n")
+cat(pkgCommand,"\n")
 if(missing(pkv)){
      if(nzchar(rpkv <- readPkgVersion(package = pkg, lib.loc=lib.loc)))
         pkv <- rpkv

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/00Index.html
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/00Index.html	2009-08-18 22:14:44 UTC (rev 528)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/00Index.html	2009-08-18 23:41:18 UTC (rev 529)
@@ -25,6 +25,8 @@
 <td>changeKeywordstyles</td></tr>
 <tr><td width="25%"><a href="copySourceFromRForge.html">copySourceFromRForge</a></td>
 <td>copySourceFromRForge</td></tr>
+<tr><td width="25%"><a href="SweaveListingOptions.html">fileCommand</a></td>
+<td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">fromRForge</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">getSweaveListingOption</a></td>
@@ -61,6 +63,8 @@
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">pkg</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
+<tr><td width="25%"><a href="SweaveListingOptions.html">pkgCommand</a></td>
+<td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="SweaveListingOptions.html">pkv</a></td>
 <td>Function to change the global options of the package 'SweaveListingUtils'</td></tr>
 <tr><td width="25%"><a href="taglist.html">print.taglist</a></td>

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingOptions.html
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingOptions.html	2009-08-18 22:14:44 UTC (rev 528)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingOptions.html	2009-08-18 23:41:18 UTC (rev 529)
@@ -30,6 +30,8 @@
 <param name="keyword" value="R:   base.url">
 <param name="keyword" value="R:   addRset">
 <param name="keyword" value="R:   addRdset">
+<param name="keyword" value="R:   fileCommand">
+<param name="keyword" value="R:   pkgCommand">
 <param name="keyword" value=" Function to change the global options of the package &lsquo;SweaveListingUtils&rsquo;">
 </object>
 
@@ -173,6 +175,10 @@
 <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>
+<dt>fileCommand:</dt><dd>character; the TeX code to define TeX command <PRE>\file</PRE>;
+defaults to <code>"\def\file#1{{\tt #1}}"</code></dd>
+<dt>pkgCommand:</dt><dd>character; the TeX code to define TeX command <PRE>\pkg</PRE>;
+defaults to <code>"\def\pkg#1{{\tt \"#1\"}}"</code></dd>
 </dl>
 
 </p>

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingPreparations.html
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingPreparations.html	2009-08-18 22:14:44 UTC (rev 528)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingPreparations.html	2009-08-18 23:41:18 UTC (rev 529)
@@ -42,6 +42,8 @@
    Rcommentcolor = getSweaveListingOption("Rcommentcolor"),
    pkg = getSweaveListingOption("pkg"),
    pkv = getSweaveListingOption("pkv"),
+   fileCommand = getSweaveListingOption("fileCommand"),
+   pkgCommand = getSweaveListingOption("pkgCommand"),
    lib.loc = NULL)
 </pre>
 
@@ -128,6 +130,12 @@
 <td>
 character; package version to be described (e.g. in a vignette);
 defaults to global option <code>"pkv"</code></td></tr>
+<tr valign="top"><td><code>fileCommand</code></td>
+<td>
+character; the TeX code to define TeX command <PRE>\file</PRE></td></tr>
+<tr valign="top"><td><code>pkgCommand</code></td>
+<td>
+character; the TeX code to define TeX command <PRE>\pkg</PRE></td></tr>
 <tr valign="top"><td><code>lib.loc</code></td>
 <td>
 location of a local library in which the described package resides</td></tr>

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

Modified: branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.toc
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.toc	2009-08-18 22:14:44 UTC (rev 528)
+++ branches/distr-2.2/pkg/SweaveListingUtils/chm/SweaveListingUtils.toc	2009-08-18 23:41:18 UTC (rev 529)
@@ -34,6 +34,10 @@
 <param name="Local" value="copySourceFromRForge.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="fileCommand">
+<param name="Local" value="SweaveListingOptions.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="fromRForge">
 <param name="Local" value="SweaveListingOptions.html">
 </OBJECT>
@@ -106,6 +110,10 @@
 <param name="Local" value="SweaveListingOptions.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="pkgCommand">
+<param name="Local" value="SweaveListingOptions.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="pkv">
 <param name="Local" value="SweaveListingOptions.html">
 </OBJECT>

Modified: branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingOptions.Rd
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingOptions.Rd	2009-08-18 22:14:44 UTC (rev 528)
+++ branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingOptions.Rd	2009-08-18 23:41:18 UTC (rev 529)
@@ -24,6 +24,8 @@
 \alias{base.url}
 \alias{addRset}
 \alias{addRdset}
+\alias{fileCommand}
+\alias{pkgCommand}
 
 \title{Function to change the global options of the package `SweaveListingUtils' }
 \description{With \code{SweaveListingOptions} you can inspect and change 
@@ -135,6 +137,10 @@
        \code{Routset}; defaults to \code{TRUE}}
 \item{addRcodeset:}{logical; default for argument \code{add} in command
        \code{Rcodeset}; defaults to \code{TRUE}}
+\item{fileCommand:}{character; the TeX code to define TeX command \verb{\\file};
+      defaults to \code{"\\def\\file#1{{\\tt #1}}"}}
+  \item{pkgCommand:}{character; the TeX code to define TeX command \verb{\\pkg};
+      defaults to \code{"\\def\\pkg#1{{\\tt \"#1\"}}"}}
 }
 }
 %\references{}

Modified: branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd
===================================================================
--- branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd	2009-08-18 22:14:44 UTC (rev 528)
+++ branches/distr-2.2/pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd	2009-08-18 23:41:18 UTC (rev 529)
@@ -25,6 +25,8 @@
    Rcommentcolor = getSweaveListingOption("Rcommentcolor"),
    pkg = getSweaveListingOption("pkg"),
    pkv = getSweaveListingOption("pkv"),
+   fileCommand = getSweaveListingOption("fileCommand"),
+   pkgCommand = getSweaveListingOption("pkgCommand"),
    lib.loc = NULL)
 }
 \arguments{
@@ -71,6 +73,8 @@
              defaults to global option \code{"pkg"}}
   \item{pkv}{character; package version to be described (e.g. in a vignette);
              defaults to global option \code{"pkv"}}
+  \item{fileCommand}{character; the TeX code to define TeX command \verb{\\file}}
+  \item{pkgCommand}{character; the TeX code to define TeX command \verb{\\pkg}}
   \item{lib.loc}{location of a local library in which the described package resides}
   }
 

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

Modified: pkg/SweaveListingUtils/DESCRIPTION
===================================================================
--- pkg/SweaveListingUtils/DESCRIPTION	2009-08-18 22:14:44 UTC (rev 528)
+++ pkg/SweaveListingUtils/DESCRIPTION	2009-08-18 23:41:18 UTC (rev 529)
@@ -1,6 +1,6 @@
 Package: SweaveListingUtils
 Title: Utilities for Sweave together with TeX listings package
-Version: 0.3.4
+Version: 0.3.5
 Depends: R(>= 2.0.0), startupmsg
 Suggests: distr
 Imports: stats
@@ -13,6 +13,6 @@
         vignette and documented source code
 Maintainer: Peter Ruckdeschel <Peter.Ruckdeschel at itwm.fraunhofer.de>
 License: LGPL-3
-Date: 2009-08-09
+Date: 2009-08-19
 LastChangedDate: {$LastChangedDate$}
 LastChangedRevision: {$LastChangedRevision$}

Modified: pkg/SweaveListingUtils/R/SweaveListingOptions.R
===================================================================
--- pkg/SweaveListingUtils/R/SweaveListingOptions.R	2009-08-18 22:14:44 UTC (rev 528)
+++ pkg/SweaveListingUtils/R/SweaveListingOptions.R	2009-08-18 23:41:18 UTC (rev 529)
@@ -34,7 +34,7 @@
 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",
+pkv = "2.1.4",
 pkg = "distr",
 Keywordstyle = "{\\bf}",
 Recomd.Keywordstyle = "{\\bf\\color{RRecomdcolor}}",
@@ -49,7 +49,9 @@
 addRdset = TRUE,
 addRinset = TRUE,
 addRoutset = TRUE,
-addRcodeset = TRUE
+addRcodeset = TRUE,
+fileCommand = "\\def\\file#1{{\\tt #1}}",
+pkgCommand = "\\def\\pkg#1{{\\tt \"#1\"}}"
 )
 
 SweaveListingOptions <- function(...) {

Modified: pkg/SweaveListingUtils/R/SweaveListingUtils.R
===================================================================
--- pkg/SweaveListingUtils/R/SweaveListingUtils.R	2009-08-18 22:14:44 UTC (rev 528)
+++ pkg/SweaveListingUtils/R/SweaveListingUtils.R	2009-08-18 23:41:18 UTC (rev 529)
@@ -212,6 +212,8 @@
    Rcommentcolor = getSweaveListingOption("Rcommentcolor"),
    pkg = getSweaveListingOption("pkg"), 
    pkv = getSweaveListingOption("pkv"), 
+   fileCommand = getSweaveListingOption("fileCommand"),
+   pkgCommand = getSweaveListingOption("pkgCommand"),
    lib.loc = NULL){
 
 sws <- .SweaveListingOptions
@@ -325,8 +327,8 @@
 cat(line)
 cat("\\let\\code\\lstinline\n")
 cat("\\def\\Code#1{{\\tt\\color{Rcolor} #1}}\n")
-cat("\\def\\file#1{{\\tt #1}}\n")
-cat("\\def\\pkg#1{{\\tt \"#1\"}}\n")
+cat(fileCommand,"\n")
+cat(pkgCommand,"\n")
 if(missing(pkv)){
      if(nzchar(rpkv <- readPkgVersion(package = pkg, lib.loc=lib.loc)))
         pkv <- rpkv

Modified: pkg/SweaveListingUtils/man/SweaveListingOptions.Rd
===================================================================
--- pkg/SweaveListingUtils/man/SweaveListingOptions.Rd	2009-08-18 22:14:44 UTC (rev 528)
+++ pkg/SweaveListingUtils/man/SweaveListingOptions.Rd	2009-08-18 23:41:18 UTC (rev 529)
@@ -24,6 +24,8 @@
 \alias{base.url}
 \alias{addRset}
 \alias{addRdset}
+\alias{fileCommand}
+\alias{pkgCommand}
 
 \title{Function to change the global options of the package `SweaveListingUtils' }
 \description{With \code{SweaveListingOptions} you can inspect and change 
@@ -52,16 +54,15 @@
 \describe{
 \item{Rset:}{%
 default setting for \\lstset-definition of R-code, default value is\cr
-\code{list("fancyvrb" = "true", "language" = "R", "escapechar" = "`", }\cr 
+\code{list("fancyvrb" = "true", "language" = "R", "escapechar" = "`", }\cr
 \code{        "basicstyle" = "{\\\\color{Rcolor}\\\\footnotesize}",}\cr
 \code{        "keywordstyle" = "{\\\\bf\\\\color{Rcolor}}",}\cr
 \code{        "commentstyle" = "{\\\\color{Rcomment}\\\\ttfamily\\\\itshape}",}\cr
 \code{        "literate" = "{<-}{{$\\\\leftarrow$}}2{<<-}{{$\\\\twoheadleftarrow$}}2",}\cr
 \code{        "alsoother" = "{$}","alsoletter" = "{.<-}"}\cr
-\code{        "otherkeywords" = }%
-\code{        "otherkeywords" = "{!,!=,~,$,*,\\\\&,\\\\ \%/\\\\ \%,\\\\ \%*\\\\ \%,\\\\ \%\\\\ \%,<-,<<-,/}")}\cr
-(CAVEAT: the spaces between the double backslashes and the percent sign in the last line
-are \emph{not} intended; I simply did not find another work-around)
+\code{        "otherkeywords" = "{!,!=,~,$,*,\\\\&,\\\\\%/\\\\\%,\\\\\%*\\\\\%,\\\\\%\\\\\%,<-,<<-,/}")}\cr
+%(CAVEAT: the spaces between the double backslashes and the percent sign in the last line
+%are \emph{not} intended; I simply did not find another work-around)
 }
 \item{Rdset:}{%
 default setting for \\lstset-definition of Rd-code, default value is\cr
@@ -136,6 +137,10 @@
        \code{Routset}; defaults to \code{TRUE}}
 \item{addRcodeset:}{logical; default for argument \code{add} in command
        \code{Rcodeset}; defaults to \code{TRUE}}
+\item{fileCommand:}{character; the TeX code to define TeX command \verb{\\file};
+      defaults to \code{"\\def\\file#1{{\\tt #1}}"}}
+  \item{pkgCommand:}{character; the TeX code to define TeX command \verb{\\pkg};
+      defaults to \code{"\\def\\pkg#1{{\\tt \"#1\"}}"}}
 }
 }
 %\references{}

Modified: pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd
===================================================================
--- pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd	2009-08-18 22:14:44 UTC (rev 528)
+++ pkg/SweaveListingUtils/man/SweaveListingPreparations.Rd	2009-08-18 23:41:18 UTC (rev 529)
@@ -25,6 +25,8 @@
    Rcommentcolor = getSweaveListingOption("Rcommentcolor"),
    pkg = getSweaveListingOption("pkg"),
    pkv = getSweaveListingOption("pkv"),
+   fileCommand = getSweaveListingOption("fileCommand"),
+   pkgCommand = getSweaveListingOption("pkgCommand"),
    lib.loc = NULL)
 }
 \arguments{
@@ -71,6 +73,8 @@
              defaults to global option \code{"pkg"}}
   \item{pkv}{character; package version to be described (e.g. in a vignette);
              defaults to global option \code{"pkv"}}
+  \item{fileCommand}{character; the TeX code to define TeX command \verb{\\file}}
+  \item{pkgCommand}{character; the TeX code to define TeX command \verb{\\pkg}}
   \item{lib.loc}{location of a local library in which the described package resides}
   }
 



More information about the Distr-commits mailing list