yatex

changeset 619:00cec40c4eb5

Merged with dev(yatex1.84)
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 24 Feb 2025 19:53:51 +0900
parents c1b39bbfcf34 d58c4f69369b
children aa395d5e3bf8
files
diffstat 6 files changed, 97 insertions(+), 25 deletions(-) [+]
line diff
     1.1 --- a/.hgtags	Sun Dec 25 14:13:45 2022 +0900
     1.2 +++ b/.hgtags	Mon Feb 24 19:53:51 2025 +0900
     1.3 @@ -23,3 +23,4 @@
     1.4  fbb636ff0fe3fd784af7697db5805a20d33b04d2 yatex-1.81
     1.5  4dad5f91b26cb44a8caa888fe8aa0aad1f1f10bb yatex-1.82
     1.6  157aa7974191bbb4707d26b05ce830282ad70ef5 yatex-1.83
     1.7 +b00018b5a0b487be347d1abf944f8ae165c5a50b yatex-1.84
     2.1 --- a/yahtml.el	Sun Dec 25 14:13:45 2022 +0900
     2.2 +++ b/yahtml.el	Mon Feb 24 19:53:51 2025 +0900
     2.3 @@ -1,8 +1,8 @@
     2.4  ;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*-
     2.5 -;;; (c) 1994-2022 by HIROSE Yuuji [yuuji(@)yatex.org]
     2.6 +;;; (c) 1994-2025 by HIROSE Yuuji [yuuji(@)yatex.org]
     2.7  ;;; $Id$
     2.8  
     2.9 -(defconst yahtml-revision-number "1.83"
    2.10 +(defconst yahtml-revision-number "1.84"
    2.11    "Revision number of running yahtml.el")
    2.12  
    2.13  ;;; Commentary:
    2.14 @@ -298,13 +298,14 @@
    2.15        (if (eq system-type 'ms-dos) "/c" "-c")))
    2.16  (defvar yahtml-use-highlighting (or yahtml-use-font-lock yahtml-use-hilit19))
    2.17  
    2.18 -(defun yahtml-define-begend-key-normal (key env &optional map)
    2.19 +(defun yahtml-define-begend-key-normal (key env &optional map func)
    2.20    "Define short cut yahtml-insert-begend key."
    2.21 -  (YaTeX-define-key
    2.22 -   key
    2.23 -   (list 'lambda '(arg) '(interactive "P")
    2.24 -	 (list 'yahtml-insert-begend 'arg env))
    2.25 -   map))
    2.26 +  (let ((func (or func 'yahtml-insert-begend)))
    2.27 +    (YaTeX-define-key
    2.28 +     key
    2.29 +     (list 'lambda '(arg) '(interactive "P")
    2.30 +	   (list func 'arg env))
    2.31 +     map)))
    2.32  
    2.33  (defun yahtml-define-begend-region-key (key env &optional map)
    2.34    "Define short cut yahtml-insert-begend-region key."
    2.35 @@ -312,13 +313,24 @@
    2.36  			      (list 'yahtml-insert-begend t env)) map))
    2.37  
    2.38  (defun yahtml-define-begend-key (key env &optional map)
    2.39 -  "Define short cut key for begin type completion both for
    2.40 -normal and region mode.  To customize yahtml, user should use this function."
    2.41 +  "Define short cut key for begin type completion.
    2.42 +Both for normal and region mode.
    2.43 +To customize yahtml, user should use this function."
    2.44    (yahtml-define-begend-key-normal key env map)
    2.45    (if YaTeX-inhibit-prefix-letter nil
    2.46      (yahtml-define-begend-region-key
    2.47       (concat (upcase (substring key 0 1)) (substring key 1)) env map)))
    2.48  
    2.49 +(defun yahtml-define-instag-key (key tag &optional map)
    2.50 +  "Define short cut key for inline-tag type completion.
    2.51 +Both for normal and region mode.
    2.52 +To customize yahtml, user should use this function."
    2.53 +  (yahtml-define-begend-key-normal key tag map 'yahtml-insert-tag)
    2.54 +  (if YaTeX-inhibit-prefix-letter nil
    2.55 +    (yahtml-define-begend-region-key
    2.56 +     (concat (upcase (substring key 0 1)) (substring key 1)) env map
    2.57 +     'yahtml-insert-tag)))
    2.58 +
    2.59  (if yahtml-mode-map nil
    2.60    (setq yahtml-mode-map (make-sparse-keymap)
    2.61  	yahtml-prefix-map (make-sparse-keymap))
    2.62 @@ -356,23 +368,23 @@
    2.63  	  (YaTeX-define-key "b" 'yahtml-insert-begend map))
    2.64        (yahtml-define-begend-key "bh" "html" map)
    2.65        (yahtml-define-begend-key "bH" "head" map)
    2.66 -      (yahtml-define-begend-key "bt" "title" map)
    2.67 +      (yahtml-define-instag-key "bt" "title" map)
    2.68        (yahtml-define-begend-key "bT" "table" map)
    2.69        (yahtml-define-begend-key "bb" "body" map)
    2.70 -      (yahtml-define-begend-key "bc" "center" map)
    2.71 +      (yahtml-define-instag-key "bc" "code" map)
    2.72        (yahtml-define-begend-key "bd" "dl" map)
    2.73        (yahtml-define-begend-key "bD" "div" map)
    2.74        (yahtml-define-begend-key "bu" "ul" map)
    2.75        (yahtml-define-begend-key "bo" "ol" map)
    2.76 -      (yahtml-define-begend-key "b1" "h1" map)
    2.77 -      (yahtml-define-begend-key "b2" "h2" map)
    2.78 -      (yahtml-define-begend-key "b3" "h3" map)
    2.79 -      (yahtml-define-begend-key "ba" "a" map)
    2.80 +      (yahtml-define-instag-key "b1" "h1" map)
    2.81 +      (yahtml-define-instag-key "b2" "h2" map)
    2.82 +      (yahtml-define-instag-key "b3" "h3" map)
    2.83 +      (yahtml-define-instag-key "ba" "a" map)
    2.84        (yahtml-define-begend-key "bf" "form" map)
    2.85 -      (yahtml-define-begend-key "bl" "label" map)
    2.86 +      (yahtml-define-instag-key "bl" "label" map)
    2.87        (yahtml-define-begend-key "bs" "select" map)
    2.88        (yahtml-define-begend-key "bv" "div" map)
    2.89 -      (yahtml-define-begend-key "bS" "span" map)
    2.90 +      (yahtml-define-instag-key "bS" "span" map)
    2.91        (yahtml-define-begend-key "bp" "pre" map)
    2.92        (yahtml-define-begend-key "bq" "blockquote" map)
    2.93        (YaTeX-define-key "b " 'yahtml-insert-begend map)
    2.94 @@ -447,6 +459,7 @@
    2.95      ;;HTML5
    2.96      ("video") ("audio") ("figure") ("iframe")
    2.97      ("header") ("footer") ("article") ("section") ("nav") ("main") ("aside")
    2.98 +    ("meter") ("progress") ("details") ("summary")
    2.99      ))
   2.100  
   2.101  (if yahtml-html4-strict
   2.102 @@ -1727,6 +1740,26 @@
   2.103  (defun yahtml::article ()
   2.104    (setq yahtml-last-typeface-cmd "h1" yahtml-last-begend "h1"))
   2.105  
   2.106 +(defun yahtml:meter ()
   2.107 +  (concat
   2.108 +   (yahtml-make-optional-argument
   2.109 +    "min" (yahtml-read-parameter "min"))
   2.110 +   (yahtml-make-optional-argument
   2.111 +    "max" (yahtml-read-parameter "max"))
   2.112 +   (yahtml-make-optional-argument
   2.113 +    "low" (yahtml-read-parameter "low"))
   2.114 +   (yahtml-make-optional-argument
   2.115 +    "high" (yahtml-read-parameter "high"))
   2.116 +   (yahtml-make-optional-argument
   2.117 +    "value" (yahtml-read-parameter "value"))))
   2.118 +
   2.119 +(defun yahtml:progress ()
   2.120 +  (concat
   2.121 +   (yahtml-make-optional-argument
   2.122 +    "max" (yahtml-read-parameter "max"))
   2.123 +   (yahtml-make-optional-argument
   2.124 +    "value" (yahtml-read-parameter "value"))))
   2.125 +
   2.126  ;;; ---------- Simple tag ----------
   2.127  (defun yahtml-insert-tag (region-mode &optional tag)
   2.128    "Insert <TAG> </TAG> and put cursor inside of them."
     3.1 --- a/yatex.el	Sun Dec 25 14:13:45 2022 +0900
     3.2 +++ b/yatex.el	Mon Feb 24 19:53:51 2025 +0900
     3.3 @@ -1,6 +1,6 @@
     3.4  ;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*-
     3.5 -;;; (c)1991-2022 by HIROSE Yuuji.[yuuji@yatex.org]
     3.6 -;;; Last modified Sun Dec 25 13:57:49 2022 on firestorm
     3.7 +;;; (c)1991-2025 by HIROSE Yuuji.[yuuji@yatex.org]
     3.8 +;;; Last modified Mon Feb 24 19:01:20 2025 on firestorm
     3.9  ;;; $Id$
    3.10  ;;; The latest version of this software is always available at;
    3.11  ;;; https://www.yatex.org/
    3.12 @@ -16,7 +16,7 @@
    3.13  
    3.14  ;;; Code:
    3.15  (require 'yatexlib)
    3.16 -(defconst YaTeX-revision-number "1.83"
    3.17 +(defconst YaTeX-revision-number "1.84"
    3.18    "Revision number of running yatex.el")
    3.19  
    3.20  ;---------- Local variables ----------
    3.21 @@ -351,6 +351,7 @@
    3.22  	 ("bm")				;deined in bm
    3.23  	 ("verbfile") ("listing")	;defined in misc
    3.24  	 ("slashbox" 2) ("backslashbox" 2) ;defined in slashbox
    3.25 +	 ("verbatimtabinput") ("listinginput" 2)
    3.26  	 ))
    3.27     (if YaTeX-use-AMS-LaTeX
    3.28         '(("DeclareMathOperator" 2) ("boldsymbol") ("pmb") ("eqref")
    3.29 @@ -412,6 +413,8 @@
    3.30         '(("comment")			;defined in version
    3.31  	 ("longtable")			;defined in longtable
    3.32  	 ("screen") ("boxnote") ("shadebox") ;; ("itembox") ;in ascmac
    3.33 +	 ("verbatimtab") ("listing") ("listingcont") ("verbatimwrite")
    3.34 +	 ("boxedverbatim")
    3.35  	 ("alltt")			;defined in alltt
    3.36  	 ("multicols")			;defined in multicol
    3.37  	 ("breakbox")))			;defined in eclbkbox
    3.38 @@ -782,7 +785,10 @@
    3.39  	(or  (featurep 'xemacs)
    3.40  	     (set (make-local-variable 'font-lock-defaults)
    3.41  		  (get 'yatex-mode 'font-lock-defaults)))
    3.42 -	;;(font-lock-mode 1)
    3.43 +	(and (boundp 'global-font-lock-mode)
    3.44 +	     global-font-lock-mode
    3.45 +	     ;; Workaround for Emacs30 on which global-font-lock ignored
    3.46 +	     (font-lock-mode 1))
    3.47  	))
    3.48    (use-local-map YaTeX-mode-map)
    3.49    (set-syntax-table YaTeX-mode-syntax-table)
     4.1 --- a/yatex.new	Sun Dec 25 14:13:45 2022 +0900
     4.2 +++ b/yatex.new	Mon Feb 24 19:53:51 2025 +0900
     4.3 @@ -1,12 +1,18 @@
     4.4  	What's new in YaTeX/yahtml
     4.5  	野鳥/yahtml - 各バージョンの変更点について
     4.6  
     4.7 +1.84	== yatex ==
     4.8 +	verbatimtab, verbatimtabinput, listinginput補完追加
     4.9 +	Emacs30でデフォルトでfont-lockが効かない対処を追加
    4.10 +	== yahtml ==
    4.11 +	ショートカットキー bc を <center> から <code> に変更
    4.12 +	details, summary要素補完を追加
    4.13  1.83	== yatex ==
    4.14  	Evince-dbus連携見直し(Thanks to TeX Wiki)。
    4.15  	latex-message-kanji-code 0 でプロセスコード 'undicided にしてみた。
    4.16  	LuaTeX等で直接PDFが出されたときにはdvipdfmx省略。
    4.17  	uplatex関連のものなどをいくつか追加。
    4.18 -	;di で \displaystyle 補完。
    4.19 +	;ds で \displaystyle 補完。
    4.20  	Dbusでのevince-reverse-search実験実装。
    4.21  	アドイン追加: wraptable, spacing, tablecolor
    4.22  	補完追加: fleqn
     5.1 --- a/yatexadd.el	Sun Dec 25 14:13:45 2022 +0900
     5.2 +++ b/yatexadd.el	Mon Feb 24 19:53:51 2025 +0900
     5.3 @@ -1,6 +1,6 @@
     5.4  ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*-
     5.5  ;;; (c)1991-2022 by HIROSE Yuuji.[yuuji@yatex.org]
     5.6 -;;; Last modified Fri Dec  2 08:40:27 2022 on firestorm
     5.7 +;;; Last modified Sun Nov 24 21:01:58 2024 on firestorm
     5.8  ;;; $Id$
     5.9  
    5.10  ;;; Code:
    5.11 @@ -2348,6 +2348,28 @@
    5.12      (if (string< "" opt)
    5.13  	(concat "[" opt "]"))))
    5.14  
    5.15 +;;; -------------------- moreverb stuff --------------------
    5.16 +;;; http://xyoshiki.web.fc2.com/tex/moreverb.html
    5.17 +(defun YaTeX:verbatimtab ()
    5.18 +  (let ((width (YaTeX-read-string-or-skip "Tab width: ")))
    5.19 +    (if (string< "" width)
    5.20 +	(concat "[" width "]"))))
    5.21 +(fset 'YaTeX:verbatimtabinput 'YaTeX:verbatimtab)
    5.22 +(defun YaTeX::verbatimtabinput (argp)
    5.23 +  (cond
    5.24 +   ((= argp 1)
    5.25 +    (YaTeX::include 1))))
    5.26 +(defun YaTeX:listinginput()
    5.27 +  (let ((interval (YaTeX-read-string-or-skip "Listing internavl: ")))
    5.28 +    (if (string< "" interval)
    5.29 +	(concat "[" interval "]"))))
    5.30 +(defun YaTeX::listinginput (argp)
    5.31 +  (cond
    5.32 +   ((= argp 1)
    5.33 +    (let ((int (YaTeX-read-string-or-skip "Start Line: " "1")))
    5.34 +      (if (string< "" int) int "1")))
    5.35 +   ((= argp 2) (YaTeX::verbatimtabinput 1))))
    5.36 +
    5.37  ;;; -------------------- math-mode stuff --------------------
    5.38  (defun YaTeX::tilde (&optional pos)
    5.39    "For accent macros in mathmode"
     6.1 --- a/yatexpkg.el	Sun Dec 25 14:13:45 2022 +0900
     6.2 +++ b/yatexpkg.el	Mon Feb 24 19:53:51 2025 +0900
     6.3 @@ -1,7 +1,7 @@
     6.4  ;;; yatexpkg.el --- YaTeX package manager -*- coding: sjis -*-
     6.5  ;;; 
     6.6  ;;; (c)2003-2022 by HIROSE, Yuuji [yuuji@yatex.org]
     6.7 -;;; Last modified Fri Dec  2 08:22:41 2022 on firestorm
     6.8 +;;; Last modified Sun Nov 24 20:43:19 2024 on firestorm
     6.9  ;;; $Id$
    6.10  
    6.11  ;;; Code:
    6.12 @@ -28,6 +28,8 @@
    6.13      ("alltt"	(env "alltt"))
    6.14      ("misc"	(section "verbfile" "listing"))
    6.15      ("verbatim"	(section "verbatiminput"))
    6.16 +    ("moreverb"	(env "verbatimtab" "listing" "listingcont")
    6.17 +		(section "verbattabiminput" "listinginput"))
    6.18      ("boites"	(env "breakbox"))
    6.19      ;;("eclbkbox"	(env "breakbox"))
    6.20      ("supertabular" (env "supertabular"))
    6.21 @@ -82,6 +84,8 @@
    6.22      ("booktab"	(section "toprule" "midrule" "bottomrule" "cmidrule"
    6.23  			 "addlinespace" "specialrule"))
    6.24      ("pxbase"	(section "UI"))
    6.25 +    ("hyperref"	(section "hyperref" "url" "nolinkurl" "href" "hyperref")
    6.26 +		(option "dvipdfmx" "luatex" "xetex" "hidelinks"))
    6.27      )
    6.28    "Default package vs. macro list.
    6.29  Alists contains '(PACKAGENAME . MACROLIST)