# HG changeset patch # User HIROSE Yuuji # Date 1514903707 -32400 # Node ID feef2aa1f50f527e721f8be0d8f047e42bbe4b86 # Parent 55a20e3120a046daa3021a098ba285131b476d44 Bibtex-command accepts %k like "pbibtex -kanji=%k". diff -r 55a20e3120a0 -r feef2aa1f50f yatex.el --- a/yatex.el Tue Jan 02 23:28:35 2018 +0900 +++ b/yatex.el Tue Jan 02 23:35:07 2018 +0900 @@ -1,6 +1,6 @@ ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- ;;; (c)1991-2017 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Tue Jan 2 19:26:15 2018 on firestorm +;;; Last modified Tue Jan 2 23:11:09 2018 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; https://www.yatex.org/ @@ -60,7 +60,7 @@ %k -> One of Kanji code mnemonic: euc, jis, sjis, utf8 ") -(defvar bibtex-command (if YaTeX-japan "jbibtex" "bibtex") +(defvar bibtex-command (if YaTeX-japan "pbibtex -kanji=%k" "bibtex") "*Default command of BibTeX. Overridden with `%#BIBTEX CommandLine...' in the buffer.") diff -r 55a20e3120a0 -r feef2aa1f50f yatexprc.el --- a/yatexprc.el Tue Jan 02 23:28:35 2018 +0900 +++ b/yatexprc.el Tue Jan 02 23:35:07 2018 +0900 @@ -1,7 +1,7 @@ ;;; yatexprc.el --- YaTeX process handler -*- coding: sjis -*- ;;; ;;; (c)1993-2017 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Tue Jan 2 17:50:40 2018 on firestorm +;;; Last modified Tue Jan 2 23:31:34 2018 on firestorm ;;; $Id$ ;;; Code: @@ -753,8 +753,10 @@ (setq pparg (substring cmd 0 (string-match "[;&]" cmd)) ;rm multistmt pparg (substring pparg (rindex pparg ? )) ;get last arg pparg (substring pparg 0 (rindex pparg ?.)) ;rm ext - bibcmd (or (YaTeX-get-builtin "BIBTEX") bibtex-command)) - (or (string-match "\\s " bibcmd) ;if bibcmd has no spaces, + bibcmd (YaTeX-replace-format + (or (YaTeX-get-builtin "BIBTEX") bibtex-command) + "k" (YaTeX-kanji-ptex-mnemonic))) + (or (string-match "\\s [^-]" bibcmd) ;if bibcmd has no argument, (setq bibcmd (concat bibcmd pparg))) ;append argument(== %#!) (and pp (stringp pp) @@ -834,8 +836,10 @@ (save-excursion (YaTeX-visit-main t) buffer-file-name))) (mainroot (file-name-nondirectory (substring main 0 (rindex main ?.)))) (alist YaTeX-call-builtin-on-file) - (b-in (or (YaTeX-get-builtin builtin-type) - (cdr (assoc builtin-type alist)))) + (b-in (YaTeX-replace-format + (or (YaTeX-get-builtin builtin-type) + (cdr (assoc builtin-type alist))) + "k" (YaTeX-kanji-ptex-mnemonic))) (command b-in)) (if (or update (null b-in)) (progn