yatex
diff yatexadd.el @ 422:5e7b06dcab9c
Add beamer's typical completions
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Fri, 28 Aug 2015 21:03:27 +0900 |
parents | 368a86a179ff |
children | e1e67b1b70e6 |
line diff
1.1 --- a/yatexadd.el Wed Jul 08 09:16:35 2015 +0900 1.2 +++ b/yatexadd.el Fri Aug 28 21:03:27 2015 +0900 1.3 @@ -1,6 +1,6 @@ 1.4 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- 1.5 ;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] 1.6 -;;; Last modified Wed Jul 8 09:15:15 2015 on firestorm 1.7 +;;; Last modified Fri Aug 28 20:52:57 2015 on zxr 1.8 ;;; $Id$ 1.9 1.10 ;;; Code: 1.11 @@ -2105,6 +2105,27 @@ 1.12 ((memq c '(?c ?C)) (setq left "{\\scriptsize " right "}"))) 1.13 (format "%s%s%s" left char right))))) 1.14 1.15 +;;; -------------------- beamer stuff -------------------- 1.16 +(defvar YaTeX:frame-option-alist-default 1.17 + '(("plain") ("containverbatim") ("shrink") ("squeeze") 1.18 + ("allowframebreaks") ("label="))) 1.19 +(defvar YaTeX:frame-option-alist-private nil 1.20 + "*Alist for completion list of the argument for `frame' environemnt") 1.21 +(defvar YaTeX:frame-option-alist 1.22 + (append YaTeX:frame-option-alist-private YaTeX:frame-option-alist-default)) 1.23 + 1.24 +(defun YaTeX:frame () 1.25 + (let*((minibuffer-local-completion-map YaTeX-minibuffer-completion-map) 1.26 + (delim ",") 1.27 + (opt (YaTeX-completing-read-or-skip 1.28 + "Frame option: " YaTeX:frame-option-alist)) 1.29 + (title (YaTeX-read-string-or-skip "Title: ")) 1.30 + (subtitle (YaTeX-read-string-or-skip "Subtitle: "))) 1.31 + (concat 1.32 + (if (string< "" opt) (concat "[" opt "]")) 1.33 + (if (string< "" title) (concat "{" title "}")) 1.34 + (if (string< "" subtitle) (concat "{" subtitle "}"))))) 1.35 + 1.36 ;;; -------------------- math-mode stuff -------------------- 1.37 (defun YaTeX::tilde (&optional pos) 1.38 "For accent macros in mathmode"