texlive[48823] Master/texmf-dist: bxjscls (3oct18)

commits+karl at tug.org commits+karl at tug.org
Thu Oct 4 00:43:41 CEST 2018


Revision: 48823
          http://tug.org/svn/texlive?view=revision&revision=48823
Author:   karl
Date:     2018-10-04 00:43:40 +0200 (Thu, 04 Oct 2018)
Log Message:
-----------
bxjscls (3oct18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/bxjscls/README-ja.md
    trunk/Master/texmf-dist/doc/latex/bxjscls/README.md
    trunk/Master/texmf-dist/doc/latex/bxjscls/bxjscls-manual.pdf
    trunk/Master/texmf-dist/doc/latex/bxjscls/bxjscls-manual.tex
    trunk/Master/texmf-dist/doc/latex/bxjscls/bxjscls.pdf
    trunk/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls
    trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls

Modified: trunk/Master/texmf-dist/doc/latex/bxjscls/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxjscls/README-ja.md	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/doc/latex/bxjscls/README-ja.md	2018-10-03 22:43:40 UTC (rev 48823)
@@ -98,6 +98,9 @@
 更新履歴
 --------
 
+  * Version 1.9d 〈2018/10/03〉
+      - 原則的に和暦の処理を bxwareki パッケージに任せる。
+      - バグ修正。
   * Version 1.9c 〈2018/09/04〉
       - pandoc 和文ドライバの Babel 対策を改良。
       - バグ修正。

Modified: trunk/Master/texmf-dist/doc/latex/bxjscls/README.md
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/bxjscls/bxjscls-manual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/bxjscls/bxjscls-manual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxjscls/bxjscls-manual.tex	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/doc/latex/bxjscls/bxjscls-manual.tex	2018-10-03 22:43:40 UTC (rev 48823)
@@ -12,8 +12,8 @@
   \renewcommand*{\XeLaTeX}{XeLaTeX}}
 \usepackage{shortvrb}
 \MakeShortVerb{\|}
