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.

7 thoughts on “pgfSweave 1.1.0 now on CRAN!

  1. Cool, thanks Cameron!

    I like the automatic “\pgfrealjobname”. If the user included the statement in the Rnw file with the wrong name, then we’ll get an error (of course). Better tell people to not put this in at all to prevent errors (from renaming the Rnw file).

    “highlight” isn’t on by default. You have to specify it to TRUE in each chunk.

    tex.driver=latex now generates eps…but the figure is on a huge page. This isn’t the output the user would want…we’ll have to find a better solution for this.

    keep.source works!

    Haven’t tried tidy and sanitize yet.

    Thanks again!

  2. If the user included the statement in the Rnw file with the wrong name, then we’ll get an error (of course). Better tell people to not put this in at all to prevent errors (from renaming the Rnw file).

    Good call, I will make a point of that. I should just remove all references to it and have it always automatically generated.

    “highlight” isn’t on by default. You have to specify it to TRUE in each chunk.

    You are right about highlight not being on by default, I intended it to be, but I must have gotten my intentions mixed. Oh well, i was on the fence about enabling that by default anyway.

    tex.driver=latex now generates eps…but the figure is on a huge page. This isn’t the output the user would want…we’ll have to find a better solution for this.

    You are right about this as well. I am not really sure how to fix this. Let me know if you have any ideas. (you may be the only user of this feature)

  3. If highlight=TRUE (set globally), echo=FALSE, term=TRUE, results=tex, then the R code is displayed with colors, where what we really want are latex outputs.

    I ran into that doing some work right now. That might be an issue if highlight is turned on globally.

  4. Thanks, That would certainly be useful to me if it was available. Actually, I could hack Sweave to get this to work now. We did something like that in the tikzDevice package.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>