yatex
changeset 374:9b3093c0c181 dev
conv2image format set to jpg for testing
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 30 Dec 2014 09:19:04 +0900 |
parents | 1b2e55ef1026 |
children | afb8cb06b1d4 |
files | yatexprc.el |
diffstat | 1 files changed, 9 insertions(+), 11 deletions(-) [+] |
line diff
1.1 --- a/yatexprc.el Mon Dec 29 22:42:39 2014 +0900 1.2 +++ b/yatexprc.el Tue Dec 30 09:19:04 2014 +0900 1.3 @@ -1,7 +1,7 @@ 1.4 ;;; yatexprc.el --- YaTeX process handler 1.5 ;;; 1.6 ;;; (c)1993-2014 by HIROSE Yuuji.[yuuji@yatex.org] 1.7 -;;; Last modified Mon Dec 29 22:42:27 2014 on sdr 1.8 +;;; Last modified Tue Dec 30 09:17:29 2014 on sdr 1.9 ;;; $Id$ 1.10 1.11 ;;; Code: 1.12 @@ -437,11 +437,11 @@ 1.13 (defvar YaTeX-typeset-dvi2image-chain 1.14 (cond 1.15 ((YaTeX-executable-find "dvipng") 1.16 - (list "dvipng %b")) 1.17 + (list "dvipng %b.dvi")) 1.18 ((YaTeX-executable-find YaTeX-cmd-dvips) 1.19 (list 1.20 (format "%s -E -o %%b.eps %%b.dvi" YaTeX-cmd-dvips) 1.21 - "convert -alpha off -density %d %b.eps %b.png"))) 1.22 + "convert -alpha off -density %d %b.eps %b.%f"))) 1.23 "*Pipe line of command as a list to create png file from DVI or PDF. 1.24 %-notation rewritten list: 1.25 %b basename of target file(\"texput\") 1.26 @@ -460,15 +460,13 @@ 1.27 (defun YaTeX-typeset-conv2image-chain () 1.28 (let*((proc (or YaTeX-typeset-process YaTeX-typeset-conv2image-process)) 1.29 (prevname (process-name proc)) 1.30 - (target "texput.png") 1.31 + (texput "texput") (format "jpg") 1.32 + (target (concat texput "." format)) 1.33 (math (get 'YaTeX-typeset-conv2image-chain 'math)) 1.34 - ;(conv (format "convert -density %d - %s" (if math 250 100) target)) 1.35 - ;(chain (list (format "dvips -E -o - texput|%s" conv))) 1.36 - ;(conv (format "convert -alpha off - %s" target)) 1.37 - (case-fold-search t) 1.38 (srctype (or (get 'YaTeX-typeset-conv2image-chain 'srctype) 1.39 - (if (save-excursion 1.40 - (re-search-backward "this is pdftex" nil t)) 1.41 + (if (file-newer-than-file-p 1.42 + (concat texput ".pdf") 1.43 + (concat texput ".dvi")) 1.44 'pdf 'dvi))) 1.45 (chain (cdr (assq srctype YaTeX-typeset-conv2image-chain-alist))) 1.46 ;; This function is the first evaluation code. 1.47 @@ -493,7 +491,7 @@ 1.48 (let ((cmdline (YaTeX-replace-formats 1.49 command 1.50 (list (cons "b" "texput") 1.51 - (cons "f" "png") 1.52 + (cons "f" format) 1.53 (cons "d" (if math "300" "200")))))) 1.54 (insert (format "Calling `%s'...\n" cmdline)) 1.55 (set-process-sentinel