Skip to content
Prev 5861 / 15075 Next

Textmate/ SWeave: Error PDF file not written to disk

I played with it a little more and I think I have gotten it to work  
properly for me. I still don't entirely understand why this works (!)  
so follow at your own risk :) First a bit of clarification, I set my  
TextMate up with TM_LATEX_COMPILER set to latexmk.pl (in TextMate  
Preferences). Then these 2 changes are made.

1)
need new version of latexmk.pl in . The original version is 3.07a, I  
got the one from
     http://www.ctan.org/tex-archive/support/latexmk/
which is 4.05. It should be at
     ~/Library/Application Support/TextMate/Pristine Copy/Bundles/ 
SWeave.tmbundle/Support/bin/latexmk.pl
which might be different if you installed it using other methods.


2)
In "Sweave, Typeset & View", change a line in run_tex()
from
     else "$TEX" -f -r "${TM_BUNDLE_SUPPORT}/latexmkrc" "$1"
to
     else "$TEX" -f -pdf "$1"

* I am not sure why I need to call -pdf to get it to produce the pdf  
while wasn't needed in the original version.
* I don't have latexmkrc in my support directory and this option was  
making latexmk.pl unhappy.


Note:
* you still need Sweave.sty somewhere
* I commented out the standard error pipe in my last post. But with  
these changes I can (and should) revert the change.

Hope this helps. It would be great if someone can fix this properly  
instead of using some voodoo hack.

Saiwing
On Apr 13, 2009, at 1:55 AM, Felix Sch?nbrodt wrote: