yatex

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 diff
     1.1 --- a/yatex23.el	Mon Dec 22 11:16:46 2014 +0900
     1.2 +++ b/yatex23.el	Mon Dec 22 11:27:28 2014 +0900
     1.3 @@ -1,12 +1,15 @@
     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 Mon Dec 22 11:15:48 2014 on firestorm
     1.7 -;;; $Id:$
     1.8 +;;; Last modified Mon Dec 22 11:26:19 2014 on firestorm
     1.9 +;;; $Id$
    1.10  
    1.11  ;;; Code:
    1.12  (defvar YaTeX-dnd-auto-figure "figure"
    1.13    "*If set, include dropped \\includegraphcs{} into that environment.
    1.14  The value should be string.  Set this `nil' to disable enclosing.")
    1.15 +(defvar YaTeX-dnd-auto-figure-package (cons "graphicx" "dvipdfmx")
    1.16 +  "*Default LaTeX package and its option for \\includegraphics")
    1.17 +
    1.18  (defun YaTeX-dnd-handler (uri action)
    1.19    "DnD handler for yatex-mode
    1.20  Convert local image URI to \\includegraphcis{} and
    1.21 @@ -36,7 +39,9 @@
    1.22  	      (insert "{" (YaTeX::includegraphics 1 path t) "}")
    1.23  	      (save-excursion
    1.24  		(YaTeX-package-auto-usepackage
    1.25 -		 "includegraphics" 'section "graphicx" "dvipdfmx"))
    1.26 +		 "includegraphics" 'section
    1.27 +		 (car YaTeX-dnd-auto-figure-package)
    1.28 +		 (cdr YaTeX-dnd-auto-figure-package)))
    1.29  	      (cond
    1.30  	       (b
    1.31  		(undo-boundary)