[Pgfsweave-commits] r21 - in pkg: . R inst/doc/figs

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 16 01:20:39 CET 2010


Author: cameronbracken
Date: 2010-11-16 01:20:38 +0100 (Tue, 16 Nov 2010)
New Revision: 21

Modified:
   pkg/ChangeLog
   pkg/DESCRIPTION
   pkg/R/pgfSweaveDriver.R
   pkg/R/zzz.R
   pkg/inst/doc/figs/fig-normalSweave.pdf
Log:
Version 1.0.10

Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2010-11-03 19:38:28 UTC (rev 20)
+++ pkg/ChangeLog	2010-11-16 00:20:38 UTC (rev 21)
@@ -1,12 +1,14 @@
-commit ce69d801d5eed9984b31adc09ff830da625ff428
-Merge: 760492f 91209db
-Author: cameronbracken <cameronbracken at edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
-Date:   Tue Sep 14 06:10:23 2010 +0000
+commit c022dab0dcadb7b798aa0267897ca985b2f9eadc
+Author: cameronbracken <cameron.bracken at gmail.com>
+Date:   Wed Nov 3 13:22:56 2010 -0600
 
-    Merge branch 'master' into r-forge-local
-    
-    git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/pgfsweave/pkg@19 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
+    Fix for "#line" comments showing up in echo'd code in 2.12.0, fixes issue 1.
 
+ R/pgfSweaveDriver.R                |    3 ++-
+ inst/doc/pgfSweave.pdf             |  Bin 260062 -> 258836 bytes
+ inst/example/pgfSweave-example.tex |    2 +-
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
 commit 91209db8f9a9d7b696c187b7302c24271cbcb1a7
 Author: cameronbracken <cameron.bracken at gmail.com>
 Date:   Tue Sep 14 00:08:53 2010 -0600
@@ -44,23 +46,6 @@
  exec/pgfsweave-script.R |    8 ++++++--
  1 files changed, 6 insertions(+), 2 deletions(-)
 
-commit 760492f629ed4a5371345d858d4b9c0301d20a6c
-Merge: 45a93a6 24d6be7
-Author: cameronbracken <cameronbracken at edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
-Date:   Wed Sep 8 16:13:10 2010 +0000
-
-    Merge branch 'master' into r-forge-local
-    
-    Conflicts:
-    	ChangeLog
-    	inst/doc/figs/fig-normalSweave.pdf
-    	inst/doc/figs/fig-pgfSweave-hist.pdf
-    	inst/doc/figs/fig-pgfSweave-tikz-hist.pdf
-    	inst/doc/pgfSweave-example.pdf
-    	inst/doc/pgfSweave.pdf
-    
-    git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/pgfsweave/pkg@18 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
-
 commit 24d6be79db77ea2b50d222821cf74465233e0186
 Merge: 5c6e4ca 99c533d
 Author: cameronbracken <cameron.bracken at gmail.com>

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2010-11-03 19:38:28 UTC (rev 20)
+++ pkg/DESCRIPTION	2010-11-16 00:20:38 UTC (rev 21)
@@ -2,7 +2,7 @@
 Type: Package
 Title: Quality speedy graphics compilation with Sweave
 Version: 1.0.10
-Date: 2010-09-14
+Date: 2010-11-15
 Author: Cameron Bracken <cameron.bracken at gmail.com> and Charlie Sharpsteen <source at sharpsteen.net>
 Maintainer: Cameron Bracken <cameron.bracken at gmail.com> 
 Depends: stashR, filehash, tikzDevice, cacheSweave, getopt

