[ESS] knitr pdf viewer on windows

Vitalie Spinu spinuvit at gmail.com
Fri Dec 20 21:31:18 CET 2013


Is making SumatraPDF the default on your computer an option?

I looked into the code and, somewhat unfortunately, windows is treated
specially by calling "start" and ignoring ess-pdf-viewer-pref. I am
afraid the only way to make it work for you is to rewrite ess-swv-PDF.

   Vitalie

 >>> David Scott on Fri, 20 Dec 2013 13:47:38 +1300 wrote:

 > I am trying to get M-n P when processing a .Rnw file to preferably not open a
 > viewer, or alternatively open Sumatra if not already open. My preferred mode is
 > to open the pdf in Sumatra when I start and allow Sumatra to update the pdf as I
 > edit and then process the .Rnw file.

 > I have changed the sweave processor to knitr:
 >  '(ess-swv-processor (quote knitr))

 > I have changed the ess pdf viewer to Sumatra:
 >  '(ess-pdf-viewer-pref "c:/Program Files/RStudio/bin/sumatra/SumatraPDF.exe")

 > Also the AUCTeX pdf viewer:
 > (setq TeX-source-correlate-mode t)
 > (setq TeX-source-correlate-method 'synctex)
 > (setq TeX-view-program-list
 >    '(("Sumatra PDF" ("\"c:/Program Files/RStudio/bin/sumatra/SumatraPDF.exe\"
 > -reuse-instance"
 >                       (mode-io-correlate " -forward-search %b %n ") " %o"))))

 > If I use pdflatex on an ordinary .tex document, I get the Sumatra viewer but M-n
 > P gives me Adobe Reader  (which is the default on my computer).

 > Any suggestions as to how to change this?

 > Thanks

 > David Scott



More information about the ESS-help mailing list