yatex
diff yatexprc.el @ 382:e009c4f86ede
Change default directory of HELP file to under `site-lisp/yatex'.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 06 Jan 2015 20:29:08 +0900 |
parents | f061b37c7542 |
children | e95ae850eefb |
line diff
1.1 --- a/yatexprc.el Sun Jan 04 21:41:00 2015 +0900 1.2 +++ b/yatexprc.el Tue Jan 06 20:29:08 2015 +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 Sun Jan 4 19:56:26 2015 on firestorm 1.8 +;;; Last modified Sun Jan 4 23:26:54 2015 on firestorm 1.9 ;;; $Id$ 1.10 1.11 ;;; Code: 1.12 @@ -408,10 +408,12 @@ 1.13 (put 'dvi2-command 'file buffer) 1.14 (put 'dvi2-command 'offset lineinfo)))) 1.15 1.16 -(defvar YaTeX-use-image-preview "jpg" 1.17 +(defvar YaTeX-use-image-preview "png" 1.18 "*Nil means not using image preview by [prefix] t e. 1.19 Acceptable value is one of \"jpg\" or \"png\", which specifies 1.20 -format of preview image.") 1.21 +format of preview image. NOTE that if your system has /usr/bin/sips 1.22 +not having convert(ImageMagick), jpeg format is automatically taken 1.23 +for conversion.") 1.24 (defvar YaTeX-preview-image-mode-map nil 1.25 "Keymap used in YaTeX-preview-image-mode") 1.26 (defun YaTeX-preview-image-mode () 1.27 @@ -435,20 +437,21 @@ 1.28 "pdfcrop --clip %b.pdf tmp.pdf" 1.29 (if (YaTeX-executable-find "convert") 1.30 "convert -density %d tmp.pdf %b.%f" 1.31 - "sips -s format %f -s dpiWidth %d -s dpiHeight %d %b.pdf --out %b.%f") 1.32 + ;; If we use sips, specify jpeg as format 1.33 + "sips -s format jpeg -s dpiWidth %d -s dpiHeight %d %b.pdf --out %b.jpg") 1.34 "rm -f tmp.pdf"))) 1.35 "*Pipe line of command as a list to create image file from PDF. 1.36 See also doc-string of YaTeX-typeset-dvi2image-chain.") 1.37 1.38 (defvar YaTeX-typeset-dvi2image-chain 1.39 (cond 1.40 - ((and (equal YaTeX-use-image-preview "png") 1.41 - (YaTeX-executable-find "dvipng")) 1.42 - (list "dvipng %b.dvi")) 1.43 ((YaTeX-executable-find YaTeX-cmd-dvips) 1.44 (list 1.45 (format "%s -E -o %%b.eps %%b.dvi" YaTeX-cmd-dvips) 1.46 - "convert -alpha off -density %d %b.eps %b.%f"))) 1.47 + "convert -alpha off -density %d %b.eps %b.%f")) 1.48 + ((and (equal YaTeX-use-image-preview "png") 1.49 + (YaTeX-executable-find "dvipng")) 1.50 + (list "dvipng %b.dvi"))) 1.51 "*Pipe line of command as a list to create png file from DVI or PDF. 1.52 %-notation rewritten list: 1.53 %b basename of target file(\"texput\")