[Rd] Vignette problem

Duncan Murdoch murdoch.duncan at gmail.com
Mon May 14 20:19:55 CEST 2012


On 14/05/2012 1:28 PM, Terry Therneau wrote:
> I'm having a problem rebuilding a package, new to me in R 2.15.0
> (Linux)  It hits all that contain the line
> \usepackage[pdftex]{graphics}
>
> and leads to the following when running R CMD check on the directory.
> (I do this often; a final run on the tar.gz file will happen before
> submission.)
> Since I float and resize my figures, removing the line is fatal in other
> ways.
>
> ----------------------------
>
> * checking re-building of vignette PDFs ... NOTE
> Error in re-building vignettes:
>     ...
> /usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def:414: Package
> pdftex.de
> f Error: PDF mode expected, but DVI mode detected!
> (pdftex.def)                If you are using `latex', then call `pdflatex'.
> (pdftex.def)                Otherwise check and correct the driver options.
> (pdftex.def)                Error recovery by switching to PDF mode.
>
> See the pdftex.def package documentation for explanation.
> Type  H<return>   for immediate help.
>    ...
>
> l.414     }\@ehc
>
> ?
> /usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def:414: Emergency
> stop.
>    ...
>
> l.414     }\@ehc
>
> No pages of output.
> Transcript written on lmekin.log.
> /usr/bin/texi2dvi: latex exited with bad status, quitting.
> make: *** [lmekin.pdf] Error 1
> Error in buildVignettes(dir =
> "/home/therneau/research/surv/Hg/coxme.Rcheck/vign_test/coxme") :
>     running 'make' failed
> Execution halted
>
> -----------------------------------------
>
> The resulting .tex file work just fine with pdflatex, however.  I
> haven't found any reference to this elsewhere, but my guess is that it
> is something simple that I've missed.

Do you have an explicit \usepackage{Sweave} in your file?  If not, 
Sweave will add one, and that might explain the difference between your 
two tests.

Another possibility is that you have a copy of Sweave.sty that is not 
the same as the one being used in one run or the other.  The checks will 
try to tell pdflatex to use the one that comes with your R version, but 
other local ones can sometimes have higher precedence in pdflatex.

And one idea what the problem might be: Sweave.sty uses the graphicx 
package, and it may conflict with the graphics package.

Duncan Murdoch



More information about the R-devel mailing list