yatex

changeset 233:699f3c6c8b2c dev

YaTeX-intelligent-newline-equation
author yuuji@gentei.org
date Sat, 28 Jan 2012 10:22:08 +0900
parents b46b927914c8
children b75390dd4260
files yatexenv.el
diffstat 1 files changed, 12 insertions(+), 9 deletions(-) [+]
line diff
     1.1 --- a/yatexenv.el	Sat Jan 28 10:00:26 2012 +0900
     1.2 +++ b/yatexenv.el	Sat Jan 28 10:22:08 2012 +0900
     1.3 @@ -2,7 +2,7 @@
     1.4  ;;; YaTeX environment-specific functions.
     1.5  ;;; yatexenv.el
     1.6  ;;; (c) 1994-2006 by HIROSE Yuuji.[yuuji@yatex.org]
     1.7 -;;; Last modified Sat Jun 24 08:14:11 2006 on firestorm
     1.8 +;;; Last modified Sat Jan 28 10:21:07 2012 on firestorm
     1.9  ;;; $Id$
    1.10  
    1.11  ;;;
    1.12 @@ -227,8 +227,7 @@
    1.13  	      (setq tabcount (1- tabcount))))
    1.14  	  (forward-char 2))
    1.15        (insert "\\= \\\\")
    1.16 -      (forward-char -5)))
    1.17 -)
    1.18 +      (forward-char -5))))
    1.19  
    1.20  ;;;
    1.21  ;; Functions for itemize/enumerate/list environments
    1.22 @@ -237,23 +236,27 @@
    1.23  (defun YaTeX-intelligent-newline-itemize ()
    1.24    "Insert '\\item '."
    1.25    (insert "\\item ")
    1.26 -  (YaTeX-indent-line)
    1.27 -)
    1.28 +  (YaTeX-indent-line))
    1.29 +
    1.30  (fset 'YaTeX-intelligent-newline-enumerate 'YaTeX-intelligent-newline-itemize)
    1.31  (fset 'YaTeX-intelligent-newline-list 'YaTeX-intelligent-newline-itemize)
    1.32  
    1.33  (defun YaTeX-intelligent-newline-description ()
    1.34    (insert "\\item[] ")
    1.35    (forward-char -2)
    1.36 -  (YaTeX-indent-line)
    1.37 -)
    1.38 +  (YaTeX-indent-line))
    1.39  
    1.40  (defun YaTeX-intelligent-newline-thebibliography ()
    1.41    "Insert '\\bibitem '."
    1.42    (YaTeX-indent-line)
    1.43    (YaTeX-make-section nil nil nil "bibitem")
    1.44 -  (YaTeX-indent-line)
    1.45 -)
    1.46 +  (YaTeX-indent-line))
    1.47 +
    1.48 +(defun YaTeX-intelligent-newline-equation ()
    1.49 +  "Warn equation can't have multiple lines."
    1.50 +  (undo)
    1.51 +  (error "Equation environment can't have multiple lines."))
    1.52 +(fset 'YaTeX-intelligent-newline-equation* 'YaTeX-intelligent-newline-equation)
    1.53  
    1.54  ;;;
    1.55  ;; Intelligent newline