-\newcommand{\PkgVersion}{1.9c}
-\newcommand{\PkgDate}{2018/09/04}
+\newcommand{\PkgVersion}{1.9d}
+\newcommand{\PkgDate}{2018/10/03}
 \newcommand{\Pkg}[1]{\textsf{#1}}
 \newcommand{\Meta}[1]{$\langle$\mbox{}\nobr#1\nobr\mbox{}$\rangle$}
 \newcommand{\Note}{\par\noindent ※}

Modified: trunk/Master/texmf-dist/doc/latex/bxjscls/bxjscls.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/source/latex/bxjscls/bxjscls.dtx	2018-10-03 22:43:40 UTC (rev 48823)
@@ -56,7 +56,8 @@
 %<*driver>
 \ProvidesFile{bxjscls.dtx}
 %</driver>
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
+% [2018/09/04 v1.9c BXJS document classes]
 % [2018/08/20 v1.9b BXJS document classes]
 % [2018/07/20 v1.9a BXJS document classes]
 % based on jsclasses [2018/06/23]
@@ -7870,8 +7871,9 @@
 % \begin{ZRnote}
 % 環境変数 |SOURCE_DATE_EPOCH|/|FORCE_SOURCE_DATE| が
 % 設定されている場合は“今日”が過去・未来の日付になる可能性がある。
-% その場合、和暦表記は1970年から平成の終わりまでの期間でのみサポートする。
-% \Note 新元号が公表されたら対応する。
+% BXJSクラスでは、和暦の扱いは |bxwareki| パッケージに任せることを
+% 原則とする。
+% ただし、|bxwareki| が使えない場合は自前で処理する。
 % \end{ZRnote}
 %
 %    \begin{macrocode}
@@ -7914,53 +7916,42 @@
 \fi
 %    \end{macrocode}
 %
+% \begin{macro}{\ifbxjs at bxwareki@avail}
+% |bxwareki| パッケージが使用できるか。
+%    \begin{macrocode}
+\newif\ifbxjs at bxwareki@avail
+\IfFileExists{bxwareki.sty}{%
+  \RequirePackage{bxwareki}[]%
+  \bxjs at bxwareki@availtrue}{}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\jayear}
 % 和暦における年の表記(元号+年数)。
 % \begin{macro}{\heisei}
 % 年数を表す整数レジスタで、
 % 元号が「平成」である場合にのみ定義される。
-% \Note 一般の年数の整数レジスタは |\bxjs at jayear| で、
-% |\heisei| はこれの別名になる。
 %    \begin{macrocode}
-\newcount\bxjs at jayear
-\let\bxjs at gengo\@empty \bxjs at jayear\year
-\@tempcnta=\the\year\two at digits\month\two at digits\day\relax
-\ifnum\@tempcnta<19700101
-\else\ifnum\@tempcnta<19890108
-  \def\bxjs at gengo{昭和}\advance\bxjs at jayear-1925\relax
-  \let\heisei\bxjs at jayear
-\else\ifnum\@tempcnta<20190501
-  \def\bxjs at gengo{平成}\advance\bxjs at jayear-1988\relax
-  \let\heisei\bxjs at jayear
-\else
+\ifbxjs at bxwareki@avail
+  \let\jayear\warekiyear
+  \def\bxjs at tmpa{H}\ifx\bxjs at tmpa\warekigengoinitial
+    \newcount\heisei \heisei=\value{warekiyear}
+  \fi
 %    \end{macrocode}
-% 現在が新元号である場合。
-% |bxwareki| とかムニャムニャとかを試してみる。
+% |bxwareki| が使えない場合のフォールバック処理。
+% 平成のみに対応する。
 %    \begin{macrocode}
-  \IfFileExists{bxwareki.sty}{\IfFileExists{bxwareki2019.def}{%
-    \RequirePackage{bxwareki}[]%
-    \let\bxjs at gengo\WarekiGengo
-  }{}}{}%
-  \if l\jsEngine \ifx\bxjs at gengo\@empty
-    \toks@{}
-    \directlua{pcall(function()
-      tex.toks[0] = bxjs.get_new_gengo()
-    end)}
-    \edef\bxjs at gengo{\the\toks@}
+\else
+  \@tempcnta=\the\year\two at digits\month\two at digits\day\relax
+  \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501
+    \newcount\heisei \heisei\year \advance\heisei-1988\relax
   \fi\fi
+  \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+    \edef\jayear{\bxjs at unxp{平成}\bxjs at iai \the\heisei \bxjs at iai}
+  \else \edef\jayear{\the\year \bxjs at iai}
+  \fi
+\fi
 %    \end{macrocode}
-% 新元号が既知の場合にのみ、和暦の年を求める。
-%    \begin{macrocode}
-  \ifx\bxjs at gengo\@empty\else \advance\bxjs at jayear-2018\relax \fi
-\fi\fi\fi
-\edef\jayear{%
-  \ifx\bxjs at gengo\@empty \the\bxjs at jayear\bxjs at iai
-  \else \bxjs at onxp{\bxjs at gengo}%
-    \ifnum\bxjs at jayear=\@ne \bxjs at unxp{元}%
-    \else \bxjs at iai\the\bxjs at jayear\bxjs at iai
-    \fi
-  \fi}
-%    \end{macrocode}
 % \end{macro}
 % \end{macro}
 %
@@ -7967,6 +7958,17 @@
 % \begin{macro}{\today}
 % 英語、西暦、和暦で場合分けをする。
 %    \begin{macrocode}
+\let\bxjs at next\relax
+\ifbxjs at bxwareki@avail
+  \ifx\warekigengo\@empty\else
+    \def\bxjs at next{\bxjs at onxp{\warekitoday}}
+  \fi
+\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+  \def\bxjs at next{%
+    \bxjs at unxp{平成}\bxjs at iai\number\heisei\bxjs at iai\bxjs at unxp{年}%
+    \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
+    \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}}
+\fi\fi
 \edef\bxjs at today{%
   \if at english
     \ifcase\month\or
@@ -7974,15 +7976,13 @@
       July\or August\or September\or October\or November\or December\fi
       \space\number\day, \number\year
   \else
-    \noexpand\bxjs at if@use at seireki{%
+    \ifx\bxjs at next\relax \expandafter\@firstoftwo
+    \else \noexpand\bxjs at if@use at seireki
+    \fi {%
       \number\year\bxjs at iai\bxjs at unxp{年}%
       \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
       \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }{%
-      \bxjs at onxp{\jayear}\bxjs at unxp{年}%
-      \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
-      \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }%
+    }{\bxjs at next}%
   \fi}
 \let\today\bxjs at today
 %    \end{macrocode}
@@ -10497,9 +10497,13 @@
 \def\bxjs at pandoc@lang at ja{%
   \expandafter\let\csname ver at babel.sty\endcsname\@undefined
   \edef\bxjs at next{%
-    \noexpand\RequirePackage[\bxjs at lang@pkg at options]{babel}[]%
+    \noexpand\RequirePackage[\bxjs at lang@pkg at options,english]{babel}[]%
   }\bxjs at next
-  \RequirePackage[main=japanese]{pxbabel}[]}
+  \if j\jsEngine
+    \RequirePackage[main=japanese]{pxbabel}[]%
+  \else
+    \RequirePackage{bxorigcapt}[]%
+  \fi}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -10787,32 +10791,6 @@
   }\fi
 %    \end{macrocode}
 %
