changeset 580:89a13c59674f

Merged to default branch
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 26 Dec 2019 13:27:55 +0859
parents 70bb775b481c (current diff) b9ba8aacbea6 (diff)
children 995282fc8bf5
files
diffstat 11 files changed, 187 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Nov 25 21:09:06 2019 +0900
+++ b/.hgtags	Thu Dec 26 13:27:55 2019 +0859
@@ -21,3 +21,4 @@
 a2bb2426a15410438d5e5917ce939bd4bbbe8194 yatex-1.80
 ca7cf34e959cc35960081f25b0f903b1bd2a191f master-beginning
 fbb636ff0fe3fd784af7697db5805a20d33b04d2 yatex-1.81
+4dad5f91b26cb44a8caa888fe8aa0aad1f1f10bb yatex-1.82
--- a/help/YATEXHLP.eng	Mon Nov 25 21:09:06 2019 +0900
+++ b/help/YATEXHLP.eng	Thu Dec 26 13:27:55 2019 +0859
@@ -1788,6 +1788,36 @@
 \textbackslash
 backslash(\) itself.
 
+geometry
+\geometry{params...}   or   \usepackage[params...]{geometry}
+From: geometry-samples.tex
+See below as examples:
+
+\geometry{centering}
+\geometry{width=10cm,vscale=.7}
+\geometry{margin=1cm, papersize={12cm,19cm}, resetpaper}
+\geometry{margin=1cm,includeheadfoot}
+\geometry{margin=1cm,includeheadfoot,includemp}
+\geometry{margin=1cm,bindingoffset=1cm,twoside}
+\geometry{hmarginratio=2:1, vmargin=2cm}
+\geometry{hscale=0.5,twoside}
+\geometry{hscale=0.5,asymmetric}
+\geometry{hscale=0.5,heightrounded}
+\geometry{left=1cm,right=4cm,top=2cm,includefoot}
+\geometry{lines=20,left=2cm,right=6cm,top=2cm,twoside}
+\geometry{width=15cm, marginparwidth=3cm, includemp}
+\geometry{hdivide={1cm,,2cm}, vdivide={3cm,8in,}, nohead}
+\geometry{headsep=20pt, head=40pt,foot=20pt,includeheadfoot}
+\geometry{text={6in,8in}, top=2cm, left=2cm}
+\geometry{centering,includemp,twoside,landscape}
+\geometry{mag=1414,margin=2cm}
+\geometry{mag=1414,margin=2truecm,truedimen}
+\geometry{a5paper, landscape, twocolumn, twoside,
+   left=2cm, hmarginratio=2:1, includemp, marginparwidth=43pt,
+   bottom=1cm, foot=.7cm, includefoot, textheight=11cm, heightrounded,
+   columnsep=1cm,verbose}
+
+	  
 YaTeX
 (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist))
 The mode you are probably using now.
--- a/help/YATEXHLP.jp	Mon Nov 25 21:09:06 2019 +0900
+++ b/help/YATEXHLP.jp	Thu Dec 26 13:27:55 2019 +0859
@@ -1805,6 +1805,35 @@
 \textbackslash
 バックスラッシュそのもの
 
+geometry
+\geometry{params...}   or   \usepackage[params...]{geometry}
+From: geometry-samples.tex
+以下を参考に:
+
+\geometry{centering}
+\geometry{width=10cm,vscale=.7}
+\geometry{margin=1cm, papersize={12cm,19cm}, resetpaper}
+\geometry{margin=1cm,includeheadfoot}
+\geometry{margin=1cm,includeheadfoot,includemp}
+\geometry{margin=1cm,bindingoffset=1cm,twoside}
+\geometry{hmarginratio=2:1, vmargin=2cm}
+\geometry{hscale=0.5,twoside}
+\geometry{hscale=0.5,asymmetric}
+\geometry{hscale=0.5,heightrounded}
+\geometry{left=1cm,right=4cm,top=2cm,includefoot}
+\geometry{lines=20,left=2cm,right=6cm,top=2cm,twoside}
+\geometry{width=15cm, marginparwidth=3cm, includemp}
+\geometry{hdivide={1cm,,2cm}, vdivide={3cm,8in,}, nohead}
+\geometry{headsep=20pt, head=40pt,foot=20pt,includeheadfoot}
+\geometry{text={6in,8in}, top=2cm, left=2cm}
+\geometry{centering,includemp,twoside,landscape}
+\geometry{mag=1414,margin=2cm}
+\geometry{mag=1414,margin=2truecm,truedimen}
+\geometry{a5paper, landscape, twocolumn, twoside,
+   left=2cm, hmarginratio=2:1, includemp, marginparwidth=43pt,
+   bottom=1cm, foot=.7cm, includefoot, textheight=11cm, heightrounded,
+   columnsep=1cm,verbose}
+
 FILTER
 %#BEGIN FILTER{OUTPUT}{COMMANDLINE}  ... %#END
 \if0 から \fi までに囲まれた領域、もしくは %#SRC{...} で指定されたファイルを
