yatex
changeset 361:41a05a44826a dev
[pdftex] option for pdflatex
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 23 Dec 2014 15:34:31 +0900 |
parents | e17589ce8b0d |
children | b1e6c8c03253 |
files | yatex.el yatex23.el yatexprc.el |
diffstat | 3 files changed, 15 insertions(+), 8 deletions(-) [+] |
line diff
1.1 --- a/yatex.el Mon Dec 22 22:58:16 2014 +0900 1.2 +++ b/yatex.el Tue Dec 23 15:34:31 2014 +0900 1.3 @@ -1,6 +1,6 @@ 1.4 ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- 1.5 ;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org] 1.6 -;;; Last modified Mon Dec 22 22:57:20 2014 on firestorm 1.7 +;;; Last modified Tue Dec 23 12:07:26 2014 on firestorm 1.8 ;;; $Id$ 1.9 ;;; The latest version of this software is always available at; 1.10 ;;; http://www.yatex.org/ 1.11 @@ -61,6 +61,8 @@ 1.12 (defvar YaTeX-cmd-dia "dia") 1.13 (defvar YaTeX-cmd-ooo "soffice") 1.14 (defvar YaTeX-cmd-gs "gs") 1.15 +(defvar YaTeX-cmd-displayline 1.16 + "/Applications/Skim.app/Contents/SharedSupport/displayline") 1.17 (defvar YaTeX-cmd-edit-ps YaTeX-cmd-gimp) 1.18 (defvar YaTeX-cmd-edit-pdf YaTeX-cmd-ooo) 1.19 (defvar YaTeX-cmd-edit-ai YaTeX-cmd-inkscape) 1.20 @@ -70,7 +72,9 @@ 1.21 (defvar tex-pdfview-command ;previewer command for your site 1.22 (cond 1.23 (YaTeX-dos "acroread") 1.24 - (YaTeX-macos "open") 1.25 + (YaTeX-macos (cond 1.26 + ((file-executable-p YaTeX-cmd-displayline) "open -a Skim") 1.27 + (t "open"))) 1.28 (t "evince")) 1.29 "*Default PDF viewer command including its option.") 1.30
2.1 --- a/yatex23.el Mon Dec 22 22:58:16 2014 +0900 2.2 +++ b/yatex23.el Tue Dec 23 15:34:31 2014 +0900 2.3 @@ -1,13 +1,16 @@ 2.4 ;;; yatex23.el --- YaTeX facilities for Emacs 23 or later -*- coding: sjis -*- 2.5 ;;; (c)2014 by HIROSE Yuuji.[yuuji@yatex.org] 2.6 -;;; Last modified Mon Dec 22 11:26:19 2014 on firestorm 2.7 +;;; Last modified Tue Dec 23 12:44:35 2014 on firestorm 2.8 ;;; $Id$ 2.9 2.10 ;;; Code: 2.11 (defvar YaTeX-dnd-auto-figure "figure" 2.12 "*If set, include dropped \\includegraphcs{} into that environment. 2.13 The value should be string. Set this `nil' to disable enclosing.") 2.14 -(defvar YaTeX-dnd-auto-figure-package (cons "graphicx" "dvipdfmx") 2.15 +(defvar YaTeX-dnd-auto-figure-package 2.16 + (cons "graphicx" 2.17 + (cond ((string-match "pdflatex" tex-command) "pdftex") 2.18 + (t "dvipdfmx"))) 2.19 "*Default LaTeX package and its option for \\includegraphics") 2.20 2.21 (defun YaTeX-dnd-handler (uri action)
3.1 --- a/yatexprc.el Mon Dec 22 22:58:16 2014 +0900 3.2 +++ b/yatexprc.el Tue Dec 23 15:34:31 2014 +0900 3.3 @@ -1,7 +1,7 @@ 3.4 ;;; yatexprc.el --- YaTeX process handler 3.5 ;;; 3.6 ;;; (c)1993-2013 by HIROSE Yuuji.[yuuji@yatex.org] 3.7 -;;; Last modified Mon Dec 22 10:01:02 2014 on firestorm 3.8 +;;; Last modified Tue Dec 23 11:53:48 2014 on firestorm 3.9 ;;; $Id$ 3.10 3.11 ;;; Code: 3.12 @@ -422,7 +422,7 @@ 3.13 ;(conv (format "convert -density %d - %s" (if math 250 100) target)) 3.14 ;(chain (list (format "dvips -E -o - texput|%s" conv))) 3.15 (conv (format "convert -alpha off - %s" target)) 3.16 - (chain (list (format "dvips -x 3000 -E -o - texput|%s" conv))) 3.17 + (chain (list (format "dvips -x 2000 -E -o - texput|%s" conv))) 3.18 (curproc (member prevname chain)) 3.19 (w (get 'YaTeX-typeset-conv2image-chain 'win)) 3.20 (pwd default-directory) 3.21 @@ -472,7 +472,8 @@ 3.22 (interactive) 3.23 (save-excursion 3.24 (let ((math (YaTeX-in-math-mode-p))) 3.25 - (YaTeX-mark-environment) 3.26 + (or (equal (YaTeX-inner-environment t) "document") 3.27 + (YaTeX-mark-environment)) 3.28 (if (and (featurep 'image) window-system) 3.29 (let ((YaTeX-typeset-buffer (concat "*bg:" YaTeX-typeset-buffer))) 3.30 (put 'YaTeX-typeset-conv2image-chain 'math math) 3.31 @@ -799,7 +800,6 @@ 3.32 "Call xdvi -sourceposition to DVI corresponding to current main file" 3.33 (interactive)) 3.34 3.35 -(defvar YaTeX-cmd-displayline "/Applications/Skim.app/Contents/SharedSupport/displayline") 3.36 (defun YaTeX-preview-jump-line () 3.37 "Call jump-line function of various previewer on current main file" 3.38 (interactive)