-% 新元号のムニャムニャ。
-%    \begin{macrocode}
-\begingroup
-  \catcode`\~=12 \let\0\relax \let\1\relax \let\2\relax
-  \directlua{
-    if not bxjs then bxjs = {} end
-    function bxjs.get_new_gengo()
-      local lc_time = nil
-      local ok, ret = pcall(function()
-        assert(os.type == "unix")
-        lc_time = os.setlocale(nil, "time")
-        assert(os.setlocale("ja_JP.utf8", "time") or
-          os.setlocale("ja_JP.UTF-8", "time"))
-        local heisei = "\229\185\179\230\136\144"
-        local kanji = "[\228-\233][\128-\191][\128-\191]"
-        local gh = os.date("\037EC", 1500000000)
-        local gn = os.date("\037EC", 1600000000)
-        assert(gh == heisei and gn ~= heisei and
-          gn:match("^"..kanji..kanji.."$"))
-        return gn
-      end)
-      os.setlocale(lc_time, "time")
-      return ok and ret or ""
-    end}
-\endgroup
-%    \end{macrocode}
 % 以上。
 %    \begin{macrocode}
 \fi
@@ -11417,6 +11395,25 @@
 % \end{macro}
 %
 %^^A----------------
+%\subsection{パッケージオプション}
+%
+% |english| オプションが指定されている場合、|\ldots| の調整を抑止する。
+% \Note つまり、「グローバルの |english| オプション」が指定されている
+% 場合も抑止の対象になる。
+% BXJSクラスの英語モードを想定しているが、それ以外の場合でも、
+% 一般的な{\LaTeX}の習慣として、グローバルの |english| は
+% 「その文書の基底言語が英語である」ことを示す。
+%    \begin{macrocode}
+\newif\ifbxjsp at english
+\DeclareOption{english}{\bxjsp at englishtrue}
+%    \end{macrocode}
+%
+% オプション定義はおしまい。
+%    \begin{macrocode}
+\ProcessOptions*
+%    \end{macrocode}
+%
+%^^A----------------
 %\subsection{パッケージ読込の阻止}
 %
 % \begin{macro}{\pandocSkipLoadFile}
@@ -11547,10 +11544,11 @@
 % \end{macro}
 %
 % |\ldots| の実装を置き換える。
+% \Note B|english| オプション指定時は置き換えない。
 %    \begin{macrocode}
-\g at addto@macro\bxjs at begin@document at hook{%
+\AtBeginDocument{%
   \let\bxjsp at org@ldots\ldots
-  \let\ldots\pandocLdots}
+  \ifbxjsp at english\else \let\ldots\pandocLdots \fi}
 %    \end{macrocode}
 %
 %^^A----------------

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls	2018-10-03 22:43:40 UTC (rev 48823)
@@ -22,7 +22,7 @@
 %% in the same archive or directory.)
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{bxjsarticle}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 %% このファイルは日本語文字を含みます.
 \def\bxjs at clsname{bxjsarticle}
 \newif\ifjsc at needsp@tch
@@ -2320,37 +2320,36 @@
   \def\bxjs at iai{\noexpand~}
 \else \def\bxjs at iai{}
 \fi
-\newcount\bxjs at jayear
-\let\bxjs at gengo\@empty \bxjs at jayear\year
-\@tempcnta=\the\year\two at digits\month\two at digits\day\relax
-\ifnum\@tempcnta<19700101
-\else\ifnum\@tempcnta<19890108
-  \def\bxjs at gengo{昭和}\advance\bxjs at jayear-1925\relax
-  \let\heisei\bxjs at jayear
-\else\ifnum\@tempcnta<20190501
-  \def\bxjs at gengo{平成}\advance\bxjs at jayear-1988\relax
-  \let\heisei\bxjs at jayear
+\newif\ifbxjs at bxwareki@avail
+\IfFileExists{bxwareki.sty}{%
+  \RequirePackage{bxwareki}[]%
+  \bxjs at bxwareki@availtrue}{}
+\ifbxjs at bxwareki@avail
+  \let\jayear\warekiyear
+  \def\bxjs at tmpa{H}\ifx\bxjs at tmpa\warekigengoinitial
+    \newcount\heisei \heisei=\value{warekiyear}
+  \fi
 \else
-  \IfFileExists{bxwareki.sty}{\IfFileExists{bxwareki2019.def}{%
-    \RequirePackage{bxwareki}[]%
-    \let\bxjs at gengo\WarekiGengo
-  }{}}{}%
-  \if l\jsEngine \ifx\bxjs at gengo\@empty
-    \toks@{}
-    \directlua{pcall(function()
-      tex.toks[0] = bxjs.get_new_gengo()
-    end)}
-    \edef\bxjs at gengo{\the\toks@}
+  \@tempcnta=\the\year\two at digits\month\two at digits\day\relax
+  \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501
+    \newcount\heisei \heisei\year \advance\heisei-1988\relax
   \fi\fi
-  \ifx\bxjs at gengo\@empty\else \advance\bxjs at jayear-2018\relax \fi
-\fi\fi\fi
-\edef\jayear{%
-  \ifx\bxjs at gengo\@empty \the\bxjs at jayear\bxjs at iai
-  \else \bxjs at onxp{\bxjs at gengo}%
-    \ifnum\bxjs at jayear=\@ne \bxjs at unxp{元}%
-    \else \bxjs at iai\the\bxjs at jayear\bxjs at iai
-    \fi
-  \fi}
+  \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+    \edef\jayear{\bxjs at unxp{平成}\bxjs at iai \the\heisei \bxjs at iai}
+  \else \edef\jayear{\the\year \bxjs at iai}
+  \fi
+\fi
+\let\bxjs at next\relax
+\ifbxjs at bxwareki@avail
+  \ifx\warekigengo\@empty\else
+    \def\bxjs at next{\bxjs at onxp{\warekitoday}}
+  \fi
+\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+  \def\bxjs at next{%
+    \bxjs at unxp{平成}\bxjs at iai\number\heisei\bxjs at iai\bxjs at unxp{年}%
+    \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
+    \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}}
+\fi\fi
 \edef\bxjs at today{%
   \if at english
     \ifcase\month\or
@@ -2358,15 +2357,13 @@
       July\or August\or September\or October\or November\or December\fi
       \space\number\day, \number\year
   \else
-    \noexpand\bxjs at if@use at seireki{%
+    \ifx\bxjs at next\relax \expandafter\@firstoftwo
+    \else \noexpand\bxjs at if@use at seireki
+    \fi {%
       \number\year\bxjs at iai\bxjs at unxp{年}%
       \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
       \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }{%
-      \bxjs at onxp{\jayear}\bxjs at unxp{年}%
-      \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
-      \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }%
+    }{\bxjs at next}%
   \fi}
 \let\today\bxjs at today
 \g at addto@macro\bxjs at begin@document at hook{%

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls	2018-10-03 22:43:40 UTC (rev 48823)
@@ -22,7 +22,7 @@
 %% in the same archive or directory.)
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{bxjsbook}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 %% このファイルは日本語文字を含みます.
 \def\bxjs at clsname{bxjsbook}
 \newif\ifjsc at needsp@tch
@@ -2426,37 +2426,36 @@
   \def\bxjs at iai{\noexpand~}
 \else \def\bxjs at iai{}
 \fi
-\newcount\bxjs at jayear
-\let\bxjs at gengo\@empty \bxjs at jayear\year
-\@tempcnta=\the\year\two at digits\month\two at digits\day\relax
-\ifnum\@tempcnta<19700101
-\else\ifnum\@tempcnta<19890108
-  \def\bxjs at gengo{昭和}\advance\bxjs at jayear-1925\relax
-  \let\heisei\bxjs at jayear
-\else\ifnum\@tempcnta<20190501
-  \def\bxjs at gengo{平成}\advance\bxjs at jayear-1988\relax
-  \let\heisei\bxjs at jayear
+\newif\ifbxjs at bxwareki@avail
+\IfFileExists{bxwareki.sty}{%
+  \RequirePackage{bxwareki}[]%
+  \bxjs at bxwareki@availtrue}{}
+\ifbxjs at bxwareki@avail
+  \let\jayear\warekiyear
+  \def\bxjs at tmpa{H}\ifx\bxjs at tmpa\warekigengoinitial
+    \newcount\heisei \heisei=\value{warekiyear}
+  \fi
 \else
-  \IfFileExists{bxwareki.sty}{\IfFileExists{bxwareki2019.def}{%
-    \RequirePackage{bxwareki}[]%
-    \let\bxjs at gengo\WarekiGengo
-  }{}}{}%
-  \if l\jsEngine \ifx\bxjs at gengo\@empty
-    \toks@{}
-    \directlua{pcall(function()
-      tex.toks[0] = bxjs.get_new_gengo()
-    end)}
-    \edef\bxjs at gengo{\the\toks@}
+  \@tempcnta=\the\year\two at digits\month\two at digits\day\relax
+  \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501
+    \newcount\heisei \heisei\year \advance\heisei-1988\relax
   \fi\fi
-  \ifx\bxjs at gengo\@empty\else \advance\bxjs at jayear-2018\relax \fi
-\fi\fi\fi
-\edef\jayear{%
-  \ifx\bxjs at gengo\@empty \the\bxjs at jayear\bxjs at iai
-  \else \bxjs at onxp{\bxjs at gengo}%
-    \ifnum\bxjs at jayear=\@ne \bxjs at unxp{元}%
-    \else \bxjs at iai\the\bxjs at jayear\bxjs at iai
-    \fi
-  \fi}
+  \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+    \edef\jayear{\bxjs at unxp{平成}\bxjs at iai \the\heisei \bxjs at iai}
+  \else \edef\jayear{\the\year \bxjs at iai}
+  \fi
+\fi
+\let\bxjs at next\relax
+\ifbxjs at bxwareki@avail
+  \ifx\warekigengo\@empty\else
+    \def\bxjs at next{\bxjs at onxp{\warekitoday}}
+  \fi
+\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+  \def\bxjs at next{%
+    \bxjs at unxp{平成}\bxjs at iai\number\heisei\bxjs at iai\bxjs at unxp{年}%
+    \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
+    \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}}
+\fi\fi
 \edef\bxjs at today{%
   \if at english
     \ifcase\month\or
@@ -2464,15 +2463,13 @@
       July\or August\or September\or October\or November\or December\fi
       \space\number\day, \number\year
   \else
-    \noexpand\bxjs at if@use at seireki{%
+    \ifx\bxjs at next\relax \expandafter\@firstoftwo
+    \else \noexpand\bxjs at if@use at seireki
+    \fi {%
       \number\year\bxjs at iai\bxjs at unxp{年}%
       \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
       \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }{%
-      \bxjs at onxp{\jayear}\bxjs at unxp{年}%
-      \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
-      \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }%
+    }{\bxjs at next}%
   \fi}
 \let\today\bxjs at today
 \g at addto@macro\bxjs at begin@document at hook{%

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty	2018-10-03 22:43:40 UTC (rev 48823)
@@ -21,7 +21,7 @@
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
 \ProvidesPackage{bxjscjkcat}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 \def\bxjx at pkgname{bxjscjkcat}
 \newcount\bxjx at cnta
 \@onlypreamble\bxjx at tmpdo

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty	2018-10-03 22:43:40 UTC (rev 48823)
@@ -21,7 +21,7 @@
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
 \ProvidesPackage{bxjscompat}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 \def\bxac at pkgname{bxjscompat}
 \let\bxac at engine=n
 \def\bxac at do#1#2{%
@@ -119,29 +119,6 @@
     range(0x2B820, 0x2CEA1, 11, false)
     range(0x2CEA2, 0x2FFFD, 11, true)
   }\fi
-\begingroup
-  \catcode`\~=12 \let\0\relax \let\1\relax \let\2\relax
-  \directlua{
-    if not bxjs then bxjs = {} end
-    function bxjs.get_new_gengo()
-      local lc_time = nil
-      local ok, ret = pcall(function()
-        assert(os.type == "unix")
-        lc_time = os.setlocale(nil, "time")
-        assert(os.setlocale("ja_JP.utf8", "time") or
-          os.setlocale("ja_JP.UTF-8", "time"))
-        local heisei = "\229\185\179\230\136\144"
-        local kanji = "[\228-\233][\128-\191][\128-\191]"
-        local gh = os.date("\037EC", 1500000000)
-        local gn = os.date("\037EC", 1600000000)
-        assert(gh == heisei and gn ~= heisei and
-          gn:match("^"..kanji..kanji.."$"))
-        return gn
-      end)
-      os.setlocale(lc_time, "time")
-      return ok and ret or ""
-    end}
-\endgroup
 \fi
 \endinput
 %%

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def	2018-10-03 22:43:40 UTC (rev 48823)
@@ -21,7 +21,7 @@
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
 \ProvidesFile{bxjsja-minimal.def}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 %% このファイルは日本語文字を含みます
 \def\DeclareJaTextFontCommand#1#2{%
   \DeclareRobustCommand#1[1]{%

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def	2018-10-03 22:43:40 UTC (rev 48823)
@@ -21,7 +21,7 @@
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
 \ProvidesFile{bxjsja-modern.def}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 \input{bxjsja-standard.def}
 \ifnum0\if x\jsEngine1\fi\if l\jsEngine1\fi=\z@
 \def\encodingdefault{T1}%

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def	2018-10-03 22:43:40 UTC (rev 48823)
@@ -21,7 +21,7 @@
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
 \ProvidesFile{bxjsja-pandoc.def}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 \input{bxjsja-standard.def}
 \RequirePackage{bxjspandoc}
 \@onlypreamble\bxjs at endpreamble@hook
