Skip to content

Sweave and transparent PDF?

2 messages · Benno Pütz, Friedrich Leisch

#
Hello,

I have run across the following problem:

Creating PDF files manually by using

pdf(version=1.4)

I can make graphs using the new transparency feature of R2.0. If, 
however, I try to create the same graphs with Sweave, all transparent 
stuff is gone. This os likely due to the default version parameter in in 
pdf().

How can I tell Sweave to use the newer PDF version? The parameter seems 
to be hard-coded (not via some option) and I could not come up with some 
kind of hook ...

Thank you

    Benno
#
> Hello,
  > I have run across the following problem:

  > Creating PDF files manually by using

  > pdf(version=1.4)

  > I can make graphs using the new transparency feature of R2.0. If, 
  > however, I try to create the same graphs with Sweave, all transparent 
  > stuff is gone. This os likely due to the default version parameter in in 
  > pdf().

  > How can I tell Sweave to use the newer PDF version? The parameter seems 
  > to be hard-coded (not via some option) and I could not come up with some 
  > kind of hook ...

Good point, currently I see no way short of directly creating the PDF
file and manually including it in latex, i.e., do

**********************************************************
<<fig=false>>=
pdf(file="foo.pdf", version="1.4")
myplot(...)
dev.off()
@

\incudegraphics{foo}
**********************************************************


But we should think about a more general mechansim to specify defaults
for the PDF device (not only for Sweave).