# HG changeset patch # User HIROSE Yuuji # Date 1419316471 -32400 # Node ID 41a05a44826aed47b8156707b313bdc5daf60712 # Parent e17589ce8b0dbb90a4b2ac486bd9246d5069bc29 [pdftex] option for pdflatex diff -r e17589ce8b0d -r 41a05a44826a yatex.el --- a/yatex.el Mon Dec 22 22:58:16 2014 +0900 +++ b/yatex.el Tue Dec 23 15:34:31 2014 +0900 @@ -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 -r e17589ce8b0d -r 41a05a44826a yatex23.el --- a/yatex23.el Mon Dec 22 22:58:16 2014 +0900 +++ b/yatex23.el Tue Dec 23 15:34:31 2014 +0900 @@ -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 -r e17589ce8b0d -r 41a05a44826a yatexprc.el --- a/yatexprc.el Mon Dec 22 22:58:16 2014 +0900 +++ b/yatexprc.el Tue Dec 23 15:34:31 2014 +0900 @@ -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)