changeset 381:fc1ad3b337a9 dev

Platform dependent default parameters adjusted
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 04 Jan 2015 23:30:57 +0900
parents f061b37c7542
children e009c4f86ede
files yatex23.el yatexprc.el
diffstat 2 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/yatex23.el	Sun Jan 04 21:41:00 2015 +0900
+++ b/yatex23.el	Sun Jan 04 23:30:57 2015 +0900
@@ -1,6 +1,6 @@
 ;;; yatex23.el --- YaTeX facilities for Emacs 23 or later -*- coding: sjis -*-
 ;;; (c)2014 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sun Jan  4 17:14:59 2015 on firestorm
+;;; Last modified Sun Jan  4 23:19:02 2015 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -95,7 +95,7 @@
   "Overlay of on-the-fly preview image")
 (defface YaTeX-on-the-fly-activated-face
   (list
-   (list (list '(class color))
+   (list (list '(class color) '(min-colors 65536))
 	 (list ':background
 	       (if (eq YaTeX-background-mode 'light)
 		   (car YaTeX-on-the-fly-bg-face)
--- a/yatexprc.el	Sun Jan 04 21:41:00 2015 +0900
+++ b/yatexprc.el	Sun Jan 04 23:30:57 2015 +0900
@@ -1,7 +1,7 @@
 ;;; yatexprc.el --- YaTeX process handler
 ;;; 
 ;;; (c)1993-2014 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sun Jan  4 19:56:26 2015 on firestorm
+;;; Last modified Sun Jan  4 23:26:54 2015 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -408,10 +408,12 @@
       (put 'dvi2-command 'file buffer)
       (put 'dvi2-command 'offset lineinfo))))
 
-(defvar YaTeX-use-image-preview "jpg"
+(defvar YaTeX-use-image-preview "png"
   "*Nil means not using image preview by [prefix] t e.
 Acceptable value is one of \"jpg\" or \"png\", which specifies
-format of preview image.")
+format of preview image.  NOTE that if your system has /usr/bin/sips
+not having convert(ImageMagick), jpeg format is automatically taken
+for conversion.")
 (defvar YaTeX-preview-image-mode-map nil
   "Keymap used in YaTeX-preview-image-mode")
 (defun YaTeX-preview-image-mode ()
@@ -435,20 +437,21 @@
      "pdfcrop --clip %b.pdf tmp.pdf"
      (if (YaTeX-executable-find "convert")
 	 "convert -density %d tmp.pdf %b.%f"
-       "sips -s format %f -s dpiWidth %d -s dpiHeight %d %b.pdf --out %b.%f")
+       ;; If we use sips, specify jpeg as format
+       "sips -s format jpeg -s dpiWidth %d -s dpiHeight %d %b.pdf --out %b.jpg")
      "rm -f tmp.pdf")))
   "*Pipe line of command as a list to create image file from PDF.
 See also doc-string of YaTeX-typeset-dvi2image-chain.")
 
 (defvar YaTeX-typeset-dvi2image-chain
   (cond
-   ((and (equal YaTeX-use-image-preview "png")
-	 (YaTeX-executable-find "dvipng"))
-    (list "dvipng %b.dvi"))
    ((YaTeX-executable-find YaTeX-cmd-dvips)
     (list
      (format "%s -E -o %%b.eps %%b.dvi" YaTeX-cmd-dvips)
-     "convert -alpha off -density %d %b.eps %b.%f")))
+     "convert -alpha off -density %d %b.eps %b.%f"))
+   ((and (equal YaTeX-use-image-preview "png")
+	 (YaTeX-executable-find "dvipng"))
+    (list "dvipng %b.dvi")))
   "*Pipe line of command as a list to create png file from DVI or PDF.
 %-notation rewritten list:
  %b	basename of target file(\"texput\")

yatex.org