yatex
changeset 422:5e7b06dcab9c dev
Add beamer's typical completions
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Fri, 28 Aug 2015 21:03:27 +0900 |
parents | 8f804c8339bb |
children | e1e67b1b70e6 |
files | yatex.el yatexadd.el |
diffstat | 2 files changed, 28 insertions(+), 3 deletions(-) [+] |
line diff
1.1 --- a/yatex.el Sun Jul 12 10:07:08 2015 +0900 1.2 +++ b/yatex.el Fri Aug 28 21:03:27 2015 +0900 1.3 @@ -1,6 +1,6 @@ 1.4 ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- 1.5 ;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] 1.6 -;;; Last modified Wed Jul 8 13:41:17 2015 on duke 1.7 +;;; Last modified Fri Aug 28 21:02:24 2015 on zxr 1.8 ;;; $Id$ 1.9 ;;; The latest version of this software is always available at; 1.10 ;;; http://www.yatex.org/ 1.11 @@ -299,6 +299,8 @@ 1.12 ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit") 1.13 ;;cleveref 1.14 ("cref") ("crefrange") ("cpageref") ("labelcref") ("labelcpageref") 1.15 + ;; beamer 1.16 + ("frametitle") ("framesubtitle") 1.17 ) 1.18 (if YaTeX-use-LaTeX2e 1.19 '(("documentclass") ("usepackage") 1.20 @@ -349,7 +351,7 @@ 1.21 ; Set tex-environment possible completion 1.22 (defvar env-table 1.23 (append 1.24 - '(("quote") ("quotation") ("center") ("verse") ("document") 1.25 + '(("quote") ("quotation") ("centerc") ("verse") ("document") 1.26 ("verbatim") ("itemize") ("enumerate") ("description") 1.27 ("list") ("tabular") ("tabular*") ("table") ("tabbing") ("titlepage") 1.28 ("sloppypar") ("picture") ("displaymath") 1.29 @@ -359,6 +361,7 @@ 1.30 ("minipage") 1.31 ("supertabular") 1.32 ("wrapfigure") ("wraptable") 1.33 + ("frame") ("block") ("example") ;beamer 1.34 ) 1.35 (if YaTeX-use-LaTeX2e 1.36 '(("comment") ;defined in version 1.37 @@ -410,6 +413,7 @@ 1.38 ("linebreak") ("pagebreak") ("noindent") ("indent") 1.39 ("left") ("right") ("dots") ("smallskip") ("medskip") ("bigskip") 1.40 ("displaystyle") 1.41 + ("onslide") ("pause") ;beamer 1.42 ) 1.43 (if YaTeX-greek-by-maketitle-completion 1.44 '(("alpha") ("beta") ("gamma") ("delta") ("epsilon")
2.1 --- a/yatexadd.el Sun Jul 12 10:07:08 2015 +0900 2.2 +++ b/yatexadd.el Fri Aug 28 21:03:27 2015 +0900 2.3 @@ -1,6 +1,6 @@ 2.4 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- 2.5 ;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] 2.6 -;;; Last modified Wed Jul 8 09:15:15 2015 on firestorm 2.7 +;;; Last modified Fri Aug 28 20:52:57 2015 on zxr 2.8 ;;; $Id$ 2.9 2.10 ;;; Code: 2.11 @@ -2105,6 +2105,27 @@ 2.12 ((memq c '(?c ?C)) (setq left "{\\scriptsize " right "}"))) 2.13 (format "%s%s%s" left char right))))) 2.14 2.15 +;;; -------------------- beamer stuff -------------------- 2.16 +(defvar YaTeX:frame-option-alist-default 2.17 + '(("plain") ("containverbatim") ("shrink") ("squeeze") 2.18 + ("allowframebreaks") ("label="))) 2.19 +(defvar YaTeX:frame-option-alist-private nil 2.20 + "*Alist for completion list of the argument for `frame' environemnt") 2.21 +(defvar YaTeX:frame-option-alist 2.22 + (append YaTeX:frame-option-alist-private YaTeX:frame-option-alist-default)) 2.23 + 2.24 +(defun YaTeX:frame () 2.25 + (let*((minibuffer-local-completion-map YaTeX-minibuffer-completion-map) 2.26 + (delim ",") 2.27 + (opt (YaTeX-completing-read-or-skip 2.28 + "Frame option: " YaTeX:frame-option-alist)) 2.29 + (title (YaTeX-read-string-or-skip "Title: ")) 2.30 + (subtitle (YaTeX-read-string-or-skip "Subtitle: "))) 2.31 + (concat 2.32 + (if (string< "" opt) (concat "[" opt "]")) 2.33 + (if (string< "" title) (concat "{" title "}")) 2.34 + (if (string< "" subtitle) (concat "{" subtitle "}"))))) 2.35 + 2.36 ;;; -------------------- math-mode stuff -------------------- 2.37 (defun YaTeX::tilde (&optional pos) 2.38 "For accent macros in mathmode"