From murdoch at stats.uwo.ca  Sat Jan 13 21:58:31 2007
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Sat, 13 Jan 2007 15:58:31 -0500
Subject: [Rd] Working with Sweave:  inverse search?
Message-ID: <45A947F7.9080206@stats.uwo.ca>

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



[Rd] Working with Sweave: inverse search?
Duncan Murdoch