changeset 323:d08c824ababe dev

resolved
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 06 Jul 2014 23:28:16 +0900
parents c456fd55013e (current diff) 1bbc6cff5b6c (diff)
children b6500fb81ee0
files yatex.el yatexadd.el
diffstat 4 files changed, 42 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/yahtml.el	Sun Jul 06 23:25:21 2014 +0900
+++ b/yahtml.el	Sun Jul 06 23:28:16 2014 +0900
@@ -1,6 +1,6 @@
 ;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*-
 ;;; (c) 1994-2013 by HIROSE Yuuji [yuuji(@)yatex.org]
-;;; Last modified Mon Apr  1 22:42:29 2013 on firestorm
+;;; Last modified Tue Jun  3 09:40:02 2014 on firestorm
 ;;; $Id$
 
 (defconst yahtml-revision-number "1.76"
@@ -437,6 +437,7 @@
     ("h1") ("h2") ("h3") ("h4") ("h5") ("h6")
     ;; ("p") ;This makes indentation screwed up!
     ("style") ("script") ("noscript") ("div") ("object") ("ins") ("del")
+    ("option")
     ))
 
 (if yahtml-html4-strict
@@ -1710,7 +1711,8 @@
     (while l
       (setq mess (format "%s %c" mess (car (car l)) (cdr (car l)))
 	    l (cdr l)))
-    (message "Char-entity reference:  %s  SPC=& RET=&; Other=&#..;" mess)
+    (message "Char-entity reference:  %s  SPC=& RET=&; BS=%s Other=&#..;"
+	     mess (if YaTeX-japan "直前の文字" "Preceding-Char"))
     (setq c (read-char))
     (cond
      ((equal c (car-safe (assoc c list)))
@@ -1720,7 +1722,11 @@
       (forward-char -1))
      ((equal c ? )
       (insert ?&))
-     (t (insert (format "&#%d;" c))))))
+     ((and (memq c '(127 8))
+	   (setq c (preceding-char))
+	   (delete-backward-char 1)
+	   nil))			;Fall through to the next 't block
+     (t (insert (format "&#x%x;" c))))))
 
 (defun yahtml:!--\#include ()
   (let ((file (yahtml-read-parameter "file" "")))
@@ -2775,7 +2781,7 @@
 
 (defun yahtml-intelligent-newline-select ()
   (interactive)
-  (insert "<" (if yahtml-prefer-upcases "OPTION" "option") "> ")
+  (yahtml-insert-single (if yahtml-prefer-upcases "OPTION" "option"))
   (yahtml-indent-line))
 
 (defun yahtml-intelligent-newline-style ()
--- a/yatex.el	Sun Jul 06 23:25:21 2014 +0900
+++ b/yatex.el	Sun Jul 06 23:28:16 2014 +0900
@@ -1,5 +1,5 @@
 ;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*-
-;;; (c)1991-2013 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org]
 ;;; Last modified Sun Jul  6 13:25:42 2014 on firestorm
 ;;; $Id$
 ;;; The latest version of this software is always available at;
@@ -8,7 +8,7 @@
 ;;; Code:
 (require 'comment)
 (require 'yatexlib)
-(defconst YaTeX-revision-number "1.77.1"
+(defconst YaTeX-revision-number "1.77.3"
   "Revision number of running yatex.el")
 
 ;---------- Local variables ----------
@@ -189,7 +189,7 @@
 
 (defvar YaTeX-auto-math-mode t
   "*T for changing YaTeX-math mode automatically.")
-(defvar YaTeX-use-AMS-LaTeX nil
+(defvar YaTeX-use-AMS-LaTeX t
   "*T for using AMS-LaTeX")
 
 (defvar yatex-mode-hook nil
@@ -267,7 +267,8 @@
      ("widetilde") ("widehat") ("overline") ("overrightarrow")
      ;; section types in mathmode
      ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit")
-
+     ;;cleveref
+     ("cref") ("crefrange") ("cpageref") ("labelcref") ("labelcpageref")
      )
    (if YaTeX-use-LaTeX2e
        '(("documentclass") ("usepackage")
@@ -881,7 +882,7 @@
 	  "ref")
 	 ((and (looking-at "[a-z \t]")
 	       (progn (skip-chars-backward "a-z \t")
-		      (looking-at "table\\|figure\\|formula")))
+		      (looking-at "table\\|figure\\|formula\\|eq\\(\\.\\|uation\\)")))
 	  "ref")
 	 ((save-excursion
 	    (skip-chars-backward "[^ア-ン]")
@@ -1618,7 +1619,7 @@
     (require 'yatexprc)			;for Nemacs's bug
     (select-window sw)
     (cond
-     ((= c ?j) (YaTeX-typeset-buffer))
+     ((memq c '(?j ?\C-j)) (YaTeX-typeset-buffer)) ; memq for usability test
      ((= c ?r) (YaTeX-typeset-region))
      ((= c ?e) (YaTeX-typeset-environment))
      ((= c ?b) (YaTeX-call-builtin-on-file
@@ -1633,7 +1634,6 @@
      ((= c ?v) (YaTeX-view-error))
      ((= c ?l) (YaTeX-lpr arg))
      ((= c ?m) (YaTeX-switch-mode-menu arg))
-     ((= c ?b) (YaTeX-insert-string "\\"))
      ((= c ?s) (YaTeX-xdvi-remote-search arg)))))
 
 (if (fboundp 'wrap-function-to-control-ime)
@@ -1685,9 +1685,13 @@
 	  YaTeX-refcommand-def-regexp-default))
 
 (defvar YaTeX-refcommand-ref-regexp-default
-  "\\(page\\|eq\\|fig\\)?ref\\|cite")
+  "\\(page\\|eq\\|fig\\)?ref\\|cite"
+  "Regexp of LaTeX's label-referring macros.
+Searching for this will be done without `\\\\'.
+So you need not add patterns if new referring macro ends with \"ref\".")
 (defvar YaTeX-refcommand-ref-regexp-private nil
-  "*Regexp of referring label commands")
+  "*Regexp of referring label commands.
+See documentation of `YaTeX-refcommand-ref-regexp-default'.")
 (defvar YaTeX-refcommand-ref-regexp
   (concat (if YaTeX-refcommand-ref-regexp-private
 	      (concat YaTeX-refcommand-ref-regexp-private "\\|"))
--- a/yatexadd.el	Sun Jul 06 23:25:21 2014 +0900
+++ b/yatexadd.el	Sun Jul 06 23:28:16 2014 +0900
@@ -1,6 +1,6 @@
 ;;; yatexadd.el --- YaTeX add-in functions
 ;;; yatexadd.el rev.20
-;;; (c)1991-2013 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org]
 ;;; Last modified Sun Jul  6 13:59:09 2014 on firestorm
 ;;; $Id$
 
@@ -1248,6 +1248,7 @@
       
 
 (fset 'YaTeX::pageref 'YaTeX::ref)
+(fset 'YaTeX::cref 'YaTeX::ref)
 (defun YaTeX::tabref (argp)	    ; For the style file of IPSJ journal
   (YaTeX::ref
    argp nil nil
@@ -1904,9 +1905,13 @@
 
 (defun YaTeX:includegraphics ()
   "Add-in for \\includegraphics's option"
-  (let (width height (scale "") angle str)
-    (setq width (YaTeX-read-string-or-skip "Width: ")
-	  height (YaTeX-read-string-or-skip "Height: "))
+  (let (width height (scale "") angle str (delim "-0-9*+/.")
+	(minibuffer-local-completion-map YaTeX-minibuffer-completion-map)
+	(tbl (append YaTeX:style-parameters-local
+		     YaTeX:style-parameters-private
+		     YaTeX:style-parameters-default)))
+    (setq width (YaTeX-completing-read-or-skip "Width: " tbl nil)
+	  height (YaTeX-completing-read-or-skip "Height: " tbl nil))
     (or (string< "" width) (string< "" height)
 	(setq scale (YaTeX-read-string-or-skip "Scale: ")))
     (setq angle (YaTeX-read-string-or-skip "Angle(0-359): "))
@@ -2003,7 +2008,7 @@
     ("amsmath") ("amssymb") ("xymtex") ("chemist")
     ("a4j") ("array") ("epsf") ("color") ("xcolor") ("epsfig") ("floatfig")
     ("landscape") ("path") ("supertabular") ("twocolumn")
-    ("latexsym") ("times") ("makeidx"))
+    ("latexsym") ("times") ("makeidx") ("geometry") ("type1cm"))
   "Default completion table for arguments of \\usepackage")
 
 (defvar YaTeX::usepackage-alist-private nil
--- a/yatexpkg.el	Sun Jul 06 23:25:21 2014 +0900
+++ b/yatexpkg.el	Sun Jul 06 23:28:16 2014 +0900
@@ -1,7 +1,7 @@
 ;;; yatexpkg.el --- YaTeX package manager
 ;;; 
-;;; (c)2003-2013 by HIROSE, Yuuji [yuuji@yatex.org]
-;;; Last modified Fri Jul  5 23:30:48 2013 on firestorm
+;;; (c)2003-2014 by HIROSE, Yuuji [yuuji@yatex.org]
+;;; Last modified Wed Jan  8 08:18:12 2014 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -43,7 +43,13 @@
     ("xcolor"	(same-as . "color"))
     ("ulem"	(section "uline" "uuline" "uwave")
 		(option ("normalem")))
-    ("multicol"	(env "multicols")))
+    ("multicol"	(env "multicols"))
+    ("cref"	(section "cleveref"))
+    ("crefrange"	(same-as . "cref"))
+    ("cpageref"		(same-as . "cref"))
+    ("labelcref"	(same-as . "cref"))
+    ("labelcpageref"	(same-as . "cref"))
+    )
   "Default package vs. macro list.
 Alists contains '(PACKAGENAME . MACROLIST)
 PACKAGENAME     Basename of package(String).

yatex.org