yatex
changeset 572:714f3527b4a1 dev
Add add-in for tabularx environment
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sat, 25 May 2019 14:48:03 +0900 |
parents | 26d14d8bc834 |
children | 9e07513fc2ef |
files | yatex.el yatexadd.el yatexenv.el yatexpkg.el |
diffstat | 4 files changed, 20 insertions(+), 18 deletions(-) [+] |
line diff
1.1 --- a/yatex.el Tue Apr 30 23:45:10 2019 +0900 1.2 +++ b/yatex.el Sat May 25 14:48:03 2019 +0900 1.3 @@ -1,6 +1,6 @@ 1.4 ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- 1.5 ;;; (c)1991-2019 by HIROSE Yuuji.[yuuji@yatex.org] 1.6 -;;; Last modified Tue Apr 30 23:43:59 2019 on firestorm 1.7 +;;; Last modified Sat May 25 14:46:49 2019 on firestorm 1.8 ;;; $Id$ 1.9 ;;; The latest version of this software is always available at; 1.10 ;;; https://www.yatex.org/ 1.11 @@ -16,7 +16,7 @@ 1.12 1.13 ;;; Code: 1.14 (require 'yatexlib) 1.15 -(defconst YaTeX-revision-number "1.81.3" 1.16 +(defconst YaTeX-revision-number "1.81.4" 1.17 "Revision number of running yatex.el") 1.18 1.19 ;---------- Local variables ---------- 1.20 @@ -204,7 +204,7 @@ 1.21 "*Regexp of verb family. Do not contain preceding \\\\ nor \\(\\).") 1.22 (defvar YaTeX-fill-inhibit-environments 1.23 (append '("tabular" "tabular*" "array" "picture" "eqnarray" "eqnarray*" 1.24 - "longtable" 1.25 + "longtable" "tabularx" 1.26 "equation" "equation*" "math" "displaymath") 1.27 YaTeX-verbatim-environments) 1.28 "*In these environments, YaTeX inhibits fill-paragraph from formatting. 1.29 @@ -218,7 +218,7 @@ 1.30 "*Regexp of environments for equations") 1.31 (defvar YaTeX-array-env-regexp 1.32 (concat 1.33 - "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabular\\*?\\|" ;LaTeX 1.34 + "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabularx?\\*?\\|" ;LaTeX 1.35 "longtable\\|" ;LaTeX2e 1.36 "matrix\\|pmatrix\\|bmatrix\\|vmatrix\\|Vmatrix\\|" ;AMS-LaTeX 1.37 "align\\*?\\|split\\*?\\|aligned\\*?\\|alignat\\*?\\|" ;AMS-LaTeX 1.38 @@ -402,6 +402,7 @@ 1.39 ("minipage") ("landscape") 1.40 ("supertabular") ("floatingfigure") ("wrapfigure") ("wraptable") 1.41 ("frame") ("block") ("example") ("columns") ("column") ;beamer 1.42 + ("tabularx") 1.43 ) 1.44 (if YaTeX-use-LaTeX2e 1.45 '(("comment") ;defined in version
2.1 --- a/yatexadd.el Tue Apr 30 23:45:10 2019 +0900 2.2 +++ b/yatexadd.el Sat May 25 14:48:03 2019 +0900 2.3 @@ -1,6 +1,6 @@ 2.4 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- 2.5 -;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] 2.6 -;;; Last modified Tue Feb 26 22:10:53 2019 on firestorm 2.7 +;;; (c)1991-2019 by HIROSE Yuuji.[yuuji@yatex.org] 2.8 +;;; Last modified Sat May 25 14:46:41 2019 on firestorm 2.9 ;;; $Id$ 2.10 2.11 ;;; Code: 2.12 @@ -22,8 +22,8 @@ 2.13 Notice that this function refers the let-variable `env' in 2.14 YaTeX-make-begin-end." 2.15 (let ((width "") bars (rule "") (and "") (j 1) loc ans (hline "\\hline")) 2.16 - (if (string= YaTeX-env-name "tabular*") 2.17 - (setq width (concat "{" (YaTeX:read-length "Width: ") "}"))) 2.18 + (if (string-match "tabular[*x]" YaTeX-env-name) 2.19 + (setq width (concat "{" (YaTeX:read-length "Table Width: ") "}"))) 2.20 (setq loc (YaTeX:read-position "tb") 2.21 bars (YaTeX-str2int 2.22 (YaTeX-read-string-or-skip 2.23 @@ -57,6 +57,7 @@ 2.24 2.25 (fset 'YaTeX:tabular* 'YaTeX:tabular) 2.26 (fset 'YaTeX:supertabular 'YaTeX:tabular) 2.27 +(fset 'YaTeX:tabularx 'YaTeX:tabular) 2.28 (defun YaTeX:alignat () 2.29 (concat "{" (read-string-with-history "Number of columns: ") "}")) 2.30 (defun YaTeX:array ()
3.1 --- a/yatexenv.el Tue Apr 30 23:45:10 2019 +0900 3.2 +++ b/yatexenv.el Sat May 25 14:48:03 2019 +0900 3.3 @@ -1,6 +1,6 @@ 3.4 ;;; yatexenv.el --- YaTeX environment-specific functions 3.5 -;;; (c) 1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] 3.6 -;;; Last modified Sun Sep 17 10:23:16 2017 on firestorm 3.7 +;;; (c) 1994-2019 by HIROSE Yuuji.[yuuji@yatex.org] 3.8 +;;; Last modified Sat May 25 14:46:33 2019 on firestorm 3.9 ;;; $Id$ 3.10 3.11 ;;; Code: 3.12 @@ -89,7 +89,7 @@ 3.13 (while (< (point) end) 3.14 (setq elt (following-char)) 3.15 (cond 3.16 - ((string-match (char-to-string elt) "clr") ;normal indicators. 3.17 + ((string-match (char-to-string elt) "clrX") ;normal indicators. 3.18 (setq cols (1+ cols)) 3.19 (forward-char 1)) 3.20 ((equal elt ?|) ;vertical 3.21 @@ -174,6 +174,7 @@ 3.22 (fset 'YaTeX-intelligent-newline-array 'YaTeX-intelligent-newline-tabular) 3.23 (fset 'YaTeX-intelligent-newline-supertabular 'YaTeX-intelligent-newline-tabular) 3.24 (fset 'YaTeX-intelligent-newline-longtable 'YaTeX-intelligent-newline-tabular) 3.25 +(fset 'YaTeX-intelligent-newline-tabularx 'YaTeX-intelligent-newline-tabular*) 3.26 3.27 (defun YaTeX-intelligent-newline-align () 3.28 "Intelligent newline function for align.
4.1 --- a/yatexpkg.el Tue Apr 30 23:45:10 2019 +0900 4.2 +++ b/yatexpkg.el Sat May 25 14:48:03 2019 +0900 4.3 @@ -1,7 +1,7 @@ 4.4 ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- 4.5 ;;; 4.6 -;;; (c)2003-2018 by HIROSE, Yuuji [yuuji@yatex.org] 4.7 -;;; Last modified Thu Jan 24 14:13:01 2019 on firestorm 4.8 +;;; (c)2003-2019 by HIROSE, Yuuji [yuuji@yatex.org] 4.9 +;;; Last modified Sat May 25 14:46:27 2019 on firestorm 4.10 ;;; $Id$ 4.11 4.12 ;;; Code: 4.13 @@ -30,6 +30,7 @@ 4.14 ("verbatim" (section "verbatiminput")) 4.15 ("eclbkbox" (env "breakbox")) 4.16 ("supertabular" (env "supertabular")) 4.17 + ("tabularx" (env "tabularx")) 4.18 ("amsmath" (env . YaTeX-package-ams-envs) 4.19 (section "tag" "tag*")) 4.20 ("amsart" (same-as . "amsmath")) 4.21 @@ -155,7 +156,7 @@ 4.22 (pkglist (YaTeX-package-lookup macro type)) 4.23 (usepkgrx (concat 4.24 YaTeX-ec-regexp 4.25 - "\\(usepackage\\|include\\)\\b")) 4.26 + "\\(usepackage\\|include\\|documentclass\\)\\b")) 4.27 (register (function 4.28 (lambda () (set-buffer cb) 4.29 (set (make-local-variable 'YaTeX-package-resolved-list) 4.30 @@ -174,10 +175,8 @@ 4.31 (goto-char (point-min)) 4.32 (YaTeX-search-active-forward ;if search fails, goto eob 4.33 begdoc YaTeX-comment-prefix nil 1) 4.34 - (while ;(YaTeX-re-search-active-backward 4.35 - ;usepkgrx YaTeX-comment-prefix nil t) 4.36 - ;;allow commented out \usepackages 2004/3/16 4.37 - (re-search-backward usepkgrx nil t) 4.38 + (while (re-search-backward usepkgrx nil t) 4.39 + ;;allow commented out \usepackages 4.40 (setq mb0 (match-beginning 0)) 4.41 (skip-chars-forward "^{") 4.42 (setq uspkgargs (YaTeX-buffer-substring