Mercurial > hgrepos > hgweb.cgi > yatex
comparison yatexenv.el @ 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 | c0827f80b18e |
children |
comparison
equal
deleted
inserted
replaced
571:26d14d8bc834 | 572:714f3527b4a1 |
---|---|
1 ;;; yatexenv.el --- YaTeX environment-specific functions | 1 ;;; yatexenv.el --- YaTeX environment-specific functions |
2 ;;; (c) 1994-2017 by HIROSE Yuuji.[yuuji@yatex.org] | 2 ;;; (c) 1994-2019 by HIROSE Yuuji.[yuuji@yatex.org] |
3 ;;; Last modified Sun Sep 17 10:23:16 2017 on firestorm | 3 ;;; Last modified Sat May 25 14:46:33 2019 on firestorm |
4 ;;; $Id$ | 4 ;;; $Id$ |
5 | 5 |
6 ;;; Code: | 6 ;;; Code: |
7 ;;; | 7 ;;; |
8 ;; Functions for tabular environment | 8 ;; Functions for tabular environment |
87 (goto-char beg) | 87 (goto-char beg) |
88 (let (elt (cols 0)) | 88 (let (elt (cols 0)) |
89 (while (< (point) end) | 89 (while (< (point) end) |
90 (setq elt (following-char)) | 90 (setq elt (following-char)) |
91 (cond | 91 (cond |
92 ((string-match (char-to-string elt) "clr") ;normal indicators. | 92 ((string-match (char-to-string elt) "clrX") ;normal indicators. |
93 (setq cols (1+ cols)) | 93 (setq cols (1+ cols)) |
94 (forward-char 1)) | 94 (forward-char 1)) |
95 ((equal elt ?|) ;vertical | 95 ((equal elt ?|) ;vertical |
96 (forward-char 1)) | 96 (forward-char 1)) |
97 ((string-match (char-to-string elt) "p@") ;p or @ expression | 97 ((string-match (char-to-string elt) "p@") ;p or @ expression |
172 (YaTeX-intelligent-newline-tabular 'tabular*)) | 172 (YaTeX-intelligent-newline-tabular 'tabular*)) |
173 | 173 |
174 (fset 'YaTeX-intelligent-newline-array 'YaTeX-intelligent-newline-tabular) | 174 (fset 'YaTeX-intelligent-newline-array 'YaTeX-intelligent-newline-tabular) |
175 (fset 'YaTeX-intelligent-newline-supertabular 'YaTeX-intelligent-newline-tabular) | 175 (fset 'YaTeX-intelligent-newline-supertabular 'YaTeX-intelligent-newline-tabular) |
176 (fset 'YaTeX-intelligent-newline-longtable 'YaTeX-intelligent-newline-tabular) | 176 (fset 'YaTeX-intelligent-newline-longtable 'YaTeX-intelligent-newline-tabular) |
177 (fset 'YaTeX-intelligent-newline-tabularx 'YaTeX-intelligent-newline-tabular*) | |
177 | 178 |
178 (defun YaTeX-intelligent-newline-align () | 179 (defun YaTeX-intelligent-newline-align () |
179 "Intelligent newline function for align. | 180 "Intelligent newline function for align. |
180 Count the number of & in the first align line and insert that many &s." | 181 Count the number of & in the first align line and insert that many &s." |
181 (let*((p (point)) (amps 0)) | 182 (let*((p (point)) (amps 0)) |