--- a/yahtml.el	Mon Nov 25 21:09:06 2019 +0900
+++ b/yahtml.el	Thu Dec 26 13:27:55 2019 +0859
@@ -1,8 +1,8 @@
 ;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*-
-;;; (c) 1994-2017 by HIROSE Yuuji [yuuji(@)yatex.org]
+;;; (c) 1994-2019 by HIROSE Yuuji [yuuji(@)yatex.org]
 ;;; $Id$
 
-(defconst yahtml-revision-number "1.80"
+(defconst yahtml-revision-number "1.80.1"
   "Revision number of running yahtml.el")
 
 ;;; Commentary:
@@ -361,6 +361,7 @@
       (yahtml-define-begend-key "bb" "body" map)
       (yahtml-define-begend-key "bc" "center" map)
       (yahtml-define-begend-key "bd" "dl" map)
+      (yahtml-define-begend-key "bD" "div" map)
       (yahtml-define-begend-key "bu" "ul" map)
       (yahtml-define-begend-key "bo" "ol" map)
       (yahtml-define-begend-key "b1" "h1" map)
@@ -373,6 +374,7 @@
       (yahtml-define-begend-key "bv" "div" map)
       (yahtml-define-begend-key "bS" "span" map)
       (yahtml-define-begend-key "bp" "pre" map)
+      (yahtml-define-begend-key "bq" "blockquote" map)
       (YaTeX-define-key "b " 'yahtml-insert-begend map)
       (YaTeX-define-key "B " 'yahtml-insert-begend-region map))
     (YaTeX-define-key "e" 'YaTeX-end-environment map)
@@ -1082,6 +1084,8 @@
 	(ask (eq yahtml-escape-chars 'ask)))
     (cond
      ((null yahtml-escape-chars) str)
+     ((string-match "%[0-9A-F][0-9A-F]%[0-9A-F][0-9A-F]%[0-9A-F][0-9A-F]" str)
+      str)
      (t
       (while (and (string< "" str)
 		  (setq p (string-match yahtml-unsafe-chars-regexp str)))
--- a/yatex.el	Mon Nov 25 21:09:06 2019 +0900
+++ b/yatex.el	Thu Dec 26 13:27:55 2019 +0859
@@ -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 Tue Dec 25 20:03:02 2018 on firestorm
+;;; (c)1991-2019 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; Last modified Thu Dec 26 12:46:41 2019 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.81.1"
+(defconst YaTeX-revision-number "1.82"
   "Revision number of running yatex.el")
 
 ;---------- Local variables ----------
@@ -204,7 +204,7 @@
   "*Regexp of verb family.  Do not contain preceding \\\\ nor \\(\\).")
 (defvar YaTeX-fill-inhibit-environments
   (append '("tabular" "tabular*" "array" "picture" "eqnarray" "eqnarray*"
-	    "longtable"
+	    "longtable" "tabularx"
 	    "equation" "equation*" "math" "displaymath")
 	  YaTeX-verbatim-environments)
   "*In these environments, YaTeX inhibits fill-paragraph from formatting.
@@ -218,7 +218,7 @@
   "*Regexp of environments for equations")
 (defvar YaTeX-array-env-regexp
   (concat
-   "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabular\\*?\\|"	;LaTeX
+   "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabularx?\\*?\\|"	;LaTeX
    "longtable\\|"						;LaTeX2e
    "matrix\\|pmatrix\\|bmatrix\\|vmatrix\\|Vmatrix\\|"		;AMS-LaTeX
    "align\\*?\\|split\\*?\\|aligned\\*?\\|alignat\\*?\\|"	;AMS-LaTeX
@@ -326,6 +326,7 @@
      ("frametitle") ("framesubtitle") 				;; beamer
      ("subfigure")						;; subfigure
      ("ruby" 2) ("kenten")					;; okumacro
+     ("geometry") ("path")
      )
    (if YaTeX-use-LaTeX2e
        '(("documentclass") ("usepackage")
@@ -398,10 +399,10 @@
      ("eqnarray") ("eqnarray*") ("figure") ("equation") ("equation*")
      ("abstract") ("array")
      ("thebibliography") ("theindex") ("flushleft") ("flushright")
-     ("minipage")
-     ("supertabular")
-     ("wrapfigure") ("wraptable")
+     ("minipage") ("landscape")
+     ("supertabular") ("floatingfigure") ("wrapfigure") ("wraptable")
      ("frame") ("block") ("example") ("columns") ("column")	;beamer
+     ("tabularx")
      )
    (if YaTeX-use-LaTeX2e
        '(("comment")			;defined in version
@@ -451,6 +452,7 @@
    '(("maketitle") ("makeindex") ("sloppy") ("protect") ("par") ("and")
      ("LaTeX") ("TeX") ("item") ("item[]") ("appendix") ("hline") ("kill")
      ;;("rightarrow") ("Rightarrow") ("leftarrow") ("Leftarrow")
+     ("onecolumn") ("twocolumn")
      ("pagebreak") ("nopagebreak") ("tableofcontents")
      ("newpage") ("clearpage") ("cleardoublepage")
      ("footnotemark") ("verb") ("verb*")
@@ -554,6 +556,7 @@
     (YaTeX-define-begend-key "bD" "description")
     (YaTeX-define-begend-key "be" "enumerate")
     (YaTeX-define-begend-key "bE" "equation")
+    (YaTeX-define-begend-key "bf" "figure")
     (YaTeX-define-begend-key "bi" "itemize")
     (YaTeX-define-begend-key "bl" "flushleft")
     (YaTeX-define-begend-key "bm" "minipage")
--- a/yatex.new	Mon Nov 25 21:09:06 2019 +0900
+++ b/yatex.new	Thu Dec 26 13:27:55 2019 +0859
@@ -1,6 +1,14 @@
 	What's new in YaTeX/yahtml
 	野鳥/yahtml - 各バージョンの変更点について
 
+1.82	== yatex ==
+	YaTeX::usepackage-alist-default を廃止し、
+	YaTeX-package-alist-default を利用するようにした。
+	tabularx等対応。
+	PDFまで生成できたときは .log, .dvi ファイルを消すようにした。
+	== yahtml ==
+	URLエンコード混みと思しきURLは再エンコードしないようにした。
+
 1.81	emacs-26 の主要関数の仕様変更に対応。
 	== yatex ==
 	タイプセットコマンド定義中の %k を漢字コード名に変換(-kanji=%k)
--- a/yatexadd.el	Mon Nov 25 21:09:06 2019 +0900
+++ b/yatexadd.el	Thu Dec 26 13:27:55 2019 +0859
@@ -1,6 +1,6 @@
 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*-
-;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Wed Nov  7 09:01:08 2018 on firestorm
+;;; (c)1991-2019 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; Last modified Thu Oct 17 09:44:48 2019 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -22,8 +22,8 @@
 Notice that this function refers the let-variable `env' in
 YaTeX-make-begin-end."
   (let ((width "") bars (rule "") (and "") (j 1) loc ans (hline "\\hline"))
-    (if (string= YaTeX-env-name "tabular*")
-	(setq width (concat "{" (YaTeX:read-length "Width: ") "}")))
+    (if (string-match "tabular[*x]" YaTeX-env-name)
+	(setq width (concat "{" (YaTeX:read-length "Table Width: ") "}")))
     (setq loc (YaTeX:read-position "tb")
 	  bars (YaTeX-str2int
 		(YaTeX-read-string-or-skip
@@ -57,6 +57,7 @@
 
 (fset 'YaTeX:tabular* 'YaTeX:tabular)
 (fset 'YaTeX:supertabular 'YaTeX:tabular)
+(fset 'YaTeX:tabularx 'YaTeX:tabular)
 (defun YaTeX:alignat ()
   (concat "{" (read-string-with-history "Number of columns: ") "}"))
 (defun YaTeX:array ()
@@ -1887,7 +1888,7 @@
   "*User defined documentclass alist")
 (defvar YaTeX:documentclasses-local nil
   "*User defined local documentclass alist")
-(defvar YaTeX-default-documentclass (if YaTeX-japan "jarticle" "article")
+(defvar YaTeX-default-documentclass (if YaTeX-japan "jsarticle" "article")
   "*Default documentclass")
 
 (defun YaTeX::documentclass (&optional argp)
@@ -2148,34 +2149,11 @@
    ((= argp 1) (YaTeX-read-string-or-skip "Kanji: ")) 
    ((= argp 2) (YaTeX-read-string-or-skip "Yomi: "))))
 
-(defvar YaTeX::usepackage-alist-default
-  '(("version") ("plext") ("url") ("fancybox") ("pifont") ("longtable")
-    ("ascmac") ("bm") ("graphics") ("graphicx") ("alltt") ("misc") ("eclbkbox")
-    ("amsmath") ("amssymb") ("xymtex") ("chemist")
-    ("a4j") ("array") ("epsf") ("color") ("xcolor") ("epsfig") ("floatfig")
-    ("landscape") ("path") ("supertabular") ("twocolumn")
-    ("latexsym") ("times") ("makeidx") ("geometry") ("type1cm")
-    ("subfigure") ("okumacro"))
-  "Default completion table for arguments of \\usepackage")
-
-(defvar YaTeX::usepackage-alist-private nil
-  "*Private completion list of the argument for usepackage")
+;;(require 'yatexpkg)
+(autoload 'YaTeX::usepackage "yatexpkg" "Add-in for \\usepackage{}")
+;;; (defun YaTeX::usepackage()...) MOVED to yatexpkg.el
+;;; See yatexpkg.el
 
-(defvar YaTeX::usepackage-alist-local nil
-  "Directory local  completion list of the argument for usepackage")
-
-(defun YaTeX::usepackage (&optional argp)
-  (cond
-   ((equal argp 1)
-    (setq YaTeX-env-name "document")
-    (let ((minibuffer-local-completion-map YaTeX-minibuffer-completion-map)
-	  (delim ","))
-      (YaTeX-cplread-with-learning
-       (if YaTeX-japan "Use package(カンマで区切ってOK): "
-	 "Use package(delimitable by comma): ")
-       'YaTeX::usepackage-alist-default
-       'YaTeX::usepackage-alist-private
-       'YaTeX::usepackage-alist-local)))))
 
 (defun YaTeX::mask (argp)
   (cond
@@ -2395,6 +2373,10 @@
    (t nil)))
 (fset 'YaTeX:it 'YaTeX:em)
 
+;;; twocolumn
+(defun YaTeX:twocolumn ()
+  (format "[%s]" (YaTeX-read-string-or-skip "One column paragraph: ")))
+
 ;;; -------------------- End of yatexadd --------------------
 (provide 'yatexadd)
 ; Local variables:
--- a/yatexenv.el	Mon Nov 25 21:09:06 2019 +0900
+++ b/yatexenv.el	Thu Dec 26 13:27:55 2019 +0859
@@ -1,6 +1,6 @@
 ;;; yatexenv.el --- YaTeX environment-specific functions
-;;; (c) 1994-2017 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sun Sep 17 10:23:16 2017 on firestorm
+;;; (c) 1994-2019 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; Last modified Sat May 25 14:46:33 2019 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -89,7 +89,7 @@
     (while (< (point) end)
 	(setq elt (following-char))
 	(cond
-	 ((string-match (char-to-string elt) "clr") ;normal indicators.
+	 ((string-match (char-to-string elt) "clrX") ;normal indicators.
 	  (setq cols (1+ cols))
 	  (forward-char 1))
 	 ((equal elt ?|)		;vertical
@@ -174,6 +174,7 @@
 (fset 'YaTeX-intelligent-newline-array 'YaTeX-intelligent-newline-tabular)
 (fset 'YaTeX-intelligent-newline-supertabular 'YaTeX-intelligent-newline-tabular)
 (fset 'YaTeX-intelligent-newline-longtable 'YaTeX-intelligent-newline-tabular)
+(fset 'YaTeX-intelligent-newline-tabularx 'YaTeX-intelligent-newline-tabular*)
 
 (defun YaTeX-intelligent-newline-align ()
   "Intelligent newline function for align.
--- a/yatexlib.el	Mon Nov 25 21:09:06 2019 +0900
+++ b/yatexlib.el	Thu Dec 26 13:27:55 2019 +0859
@@ -1,7 +1,7 @@
 ;;; yatexlib.el --- YaTeX and yahtml common libraries -*- coding: sjis -*-
 ;;; 
-;;; (c)1994-2018 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Wed May 23 07:59:08 2018 on firestorm
+;;; (c)1994-2019 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; Last modified Thu Dec 26 12:47:45 2019 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -130,7 +130,9 @@
     (let ((coding
 	   (cond
 	    ((boundp 'buffer-file-coding-system)
-	     (symbol-name buffer-file-coding-system))
+	     (symbol-name (if (fboundp 'coding-system-name)
+			      (coding-system-name buffer-file-coding-system)
+			    buffer-file-coding-system)))
 	    ((boundp 'file-coding-system) (symbol-name file-coding-system))))
 	  (case-fold-search t))
       (cond ((string-match "utf-8\\>" coding)			"utf8")
@@ -1116,8 +1118,8 @@
 		  regexp (format "\\(%s%s\\)\\|\\(%s%s\\)"
 				 YaTeX-ec-regexp
 				 (regexp-quote
-				  (cdr (assq env '((?( . ")") (?) . "(")
-						   (?[ . "]") (?] . "[")))))
+				  (cdr (assq env '((?\( . ")") (?\) . "(")
+						   (?\[ . "]") (?\] . "[")))))
 				 YaTeX-ec-regexp
 				 (regexp-quote (char-to-string env)))
 		  re-s (if (memq env '(?\( ?\[))
--- a/yatexpkg.el	Mon Nov 25 21:09:06 2019 +0900
+++ b/yatexpkg.el	Thu Dec 26 13:27:55 2019 +0859
@@ -1,7 +1,7 @@
 ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*-
 ;;; 
-;;; (c)2003-2018 by HIROSE, Yuuji [yuuji@yatex.org]
-;;; Last modified Wed Nov  7 08:57:36 2018 on firestorm
+;;; (c)2003-2019 by HIROSE, Yuuji [yuuji@yatex.org]
+;;; Last modified Sat May 25 14:46:27 2019 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -30,17 +30,37 @@
     ("verbatim"	(section "verbatiminput"))
     ("eclbkbox"	(env "breakbox"))
     ("supertabular" (env "supertabular"))
+    ("tabularx" (env "tabularx"))
     ("amsmath"	(env . YaTeX-package-ams-envs)
      		(section "tag" "tag*"))
+    ("amsart"	(same-as . "amsmath"))
+    ("amsbook"	(same-as . "amsmath"))
+    ("amsproc"	(same-as . "amsmath"))
     ("amssymb"	(maketitle "leqq" "geqq" "mathbb" "mathfrak"
 			   "fallingdotseq" "therefore" "because"
 			   "varDelta" "varTheta" "varLambda" "varXi" "varPi"
 			   "varSigma" "varUpsilon" "varPhi" "varPsi" "varOmega"
 			   "lll" "ggg")) ;very few.  Please tell us!
+    ("latexsym"	(maketitle "mho" "Join" "Box" "Diamond" "leadsto"
+			   "sqsubset" "sqsupset" "lhd" "unlhd" "rhd" "unrhd"))
     ("mathrsfs"	(section "mathscr"))
     ("graphicx" (section "includegraphics"
 			 "rotatebox" "scalebox" "resizebox" "reflectbox")
      		(option . YaTeX-package-graphics-driver-alist))
+    ("xymtex"	(section "Ycyclohexaneh"))	;;XXX we need more and more...
+    ("chemist"	nil)				;;XXX we need completions...
+    ("a4j"	nil)
+    ("array"	nil)
+    ("times"	nil)
+    ("newtx"	nil)
+    ("makeidx"	nil)
+    ("geometry"	(section "geometry"))
+    ("lscape"	(env "landscape"))
+    ("path"	(section "path"))
+    ("epsf"	(section "epsfbox"))
+    ("epsfig"	(section "epsfig"))
+    ("floatflt"	(env "floatingfigure"))
+    ("type1cm"	(section "fontsize"))
     ("svg"	(section "includesvg"))
     ("color"	(section "textcolor" "colorbox" "pagecolor" "color")
      		(option . YaTeX-package-graphics-driver-alist)
@@ -49,11 +69,8 @@
     ("ulem"	(section "uline" "uuline" "uwave")
 		(option ("normalem")))
     ("multicol"	(env "multicols"))
-    ("cref"	(section "cleveref"))
-    ("crefrange"	(same-as . "cref"))
-    ("cpageref"		(same-as . "cref"))
-    ("labelcref"	(same-as . "cref"))
-    ("labelcpageref"	(same-as . "cref"))
+    ("cleveref"	(section "cref" "crefrange" "cpageref" "labelcref"
+			 "labelpageref"))
     ("wrapfig"	(env "wrapfigure" "wraptable"))
     ("setspace"	(env "spacing") (section "setstretch"))
     ("cases"	(env "numcases" "subnumcases"))
@@ -139,7 +156,7 @@
 	(pkglist (YaTeX-package-lookup macro type))
 	(usepkgrx (concat
 		   YaTeX-ec-regexp
-		   "\\(usepackage\\|include\\)\\b"))
+		   "\\(usepackage\\|include\\|documentclass\\)\\b"))
 	(register (function
 		   (lambda () (set-buffer cb)
 		     (set (make-local-variable 'YaTeX-package-resolved-list)
@@ -158,10 +175,8 @@
 		(goto-char (point-min))
 		(YaTeX-search-active-forward	;if search fails, goto eob
 		 begdoc YaTeX-comment-prefix nil 1)
-		(while ;(YaTeX-re-search-active-backward
-			;usepkgrx YaTeX-comment-prefix nil t)
-		    ;;allow commented out \usepackages 2004/3/16
-		    (re-search-backward usepkgrx nil t)
+		(while (re-search-backward usepkgrx nil t)
+		  ;;allow commented out \usepackages
 		  (setq mb0 (match-beginning 0))
 		  (skip-chars-forward "^{")
 		  (setq uspkgargs (YaTeX-buffer-substring
@@ -236,4 +251,46 @@
 	      (funcall register)
 	      (message "Don't forget to put \\usepackage{%s} yourself later"
 		       (car (car pkglist)))) ;doing car car is negligence...
-    ))))))
+	    ))))))
+
+(defvar YaTeX::usepackage-alist-private nil
+  "*Private completion list of the argument for usepackage")
+
+(defvar YaTeX::usepackage-alist-local nil
+  "Directory local  completion list of the argument for usepackage")
+
+(defun YaTeX::usepackage (&optional argp)
+  (cond
+   ((equal argp 1)
+    (setq YaTeX-env-name "document")
+    (let ((minibuffer-local-completion-map YaTeX-minibuffer-completion-map)
+	  (delim ","))
+      (YaTeX-cplread-with-learning
+       (if YaTeX-japan "Use package(カンマで区切ってOK): "
+	 "Use package(delimitable by comma): ")
+       ;; 'YaTeX::usepackage-alist-default	;; OBSOLETED at 1.82
+       'YaTeX-package-alist-default
+       'YaTeX::usepackage-alist-private
+       'YaTeX::usepackage-alist-local)))))
+
+
+;;;
+;; Add-ins for auxiliary package handled here
+;;;
+(defun YaTeX:floatingfigure ()
+  (concat (YaTeX:read-position "rlpv")
+	  (YaTeX:read-length "Width: ")))
+
+(defvar YaTeX:geometry-default "margin=1.5cm,includeheadfoot,includemp"
+  "*Default options for \\geometry{}")
+(defun YaTeX::geometry (argp)
+  "Add-in for \\geometry's option"
+  ;; cf. https://dayinthelife.at.webry.info/201401/article_2.html
+  (cond
+   ((= argp 1)
+    (YaTeX-help "geometry")
+    (message "Change default by setting YaTeX:geometry-default")
+    (if (string= YaTeX:geometry-default "") ""
+      YaTeX:geometry-default))))
+
+(provide 'yatexpkg)
--- a/yatexprc.el	Mon Nov 25 21:09:06 2019 +0900
+++ b/yatexprc.el	Thu Dec 26 13:27:55 2019 +0859
@@ -1,7 +1,7 @@
 ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*-
 ;;; 
-;;; (c)1993-2018 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Mon Nov 25 21:01:57 2019 on monster
+;;; (c)1993-2019 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; Last modified Thu Dec 26 12:48:12 2019 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -1353,6 +1353,8 @@
        (setq fname (substring fname 0 (rindex fname ?.))))
      ext)))
 
+(defvar YaTeX-proc-feed-relative t
+  "Non-nil means feed process relative path name of target file.")
 (defun YaTeX-get-latex-command (&optional switch)
   "Specify the latex-command name and its argument.
 If there is a line which begins with string: \"%#!\", the following
@@ -1372,7 +1374,9 @@
 	  (cond
 	   (YaTeX-parent-file
 	    (if YaTeX-dos (expand-file-name YaTeX-parent-file)
-	      YaTeX-parent-file))
+	      (if YaTeX-proc-feed-relative
+		  (file-relative-name YaTeX-parent-file)
+		YaTeX-parent-file)))
 	   (t (save-excursion
 		(YaTeX-visit-main t)
 		(file-name-nondirectory (buffer-file-name)))))

yatex.org