yatex
changeset 323:d08c824ababe dev
resolved
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 06 Jul 2014 23:28:16 +0900 |
parents | c456fd55013e 1bbc6cff5b6c |
children | b6500fb81ee0 |
files | yatex.el yatexadd.el |
diffstat | 4 files changed, 42 insertions(+), 21 deletions(-) [+] |
line diff
1.1 --- a/yahtml.el Sun Jul 06 23:25:21 2014 +0900 1.2 +++ b/yahtml.el Sun Jul 06 23:28:16 2014 +0900 1.3 @@ -1,6 +1,6 @@ 1.4 ;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*- 1.5 ;;; (c) 1994-2013 by HIROSE Yuuji [yuuji(@)yatex.org] 1.6 -;;; Last modified Mon Apr 1 22:42:29 2013 on firestorm 1.7 +;;; Last modified Tue Jun 3 09:40:02 2014 on firestorm 1.8 ;;; $Id$ 1.9 1.10 (defconst yahtml-revision-number "1.76" 1.11 @@ -437,6 +437,7 @@ 1.12 ("h1") ("h2") ("h3") ("h4") ("h5") ("h6") 1.13 ;; ("p") ;This makes indentation screwed up! 1.14 ("style") ("script") ("noscript") ("div") ("object") ("ins") ("del") 1.15 + ("option") 1.16 )) 1.17 1.18 (if yahtml-html4-strict 1.19 @@ -1710,7 +1711,8 @@ 1.20 (while l 1.21 (setq mess (format "%s %c" mess (car (car l)) (cdr (car l))) 1.22 l (cdr l))) 1.23 - (message "Char-entity reference: %s SPC=& RET=&; Other=&#..;" mess) 1.24 + (message "Char-entity reference: %s SPC=& RET=&; BS=%s Other=&#..;" 1.25 + mess (if YaTeX-japan "直前の文字" "Preceding-Char")) 1.26 (setq c (read-char)) 1.27 (cond 1.28 ((equal c (car-safe (assoc c list))) 1.29 @@ -1720,7 +1722,11 @@ 1.30 (forward-char -1)) 1.31 ((equal c ? ) 1.32 (insert ?&)) 1.33 - (t (insert (format "&#%d;" c)))))) 1.34 + ((and (memq c '(127 8)) 1.35 + (setq c (preceding-char)) 1.36 + (delete-backward-char 1) 1.37 + nil)) ;Fall through to the next 't block 1.38 + (t (insert (format "&#x%x;" c)))))) 1.39 1.40 (defun yahtml:!--\#include () 1.41 (let ((file (yahtml-read-parameter "file" ""))) 1.42 @@ -2775,7 +2781,7 @@ 1.43 1.44 (defun yahtml-intelligent-newline-select () 1.45 (interactive) 1.46 - (insert "<" (if yahtml-prefer-upcases "OPTION" "option") "> ") 1.47 + (yahtml-insert-single (if yahtml-prefer-upcases "OPTION" "option")) 1.48 (yahtml-indent-line)) 1.49 1.50 (defun yahtml-intelligent-newline-style ()
2.1 --- a/yatex.el Sun Jul 06 23:25:21 2014 +0900 2.2 +++ b/yatex.el Sun Jul 06 23:28:16 2014 +0900 2.3 @@ -1,5 +1,5 @@ 2.4 ;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*- 2.5 -;;; (c)1991-2013 by HIROSE Yuuji.[yuuji@yatex.org] 2.6 +;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org] 2.7 ;;; Last modified Sun Jul 6 13:25:42 2014 on firestorm 2.8 ;;; $Id$ 2.9 ;;; The latest version of this software is always available at; 2.10 @@ -8,7 +8,7 @@ 2.11 ;;; Code: 2.12 (require 'comment) 2.13 (require 'yatexlib) 2.14 -(defconst YaTeX-revision-number "1.77.1" 2.15 +(defconst YaTeX-revision-number "1.77.3" 2.16 "Revision number of running yatex.el") 2.17 2.18 ;---------- Local variables ---------- 2.19 @@ -189,7 +189,7 @@ 2.20 2.21 (defvar YaTeX-auto-math-mode t 2.22 "*T for changing YaTeX-math mode automatically.") 2.23 -(defvar YaTeX-use-AMS-LaTeX nil 2.24 +(defvar YaTeX-use-AMS-LaTeX t 2.25 "*T for using AMS-LaTeX") 2.26 2.27 (defvar yatex-mode-hook nil 2.28 @@ -267,7 +267,8 @@ 2.29 ("widetilde") ("widehat") ("overline") ("overrightarrow") 2.30 ;; section types in mathmode 2.31 ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit") 2.32 - 2.33 + ;;cleveref 2.34 + ("cref") ("crefrange") ("cpageref") ("labelcref") ("labelcpageref") 2.35 ) 2.36 (if YaTeX-use-LaTeX2e 2.37 '(("documentclass") ("usepackage") 2.38 @@ -881,7 +882,7 @@ 2.39 "ref") 2.40 ((and (looking-at "[a-z \t]") 2.41 (progn (skip-chars-backward "a-z \t") 2.42 - (looking-at "table\\|figure\\|formula"))) 2.43 + (looking-at "table\\|figure\\|formula\\|eq\\(\\.\\|uation\\)"))) 2.44 "ref") 2.45 ((save-excursion 2.46 (skip-chars-backward "[^ア-ン]") 2.47 @@ -1618,7 +1619,7 @@ 2.48 (require 'yatexprc) ;for Nemacs's bug 2.49 (select-window sw) 2.50 (cond 2.51 - ((= c ?j) (YaTeX-typeset-buffer)) 2.52 + ((memq c '(?j ?\C-j)) (YaTeX-typeset-buffer)) ; memq for usability test 2.53 ((= c ?r) (YaTeX-typeset-region)) 2.54 ((= c ?e) (YaTeX-typeset-environment)) 2.55 ((= c ?b) (YaTeX-call-builtin-on-file 2.56 @@ -1633,7 +1634,6 @@ 2.57 ((= c ?v) (YaTeX-view-error)) 2.58 ((= c ?l) (YaTeX-lpr arg)) 2.59 ((= c ?m) (YaTeX-switch-mode-menu arg)) 2.60 - ((= c ?b) (YaTeX-insert-string "\\")) 2.61 ((= c ?s) (YaTeX-xdvi-remote-search arg))))) 2.62 2.63 (if (fboundp 'wrap-function-to-control-ime) 2.64 @@ -1685,9 +1685,13 @@ 2.65 YaTeX-refcommand-def-regexp-default)) 2.66 2.67 (defvar YaTeX-refcommand-ref-regexp-default 2.68 - "\\(page\\|eq\\|fig\\)?ref\\|cite") 2.69 + "\\(page\\|eq\\|fig\\)?ref\\|cite" 2.70 + "Regexp of LaTeX's label-referring macros. 2.71 +Searching for this will be done without `\\\\'. 2.72 +So you need not add patterns if new referring macro ends with \"ref\".") 2.73 (defvar YaTeX-refcommand-ref-regexp-private nil 2.74 - "*Regexp of referring label commands") 2.75 + "*Regexp of referring label commands. 2.76 +See documentation of `YaTeX-refcommand-ref-regexp-default'.") 2.77 (defvar YaTeX-refcommand-ref-regexp 2.78 (concat (if YaTeX-refcommand-ref-regexp-private 2.79 (concat YaTeX-refcommand-ref-regexp-private "\\|"))
3.1 --- a/yatexadd.el Sun Jul 06 23:25:21 2014 +0900 3.2 +++ b/yatexadd.el Sun Jul 06 23:28:16 2014 +0900 3.3 @@ -1,6 +1,6 @@ 3.4 ;;; yatexadd.el --- YaTeX add-in functions 3.5 ;;; yatexadd.el rev.20 3.6 -;;; (c)1991-2013 by HIROSE Yuuji.[yuuji@yatex.org] 3.7 +;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org] 3.8 ;;; Last modified Sun Jul 6 13:59:09 2014 on firestorm 3.9 ;;; $Id$ 3.10 3.11 @@ -1248,6 +1248,7 @@ 3.12 3.13 3.14 (fset 'YaTeX::pageref 'YaTeX::ref) 3.15 +(fset 'YaTeX::cref 'YaTeX::ref) 3.16 (defun YaTeX::tabref (argp) ; For the style file of IPSJ journal 3.17 (YaTeX::ref 3.18 argp nil nil 3.19 @@ -1904,9 +1905,13 @@ 3.20 3.21 (defun YaTeX:includegraphics () 3.22 "Add-in for \\includegraphics's option" 3.23 - (let (width height (scale "") angle str) 3.24 - (setq width (YaTeX-read-string-or-skip "Width: ") 3.25 - height (YaTeX-read-string-or-skip "Height: ")) 3.26 + (let (width height (scale "") angle str (delim "-0-9*+/.") 3.27 + (minibuffer-local-completion-map YaTeX-minibuffer-completion-map) 3.28 + (tbl (append YaTeX:style-parameters-local 3.29 + YaTeX:style-parameters-private 3.30 + YaTeX:style-parameters-default))) 3.31 + (setq width (YaTeX-completing-read-or-skip "Width: " tbl nil) 3.32 + height (YaTeX-completing-read-or-skip "Height: " tbl nil)) 3.33 (or (string< "" width) (string< "" height) 3.34 (setq scale (YaTeX-read-string-or-skip "Scale: "))) 3.35 (setq angle (YaTeX-read-string-or-skip "Angle(0-359): ")) 3.36 @@ -2003,7 +2008,7 @@ 3.37 ("amsmath") ("amssymb") ("xymtex") ("chemist") 3.38 ("a4j") ("array") ("epsf") ("color") ("xcolor") ("epsfig") ("floatfig") 3.39 ("landscape") ("path") ("supertabular") ("twocolumn") 3.40 - ("latexsym") ("times") ("makeidx")) 3.41 + ("latexsym") ("times") ("makeidx") ("geometry") ("type1cm")) 3.42 "Default completion table for arguments of \\usepackage") 3.43 3.44 (defvar YaTeX::usepackage-alist-private nil
4.1 --- a/yatexpkg.el Sun Jul 06 23:25:21 2014 +0900 4.2 +++ b/yatexpkg.el Sun Jul 06 23:28:16 2014 +0900 4.3 @@ -1,7 +1,7 @@ 4.4 ;;; yatexpkg.el --- YaTeX package manager 4.5 ;;; 4.6 -;;; (c)2003-2013 by HIROSE, Yuuji [yuuji@yatex.org] 4.7 -;;; Last modified Fri Jul 5 23:30:48 2013 on firestorm 4.8 +;;; (c)2003-2014 by HIROSE, Yuuji [yuuji@yatex.org] 4.9 +;;; Last modified Wed Jan 8 08:18:12 2014 on firestorm 4.10 ;;; $Id$ 4.11 4.12 ;;; Code: 4.13 @@ -43,7 +43,13 @@ 4.14 ("xcolor" (same-as . "color")) 4.15 ("ulem" (section "uline" "uuline" "uwave") 4.16 (option ("normalem"))) 4.17 - ("multicol" (env "multicols"))) 4.18 + ("multicol" (env "multicols")) 4.19 + ("cref" (section "cleveref")) 4.20 + ("crefrange" (same-as . "cref")) 4.21 + ("cpageref" (same-as . "cref")) 4.22 + ("labelcref" (same-as . "cref")) 4.23 + ("labelcpageref" (same-as . "cref")) 4.24 + ) 4.25 "Default package vs. macro list. 4.26 Alists contains '(PACKAGENAME . MACROLIST) 4.27 PACKAGENAME Basename of package(String).