diff --git a/yatex.el b/yatex.el index bd69b4e..6955ba7 100644 --- a/yatex.el +++ b/yatex.el @@ -1,6 +1,6 @@ ;;; yatex.el --- Yet Another tex-mode for emacs //�쒹// -*- coding: sjis -*- ;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Mon Dec 22 22:57:20 2014 on firestorm +;;; Last modified Tue Dec 23 12:07:26 2014 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; http://www.yatex.org/ @@ -61,6 +61,8 @@ (defvar YaTeX-cmd-dia "dia") (defvar YaTeX-cmd-ooo "soffice") (defvar YaTeX-cmd-gs "gs") +(defvar YaTeX-cmd-displayline + "/Applications/Skim.app/Contents/SharedSupport/displayline") (defvar YaTeX-cmd-edit-ps YaTeX-cmd-gimp) (defvar YaTeX-cmd-edit-pdf YaTeX-cmd-ooo) (defvar YaTeX-cmd-edit-ai YaTeX-cmd-inkscape) @@ -70,7 +72,9 @@ (defvar tex-pdfview-command ;previewer command for your site (cond (YaTeX-dos "acroread") - (YaTeX-macos "open") + (YaTeX-macos (cond + ((file-executable-p YaTeX-cmd-displayline) "open -a Skim") + (t "open"))) (t "evince")) "*Default PDF viewer command including its option.") diff --git a/yatex23.el b/yatex23.el index 78a8440..e2526ea 100644 --- a/yatex23.el +++ b/yatex23.el @@ -1,13 +1,16 @@ ;;; yatex23.el --- YaTeX facilities for Emacs 23 or later -*- coding: sjis -*- ;;; (c)2014 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Mon Dec 22 11:26:19 2014 on firestorm +;;; Last modified Tue Dec 23 12:44:35 2014 on firestorm ;;; $Id$ ;;; Code: (defvar YaTeX-dnd-auto-figure "figure" "*If set, include dropped \\includegraphcs{} into that environment. The value should be string. Set this `nil' to disable enclosing.") -(defvar YaTeX-dnd-auto-figure-package (cons "graphicx" "dvipdfmx") +(defvar YaTeX-dnd-auto-figure-package + (cons "graphicx" + (cond ((string-match "pdflatex" tex-command) "pdftex") + (t "dvipdfmx"))) "*Default LaTeX package and its option for \\includegraphics") (defun YaTeX-dnd-handler (uri action) diff --git a/yatexprc.el b/yatexprc.el index cb962b2..08f689f 100644 --- a/yatexprc.el +++ b/yatexprc.el @@ -1,7 +1,7 @@ ;;; yatexprc.el --- YaTeX process handler ;;; ;;; (c)1993-2013 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Mon Dec 22 10:01:02 2014 on firestorm +;;; Last modified Tue Dec 23 11:53:48 2014 on firestorm ;;; $Id$ ;;; Code: @@ -422,7 +422,7 @@ ;(conv (format "convert -density %d - %s" (if math 250 100) target)) ;(chain (list (format "dvips -E -o - texput|%s" conv))) (conv (format "convert -alpha off - %s" target)) - (chain (list (format "dvips -x 3000 -E -o - texput|%s" conv))) + (chain (list (format "dvips -x 2000 -E -o - texput|%s" conv))) (curproc (member prevname chain)) (w (get 'YaTeX-typeset-conv2image-chain 'win)) (pwd default-directory) @@ -472,7 +472,8 @@ (interactive) (save-excursion (let ((math (YaTeX-in-math-mode-p))) - (YaTeX-mark-environment) + (or (equal (YaTeX-inner-environment t) "document") + (YaTeX-mark-environment)) (if (and (featurep 'image) window-system) (let ((YaTeX-typeset-buffer (concat "*bg:" YaTeX-typeset-buffer))) (put 'YaTeX-typeset-conv2image-chain 'math math) @@ -799,7 +800,6 @@ "Call xdvi -sourceposition to DVI corresponding to current main file" (interactive)) -(defvar YaTeX-cmd-displayline "/Applications/Skim.app/Contents/SharedSupport/displayline") (defun YaTeX-preview-jump-line () "Call jump-line function of various previewer on current main file" (interactive)