Tag Archives: News

pgfSweave 1.1.0 now on CRAN!

The next release of pgfSweave is now on CRAN! It has been a while since I posted about pgfSweave and there have been some significant changes in the past couple of months.

The main new features are:

  • Automatic code highlighting via the highlight package. This can be turned off with the highlight option.
  • “Tidying” of source code output via the tidy option.
  • Access to tikzDevice sanitization through a code chunk option sanitize
  • Automatic addition of the \pgfrealjobname command if it does not exist similarly to the addition of the \usepackage{Sweave} line.
  • Setting tex.driver=latex will now (in addition to working) generate an eps file

And of course bug fixes:

  • Fixes for bunches of issues related to the changes in Sweave in R 2.12. I think these issues are now resolved (fingers crossed)
  • keep.source actually works now.

See the NEWS file for the complete list of changes and the vignette for information on now to use the new options.

pgfSweave now on CRAN

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

Beta Verson of tikzDevice Released!

The tikzDevice package provides a new graphics device for R which enables direct output of graphics in a LaTeX-friendly way. The device output consists of files containing instructions for the TikZ graphics language and may be imported directly into LaTeX documents using the \input{} command.

The beta version of tikzDevice is now available here.

An additional location for downloading source tarballs and windows binaries is here.

There are many significant improvements compared to the alpha version:


  • Rd documentation
  • A vignette
  • Proper string placement (because of string width and character metric calculations via latex)
  • Custom LaTeX headers, footers and typesetting engines
  • R-Level Annotation of graphics with TikZ commands (see TeXample for great examples of using TikZ commands)


  • ASCII character support only
  • No recognition of the R symbol font (i.e. no plotmath symbols)
  • A bevy of other quirks and “personality traits” that will make themselves known in time

The device requires a working installation of LaTeX and the TIkZ package in order to function. This is because font metrics are currently calculated through direct calls to the LaTeX compiler. Unfortunately, this results in some significant computational overhead- it may take several seconds to create a plot that contains a lot of text. In an attempt to offset this behavior, the tikzDevice uses the filehash package to store font metrics that it has already computed. Hopefully the more the device is used, the faster it will be. We suggest reviewing the package vignette, especially the section “R Options That Affect Package Behavior ” for more information on how the caching process works.

We think the package is quite usable as it is, but there are surely many bugs that we don’t know about. We welcome bug reports at our R-Forge tracker


The tikzDevice Team