[Rd] Vignette problem

Terry Therneau therneau at mayo.edu
Tue May 15 15:56:50 CEST 2012


Duncan,
   Thanks for the ideas.  I checked them out and none seem to be the 
culprit.  My original message was wrong in one detail BTW, as I was 
already using "graphicx" not graphics.
   I switched over to the central server machine (CENTOS) to finish up 
the coxme submission until I could figure this out.  Ran CMD check, 
tidied up the NAMESPACE, DESCRIPTION, NEWS files, fixed a missing $ sign 
in an Rnw, etc.  Submitted the final to CRAN, then updated all the files 
on the Linux box from which the error below came -- both boxes point to 
the same Mercurial master --- and then tried again.
   Now it works!  And I have no idea what could have prompted the 
change.  It will remain a mystery, since I'm not going to try to bring 
the error back. :-)

Terry T.

On 05/14/2012 01:19 PM, Duncan Murdoch wrote:
> 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