yatex

changeset 234:b75390dd4260 dev

C-j can skip further parameter input for table/figure environment.
author yuuji@gentei.org
date Sat, 28 Jan 2012 11:16:11 +0900
parents 699f3c6c8b2c
children f70aae80489e
files yatexadd.el yatexenv.el yatexlib.el
diffstat 3 files changed, 27 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/yatexadd.el	Sat Jan 28 10:22:08 2012 +0900
     1.2 +++ b/yatexadd.el	Sat Jan 28 11:16:11 2012 +0900
     1.3 @@ -2,7 +2,7 @@
     1.4  ;;; YaTeX add-in functions.
     1.5  ;;; yatexadd.el rev.20
     1.6  ;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org]
     1.7 -;;; Last modified Sat Jan 28 09:55:19 2012 on firestorm
     1.8 +;;; Last modified Sat Jan 28 11:03:05 2012 on firestorm
     1.9  ;;; $Id$
    1.10  
    1.11  ;;;
    1.12 @@ -109,12 +109,15 @@
    1.13    (let*((caption "") (label "") (opts "")
    1.14  	(top (if type firstp YaTeX:figure-caption-first))
    1.15  	(tl (or type "Figure"))
    1.16 -	(heremsg (format "%% %s here" tl)))
    1.17 -    (setq label (read-string (concat tl " Label: ")))
    1.18 +	(heremsg (format "%% %s here" tl))
    1.19 +	(pos (YaTeX:read-position "htbp")))
    1.20 +    (setq label (or (YaTeX-skip-next-reader-p)
    1.21 +		    (read-string (concat tl " Label: "))))
    1.22      (if (string= "" label)
    1.23  	(setq YaTeX-section-name "label")
    1.24        (setq opts (format "\n\\label{%s}" label)))
    1.25 -    (setq caption (read-string (concat tl " Caption: ")))
    1.26 +    (setq caption (or (YaTeX-skip-next-reader-p)
    1.27 +		      (read-string (concat tl " Caption: "))))
    1.28      (if (string= "" caption)
    1.29  	(setq YaTeX-section-name "caption")
    1.30        (setq caption (format "\\caption{%s}" caption)
    1.31 @@ -123,7 +126,7 @@
    1.32  			 (if top caption heremsg)
    1.33  			 (if top heremsg caption)))
    1.34        (format "\\caption{%s}" caption))
    1.35 -    opts))
    1.36 +    (concat pos opts)))
    1.37  
    1.38  (fset 'YaTeX:figure* 'YaTeX:figure)
    1.39  
     2.1 --- a/yatexenv.el	Sat Jan 28 10:22:08 2012 +0900
     2.2 +++ b/yatexenv.el	Sat Jan 28 11:16:11 2012 +0900
     2.3 @@ -2,7 +2,7 @@
     2.4  ;;; YaTeX environment-specific functions.
     2.5  ;;; yatexenv.el
     2.6  ;;; (c) 1994-2006 by HIROSE Yuuji.[yuuji@yatex.org]
     2.7 -;;; Last modified Sat Jan 28 10:21:07 2012 on firestorm
     2.8 +;;; Last modified Sat Jan 28 10:26:54 2012 on firestorm
     2.9  ;;; $Id$
    2.10  
    2.11  ;;;
    2.12 @@ -252,6 +252,10 @@
    2.13    (YaTeX-make-section nil nil nil "bibitem")
    2.14    (YaTeX-indent-line))
    2.15  
    2.16 +
    2.17 +;;;
    2.18 +;; Functions for math mode environments
    2.19 +;;;
    2.20  (defun YaTeX-intelligent-newline-equation ()
    2.21    "Warn equation can't have multiple lines."
    2.22    (undo)
    2.23 @@ -259,6 +263,13 @@
    2.24  (fset 'YaTeX-intelligent-newline-equation* 'YaTeX-intelligent-newline-equation)
    2.25  
    2.26  ;;;
    2.27 +;; For document environment
    2.28 +;;;
    2.29 +(defun YaTeX-intelligent-newline-document ()
    2.30 +  "New paragraph."
    2.31 +  (newline))				;Do you prefer `\par'?
    2.32 +
    2.33 +;;;
    2.34  ;; Intelligent newline
    2.35  ;;;
    2.36  ;;;###autoload
     3.1 --- a/yatexlib.el	Sat Jan 28 10:22:08 2012 +0900
     3.2 +++ b/yatexlib.el	Sat Jan 28 11:16:11 2012 +0900
     3.3 @@ -2,7 +2,7 @@
     3.4  ;;; YaTeX and yahtml common libraries, general functions and definitions
     3.5  ;;; yatexlib.el
     3.6  ;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org]
     3.7 -;;; Last modified Mon Jan 23 00:10:51 2012 on firestorm
     3.8 +;;; Last modified Sat Jan 28 11:02:48 2012 on firestorm
     3.9  ;;; $Id$
    3.10  
    3.11  ;; General variables
    3.12 @@ -752,6 +752,12 @@
    3.13      (read-with-history-in hsym prompt init))
    3.14     (t (read-string prompt init))))
    3.15  
    3.16 +(defvar YaTeX-skip-next-reader-char ?\C-j)
    3.17 +(defun YaTeX-skip-next-reader-p ()
    3.18 +  "Check if the next string-reader should be skip."
    3.19 +  (if (equal last-input-char YaTeX-skip-next-reader-char)
    3.20 +      "" nil))
    3.21 +
    3.22  ;;;###autoload
    3.23  (fset 'YaTeX-rassoc
    3.24        (if (and nil (fboundp 'rassoc) (subrp (symbol-function 'rassoc)))