From murdoch at stats.uwo.ca  Tue Aug  5 17:43:49 2008
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Tue, 05 Aug 2008 11:43:49 -0400
Subject: [Rd] patchDVI update:  SyncTex support
Message-ID: <48987535.3060309@stats.uwo.ca>

A while ago I wrote a package called patchDVI, that allowed 
"reverse-search" from the YAP .dvi previewer (or others) to jump 
directly to the .Rnw source of an Sweave document.

Recently support for reverse search has been integrated into pdflatex 
(through SyncTex).  There aren't many PDF previewers on Windows that 
support this (only an unreleased version of SumatraPDF, as far as I 
know), but I believe Mac OSX previewers have supported it for some time, 
and there may be others on Linux or Windows too.

I'd appreciate anyone who is using one of those previewers and who is 
interested in this to test the new code.  It's available on 
http://www.stats.uwo.ca/faculty/murdoch/software/ (near the bottom of 
the page).

Including the concordance info into a .pdf needs a patch to Sweave, and 
to Sweave.sty:

Sweave should wrap the concordance in \Sconcordance{}, instead of 
\special{}.

Sweave.sty should have this macro added:

\newcommand{\Sconcordance}[1]{%
\ifx\pdfoutput\undefined%
\csname newcount\endcsname\pdfoutput\fi%
\ifcase\pdfoutput\special{#1}%
\else\immediate\pdfobj{#1}\fi}

Improvements to this macro would also be appreciated.

Duncan Murdoch



[Rd] patchDVI update: SyncTex support
Duncan Murdoch