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 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to