diff --git a/yatex.el b/yatex.el index af97594..62f896b 100644 --- a/yatex.el +++ b/yatex.el @@ -1,6 +1,6 @@ ;;; yatex.el --- Yet Another tex-mode for emacs //�쒹// -*- coding: sjis -*- ;;; (c)1991-2019 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Tue Apr 30 23:43:59 2019 on firestorm +;;; Last modified Sat May 25 14:46:49 2019 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; https://www.yatex.org/ @@ -16,7 +16,7 @@ ;;; Code: (require 'yatexlib) -(defconst YaTeX-revision-number "1.81.3" +(defconst YaTeX-revision-number "1.81.4" "Revision number of running yatex.el") ;---------- Local variables ---------- @@ -204,7 +204,7 @@ "*Regexp of verb family. Do not contain preceding \\\\ nor \\(\\).") (defvar YaTeX-fill-inhibit-environments (append '("tabular" "tabular*" "array" "picture" "eqnarray" "eqnarray*" - "longtable" + "longtable" "tabularx" "equation" "equation*" "math" "displaymath") YaTeX-verbatim-environments) "*In these environments, YaTeX inhibits fill-paragraph from formatting. @@ -218,7 +218,7 @@ "*Regexp of environments for equations") (defvar YaTeX-array-env-regexp (concat - "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabular\\*?\\|" ;LaTeX + "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabularx?\\*?\\|" ;LaTeX "longtable\\|" ;LaTeX2e "matrix\\|pmatrix\\|bmatrix\\|vmatrix\\|Vmatrix\\|" ;AMS-LaTeX "align\\*?\\|split\\*?\\|aligned\\*?\\|alignat\\*?\\|" ;AMS-LaTeX @@ -402,6 +402,7 @@ ("minipage") ("landscape") ("supertabular") ("floatingfigure") ("wrapfigure") ("wraptable") ("frame") ("block") ("example") ("columns") ("column") ;beamer + ("tabularx") ) (if YaTeX-use-LaTeX2e '(("comment") ;defined in version diff --git a/yatexadd.el b/yatexadd.el index 390ecd6..a8dfb97 100644 --- a/yatexadd.el +++ b/yatexadd.el @@ -1,6 +1,6 @@ ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- -;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Tue Feb 26 22:10:53 2019 on firestorm +;;; (c)1991-2019 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Sat May 25 14:46:41 2019 on firestorm ;;; $Id$ ;;; Code: @@ -22,8 +22,8 @@ Notice that this function refers the let-variable `env' in YaTeX-make-begin-end." (let ((width "") bars (rule "") (and "") (j 1) loc ans (hline "\\hline")) - (if (string= YaTeX-env-name "tabular*") - (setq width (concat "{" (YaTeX:read-length "Width: ") "}"))) + (if (string-match "tabular[*x]" YaTeX-env-name) + (setq width (concat "{" (YaTeX:read-length "Table Width: ") "}"))) (setq loc (YaTeX:read-position "tb") bars (YaTeX-str2int (YaTeX-read-string-or-skip @@ -57,6 +57,7 @@ (fset 'YaTeX:tabular* 'YaTeX:tabular) (fset 'YaTeX:supertabular 'YaTeX:tabular) +(fset 'YaTeX:tabularx 'YaTeX:tabular) (defun YaTeX:alignat () (concat "{" (read-string-with-history "Number of columns: ") "}")) (defun YaTeX:array () diff --git a/yatexenv.el b/yatexenv.el index 6cc2250..1f11804 100644 --- a/yatexenv.el +++ b/yatexenv.el @@ -1,6 +1,6 @@ ;;; yatexenv.el --- YaTeX environment-specific functions -;;; (c) 1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Sep 17 10:23:16 2017 on firestorm +;;; (c) 1994-2019 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Sat May 25 14:46:33 2019 on firestorm ;;; $Id$ ;;; Code: @@ -89,7 +89,7 @@ (while (< (point) end) (setq elt (following-char)) (cond - ((string-match (char-to-string elt) "clr") ;normal indicators. + ((string-match (char-to-string elt) "clrX") ;normal indicators. (setq cols (1+ cols)) (forward-char 1)) ((equal elt ?|) ;vertical @@ -174,6 +174,7 @@ (fset 'YaTeX-intelligent-newline-array 'YaTeX-intelligent-newline-tabular) (fset 'YaTeX-intelligent-newline-supertabular 'YaTeX-intelligent-newline-tabular) (fset 'YaTeX-intelligent-newline-longtable 'YaTeX-intelligent-newline-tabular) +(fset 'YaTeX-intelligent-newline-tabularx 'YaTeX-intelligent-newline-tabular*) (defun YaTeX-intelligent-newline-align () "Intelligent newline function for align. diff --git a/yatexpkg.el b/yatexpkg.el index e6401b5..e9b2c26 100644 --- a/yatexpkg.el +++ b/yatexpkg.el @@ -1,7 +1,7 @@ ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- ;;; -;;; (c)2003-2018 by HIROSE, Yuuji [yuuji@yatex.org] -;;; Last modified Thu Jan 24 14:13:01 2019 on firestorm +;;; (c)2003-2019 by HIROSE, Yuuji [yuuji@yatex.org] +;;; Last modified Sat May 25 14:46:27 2019 on firestorm ;;; $Id$ ;;; Code: @@ -30,6 +30,7 @@ ("verbatim" (section "verbatiminput")) ("eclbkbox" (env "breakbox")) ("supertabular" (env "supertabular")) + ("tabularx" (env "tabularx")) ("amsmath" (env . YaTeX-package-ams-envs) (section "tag" "tag*")) ("amsart" (same-as . "amsmath")) @@ -155,7 +156,7 @@ (pkglist (YaTeX-package-lookup macro type)) (usepkgrx (concat YaTeX-ec-regexp - "\\(usepackage\\|include\\)\\b")) + "\\(usepackage\\|include\\|documentclass\\)\\b")) (register (function (lambda () (set-buffer cb) (set (make-local-variable 'YaTeX-package-resolved-list) @@ -174,10 +175,8 @@ (goto-char (point-min)) (YaTeX-search-active-forward ;if search fails, goto eob begdoc YaTeX-comment-prefix nil 1) - (while ;(YaTeX-re-search-active-backward - ;usepkgrx YaTeX-comment-prefix nil t) - ;;allow commented out \usepackages 2004/3/16 - (re-search-backward usepkgrx nil t) + (while (re-search-backward usepkgrx nil t) + ;;allow commented out \usepackages (setq mb0 (match-beginning 0)) (skip-chars-forward "^{") (setq uspkgargs (YaTeX-buffer-substring