yatex

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 diff
     1.1 --- a/yatex23.el	Sun Jan 04 21:41:00 2015 +0900
     1.2 +++ b/yatex23.el	Sun Jan 04 23:30:57 2015 +0900
     1.3 @@ -1,6 +1,6 @@
     1.4  ;;; yatex23.el --- YaTeX facilities for Emacs 23 or later -*- coding: sjis -*-
     1.5  ;;; (c)2014 by HIROSE Yuuji.[yuuji@yatex.org]
     1.6 -;;; Last modified Sun Jan  4 17:14:59 2015 on firestorm
     1.7 +;;; Last modified Sun Jan  4 23:19:02 2015 on firestorm
     1.8  ;;; $Id$
     1.9  
    1.10  ;;; Code:
    1.11 @@ -95,7 +95,7 @@
    1.12    "Overlay of on-the-fly preview image")
    1.13  (defface YaTeX-on-the-fly-activated-face
    1.14    (list
    1.15 -   (list (list '(class color))
    1.16 +   (list (list '(class color) '(min-colors 65536))
    1.17  	 (list ':background
    1.18  	       (if (eq YaTeX-background-mode 'light)
    1.19  		   (car YaTeX-on-the-fly-bg-face)
     2.1 --- a/yatexprc.el	Sun Jan 04 21:41:00 2015 +0900
     2.2 +++ b/yatexprc.el	Sun Jan 04 23:30:57 2015 +0900
     2.3 @@ -1,7 +1,7 @@
     2.4  ;;; yatexprc.el --- YaTeX process handler
     2.5  ;;; 
     2.6  ;;; (c)1993-2014 by HIROSE Yuuji.[yuuji@yatex.org]
     2.7 -;;; Last modified Sun Jan  4 19:56:26 2015 on firestorm
     2.8 +;;; Last modified Sun Jan  4 23:26:54 2015 on firestorm
     2.9  ;;; $Id$
    2.10  
    2.11  ;;; Code:
    2.12 @@ -408,10 +408,12 @@
    2.13        (put 'dvi2-command 'file buffer)
    2.14        (put 'dvi2-command 'offset lineinfo))))
    2.15  
    2.16 -(defvar YaTeX-use-image-preview "jpg"
    2.17 +(defvar YaTeX-use-image-preview "png"
    2.18    "*Nil means not using image preview by [prefix] t e.
    2.19  Acceptable value is one of \"jpg\" or \"png\", which specifies
    2.20 -format of preview image.")
    2.21 +format of preview image.  NOTE that if your system has /usr/bin/sips
    2.22 +not having convert(ImageMagick), jpeg format is automatically taken
    2.23 +for conversion.")
    2.24  (defvar YaTeX-preview-image-mode-map nil
    2.25    "Keymap used in YaTeX-preview-image-mode")
    2.26  (defun YaTeX-preview-image-mode ()
    2.27 @@ -435,20 +437,21 @@
    2.28       "pdfcrop --clip %b.pdf tmp.pdf"
    2.29       (if (YaTeX-executable-find "convert")
    2.30  	 "convert -density %d tmp.pdf %b.%f"
    2.31 -       "sips -s format %f -s dpiWidth %d -s dpiHeight %d %b.pdf --out %b.%f")
    2.32 +       ;; If we use sips, specify jpeg as format
    2.33 +       "sips -s format jpeg -s dpiWidth %d -s dpiHeight %d %b.pdf --out %b.jpg")
    2.34       "rm -f tmp.pdf")))
    2.35    "*Pipe line of command as a list to create image file from PDF.
    2.36  See also doc-string of YaTeX-typeset-dvi2image-chain.")
    2.37  
    2.38  (defvar YaTeX-typeset-dvi2image-chain
    2.39    (cond
    2.40 -   ((and (equal YaTeX-use-image-preview "png")
    2.41 -	 (YaTeX-executable-find "dvipng"))
    2.42 -    (list "dvipng %b.dvi"))
    2.43     ((YaTeX-executable-find YaTeX-cmd-dvips)
    2.44      (list
    2.45       (format "%s -E -o %%b.eps %%b.dvi" YaTeX-cmd-dvips)
    2.46 -     "convert -alpha off -density %d %b.eps %b.%f")))
    2.47 +     "convert -alpha off -density %d %b.eps %b.%f"))
    2.48 +   ((and (equal YaTeX-use-image-preview "png")
    2.49 +	 (YaTeX-executable-find "dvipng"))
    2.50 +    (list "dvipng %b.dvi")))
    2.51    "*Pipe line of command as a list to create png file from DVI or PDF.
    2.52  %-notation rewritten list:
    2.53   %b	basename of target file(\"texput\")