# HG changeset patch # User HIROSE Yuuji # Date 1440763407 -32400 # Node ID 5e7b06dcab9cca9b3c1212160c50e41b72494640 # Parent 8f804c8339bbc176c44058d8142f48f99c3d936e Add beamer's typical completions diff -r 8f804c8339bb -r 5e7b06dcab9c yatex.el --- a/yatex.el Sun Jul 12 10:07:08 2015 +0900 +++ b/yatex.el Fri Aug 28 21:03:27 2015 +0900 @@ -1,6 +1,6 @@ ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- ;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Wed Jul 8 13:41:17 2015 on duke +;;; Last modified Fri Aug 28 21:02:24 2015 on zxr ;;; $Id$ ;;; The latest version of this software is always available at; ;;; http://www.yatex.org/ @@ -299,6 +299,8 @@ ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit") ;;cleveref ("cref") ("crefrange") ("cpageref") ("labelcref") ("labelcpageref") + ;; beamer + ("frametitle") ("framesubtitle") ) (if YaTeX-use-LaTeX2e '(("documentclass") ("usepackage") @@ -349,7 +351,7 @@ ; Set tex-environment possible completion (defvar env-table (append - '(("quote") ("quotation") ("center") ("verse") ("document") + '(("quote") ("quotation") ("centerc") ("verse") ("document") ("verbatim") ("itemize") ("enumerate") ("description") ("list") ("tabular") ("tabular*") ("table") ("tabbing") ("titlepage") ("sloppypar") ("picture") ("displaymath") @@ -359,6 +361,7 @@ ("minipage") ("supertabular") ("wrapfigure") ("wraptable") + ("frame") ("block") ("example") ;beamer ) (if YaTeX-use-LaTeX2e '(("comment") ;defined in version @@ -410,6 +413,7 @@ ("linebreak") ("pagebreak") ("noindent") ("indent") ("left") ("right") ("dots") ("smallskip") ("medskip") ("bigskip") ("displaystyle") + ("onslide") ("pause") ;beamer ) (if YaTeX-greek-by-maketitle-completion '(("alpha") ("beta") ("gamma") ("delta") ("epsilon") diff -r 8f804c8339bb -r 5e7b06dcab9c yatexadd.el --- a/yatexadd.el Sun Jul 12 10:07:08 2015 +0900 +++ b/yatexadd.el Fri Aug 28 21:03:27 2015 +0900 @@ -1,6 +1,6 @@ ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- ;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Wed Jul 8 09:15:15 2015 on firestorm +;;; Last modified Fri Aug 28 20:52:57 2015 on zxr ;;; $Id$ ;;; Code: @@ -2105,6 +2105,27 @@ ((memq c '(?c ?C)) (setq left "{\\scriptsize " right "}"))) (format "%s%s%s" left char right))))) +;;; -------------------- beamer stuff -------------------- +(defvar YaTeX:frame-option-alist-default + '(("plain") ("containverbatim") ("shrink") ("squeeze") + ("allowframebreaks") ("label="))) +(defvar YaTeX:frame-option-alist-private nil + "*Alist for completion list of the argument for `frame' environemnt") +(defvar YaTeX:frame-option-alist + (append YaTeX:frame-option-alist-private YaTeX:frame-option-alist-default)) + +(defun YaTeX:frame () + (let*((minibuffer-local-completion-map YaTeX-minibuffer-completion-map) + (delim ",") + (opt (YaTeX-completing-read-or-skip + "Frame option: " YaTeX:frame-option-alist)) + (title (YaTeX-read-string-or-skip "Title: ")) + (subtitle (YaTeX-read-string-or-skip "Subtitle: "))) + (concat + (if (string< "" opt) (concat "[" opt "]")) + (if (string< "" title) (concat "{" title "}")) + (if (string< "" subtitle) (concat "{" subtitle "}"))))) + ;;; -------------------- math-mode stuff -------------------- (defun YaTeX::tilde (&optional pos) "For accent macros in mathmode"