diff --git a/docs/yatexe b/docs/yatexe
index fc737d8..e6588b3 100644
--- a/docs/yatexe
+++ b/docs/yatexe
@@ -376,6 +376,9 @@
`%#MAKEINDEX'
... Command line for bibtex ([prefix] t b)
+ `%#DVIPDF'
+
+ ... Command line for dvipdf(mx) ([prefix] t b)
If you want to invoke "makeidx hogehoge" to update index, put the next
line some upper place in the source, for example.
@@ -2178,69 +2181,70 @@
HIROSE Yuuji
+
Tag table:
-Node: Top256
-Node: What is YaTeX?1597
-Node: Main features1970
-Node: Installation3499
-Node: Typesetting4276
-Node: Calling typesetter5406
-Node: Calling previewer7610
-Node: Printing out7971
-Node: %#notation8263
-Node: Changing typesetter8681
-Node: Splitting input files9045
-Node: Static region for typesetting10470
-Node: Lpr format11599
-Node: Controlling which command to invoke12672
-Node: Editing %# notation13265
-Node: Completion13809
-Node: Begin-type completion14369
-Node: Section-type completion17412
-Node: view-sectioning19847
-Node: Large-type completion21427
-Node: Maketitle-type completion22158
-Node: Arbitrary completion22710
-Node: End completion23100
-Node: Accent completion23570
-Node: Image completion24187
-Node: Greek letters completion26444
-Node: Local dictionaries27171
-Node: Commenting out28108
-Node: Cursor jump29567
-Node: Jump to corresponding object29879
-Node: Invoking image processor31280
-Node: Jump to main file32623
-Node: Jumping around the environment32988
-Node: Jumping to last completion position33406
-Node: Changing and Deleting33915
-Node: Changing LaTeX commands34307
-Node: Killing LaTeX commands35484
-Node: Filling36669
-Node: Updation of includeonly38520
-Node: What column39317
-Node: Intelligent newline40402
-Node: Usepackage checker42056
-Node: Online help42647
-Node: Browsing file hierarchy44322
-Node: Cooperation with other packages46059
-Node: Customizations46764
-Node: Lisp variables47098
-Node: All customizable variables48102
-Node: Sample definitions57901
-Node: Hook variables58414
-Node: Hook file59118
-Node: Add-in functions59457
-Node: How the add-in function works60317
-Node: Defining option-add-in62516
-Node: Defining argument-add-in63238
-Node: Defining enclosing-add-in64120
-Node: How the function is called64974
-Node: Useful functions for creating add-in65650
-Node: Contribution67055
-Node: Add-in generator67329
-Node: Etcetera72701
-Node: Copying73306
+Node: Top253
+Node: What is YaTeX?1594
+Node: Main features1967
+Node: Installation3496
+Node: Typesetting4273
+Node: Calling typesetter5403
+Node: Calling previewer7607
+Node: Printing out7968
+Node: %#notation8260
+Node: Changing typesetter8678
+Node: Splitting input files9042
+Node: Static region for typesetting10467
+Node: Lpr format11596
+Node: Controlling which command to invoke12669
+Node: Editing %# notation13339
+Node: Completion13883
+Node: Begin-type completion14443
+Node: Section-type completion17486
+Node: view-sectioning19921
+Node: Large-type completion21501
+Node: Maketitle-type completion22232
+Node: Arbitrary completion22784
+Node: End completion23174
+Node: Accent completion23644
+Node: Image completion24261
+Node: Greek letters completion26518
+Node: Local dictionaries27245
+Node: Commenting out28182
+Node: Cursor jump29641
+Node: Jump to corresponding object29953
+Node: Invoking image processor31354
+Node: Jump to main file32697
+Node: Jumping around the environment33062
+Node: Jumping to last completion position33480
+Node: Changing and Deleting33989
+Node: Changing LaTeX commands34381
+Node: Killing LaTeX commands35558
+Node: Filling36743
+Node: Updation of includeonly38594
+Node: What column39391
+Node: Intelligent newline40476
+Node: Usepackage checker42130
+Node: Online help42721
+Node: Browsing file hierarchy44396
+Node: Cooperation with other packages46133
+Node: Customizations46838
+Node: Lisp variables47172
+Node: All customizable variables48176
+Node: Sample definitions57975
+Node: Hook variables58488
+Node: Hook file59192
+Node: Add-in functions59531
+Node: How the add-in function works60391
+Node: Defining option-add-in62590
+Node: Defining argument-add-in63312
+Node: Defining enclosing-add-in64194
+Node: How the function is called65048
+Node: Useful functions for creating add-in65724
+Node: Contribution67129
+Node: Add-in generator67403
+Node: Etcetera72775
+Node: Copying73380
End tag table
diff --git a/docs/yatexj b/docs/yatexj
index 5901ad8..c1b336c 100644
--- a/docs/yatexj
+++ b/docs/yatexj
Binary files differ
diff --git a/makefile b/makefile
index c732992..7e4a8e3 100644
--- a/makefile
+++ b/makefile
@@ -49,8 +49,8 @@
# make clean to delete all producted files
# make ci to check in all
# make co to check out all
-MVER = 1.77
-LISP = ${LISP18} ${LISP19}
+MVER = 1.78
+LISP = ${LISP18} ${LISP19} ${LISP23}
YAHTML = yahtml.el
COMMON = yatexlib.el yatexprc.el
LISP18 = comment.el yatex.el yatexadd.el yatexgen.el yatexenv.el \
@@ -58,6 +58,7 @@
yatexmth.el yatexhks.el yatexhlp.el \
yatexm-o.el yatexsec.el yatexhie.el yatexpkg.el ${YAHTML}
LISP19 = yatex19.el
+LISP23 = yatex23.el
DOCS = ${DOCSRC} ${DOCOBJ} ${NEWS}
NEWS = yatex.new
DOCHTML = docs/htmlqa docs/htmlqa.eng docs/yahtmlj.tex docs/yahtmle.tex
diff --git a/yahtml.el b/yahtml.el
index 7f4709e..aec8df4 100644
--- a/yahtml.el
+++ b/yahtml.el
@@ -1,9 +1,9 @@
;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*-
;;; (c) 1994-2013 by HIROSE Yuuji [yuuji(@)yatex.org]
-;;; Last modified Tue Jun 3 09:40:02 2014 on firestorm
+;;; Last modified Tue Dec 16 11:11:25 2014 on firestorm
;;; $Id$
-(defconst yahtml-revision-number "1.76"
+(defconst yahtml-revision-number "1.77"
"Revision number of running yahtml.el")
;;; Commentary:
@@ -661,6 +661,12 @@
(font-lock-mode 1) ;;Why should I fontify again???
;; in yatex-mode, there's no need to refontify...
(font-lock-fontify-buffer)))))
+ ;; +dnd for X11 w/ emacs23+
+ (and window-system (featurep 'dnd)
+ (set (make-local-variable 'dnd-protocol-alist)
+ (cons (cons "^\\(file\\|https?\\):" 'yahtml-dnd-handler)
+ dnd-protocol-alist)))
+
(set-syntax-table yahtml-syntax-table)
(use-local-map yahtml-mode-map)
(YaTeX-read-user-completion-table)
@@ -3128,6 +3134,33 @@
(font-lock-mode -1) ;is stupid, but sure.
(font-lock-mode 1))
+;;;
+;; Drag-n-Drop
+;;;
+(defun yahtml-dnd-handler (uri action)
+ "DnD handler for yahtml mode
+Convert image URI to img-src and others to a-href."
+ (let*((file (dnd-get-local-file-name uri))
+ (path (if file (file-relative-name file) uri))
+ (case-fold-search t)
+ (geom ""))
+ (cond
+ ((memq action '(copy link move private))
+ (cond
+ ((string-match "\\.\\(jpe?g\\|png\\|gif\\|bmp\\|tiff?\\)$" path)
+ (if file
+ (setq geom (yahtml-get-image-info path)
+ geom (if (car geom)
+ (apply 'format " width=\"%s\" height=\"%s\"" geom)
+ "")))
+ (insert (format ""
+ path (file-name-nondirectory path) geom)))
+
+ (t (insert (format "" path))
+ (forward-char -4))))
+ (t (message "No handler for action `%s'" action))))
+ action)
+
(run-hooks 'yahtml-load-hook)
(provide 'yahtml)
diff --git a/yatex.el b/yatex.el
index 618b542..f0a79d9 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 Sun Sep 21 21:57:39 2014 on firestorm
+;;; Last modified Tue Dec 16 10:23:28 2014 on firestorm
;;; $Id$
;;; The latest version of this software is always available at;
;;; http://www.yatex.org/
@@ -8,7 +8,7 @@
;;; Code:
(require 'comment)
(require 'yatexlib)
-(defconst YaTeX-revision-number "1.77.3"
+(defconst YaTeX-revision-number "1.77.4"
"Revision number of running yatex.el")
;---------- Local variables ----------
@@ -690,6 +690,10 @@
local-abbrev-table yatex-mode-abbrev-table)
(if (fboundp 'comment-indent-new-line) ;for Emacs21
(setq comment-line-break-function 'YaTeX-comment-line-break))
+ ;; +dnd for X11 w/ emacs23+
+ (and window-system (featurep 'dnd) (require 'yatex23 nil t)
+ (set (make-local-variable 'dnd-protocol-alist)
+ (cons (cons "^file:" 'YaTeX-dnd-handler) dnd-protocol-alist)))
(if (and YaTeX-use-font-lock (featurep 'font-lock))
(progn
diff --git a/yatex23.el b/yatex23.el
new file mode 100644
index 0000000..1aab0c3
--- /dev/null
+++ b/yatex23.el
@@ -0,0 +1,36 @@
+;;; yatex23.el --- YaTeX facilities for Emacs 23 or later -*- coding: sjis -*-
+;;; (c)2014 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; Last modified Tue Dec 16 11:08:10 2014 on firestorm
+;;; $Id:$
+
+;;; Code:
+(defun YaTeX-dnd-handler (uri action)
+ "DnD handler for yatex-mode
+Convert local image URI to \\includegraphcis{} and
+.tex file names to \\include{}."
+ (save-excursion
+ (YaTeX-visit-main t)
+ (let*((file (dnd-get-local-file-name uri))
+ (path (file-relative-name file))
+ (insert-file-directory nil)
+ (case-fold-search t))
+ (cond
+ ((memq action '(copy link move private))
+ (cond
+ ((string-match "\\.\\(jpe?g\\|png\\|gif\\|bmp\\|tiff?\\|e?ps\\|pdf\\)$" path)
+ (insert "\\includegraphics"
+ "{" (YaTeX::includegraphics 1 path t) "}")
+ (YaTeX-package-auto-usepackage "includegraphics" 'section))
+ ((string-match "\\.tex$" path)
+ (insert "\\include{" path "}"))
+ ))
+ (t (message "%s" action))))))
+
+(provide 'yatex23)
+
+; Local variables:
+; fill-prefix: ";;; "
+; paragraph-start: "^$\\|\\|;;;$"
+; paragraph-separate: "^$\\|\\|;;;$"
+; coding: sjis
+; End:
diff --git a/yatexadd.el b/yatexadd.el
index d77bc6d..511deb4 100644
--- a/yatexadd.el
+++ b/yatexadd.el
@@ -1,7 +1,7 @@
;;; yatexadd.el --- YaTeX add-in functions
;;; yatexadd.el rev.20
;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sun Sep 21 14:14:59 2014 on firestorm
+;;; Last modified Tue Dec 16 09:45:09 2014 on firestorm
;;; $Id$
;;; Code:
@@ -1939,9 +1939,9 @@
str)
(substring str (match-beginning 1) (match-end 1)))))
-(defun YaTeX::includegraphics (argp)
+(defun YaTeX::includegraphics (argp &optional file doclip)
"Add-in for \\includegraphics"
- (let ((imgfile (YaTeX::include argp "Image File: "))
+ (let ((imgfile (or file (YaTeX::include argp "Image File: ")))
(case-fold-search t) info bb noupdate needclose c)
(and (string-match "\\.\\(jpe?g\\|png\\|gif\\|bmp\\|pdf\\)$" imgfile)
(file-exists-p imgfile)
@@ -1971,10 +1971,11 @@
(replace-match bb))
(noupdate nil)
((and (match-beginning 1)
- (prog2
- (message "Insert `%s'? Y)es N)o C)yes+`clip': " bb)
- (memq (setq c (read-char)) '(?y ?Y ?\ ?c ?C))
- (message "")))
+ (or doclip
+ (prog2
+ (message "Insert `%s'? Y)es N)o C)yes+`clip': " bb)
+ (memq (setq c (read-char)) '(?y ?Y ?\ ?c ?C))
+ (message ""))))
(goto-char (match-end 0))
(message "`bb=' %s"
(format