yatex
diff yatexenv.el @ 58:3a7c0c2bf16d
Official support for AMS-LaTeX, HTML, xdvi -remote, Netscape
author | yuuji |
---|---|
date | Thu, 01 Feb 1996 18:55:47 +0000 |
parents | a9653fbd1c1c |
children | 48ac97a6b6ce |
line diff
1.1 --- a/yatexenv.el Thu Jun 29 13:46:57 1995 +0000 1.2 +++ b/yatexenv.el Thu Feb 01 18:55:47 1996 +0000 1.3 @@ -2,7 +2,7 @@ 1.4 ;;; YaTeX environment-specific functions. 1.5 ;;; yatexenv.el 1.6 ;;; (c ) 1994, 1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 1.7 -;;; Last modified Thu May 18 11:52:05 1995 on inspire 1.8 +;;; Last modified Fri Feb 2 03:47:14 1996 on supra 1.9 ;;; $Id$ 1.10 1.11 ;;; 1.12 @@ -116,18 +116,23 @@ 1.13 (let*((p (point)) (format (YaTeX-tabular-parse-format tabular*)) 1.14 (cols (car format)) (beg (car (cdr format))) 1.15 space hline) 1.16 - (setq hline (search-backward "\\hline" beg t)) 1.17 + (cond 1.18 + ((search-backward "&" beg t) 1.19 + (goto-char p) 1.20 + (setq hline (search-backward "\\hline" beg t)) 1.21 + (setq space (if (search-backward "\t&" beg t) "\t" " ")) 1.22 + (goto-char p)) 1.23 + (t ;;(insert "\\hline\n") 1.24 + (setq space " "))) 1.25 (goto-char p) 1.26 - (setq space (if (search-backward "\t&" beg t) "\t" " ")) 1.27 - (goto-char p) 1.28 - (YaTeX-indent-line) 1.29 - (setq p (point)) 1.30 (while (> (1- cols) 0) 1.31 (insert "&" space) 1.32 (setq cols (1- cols))) 1.33 (insert "\\\\") 1.34 (if hline (insert " \\hline")) 1.35 - (goto-char p)) 1.36 + (goto-char p) 1.37 + (YaTeX-indent-line) 1.38 +) 1.39 ) 1.40 1.41 (defun YaTeX-intelligent-newline-tabular* () 1.42 @@ -160,17 +165,17 @@ 1.43 (insert "\\>\t") 1.44 (setq tabcount (1- tabcount)))) 1.45 (forward-char 2)) 1.46 - (insert "\\="))) 1.47 + (insert "\\= \\\\") 1.48 + (forward-char -5))) 1.49 ) 1.50 1.51 ;;; 1.52 ;; Functions for itemize/enumerate/list environments 1.53 ;;; 1.54 1.55 -(defvar YaTeX-item-for-insert "\\item ") 1.56 (defun YaTeX-intelligent-newline-itemize () 1.57 "Insert '\\item '." 1.58 - (insert YaTeX-item-for-insert) 1.59 + (insert "\\item ") 1.60 (YaTeX-indent-line) 1.61 ) 1.62 (fset 'YaTeX-intelligent-newline-enumerate 'YaTeX-intelligent-newline-itemize) 1.63 @@ -199,6 +204,7 @@ 1.64 (setq func (intern-soft (concat "YaTeX-intelligent-newline-" env))) 1.65 (end-of-line) 1.66 (newline) 1.67 + (undo-boundary) 1.68 (if (and env func (fboundp func)) 1.69 (funcall func))) 1.70 )