@@ -134,9 +134,13 @@
 \def\bxjs at pandoc@lang at ja{%
   \expandafter\let\csname ver at babel.sty\endcsname\@undefined
   \edef\bxjs at next{%
-    \noexpand\RequirePackage[\bxjs at lang@pkg at options]{babel}[]%
+    \noexpand\RequirePackage[\bxjs at lang@pkg at options,english]{babel}[]%
   }\bxjs at next
-  \RequirePackage[main=japanese]{pxbabel}[]}
+  \if j\jsEngine
+    \RequirePackage[main=japanese]{pxbabel}[]%
+  \else
+    \RequirePackage{bxorigcapt}[]%
+  \fi}
 \fi
 \bxjs at set@dupload at proc{geometry.sty}{%
   \setpagelayout*{#1}}

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def	2018-10-03 22:43:40 UTC (rev 48823)
@@ -21,7 +21,7 @@
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
 \ProvidesFile{bxjsja-standard.def}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 %% このファイルは日本語文字を含みます
 \input{bxjsja-minimal.def}
 \bxjs at simplejasetupfalse

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty	2018-10-03 22:43:40 UTC (rev 48823)
@@ -21,7 +21,7 @@
 %% same distribution. (The sources need not necessarily be
 %% in the same archive or directory.)
 \ProvidesPackage{bxjspandoc}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 %% このファイルは日本語文字を含みます.
 \def\bxjsp at pkgname{bxjscjkcat}
 \let\bxjsp at engine=n
@@ -34,6 +34,9 @@
 \bxjsp at do\XeTeXversion{\let\bxjsp at engine=x}
 \bxjsp at do\pdftexversion{\let\bxjsp at engine=p}
 \bxjsp at do\luatexversion{\let\bxjsp at engine=l}
+\newif\ifbxjsp at english
+\DeclareOption{english}{\bxjsp at englishtrue}
+\ProcessOptions*
 \@onlypreamble\pandocSkipLoadFile
 \newcommand*\pandocSkipLoadFile[1]{%
   \expandafter\bxjsp at skip@load at file@a\csname ver@#1\endcsname{#1}}
@@ -83,9 +86,9 @@
   \bxjsp at ja@ellipsis \let\bxjsp at tok=}
 \def\bxjsp at ldots@g{%
   \expandafter\bxjsp at org@ldots\expandafter{\romannumeral-`} }
-\g at addto@macro\bxjs at begin@document at hook{%
+\AtBeginDocument{%
   \let\bxjsp at org@ldots\ldots
-  \let\ldots\pandocLdots}
+  \ifbxjsp at english\else \let\ldots\pandocLdots \fi}
 \IfFileExists{bxpandola.sty}{%
   \RequirePackage{bxpandola}\relax
   \PackageInfo\bxjsp at pkgname

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls	2018-10-03 22:43:40 UTC (rev 48823)
@@ -22,7 +22,7 @@
 %% in the same archive or directory.)
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{bxjsreport}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 %% このファイルは日本語文字を含みます.
 \def\bxjs at clsname{bxjsreport}
 \newif\ifjsc at needsp@tch
@@ -2449,37 +2449,36 @@
   \def\bxjs at iai{\noexpand~}
 \else \def\bxjs at iai{}
 \fi
-\newcount\bxjs at jayear
-\let\bxjs at gengo\@empty \bxjs at jayear\year
-\@tempcnta=\the\year\two at digits\month\two at digits\day\relax
-\ifnum\@tempcnta<19700101
-\else\ifnum\@tempcnta<19890108
-  \def\bxjs at gengo{昭和}\advance\bxjs at jayear-1925\relax
-  \let\heisei\bxjs at jayear
-\else\ifnum\@tempcnta<20190501
-  \def\bxjs at gengo{平成}\advance\bxjs at jayear-1988\relax
-  \let\heisei\bxjs at jayear
+\newif\ifbxjs at bxwareki@avail
+\IfFileExists{bxwareki.sty}{%
+  \RequirePackage{bxwareki}[]%
+  \bxjs at bxwareki@availtrue}{}
+\ifbxjs at bxwareki@avail
+  \let\jayear\warekiyear
+  \def\bxjs at tmpa{H}\ifx\bxjs at tmpa\warekigengoinitial
+    \newcount\heisei \heisei=\value{warekiyear}
+  \fi
 \else
-  \IfFileExists{bxwareki.sty}{\IfFileExists{bxwareki2019.def}{%
-    \RequirePackage{bxwareki}[]%
-    \let\bxjs at gengo\WarekiGengo
-  }{}}{}%
-  \if l\jsEngine \ifx\bxjs at gengo\@empty
-    \toks@{}
-    \directlua{pcall(function()
-      tex.toks[0] = bxjs.get_new_gengo()
-    end)}
-    \edef\bxjs at gengo{\the\toks@}
+  \@tempcnta=\the\year\two at digits\month\two at digits\day\relax
+  \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501
+    \newcount\heisei \heisei\year \advance\heisei-1988\relax
   \fi\fi
-  \ifx\bxjs at gengo\@empty\else \advance\bxjs at jayear-2018\relax \fi
-\fi\fi\fi
-\edef\jayear{%
-  \ifx\bxjs at gengo\@empty \the\bxjs at jayear\bxjs at iai
-  \else \bxjs at onxp{\bxjs at gengo}%
-    \ifnum\bxjs at jayear=\@ne \bxjs at unxp{元}%
-    \else \bxjs at iai\the\bxjs at jayear\bxjs at iai
-    \fi
-  \fi}
+  \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+    \edef\jayear{\bxjs at unxp{平成}\bxjs at iai \the\heisei \bxjs at iai}
+  \else \edef\jayear{\the\year \bxjs at iai}
+  \fi
+\fi
+\let\bxjs at next\relax
+\ifbxjs at bxwareki@avail
+  \ifx\warekigengo\@empty\else
+    \def\bxjs at next{\bxjs at onxp{\warekitoday}}
+  \fi
+\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+  \def\bxjs at next{%
+    \bxjs at unxp{平成}\bxjs at iai\number\heisei\bxjs at iai\bxjs at unxp{年}%
+    \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
+    \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}}
+\fi\fi
 \edef\bxjs at today{%
   \if at english
     \ifcase\month\or
@@ -2487,15 +2486,13 @@
       July\or August\or September\or October\or November\or December\fi
       \space\number\day, \number\year
   \else
-    \noexpand\bxjs at if@use at seireki{%
+    \ifx\bxjs at next\relax \expandafter\@firstoftwo
+    \else \noexpand\bxjs at if@use at seireki
+    \fi {%
       \number\year\bxjs at iai\bxjs at unxp{年}%
       \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
       \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }{%
-      \bxjs at onxp{\jayear}\bxjs at unxp{年}%
-      \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
-      \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }%
+    }{\bxjs at next}%
   \fi}
 \let\today\bxjs at today
 \g at addto@macro\bxjs at begin@document at hook{%

Modified: trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls	2018-10-03 22:43:11 UTC (rev 48822)
+++ trunk/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls	2018-10-03 22:43:40 UTC (rev 48823)
@@ -22,7 +22,7 @@
 %% in the same archive or directory.)
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{bxjsslide}
-  [2018/09/04 v1.9c BXJS document classes]
+  [2018/10/03 v1.9d BXJS document classes]
 %% このファイルは日本語文字を含みます.
 \def\bxjs at clsname{bxjsslide}
 \newif\ifjsc at needsp@tch
@@ -2318,37 +2318,36 @@
   \def\bxjs at iai{\noexpand~}
 \else \def\bxjs at iai{}
 \fi
-\newcount\bxjs at jayear
-\let\bxjs at gengo\@empty \bxjs at jayear\year
-\@tempcnta=\the\year\two at digits\month\two at digits\day\relax
-\ifnum\@tempcnta<19700101
-\else\ifnum\@tempcnta<19890108
-  \def\bxjs at gengo{昭和}\advance\bxjs at jayear-1925\relax
-  \let\heisei\bxjs at jayear
-\else\ifnum\@tempcnta<20190501
-  \def\bxjs at gengo{平成}\advance\bxjs at jayear-1988\relax
-  \let\heisei\bxjs at jayear
+\newif\ifbxjs at bxwareki@avail
+\IfFileExists{bxwareki.sty}{%
+  \RequirePackage{bxwareki}[]%
+  \bxjs at bxwareki@availtrue}{}
+\ifbxjs at bxwareki@avail
+  \let\jayear\warekiyear
+  \def\bxjs at tmpa{H}\ifx\bxjs at tmpa\warekigengoinitial
+    \newcount\heisei \heisei=\value{warekiyear}
+  \fi
 \else
-  \IfFileExists{bxwareki.sty}{\IfFileExists{bxwareki2019.def}{%
-    \RequirePackage{bxwareki}[]%
-    \let\bxjs at gengo\WarekiGengo
-  }{}}{}%
-  \if l\jsEngine \ifx\bxjs at gengo\@empty
-    \toks@{}
-    \directlua{pcall(function()
-      tex.toks[0] = bxjs.get_new_gengo()
-    end)}
-    \edef\bxjs at gengo{\the\toks@}
+  \@tempcnta=\the\year\two at digits\month\two at digits\day\relax
+  \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501
+    \newcount\heisei \heisei\year \advance\heisei-1988\relax
   \fi\fi
-  \ifx\bxjs at gengo\@empty\else \advance\bxjs at jayear-2018\relax \fi
-\fi\fi\fi
-\edef\jayear{%
-  \ifx\bxjs at gengo\@empty \the\bxjs at jayear\bxjs at iai
-  \else \bxjs at onxp{\bxjs at gengo}%
-    \ifnum\bxjs at jayear=\@ne \bxjs at unxp{元}%
-    \else \bxjs at iai\the\bxjs at jayear\bxjs at iai
-    \fi
-  \fi}
+  \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+    \edef\jayear{\bxjs at unxp{平成}\bxjs at iai \the\heisei \bxjs at iai}
+  \else \edef\jayear{\the\year \bxjs at iai}
+  \fi
+\fi
+\let\bxjs at next\relax
+\ifbxjs at bxwareki@avail
+  \ifx\warekigengo\@empty\else
+    \def\bxjs at next{\bxjs at onxp{\warekitoday}}
+  \fi
+\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne
+  \def\bxjs at next{%
+    \bxjs at unxp{平成}\bxjs at iai\number\heisei\bxjs at iai\bxjs at unxp{年}%
+    \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
+    \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}}
+\fi\fi
 \edef\bxjs at today{%
   \if at english
     \ifcase\month\or
@@ -2356,15 +2355,13 @@
       July\or August\or September\or October\or November\or December\fi
       \space\number\day, \number\year
   \else
-    \noexpand\bxjs at if@use at seireki{%
+    \ifx\bxjs at next\relax \expandafter\@firstoftwo
+    \else \noexpand\bxjs at if@use at seireki
+    \fi {%
       \number\year\bxjs at iai\bxjs at unxp{年}%
       \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
       \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }{%
-      \bxjs at onxp{\jayear}\bxjs at unxp{年}%
-      \bxjs at iai\number\month\bxjs at iai\bxjs at unxp{月}%
-      \bxjs at iai\number\day\bxjs at iai\bxjs at unxp{日}%
-    }%
+    }{\bxjs at next}%
   \fi}
 \let\today\bxjs at today
 \g at addto@macro\bxjs at begin@document at hook{%



More information about the tex-live-commits mailing list