[Rd] Working with Sweave: inverse search?

Duncan Murdoch murdoch at stats.uwo.ca
Sat Jan 13 21:58:31 CET 2007


The xdvi and yap DVI viewers allow inverse (aka reverse) search:  you 
click on a location in the output display, and your editor moves to the 
corresponding location in the input file.  yap at least also allows 
forward search, where you can have your editor tell it to location where 
a particular input line is displayed.

I would like something like this to work in Sweave files.  That is, I 
write an Sweave file and process it through to a .dvi in the previewer, 
then I click in a previewer and am taken to the original location in the 
Sweave file.

There seem to be two obstacles:  The latex I'm using (from MikTeX) 
doesn't give any way to indicate the original source file when the .tex 
comes out of Sweave, and Sweave doesn't keep track of the concordance 
between input lines and output lines.

Both of these are fixable, but it looks like a few hours work; has 
anyone done this already?

Duncan Murdoch



More information about the R-devel mailing list