yatex

diff yatexadd.el @ 7:9a56acb6c287

Fill-paragraph and (un)comment-paragraph work fine. Fix kill range of YaTeX-kill-some-pairs. Ignore begin/end in verb or verbatim. Indent rigidly initial space between begin/end pairs. Add yatex-mode-load-hook. Go to corresponding \label or \ref.
author yuuji
date Tue, 04 May 1993 12:57:27 +0000
parents
children c746646cecf5
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/yatexadd.el	Tue May 04 12:57:27 1993 +0000
     1.3 @@ -0,0 +1,59 @@
     1.4 +;;; -*- Emacs-Lisp -*-
     1.5 +;;; YaTeX add in functions.
     1.6 +;;; yatexadd.el rev.2
     1.7 +;;; (c)1991-1993 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
     1.8 +;;; Last modified Fri Feb  5 09:36:06 1993 on gloria
     1.9 +
    1.10 +(provide 'yatexadd)
    1.11 +
    1.12 +;;;
    1.13 +;;Sample functions for LaTeX environment.
    1.14 +;;;
    1.15 +(defvar YaTeX:tabular-default-rule
    1.16 +  "@{\\vrule width 1pt\\ }c|c|c@{\\ \\vrule width 1pt}"
    1.17 +  "*Your favorite default rule format."
    1.18 +)
    1.19 +(defun YaTeX:tabular ()
    1.20 +  "YaTeX add in function for tabular environment."
    1.21 +  (let (bars (rule "") (j 0) loc)
    1.22 +    (setq bars (string-to-int (read-string "Number of `|': ")))
    1.23 +    (if (> bars 0)
    1.24 +	(while (< j bars) (setq rule (concat rule "|")) (setq j (1+ j)))
    1.25 +      (setq rule YaTeX:tabular-default-rule))
    1.26 +    (setq rule (read-string "rule format: " rule))
    1.27 +
    1.28 +    (insert (format "{%s}" rule))
    1.29 +    (message ""))
    1.30 +)
    1.31 +
    1.32 +(defun YaTeX:table ()
    1.33 +  (let ((pos ""))
    1.34 +    (message "Position []:")
    1.35 +    (while (not (string-match
    1.36 +		 (setq loc (read-key-sequence (format "Position [%s]: " pos)))
    1.37 +		 "\r\^g\n"))
    1.38 +      (cond
    1.39 +       ((string-match loc "htbp")
    1.40 +	(if (not (string-match loc pos))
    1.41 +	    (setq pos (concat pos loc))))
    1.42 +       ((and (string-match loc "\C-h\C-?") (> (length pos) 0))
    1.43 +	(setq pos (substring pos 0 (1- (length pos)))))
    1.44 +       (t
    1.45 +	(ding)
    1.46 +	(message "Please input one of `htbp'.")
    1.47 +	(sit-for 3))))
    1.48 +    (if (string= pos "") nil
    1.49 +      (insert "[" pos "]")))
    1.50 +)
    1.51 +
    1.52 +(defun YaTeX:description ()
    1.53 +  "Truly poor service:-)"
    1.54 +  (setq single-command "item[]")
    1.55 +)
    1.56 +
    1.57 +(defun YaTeX:itemize ()
    1.58 +  "It's also poor service."
    1.59 +  (setq single-command "item")
    1.60 +)
    1.61 +
    1.62 +(fset 'YaTeX:enumerate 'YaTeX:itemize)