changeset 358:2c2b70f41fb3 dev

New variable YaTeX-dnd-auto-figure-package for full-auto usepackage
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 22 Dec 2014 11:27:28 +0900
parents 4ea63809a0ca
children dbef6cf84f98
files yatex23.el
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/yatex23.el	Mon Dec 22 11:16:46 2014 +0900
+++ b/yatex23.el	Mon Dec 22 11:27:28 2014 +0900
@@ -1,12 +1,15 @@
 ;;; 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:15:48 2014 on firestorm
-;;; $Id:$
+;;; Last modified Mon Dec 22 11:26:19 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")
+  "*Default LaTeX package and its option for \\includegraphics")
+
 (defun YaTeX-dnd-handler (uri action)
   "DnD handler for yatex-mode
 Convert local image URI to \\includegraphcis{} and
@@ -36,7 +39,9 @@
 	      (insert "{" (YaTeX::includegraphics 1 path t) "}")
 	      (save-excursion
 		(YaTeX-package-auto-usepackage
-		 "includegraphics" 'section "graphicx" "dvipdfmx"))
+		 "includegraphics" 'section
+		 (car YaTeX-dnd-auto-figure-package)
+		 (cdr YaTeX-dnd-auto-figure-package)))
 	      (cond
 	       (b
 		(undo-boundary)

yatex.org