This is one way to check for the version of PGF that is installed in an automated way. First create a tex file with the following contents:
Say you named it
cat test-pgf-verson.log | grep PGFVersion | sed ‘s/PGFVersion=//’
should display the version number. I happen to need to do this from
R so using similar logic:
logFile <- ‘test–pgf–version.log‘
logContents <- readLines( logFile )
match <- logContents[ grep(‘PGFVersion=‘, logContents) ]
version <- gsub(‘[=A–Za–z–]‘,”,match)
which accomplishes the same task as the second line above.
Version 1.0.5 is now on CRAN. This version brings some bug fixes as well as two new features:
- Unlabeled code chunks are now allowed.
- The correct version of PGF is now checked for on startup. If the version is < 2.00, the package will fail to load.
At long last pgfSweave has finally made its way to CRAN.
The pgfSweave R package is about speed and style of graphics. For speed,
the package provides capabilities for “caching” graphics generated
with Sweave on top of the caching funcitonality of cacheSweave. For
style the pgfSweave package facilitates the integration of R graphics
with LaTeX reports through the tikzDevice package and eps2pgf utility.
With these tools, figure labels are converted to LaTeX strings so they
match the style of the document and the full range of LaTeX math
symbols/equations are available.
The backbone of pgfSweave is a a new driver for Sweave
(pgfSweaveDriver). The driver provides new chunk options tikz, pgf and
external on top of the cache option provided by cacheSweave.
This package started as a fork (hack) of cacheSweave to suit our own
narrow purposes and has since become a valuable tool for much of our
own work. We hope you will find it useful as well.
-Cameron Bracken and Charlie Sharpsteen