yatex
diff yatexpkg.el @ 570:2ed79846fd53
Add forgotten shortcut for figure environment
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 07 Apr 2019 01:10:29 +0900 |
parents | 71697ec66240 |
children | 714f3527b4a1 |
line diff
1.1 --- a/yatexpkg.el Thu Jan 24 08:03:47 2019 +0900 1.2 +++ b/yatexpkg.el Sun Apr 07 01:10:29 2019 +0900 1.3 @@ -1,7 +1,7 @@ 1.4 ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- 1.5 ;;; 1.6 ;;; (c)2003-2018 by HIROSE, Yuuji [yuuji@yatex.org] 1.7 -;;; Last modified Thu Jan 24 08:00:20 2019 on firestorm 1.8 +;;; Last modified Thu Jan 24 14:13:01 2019 on firestorm 1.9 ;;; $Id$ 1.10 1.11 ;;; Code: 1.12 @@ -40,10 +40,26 @@ 1.13 "varDelta" "varTheta" "varLambda" "varXi" "varPi" 1.14 "varSigma" "varUpsilon" "varPhi" "varPsi" "varOmega" 1.15 "lll" "ggg")) ;very few. Please tell us! 1.16 + ("latexsym" (maketitle "mho" "Join" "Box" "Diamond" "leadsto" 1.17 + "sqsubset" "sqsupset" "lhd" "unlhd" "rhd" "unrhd")) 1.18 ("mathrsfs" (section "mathscr")) 1.19 ("graphicx" (section "includegraphics" 1.20 "rotatebox" "scalebox" "resizebox" "reflectbox") 1.21 (option . YaTeX-package-graphics-driver-alist)) 1.22 + ("xymtex" (section "Ycyclohexaneh")) ;;XXX we need more and more... 1.23 + ("chemist" nil) ;;XXX we need completions... 1.24 + ("a4j" nil) 1.25 + ("array" nil) 1.26 + ("times" nil) 1.27 + ("newtx" nil) 1.28 + ("makeidx" nil) 1.29 + ("geometry" (section "geometry")) 1.30 + ("lscape" (env "landscape")) 1.31 + ("path" (section "path")) 1.32 + ("epsf" (section "epsfbox")) 1.33 + ("epsfig" (section "epsfig")) 1.34 + ("floatflt" (env "floatingfigure")) 1.35 + ("type1cm" (section "fontsize")) 1.36 ("svg" (section "includesvg")) 1.37 ("color" (section "textcolor" "colorbox" "pagecolor" "color") 1.38 (option . YaTeX-package-graphics-driver-alist) 1.39 @@ -52,11 +68,8 @@ 1.40 ("ulem" (section "uline" "uuline" "uwave") 1.41 (option ("normalem"))) 1.42 ("multicol" (env "multicols")) 1.43 - ("cref" (section "cleveref")) 1.44 - ("crefrange" (same-as . "cref")) 1.45 - ("cpageref" (same-as . "cref")) 1.46 - ("labelcref" (same-as . "cref")) 1.47 - ("labelcpageref" (same-as . "cref")) 1.48 + ("cleveref" (section "cref" "crefrange" "cpageref" "labelcref" 1.49 + "labelpageref")) 1.50 ("wrapfig" (env "wrapfigure" "wraptable")) 1.51 ("setspace" (env "spacing") (section "setstretch")) 1.52 ("cases" (env "numcases" "subnumcases")) 1.53 @@ -239,4 +252,46 @@ 1.54 (funcall register) 1.55 (message "Don't forget to put \\usepackage{%s} yourself later" 1.56 (car (car pkglist)))) ;doing car car is negligence... 1.57 - )))))) 1.58 + )))))) 1.59 + 1.60 +(defvar YaTeX::usepackage-alist-private nil 1.61 + "*Private completion list of the argument for usepackage") 1.62 + 1.63 +(defvar YaTeX::usepackage-alist-local nil 1.64 + "Directory local completion list of the argument for usepackage") 1.65 + 1.66 +(defun YaTeX::usepackage (&optional argp) 1.67 + (cond 1.68 + ((equal argp 1) 1.69 + (setq YaTeX-env-name "document") 1.70 + (let ((minibuffer-local-completion-map YaTeX-minibuffer-completion-map) 1.71 + (delim ",")) 1.72 + (YaTeX-cplread-with-learning 1.73 + (if YaTeX-japan "Use package(カンマで区切ってOK): " 1.74 + "Use package(delimitable by comma): ") 1.75 + ;; 'YaTeX::usepackage-alist-default ;; OBSOLETED at 1.82 1.76 + 'YaTeX-package-alist-default 1.77 + 'YaTeX::usepackage-alist-private 1.78 + 'YaTeX::usepackage-alist-local))))) 1.79 + 1.80 + 1.81 +;;; 1.82 +;; Add-ins for auxiliary package handled here 1.83 +;;; 1.84 +(defun YaTeX:floatingfigure () 1.85 + (concat (YaTeX:read-position "rlpv") 1.86 + (YaTeX:read-length "Width: "))) 1.87 + 1.88 +(defvar YaTeX:geometry-default "margin=1.5cm,includeheadfoot,includemp" 1.89 + "*Default options for \\geometry{}") 1.90 +(defun YaTeX::geometry (argp) 1.91 + "Add-in for \\geometry's option" 1.92 + ;; cf. https://dayinthelife.at.webry.info/201401/article_2.html 1.93 + (cond 1.94 + ((= argp 1) 1.95 + (YaTeX-help "geometry") 1.96 + (message "Change default by setting YaTeX:geometry-default") 1.97 + (if (string= YaTeX:geometry-default "") "" 1.98 + YaTeX:geometry-default)))) 1.99 + 1.100 +(provide 'yatexpkg)