[ESS] knitr pdf viewer on windows

David Scott d.scott at auckland.ac.nz
Fri Dec 20 01:47:38 CET 2013


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


-- 
_________________________________________________________________
David Scott	Department of Statistics
		The University of Auckland, PB 92019
		Auckland 1142,    NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email:	d.scott at auckland.ac.nz,  Fax: +64 9 373 7018



More information about the ESS-help mailing list