diff --git a/yahtml.el b/yahtml.el index c3154ab..7f4709e 100644 --- a/yahtml.el +++ b/yahtml.el @@ -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 "���O�̕���" "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 () diff --git a/yatex.el b/yatex.el index b2c5f5d..8caf9eb 100644 --- a/yatex.el +++ b/yatex.el @@ -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 "[^�A-��]") @@ -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 "\\|")) diff --git a/yatexadd.el b/yatexadd.el index 20570f3..d369709 100644 --- a/yatexadd.el +++ b/yatexadd.el @@ -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 diff --git a/yatexpkg.el b/yatexpkg.el index 16c3647..950bfc5 100644 --- a/yatexpkg.el +++ b/yatexpkg.el @@ -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).