Modified: pkg/R/pgfSweaveDriver.R
===================================================================
--- pkg/R/pgfSweaveDriver.R	2010-11-03 19:38:28 UTC (rev 20)
+++ pkg/R/pgfSweaveDriver.R	2010-11-16 00:20:38 UTC (rev 21)
@@ -185,11 +185,13 @@
     }
     text.lines = readLines(source, warn = FALSE)
     if (keep.comment) {
-        identifier = function() paste(sample(LETTERS), collapse = "")
+        identifier = function() "pgfSweaveCommentIdentifier__"
+        #paste(sample(LETTERS), collapse = "")
         if (missing(begin.comment))
             begin.comment = identifier()
         if (missing(end.comment))
             end.comment = identifier()
+        
         text.lines = gsub("^[[:space:]]+|[[:space:]]+$", "",
             text.lines)
         while (length(grep(sprintf("%s|%s", begin.comment, end.comment),
@@ -197,10 +199,14 @@
             begin.comment = identifier()
             end.comment = identifier()
         }
-        head.comment = (substring(text.lines, 1, 1) == "#") && 
-            (substring(text.lines, 1, 5) != "#line")
-        if (any(head.comment)) {
+        line.num.comment = substring(text.lines, 1, 5) == "#line" 
+        text.lines = text.lines[!line.num.comment]
+          head.comment = substring(text.lines, 1, 1) == "#"
+          #grep("^[[:space:]]+|#",text.lines)
+          #
+        if ( length(head.comment) > 0 ) {
             text.lines[head.comment] = gsub("\"", "'", text.lines[head.comment])
+            text.lines[head.comment] = gsub("^#", "  #", text.lines[head.comment])
             text.lines[head.comment] = sprintf("%s=\"%s%s\"",
                 begin.comment, text.lines[head.comment], end.comment)
         }
@@ -227,7 +233,7 @@
     zz = tempfile()
     enc = options(encoding = "native.enc")
     writeLines(text, zz)
-    tidy.res = tidy.source(zz, out = FALSE, keep.blank.line = FALSE)
+    tidy.res = tidy.source(zz, out = FALSE, keep.blank.line = TRUE)
     options(enc)
     unlink(zz)
     options(begin.comment = tidy.res$begin.comment, end.comment = tidy.res$end.comment)
@@ -347,6 +353,13 @@
           showto <- srclines[srcref[3]]
         }
         dce <- getSrcLines(srcfile, lastshown+1, showto)
+            # replace the comment identifiers
+        dce <- gsub(sprintf("%s = \"|%s\"", getOption("begin.comment"),
+            getOption("end.comment")), "", dce)
+            # replace tabs with spaces for better looking output
+        dce <- gsub("\\\\t", "    ", dce)
+            # replace leading lines with #line from 2.12.0
+        if(substring(dce[1], 1, 5) == "#line") dce <- dce[-1]
         leading <- showfrom-lastshown
         lastshown <- showto
         srcline <- srclines[srcref[3]]

Modified: pkg/R/zzz.R
===================================================================
--- pkg/R/zzz.R	2010-11-03 19:38:28 UTC (rev 20)
+++ pkg/R/zzz.R	2010-11-16 00:20:38 UTC (rev 21)
@@ -30,6 +30,7 @@
 	
 	setwd(texDir)
 	
+	  # requires tikzDevice to be loaded
 	latexCmd <- getOption('tikzLatex')
 
 	# Append the batchmode flag to increase LaTeX 
@@ -62,8 +63,5 @@
 		stop(paste('PGF >= 2.00 is required to use pgfSweave, you are using version',match))
 	else
 		packageStartupMessage(paste('pgfSweave: Using PGF Version',match))
-		
 	
-	
-	
 }
\ No newline at end of file

Modified: pkg/inst/doc/figs/fig-normalSweave.pdf
===================================================================
--- pkg/inst/doc/figs/fig-normalSweave.pdf	2010-11-03 19:38:28 UTC (rev 20)
+++ pkg/inst/doc/figs/fig-normalSweave.pdf	2010-11-16 00:20:38 UTC (rev 21)
@@ -2,8 +2,13 @@
 %âãÏÓ\r
 1 0 obj
 <<
+<<<<<<< HEAD
 /CreationDate (D:20101103133748)
 /ModDate (D:20101103133748)
+=======
+/CreationDate (D:20101103132622)
+/ModDate (D:20101103132622)
+>>>>>>> master
 /Title (R Graphics Output)
 /Producer (R 2.12.0)
 /Creator (R)
@@ -47,17 +52,27 @@
 1 J
 1 j
 10.00 M
+<<<<<<< HEAD
 63.73 73.44 m 181.07 73.44 l S
 63.73 73.44 m 63.73 66.24 l S
 93.07 73.44 m 93.07 66.24 l S
 122.40 73.44 m 122.40 66.24 l S
 151.73 73.44 m 151.73 66.24 l S
 181.07 73.44 m 181.07 66.24 l S
+=======
+63.73 73.44 m 174.16 73.44 l S
+63.73 73.44 m 63.73 66.24 l S
+91.34 73.44 m 91.34 66.24 l S
+118.95 73.44 m 118.95 66.24 l S
+146.56 73.44 m 146.56 66.24 l S
+174.16 73.44 m 174.16 66.24 l S
+>>>>>>> master
 BT
 0.000 0.000 0.000 rg
 /F2 1 Tf 12.00 0.00 -0.00 12.00 56.89 47.52 Tm (-4) Tj
 ET
 BT
+<<<<<<< HEAD
 /F2 1 Tf 12.00 0.00 -0.00 12.00 86.23 47.52 Tm (-2) Tj
 ET
 BT
@@ -65,20 +80,41 @@
 ET
 BT
 /F2 1 Tf 12.00 0.00 -0.00 12.00 148.40 47.52 Tm (2) Tj
+=======
+/F2 1 Tf 12.00 0.00 -0.00 12.00 84.50 47.52 Tm (-2) Tj
 ET
 BT
-/F2 1 Tf 12.00 0.00 -0.00 12.00 177.73 47.52 Tm (4) Tj
+/F2 1 Tf 12.00 0.00 -0.00 12.00 115.61 47.52 Tm (0) Tj
 ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 143.22 47.52 Tm (2) Tj
+>>>>>>> master
+ET
+BT
+/F2 1 Tf 12.00 0.00 -0.00 12.00 170.83 47.52 Tm (4) Tj
+ET
+<<<<<<< HEAD
 59.04 76.53 m 59.04 137.01 l S
 59.04 76.53 m 51.84 76.53 l S
 59.04 96.69 m 51.84 96.69 l S
 59.04 116.85 m 51.84 116.85 l S
 59.04 137.01 m 51.84 137.01 l S
+=======
+59.04 76.53 m 59.04 137.08 l S
+59.04 76.53 m 51.84 76.53 l S
+59.04 96.71 m 51.84 96.71 l S
+59.04 116.90 m 51.84 116.90 l S
+59.04 137.08 m 51.84 137.08 l S
+>>>>>>> master
 BT
 /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 73.20 Tm (0) Tj
 ET
 BT
+<<<<<<< HEAD
 /F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 103.51 Tm (1000) Tj
+=======
+/F2 1 Tf 0.00 12.00 -12.00 0.00 41.76 103.55 Tm (1000) Tj
+>>>>>>> master
 ET
 Q q 59.04 73.44 126.72 83.52 re W n
 0.000 0.000 0.000 RG
@@ -87,6 +123,7 @@
 1 J
 1 j
 10.00 M
+<<<<<<< HEAD
 63.73 76.53 7.33 0.08 re S
 71.07 76.53 7.33 0.32 re S
 78.40 76.53 7.33 2.10 re S
@@ -103,11 +140,34 @@
 159.07 76.53 7.33 1.98 re S
 166.40 76.53 7.33 0.40 re S
 173.73 76.53 7.33 0.16 re S
+=======
+63.73 76.53 6.90 0.12 re S
+70.64 76.53 6.90 0.28 re S
+77.54 76.53 6.90 1.53 re S
+84.44 76.53 6.90 6.30 re S
+91.34 76.53 6.90 17.68 re S
+98.24 76.53 6.90 36.97 re S
+105.15 76.53 6.90 61.51 re S
+112.05 76.53 6.90 77.29 re S
+118.95 76.53 6.90 77.33 re S
+125.85 76.53 6.90 61.87 re S
+132.75 76.53 6.90 37.13 re S
+139.65 76.53 6.90 16.71 re S
+146.56 76.53 6.90 6.62 re S
+153.46 76.53 6.90 1.86 re S
+160.36 76.53 6.90 0.32 re S
+167.26 76.53 6.90 0.04 re S
+174.16 76.53 6.90 0.04 re S
+>>>>>>> master
 Q
 endstream
 endobj
 7 0 obj
+<<<<<<< HEAD
 1666
+=======
+1693
+>>>>>>> master
 endobj
 3 0 obj
 <<
@@ -154,6 +214,7 @@
 0000000000 65535 f 
 0000000021 00000 n 
 0000000164 00000 n 
+<<<<<<< HEAD
 0000002032 00000 n 
 0000002115 00000 n 
 0000000213 00000 n 
@@ -162,6 +223,16 @@
 0000002207 00000 n 
 0000002464 00000 n 
 0000002560 00000 n 
+=======
+0000002059 00000 n 
+0000002142 00000 n 
+0000000213 00000 n 
+0000000293 00000 n 
+0000002039 00000 n 
+0000002234 00000 n 
+0000002491 00000 n 
+0000002587 00000 n 
+>>>>>>> master
 trailer
 <<
 /Size 11
@@ -169,5 +240,9 @@
 /Root 2 0 R
 >>
 startxref
+<<<<<<< HEAD
 2662
+=======
+2689
+>>>>>>> master
 %%EOF



More information about the Pgfsweave-commits mailing list