# HG changeset patch # User HIROSE Yuuji # Date 1540176285 -32400 # Node ID e7356faf50df0f24ebeabee38e99f2b99d0f01c2 # Parent d97881f33e284a17afc502c450ffa02eb42cf27c Add completion stuff of \subfigure{}. diff -r d97881f33e28 -r e7356faf50df yatex.el --- a/yatex.el Tue Aug 21 10:49:30 2018 +0900 +++ b/yatex.el Mon Oct 22 11:44:45 2018 +0900 @@ -1,6 +1,6 @@ ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- ;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sat Jun 2 14:13:17 2018 on firestorm +;;; Last modified Mon Oct 22 11:43:30 2018 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; https://www.yatex.org/ @@ -16,7 +16,7 @@ ;;; Code: (require 'yatexlib) -(defconst YaTeX-revision-number "1.80.3" +(defconst YaTeX-revision-number "1.80.4" "Revision number of running yatex.el") ;---------- Local variables ---------- @@ -323,8 +323,8 @@ ("mathscr") ("mathrsfs") ;;cleveref ("cref") ("crefrange") ("cpageref") ("labelcref") ("labelcpageref") - ;; beamer - ("frametitle") ("framesubtitle") + ("frametitle") ("framesubtitle") ;; beamer + ("subfigure") ;; subfigure ) (if YaTeX-use-LaTeX2e '(("documentclass") ("usepackage") diff -r d97881f33e28 -r e7356faf50df yatexadd.el --- a/yatexadd.el Tue Aug 21 10:49:30 2018 +0900 +++ b/yatexadd.el Mon Oct 22 11:44:45 2018 +0900 @@ -1,6 +1,6 @@ ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- ;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Wed May 30 13:35:42 2018 on firestorm +;;; Last modified Mon Oct 22 11:43:47 2018 on firestorm ;;; $Id$ ;;; Code: @@ -2133,6 +2133,15 @@ (setq YaTeX-section-name "label") nil) +(defun YaTeX:subfigure () + (let ((subcap (YaTeX-read-string-or-skip "Sub-caption: "))) + (if (string= "" subcap) "" + (concat "[" subcap "]")))) + +(defun YaTeX::subfigure () + (setq YaTeX-section-name "includegraphics") + nil) + (defvar YaTeX::usepackage-alist-default '(("version") ("plext") ("url") ("fancybox") ("pifont") ("longtable") @@ -2140,7 +2149,8 @@ ("amsmath") ("amssymb") ("xymtex") ("chemist") ("a4j") ("array") ("epsf") ("color") ("xcolor") ("epsfig") ("floatfig") ("landscape") ("path") ("supertabular") ("twocolumn") - ("latexsym") ("times") ("makeidx") ("geometry") ("type1cm")) + ("latexsym") ("times") ("makeidx") ("geometry") ("type1cm") + ("subfigure")) "Default completion table for arguments of \\usepackage") (defvar YaTeX::usepackage-alist-private nil diff -r d97881f33e28 -r e7356faf50df yatexpkg.el --- a/yatexpkg.el Tue Aug 21 10:49:30 2018 +0900 +++ b/yatexpkg.el Mon Oct 22 11:44:45 2018 +0900 @@ -1,7 +1,7 @@ ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- ;;; ;;; (c)2003-2018 by HIROSE, Yuuji [yuuji@yatex.org] -;;; Last modified Fri Jan 5 00:22:46 2018 on firestorm +;;; Last modified Mon Oct 22 11:30:45 2018 on firestorm ;;; $Id$ ;;; Code: @@ -57,6 +57,7 @@ ("wrapfig" (env "wrapfigure" "wraptable")) ("setspace" (env "spacing") (section "setstretch")) ("cases" (env "numcases" "subnumcases")) + ("subfigure" (section "subfigure")) ) "Default package vs. macro list. Alists contains '(PACKAGENAME . MACROLIST)