yatex
changeset 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 | 2ef9f21dd13b |
files | help/YATEXHLP.eng help/YATEXHLP.jp yatex.el yatexadd.el yatexpkg.el |
diffstat | 5 files changed, 131 insertions(+), 41 deletions(-) [+] |
line diff
1.1 --- a/help/YATEXHLP.eng Thu Jan 24 08:03:47 2019 +0900 1.2 +++ b/help/YATEXHLP.eng Thu Jan 24 15:16:07 2019 +0900 1.3 @@ -1788,6 +1788,36 @@ 1.4 \textbackslash 1.5 backslash(\) itself. 1.6 1.7 +geometry 1.8 +\geometry{params...} or \usepackage[params...]{geometry} 1.9 +From: geometry-samples.tex 1.10 +See below as examples: 1.11 + 1.12 +\geometry{centering} 1.13 +\geometry{width=10cm,vscale=.7} 1.14 +\geometry{margin=1cm, papersize={12cm,19cm}, resetpaper} 1.15 +\geometry{margin=1cm,includeheadfoot} 1.16 +\geometry{margin=1cm,includeheadfoot,includemp} 1.17 +\geometry{margin=1cm,bindingoffset=1cm,twoside} 1.18 +\geometry{hmarginratio=2:1, vmargin=2cm} 1.19 +\geometry{hscale=0.5,twoside} 1.20 +\geometry{hscale=0.5,asymmetric} 1.21 +\geometry{hscale=0.5,heightrounded} 1.22 +\geometry{left=1cm,right=4cm,top=2cm,includefoot} 1.23 +\geometry{lines=20,left=2cm,right=6cm,top=2cm,twoside} 1.24 +\geometry{width=15cm, marginparwidth=3cm, includemp} 1.25 +\geometry{hdivide={1cm,,2cm}, vdivide={3cm,8in,}, nohead} 1.26 +\geometry{headsep=20pt, head=40pt,foot=20pt,includeheadfoot} 1.27 +\geometry{text={6in,8in}, top=2cm, left=2cm} 1.28 +\geometry{centering,includemp,twoside,landscape} 1.29 +\geometry{mag=1414,margin=2cm} 1.30 +\geometry{mag=1414,margin=2truecm,truedimen} 1.31 +\geometry{a5paper, landscape, twocolumn, twoside, 1.32 + left=2cm, hmarginratio=2:1, includemp, marginparwidth=43pt, 1.33 + bottom=1cm, foot=.7cm, includefoot, textheight=11cm, heightrounded, 1.34 + columnsep=1cm,verbose} 1.35 + 1.36 + 1.37 YaTeX 1.38 (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist)) 1.39 The mode you are probably using now.
2.1 --- a/help/YATEXHLP.jp Thu Jan 24 08:03:47 2019 +0900 2.2 +++ b/help/YATEXHLP.jp Thu Jan 24 15:16:07 2019 +0900 2.3 @@ -1805,6 +1805,35 @@ 2.4 \textbackslash 2.5 バックスラッシュそのもの 2.6 2.7 +geometry 2.8 +\geometry{params...} or \usepackage[params...]{geometry} 2.9 +From: geometry-samples.tex 2.10 +以下を参考に: 2.11 + 2.12 +\geometry{centering} 2.13 +\geometry{width=10cm,vscale=.7} 2.14 +\geometry{margin=1cm, papersize={12cm,19cm}, resetpaper} 2.15 +\geometry{margin=1cm,includeheadfoot} 2.16 +\geometry{margin=1cm,includeheadfoot,includemp} 2.17 +\geometry{margin=1cm,bindingoffset=1cm,twoside} 2.18 +\geometry{hmarginratio=2:1, vmargin=2cm} 2.19 +\geometry{hscale=0.5,twoside} 2.20 +\geometry{hscale=0.5,asymmetric} 2.21 +\geometry{hscale=0.5,heightrounded} 2.22 +\geometry{left=1cm,right=4cm,top=2cm,includefoot} 2.23 +\geometry{lines=20,left=2cm,right=6cm,top=2cm,twoside} 2.24 +\geometry{width=15cm, marginparwidth=3cm, includemp} 2.25 +\geometry{hdivide={1cm,,2cm}, vdivide={3cm,8in,}, nohead} 2.26 +\geometry{headsep=20pt, head=40pt,foot=20pt,includeheadfoot} 2.27 +\geometry{text={6in,8in}, top=2cm, left=2cm} 2.28 +\geometry{centering,includemp,twoside,landscape} 2.29 +\geometry{mag=1414,margin=2cm} 2.30 +\geometry{mag=1414,margin=2truecm,truedimen} 2.31 +\geometry{a5paper, landscape, twocolumn, twoside, 2.32 + left=2cm, hmarginratio=2:1, includemp, marginparwidth=43pt, 2.33 + bottom=1cm, foot=.7cm, includefoot, textheight=11cm, heightrounded, 2.34 + columnsep=1cm,verbose} 2.35 + 2.36 FILTER 2.37 %#BEGIN FILTER{OUTPUT}{COMMANDLINE} ... %#END 2.38 \if0 から \fi までに囲まれた領域、もしくは %#SRC{...} で指定されたファイルを
3.1 --- a/yatex.el Thu Jan 24 08:03:47 2019 +0900 3.2 +++ b/yatex.el Thu Jan 24 15:16:07 2019 +0900 3.3 @@ -1,6 +1,6 @@ 3.4 ;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*- 3.5 ;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] 3.6 -;;; Last modified Thu Jan 24 08:00:29 2019 on firestorm 3.7 +;;; Last modified Thu Jan 24 15:14:47 2019 on firestorm 3.8 ;;; $Id$ 3.9 ;;; The latest version of this software is always available at; 3.10 ;;; https://www.yatex.org/ 3.11 @@ -326,6 +326,7 @@ 3.12 ("frametitle") ("framesubtitle") ;; beamer 3.13 ("subfigure") ;; subfigure 3.14 ("ruby" 2) ("kenten") ;; okumacro 3.15 + ("geometry") ("path") 3.16 ) 3.17 (if YaTeX-use-LaTeX2e 3.18 '(("documentclass") ("usepackage") 3.19 @@ -398,9 +399,8 @@ 3.20 ("eqnarray") ("eqnarray*") ("figure") ("equation") ("equation*") 3.21 ("abstract") ("array") 3.22 ("thebibliography") ("theindex") ("flushleft") ("flushright") 3.23 - ("minipage") 3.24 - ("supertabular") 3.25 - ("wrapfigure") ("wraptable") 3.26 + ("minipage") ("landscape") 3.27 + ("supertabular") ("floatingfigure") ("wrapfigure") ("wraptable") 3.28 ("frame") ("block") ("example") ("columns") ("column") ;beamer 3.29 ) 3.30 (if YaTeX-use-LaTeX2e
4.1 --- a/yatexadd.el Thu Jan 24 08:03:47 2019 +0900 4.2 +++ b/yatexadd.el Thu Jan 24 15:16:07 2019 +0900 4.3 @@ -1,6 +1,6 @@ 4.4 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- 4.5 ;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] 4.6 -;;; Last modified Wed Jan 16 08:23:13 2019 on firestorm 4.7 +;;; Last modified Thu Jan 24 13:57:49 2019 on firestorm 4.8 ;;; $Id$ 4.9 4.10 ;;; Code: 4.11 @@ -2040,8 +2040,7 @@ 4.12 (format "%s=%s" s (symbol-value s))))) 4.13 '(width height scale angle))) 4.14 ",")) 4.15 - (if (string= "" str) "" 4.16 - (concat "[" str "]")))) 4.17 + (concat "{" str "}"))) 4.18 4.19 (defvar YaTeX::get-boundingbox-cmd YaTeX-cmd-gs 4.20 "Command to get bounding box from PDF files. 4.21 @@ -2148,34 +2147,11 @@ 4.22 ((= argp 1) (YaTeX-read-string-or-skip "Kanji: ")) 4.23 ((= argp 2) (YaTeX-read-string-or-skip "Yomi: ")))) 4.24 4.25 -(defvar YaTeX::usepackage-alist-default 4.26 - '(("version") ("plext") ("url") ("fancybox") ("pifont") ("longtable") 4.27 - ("ascmac") ("bm") ("graphics") ("graphicx") ("alltt") ("misc") ("eclbkbox") 4.28 - ("amsmath") ("amssymb") ("xymtex") ("chemist") 4.29 - ("a4j") ("array") ("epsf") ("color") ("xcolor") ("epsfig") ("floatfig") 4.30 - ("landscape") ("path") ("supertabular") ("twocolumn") 4.31 - ("latexsym") ("times") ("makeidx") ("geometry") ("type1cm") 4.32 - ("subfigure") ("okumacro")) 4.33 - "Default completion table for arguments of \\usepackage") 4.34 +;;(require 'yatexpkg) 4.35 +(autoload 'YaTeX::usepackage "yatexpkg" "Add-in for \\usepackage{}") 4.36 +;;; (defun YaTeX::usepackage()...) MOVED to yatexpkg.el 4.37 +;;; See yatexpkg.el 4.38 4.39 -(defvar YaTeX::usepackage-alist-private nil 4.40 - "*Private completion list of the argument for usepackage") 4.41 - 4.42 -(defvar YaTeX::usepackage-alist-local nil 4.43 - "Directory local completion list of the argument for usepackage") 4.44 - 4.45 -(defun YaTeX::usepackage (&optional argp) 4.46 - (cond 4.47 - ((equal argp 1) 4.48 - (setq YaTeX-env-name "document") 4.49 - (let ((minibuffer-local-completion-map YaTeX-minibuffer-completion-map) 4.50 - (delim ",")) 4.51 - (YaTeX-cplread-with-learning 4.52 - (if YaTeX-japan "Use package(カンマで区切ってOK): " 4.53 - "Use package(delimitable by comma): ") 4.54 - 'YaTeX::usepackage-alist-default 4.55 - 'YaTeX::usepackage-alist-private 4.56 - 'YaTeX::usepackage-alist-local))))) 4.57 4.58 (defun YaTeX::mask (argp) 4.59 (cond
5.1 --- a/yatexpkg.el Thu Jan 24 08:03:47 2019 +0900 5.2 +++ b/yatexpkg.el Thu Jan 24 15:16:07 2019 +0900 5.3 @@ -1,7 +1,7 @@ 5.4 ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*- 5.5 ;;; 5.6 ;;; (c)2003-2018 by HIROSE, Yuuji [yuuji@yatex.org] 5.7 -;;; Last modified Thu Jan 24 08:00:20 2019 on firestorm 5.8 +;;; Last modified Thu Jan 24 14:13:01 2019 on firestorm 5.9 ;;; $Id$ 5.10 5.11 ;;; Code: 5.12 @@ -40,10 +40,26 @@ 5.13 "varDelta" "varTheta" "varLambda" "varXi" "varPi" 5.14 "varSigma" "varUpsilon" "varPhi" "varPsi" "varOmega" 5.15 "lll" "ggg")) ;very few. Please tell us! 5.16 + ("latexsym" (maketitle "mho" "Join" "Box" "Diamond" "leadsto" 5.17 + "sqsubset" "sqsupset" "lhd" "unlhd" "rhd" "unrhd")) 5.18 ("mathrsfs" (section "mathscr")) 5.19 ("graphicx" (section "includegraphics" 5.20 "rotatebox" "scalebox" "resizebox" "reflectbox") 5.21 (option . YaTeX-package-graphics-driver-alist)) 5.22 + ("xymtex" (section "Ycyclohexaneh")) ;;XXX we need more and more... 5.23 + ("chemist" nil) ;;XXX we need completions... 5.24 + ("a4j" nil) 5.25 + ("array" nil) 5.26 + ("times" nil) 5.27 + ("newtx" nil) 5.28 + ("makeidx" nil) 5.29 + ("geometry" (section "geometry")) 5.30 + ("lscape" (env "landscape")) 5.31 + ("path" (section "path")) 5.32 + ("epsf" (section "epsfbox")) 5.33 + ("epsfig" (section "epsfig")) 5.34 + ("floatflt" (env "floatingfigure")) 5.35 + ("type1cm" (section "fontsize")) 5.36 ("svg" (section "includesvg")) 5.37 ("color" (section "textcolor" "colorbox" "pagecolor" "color") 5.38 (option . YaTeX-package-graphics-driver-alist) 5.39 @@ -52,11 +68,8 @@ 5.40 ("ulem" (section "uline" "uuline" "uwave") 5.41 (option ("normalem"))) 5.42 ("multicol" (env "multicols")) 5.43 - ("cref" (section "cleveref")) 5.44 - ("crefrange" (same-as . "cref")) 5.45 - ("cpageref" (same-as . "cref")) 5.46 - ("labelcref" (same-as . "cref")) 5.47 - ("labelcpageref" (same-as . "cref")) 5.48 + ("cleveref" (section "cref" "crefrange" "cpageref" "labelcref" 5.49 + "labelpageref")) 5.50 ("wrapfig" (env "wrapfigure" "wraptable")) 5.51 ("setspace" (env "spacing") (section "setstretch")) 5.52 ("cases" (env "numcases" "subnumcases")) 5.53 @@ -239,4 +252,46 @@ 5.54 (funcall register) 5.55 (message "Don't forget to put \\usepackage{%s} yourself later" 5.56 (car (car pkglist)))) ;doing car car is negligence... 5.57 - )))))) 5.58 + )))))) 5.59 + 5.60 +(defvar YaTeX::usepackage-alist-private nil 5.61 + "*Private completion list of the argument for usepackage") 5.62 + 5.63 +(defvar YaTeX::usepackage-alist-local nil 5.64 + "Directory local completion list of the argument for usepackage") 5.65 + 5.66 +(defun YaTeX::usepackage (&optional argp) 5.67 + (cond 5.68 + ((equal argp 1) 5.69 + (setq YaTeX-env-name "document") 5.70 + (let ((minibuffer-local-completion-map YaTeX-minibuffer-completion-map) 5.71 + (delim ",")) 5.72 + (YaTeX-cplread-with-learning 5.73 + (if YaTeX-japan "Use package(カンマで区切ってOK): " 5.74 + "Use package(delimitable by comma): ") 5.75 + ;; 'YaTeX::usepackage-alist-default ;; OBSOLETED at 1.82 5.76 + 'YaTeX-package-alist-default 5.77 + 'YaTeX::usepackage-alist-private 5.78 + 'YaTeX::usepackage-alist-local))))) 5.79 + 5.80 + 5.81 +;;; 5.82 +;; Add-ins for auxiliary package handled here 5.83 +;;; 5.84 +(defun YaTeX:floatingfigure () 5.85 + (concat (YaTeX:read-position "rlpv") 5.86 + (YaTeX:read-length "Width: "))) 5.87 + 5.88 +(defvar YaTeX:geometry-default "margin=1.5cm,includeheadfoot,includemp" 5.89 + "*Default options for \\geometry{}") 5.90 +(defun YaTeX::geometry (argp) 5.91 + "Add-in for \\geometry's option" 5.92 + ;; cf. https://dayinthelife.at.webry.info/201401/article_2.html 5.93 + (cond 5.94 + ((= argp 1) 5.95 + (YaTeX-help "geometry") 5.96 + (message "Change default by setting YaTeX:geometry-default") 5.97 + (if (string= YaTeX:geometry-default "") "" 5.98 + YaTeX:geometry-default)))) 5.99 + 5.100 +(provide 'yatexpkg)