comparison yatexpkg.el @ 565:6c09561c22f0 dev

Use YaTeX-package-alist-default for YaTeX::usepackage-alist-default
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 24 Jan 2019 15:16:07 +0900
parents 71697ec66240
children 714f3527b4a1
comparison
equal deleted inserted replaced
564:71697ec66240 565:6c09561c22f0
1 ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- 1 ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*-
2 ;;; 2 ;;;
3 ;;; (c)2003-2018 by HIROSE, Yuuji [yuuji@yatex.org] 3 ;;; (c)2003-2018 by HIROSE, Yuuji [yuuji@yatex.org]
4 ;;; Last modified Thu Jan 24 08:00:20 2019 on firestorm 4 ;;; Last modified Thu Jan 24 14:13:01 2019 on firestorm
5 ;;; $Id$ 5 ;;; $Id$
6 6
7 ;;; Code: 7 ;;; Code:
8 (defvar YaTeX-package-ams-envs 8 (defvar YaTeX-package-ams-envs
9 (mapcar 'car YaTeX-ams-env-table)) 9 (mapcar 'car YaTeX-ams-env-table))
38 ("amssymb" (maketitle "leqq" "geqq" "mathbb" "mathfrak" 38 ("amssymb" (maketitle "leqq" "geqq" "mathbb" "mathfrak"
39 "fallingdotseq" "therefore" "because" 39 "fallingdotseq" "therefore" "because"
40 "varDelta" "varTheta" "varLambda" "varXi" "varPi" 40 "varDelta" "varTheta" "varLambda" "varXi" "varPi"
41 "varSigma" "varUpsilon" "varPhi" "varPsi" "varOmega" 41 "varSigma" "varUpsilon" "varPhi" "varPsi" "varOmega"
42 "lll" "ggg")) ;very few. Please tell us! 42 "lll" "ggg")) ;very few. Please tell us!
43 ("latexsym" (maketitle "mho" "Join" "Box" "Diamond" "leadsto"
44 "sqsubset" "sqsupset" "lhd" "unlhd" "rhd" "unrhd"))
43 ("mathrsfs" (section "mathscr")) 45 ("mathrsfs" (section "mathscr"))
44 ("graphicx" (section "includegraphics" 46 ("graphicx" (section "includegraphics"
45 "rotatebox" "scalebox" "resizebox" "reflectbox") 47 "rotatebox" "scalebox" "resizebox" "reflectbox")
46 (option . YaTeX-package-graphics-driver-alist)) 48 (option . YaTeX-package-graphics-driver-alist))
49 ("xymtex" (section "Ycyclohexaneh")) ;;XXX we need more and more...
50 ("chemist" nil) ;;XXX we need completions...
51 ("a4j" nil)
52 ("array" nil)
53 ("times" nil)
54 ("newtx" nil)
55 ("makeidx" nil)
56 ("geometry" (section "geometry"))
57 ("lscape" (env "landscape"))
58 ("path" (section "path"))
59 ("epsf" (section "epsfbox"))
60 ("epsfig" (section "epsfig"))
61 ("floatflt" (env "floatingfigure"))
62 ("type1cm" (section "fontsize"))
47 ("svg" (section "includesvg")) 63 ("svg" (section "includesvg"))
48 ("color" (section "textcolor" "colorbox" "pagecolor" "color") 64 ("color" (section "textcolor" "colorbox" "pagecolor" "color")
49 (option . YaTeX-package-graphics-driver-alist) 65 (option . YaTeX-package-graphics-driver-alist)
50 (default-option . "usenames,dvipsnames")) 66 (default-option . "usenames,dvipsnames"))
51 ("xcolor" (same-as . "color")) 67 ("xcolor" (same-as . "color"))
52 ("ulem" (section "uline" "uuline" "uwave") 68 ("ulem" (section "uline" "uuline" "uwave")
53 (option ("normalem"))) 69 (option ("normalem")))
54 ("multicol" (env "multicols")) 70 ("multicol" (env "multicols"))
55 ("cref" (section "cleveref")) 71 ("cleveref" (section "cref" "crefrange" "cpageref" "labelcref"
56 ("crefrange" (same-as . "cref")) 72 "labelpageref"))
57 ("cpageref" (same-as . "cref"))
58 ("labelcref" (same-as . "cref"))
59 ("labelcpageref" (same-as . "cref"))
60 ("wrapfig" (env "wrapfigure" "wraptable")) 73 ("wrapfig" (env "wrapfigure" "wraptable"))
61 ("setspace" (env "spacing") (section "setstretch")) 74 ("setspace" (env "spacing") (section "setstretch"))
62 ("cases" (env "numcases" "subnumcases")) 75 ("cases" (env "numcases" "subnumcases"))
63 ("subfigure" (section "subfigure")) 76 ("subfigure" (section "subfigure"))
64 ("okumacro" (section "ruby" "kenten")) 77 ("okumacro" (section "ruby" "kenten"))
237 option pkg macro)) 250 option pkg macro))
238 (funcall register)) 251 (funcall register))
239 (funcall register) 252 (funcall register)
240 (message "Don't forget to put \\usepackage{%s} yourself later" 253 (message "Don't forget to put \\usepackage{%s} yourself later"
241 (car (car pkglist)))) ;doing car car is negligence... 254 (car (car pkglist)))) ;doing car car is negligence...
242 )))))) 255 ))))))
256
257 (defvar YaTeX::usepackage-alist-private nil
258 "*Private completion list of the argument for usepackage")
259
260 (defvar YaTeX::usepackage-alist-local nil
261 "Directory local completion list of the argument for usepackage")
262
263 (defun YaTeX::usepackage (&optional argp)
264 (cond
265 ((equal argp 1)
266 (setq YaTeX-env-name "document")
267 (let ((minibuffer-local-completion-map YaTeX-minibuffer-completion-map)
268 (delim ","))
269 (YaTeX-cplread-with-learning
270 (if YaTeX-japan "Use package(カンマで区切ってOK): "
271 "Use package(delimitable by comma): ")
272 ;; 'YaTeX::usepackage-alist-default ;; OBSOLETED at 1.82
273 'YaTeX-package-alist-default
274 'YaTeX::usepackage-alist-private
275 'YaTeX::usepackage-alist-local)))))
276
277
278 ;;;
279 ;; Add-ins for auxiliary package handled here
280 ;;;
281 (defun YaTeX:floatingfigure ()
282 (concat (YaTeX:read-position "rlpv")
283 (YaTeX:read-length "Width: ")))
284
285 (defvar YaTeX:geometry-default "margin=1.5cm,includeheadfoot,includemp"
286 "*Default options for \\geometry{}")
287 (defun YaTeX::geometry (argp)
288 "Add-in for \\geometry's option"
289 ;; cf. https://dayinthelife.at.webry.info/201401/article_2.html
290 (cond
291 ((= argp 1)
292 (YaTeX-help "geometry")
293 (message "Change default by setting YaTeX:geometry-default")
294 (if (string= YaTeX:geometry-default "") ""
295 YaTeX:geometry-default))))
296
297 (provide 'yatexpkg)

yatex.org