[Tex/LaTex] SumatraPDF inverse search for RNW files

knitrrnwsumatrapdftexstudio

I'm using TexStudio to edit my rnw files. I setup an inverse search from SumatraPDF to TexStudio using THIS (verbatim) which is a renewed version of THIS. When I double click a text in SumatraPDF it opens the tex file and shows the correct text. But I want it to open the rnw file and find the correct text there. How can I do that?

I'm using following command in SumatraPDF:

"C:\Program Files (x86)\TeXstudio\texstudio.exe" "%f" -line %l

Best Answer

The Problem: This is neiter an issue of TeXstudio nor of Sumatra PDF. Instead it's a result of the combination of Synctex and the build chain is rnw -> tex -> pdf. Synctex is originally designed to provide a connection between the tex file and the pdf. It does not know anything about the rnw.

Towards a Solution: I'm not an R user and therefore have no ready solution. However the package patchDVI seems to be the thing to look for. Additionally, this description may help: http://starlinq.livejournal.com/5762.html

Related Question