--- SweaveOLD.R 2009-02-12 16:39:21.000000000 -0600 +++ SweaveNEW.R 2009-06-15 07:54:14.000000000 -0500 @@ -372,7 +372,8 @@ fig=FALSE, pdf=TRUE, eps=TRUE, width=6, height=6, term=TRUE, echo=TRUE, keep.source=FALSE, results="verbatim", - split=FALSE, strip.white="true", include=TRUE, + split=FALSE, strip.white="true", + include=TRUE, center.fig=FALSE, pdf.version=grDevices::pdf.options()$version, pdf.encoding=grDevices::pdf.options()$encoding, concordance=FALSE, expand=TRUE) @@ -611,10 +612,15 @@ if(inherits(err, "try-error")) stop(err) } if(options$include) { + if(options$center.fig) { + cat("\\centerline{\\includegraphics{", chunkprefix, "}}\n", sep="", + file=object$output, append=TRUE) + } else { cat("\\includegraphics{", chunkprefix, "}\n", sep="", file=object$output, append=TRUE) - linesout[thisline + 1L] <- srcline - thisline <- thisline + 1L + } + linesout[thisline + 1L] <- srcline + thisline <- thisline + 1L } } object$linesout <- c(object$linesout, linesout)