[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-AUCTeX] C-c C-v fails when using pst-pdf
From: |
Holger Sparr |
Subject: |
[Bug-AUCTeX] C-c C-v fails when using pst-pdf |
Date: |
Mon, 09 Jul 2007 22:44:50 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) |
Hi,
[pst-pdf: Produce an pdf-file with using postscript environments where
you place pstricks pictures environments etc.]
When using pst-pdf, you are supposed to run the shell script ps4pdf to
produce a pdf-file, which I run by setting a local file variable.
When typing C-c C-v afterwards, AUCTeX opens ghostview to view the
results.
The process to find the right extension by scanning LaTeX's output for
viewing is not sufficient since a further run of ps2pdf was applied to
the result of last LaTeX run.
Maybe, one could check whether a newer pdf-file is present?
Something along:
(defun TeX-my-view ()
"Select the viewer depending on local variables like
`TeX-command-default' and `TeX-PDF-mode'."
(interactive)
(if (or (eq TeX-command-default "make pdf") (eq TeX-PDF-mode t))
(TeX-command "Xpdf" 'TeX-master-file)
;; (message "%s" TeX-command-default)
(if (file-newer-than-file-p (TeX-master-file "pdf" nil) (TeX-master-file
"dvi" nil))
(TeX-command "Xpdf" 'TeX-master-file)
(if (file-newer-than-file-p (TeX-master-file "ps" nil) (TeX-master-file
"dvi" nil))
(TeX-command "Ghostview" 'TeX-master-file)
(TeX-command "Xdvi" 'TeX-master-file)))))
Holger
--
- [Bug-AUCTeX] C-c C-v fails when using pst-pdf,
Holger Sparr <=