[ESS] Oppening pdf files from ESS

Kevin Wright kw.statr at gmail.com
Thu Nov 6 01:44:29 CET 2008


Which version of ess are you using?  I think I had a problem similar
to yours, but it seems to be okay now.

Here is my ess-swv-PDF.

(defun ess-swv-PDF ()
  "Create a PDF file ('pdflatex') and display it."
  (interactive)
  (let* ((buf (buffer-name))
	 (namestem (file-name-sans-extension (buffer-file-name)))
	 (latex-filename (concat namestem ".tex"))
	 (tex-buf (get-buffer-create " *ESS-tex-output*"))
	 (pdfviewer (ess-get-pdf-viewer))
	 (pdf-status))
    ;;(shell-command (concat "pdflatex " latex-filename))
    (message "Running pdfLaTeX on '%s' ..." latex-filename)
    (switch-to-buffer tex-buf)
    (setq pdf-status
	  (call-process "pdflatex" nil tex-buf 1 latex-filename))
    (if (not (= 0 pdf-status))
	(message "** OOPS: error in 'pdflatex' (%d)!" pdf-status)
      ;; else: pdflatex probably ok
;      (shell-command (concat pdfviewer " " namestem ".pdf &")))
  (w32-shell-execute "open" (concat namestem ".pdf") nil 1))
    (switch-to-buffer buf)
    (display-buffer tex-buf)))

Kevin Wright



On Wed, Nov 5, 2008 at 11:29 AM, Vitalie Spinu <vitosmail at rambler.ru> wrote:
> Dear ESS Community,
>
> I have troubles with opening pdf files from ESS under Windows using
> ess-swv-Pdf. Pdflatex runs ok, but at the final stage the error:
>
> Foxit Reader.exe c:/spinus/works/EuroQol/elsberg.pdf: exited abnormally with
> code 1.
>
> strikes. Same story for acrobat reader.
>
> From command prompt can easily open it:
> "C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe"
> "c:/spinus/works/EuroQol/elsberg.pdf
>
> Thanks for any suggestions.
>
> --
> Spinu Vitalie
> Erasmus University Rotterdam
> Tinbergen Institute
> Burg Oudlaan 50, H09-10
> NL 3062 PA Rotterdam
> +31 10 4088924
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>




More information about the ESS-help mailing list