diff options
author | Karl Berry <karl@freefriends.org> | 2018-10-03 22:43:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-10-03 22:43:40 +0000 |
commit | 55845302274b6cfc093524d6b32db3b1747626c5 (patch) | |
tree | 59475b9b3a6a7c6695513ddb7846f3524eccabae /Master/texmf-dist/tex | |
parent | 6a571d522b6eef2ec3644ce4a87d392c6685be32 (diff) |
bxjscls (3oct18)
git-svn-id: svn://tug.org/texlive/trunk@48823 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
11 files changed, 150 insertions, 178 deletions
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls index dcaca65ca4c..fd82e3edf76 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls @@ -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@clsname{bxjsarticle} \newif\ifjsc@needsp@tch @@ -2320,37 +2320,36 @@ \def\bxjs@iai{\noexpand~} \else \def\bxjs@iai{} \fi -\newcount\bxjs@jayear -\let\bxjs@gengo\@empty \bxjs@jayear\year -\@tempcnta=\the\year\two@digits\month\two@digits\day\relax -\ifnum\@tempcnta<19700101 -\else\ifnum\@tempcnta<19890108 - \def\bxjs@gengo{昭和}\advance\bxjs@jayear-1925\relax - \let\heisei\bxjs@jayear -\else\ifnum\@tempcnta<20190501 - \def\bxjs@gengo{平成}\advance\bxjs@jayear-1988\relax - \let\heisei\bxjs@jayear +\newif\ifbxjs@bxwareki@avail +\IfFileExists{bxwareki.sty}{% + \RequirePackage{bxwareki}[]% + \bxjs@bxwareki@availtrue}{} +\ifbxjs@bxwareki@avail + \let\jayear\warekiyear + \def\bxjs@tmpa{H}\ifx\bxjs@tmpa\warekigengoinitial + \newcount\heisei \heisei=\value{warekiyear} + \fi \else - \IfFileExists{bxwareki.sty}{\IfFileExists{bxwareki2019.def}{% - \RequirePackage{bxwareki}[]% - \let\bxjs@gengo\WarekiGengo - }{}}{}% - \if l\jsEngine \ifx\bxjs@gengo\@empty - \toks@{} - \directlua{pcall(function() - tex.toks[0] = bxjs.get_new_gengo() - end)} - \edef\bxjs@gengo{\the\toks@} + \@tempcnta=\the\year\two@digits\month\two@digits\day\relax + \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501 + \newcount\heisei \heisei\year \advance\heisei-1988\relax \fi\fi - \ifx\bxjs@gengo\@empty\else \advance\bxjs@jayear-2018\relax \fi -\fi\fi\fi -\edef\jayear{% - \ifx\bxjs@gengo\@empty \the\bxjs@jayear\bxjs@iai - \else \bxjs@onxp{\bxjs@gengo}% - \ifnum\bxjs@jayear=\@ne \bxjs@unxp{元}% - \else \bxjs@iai\the\bxjs@jayear\bxjs@iai - \fi - \fi} + \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne + \edef\jayear{\bxjs@unxp{平成}\bxjs@iai \the\heisei \bxjs@iai} + \else \edef\jayear{\the\year \bxjs@iai} + \fi +\fi +\let\bxjs@next\relax +\ifbxjs@bxwareki@avail + \ifx\warekigengo\@empty\else + \def\bxjs@next{\bxjs@onxp{\warekitoday}} + \fi +\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne + \def\bxjs@next{% + \bxjs@unxp{平成}\bxjs@iai\number\heisei\bxjs@iai\bxjs@unxp{年}% + \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% + \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}} +\fi\fi \edef\bxjs@today{% \if@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@if@use@seireki{% + \ifx\bxjs@next\relax \expandafter\@firstoftwo + \else \noexpand\bxjs@if@use@seireki + \fi {% \number\year\bxjs@iai\bxjs@unxp{年}% \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}% - }{% - \bxjs@onxp{\jayear}\bxjs@unxp{年}% - \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% - \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}% - }% + }{\bxjs@next}% \fi} \let\today\bxjs@today \g@addto@macro\bxjs@begin@document@hook{% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls index 8f3a81de906..2d17c19866d 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls @@ -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@clsname{bxjsbook} \newif\ifjsc@needsp@tch @@ -2426,37 +2426,36 @@ \def\bxjs@iai{\noexpand~} \else \def\bxjs@iai{} \fi -\newcount\bxjs@jayear -\let\bxjs@gengo\@empty \bxjs@jayear\year -\@tempcnta=\the\year\two@digits\month\two@digits\day\relax -\ifnum\@tempcnta<19700101 -\else\ifnum\@tempcnta<19890108 - \def\bxjs@gengo{昭和}\advance\bxjs@jayear-1925\relax - \let\heisei\bxjs@jayear -\else\ifnum\@tempcnta<20190501 - \def\bxjs@gengo{平成}\advance\bxjs@jayear-1988\relax - \let\heisei\bxjs@jayear +\newif\ifbxjs@bxwareki@avail +\IfFileExists{bxwareki.sty}{% + \RequirePackage{bxwareki}[]% + \bxjs@bxwareki@availtrue}{} +\ifbxjs@bxwareki@avail + \let\jayear\warekiyear + \def\bxjs@tmpa{H}\ifx\bxjs@tmpa\warekigengoinitial + \newcount\heisei \heisei=\value{warekiyear} + \fi \else - \IfFileExists{bxwareki.sty}{\IfFileExists{bxwareki2019.def}{% - \RequirePackage{bxwareki}[]% - \let\bxjs@gengo\WarekiGengo - }{}}{}% - \if l\jsEngine \ifx\bxjs@gengo\@empty - \toks@{} - \directlua{pcall(function() - tex.toks[0] = bxjs.get_new_gengo() - end)} - \edef\bxjs@gengo{\the\toks@} + \@tempcnta=\the\year\two@digits\month\two@digits\day\relax + \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501 + \newcount\heisei \heisei\year \advance\heisei-1988\relax \fi\fi - \ifx\bxjs@gengo\@empty\else \advance\bxjs@jayear-2018\relax \fi -\fi\fi\fi -\edef\jayear{% - \ifx\bxjs@gengo\@empty \the\bxjs@jayear\bxjs@iai - \else \bxjs@onxp{\bxjs@gengo}% - \ifnum\bxjs@jayear=\@ne \bxjs@unxp{元}% - \else \bxjs@iai\the\bxjs@jayear\bxjs@iai - \fi - \fi} + \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne + \edef\jayear{\bxjs@unxp{平成}\bxjs@iai \the\heisei \bxjs@iai} + \else \edef\jayear{\the\year \bxjs@iai} + \fi +\fi +\let\bxjs@next\relax +\ifbxjs@bxwareki@avail + \ifx\warekigengo\@empty\else + \def\bxjs@next{\bxjs@onxp{\warekitoday}} + \fi +\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne + \def\bxjs@next{% + \bxjs@unxp{平成}\bxjs@iai\number\heisei\bxjs@iai\bxjs@unxp{年}% + \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% + \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}} +\fi\fi \edef\bxjs@today{% \if@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@if@use@seireki{% + \ifx\bxjs@next\relax \expandafter\@firstoftwo + \else \noexpand\bxjs@if@use@seireki + \fi {% \number\year\bxjs@iai\bxjs@unxp{年}% \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}% - }{% - \bxjs@onxp{\jayear}\bxjs@unxp{年}% - \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% - \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}% - }% + }{\bxjs@next}% \fi} \let\today\bxjs@today \g@addto@macro\bxjs@begin@document@hook{% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty index 5ad00519b95..0347e57183f 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty @@ -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@pkgname{bxjscjkcat} \newcount\bxjx@cnta \@onlypreamble\bxjx@tmpdo diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty index 9e87d7cbb30..f1b09a68eba 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty @@ -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@pkgname{bxjscompat} \let\bxac@engine=n \def\bxac@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 %% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def index 0cd877f885f..ec30cf930eb 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def @@ -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]{% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def index 8d412cedc9b..d8e38446087 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def @@ -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}% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def index 2de6829c0c3..91899aaeeca 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def @@ -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@endpreamble@hook @@ -134,9 +134,13 @@ \def\bxjs@pandoc@lang@ja{% \expandafter\let\csname ver@babel.sty\endcsname\@undefined \edef\bxjs@next{% - \noexpand\RequirePackage[\bxjs@lang@pkg@options]{babel}[]% + \noexpand\RequirePackage[\bxjs@lang@pkg@options,english]{babel}[]% }\bxjs@next - \RequirePackage[main=japanese]{pxbabel}[]} + \if j\jsEngine + \RequirePackage[main=japanese]{pxbabel}[]% + \else + \RequirePackage{bxorigcapt}[]% + \fi} \fi \bxjs@set@dupload@proc{geometry.sty}{% \setpagelayout*{#1}} diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def index e13b55658d3..f74ede1e179 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def @@ -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@simplejasetupfalse diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty index 780593de978..d6bc773426b 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty @@ -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@pkgname{bxjscjkcat} \let\bxjsp@engine=n @@ -34,6 +34,9 @@ \bxjsp@do\XeTeXversion{\let\bxjsp@engine=x} \bxjsp@do\pdftexversion{\let\bxjsp@engine=p} \bxjsp@do\luatexversion{\let\bxjsp@engine=l} +\newif\ifbxjsp@english +\DeclareOption{english}{\bxjsp@englishtrue} +\ProcessOptions* \@onlypreamble\pandocSkipLoadFile \newcommand*\pandocSkipLoadFile[1]{% \expandafter\bxjsp@skip@load@file@a\csname ver@#1\endcsname{#1}} @@ -83,9 +86,9 @@ \bxjsp@ja@ellipsis \let\bxjsp@tok=} \def\bxjsp@ldots@g{% \expandafter\bxjsp@org@ldots\expandafter{\romannumeral-`} } -\g@addto@macro\bxjs@begin@document@hook{% +\AtBeginDocument{% \let\bxjsp@org@ldots\ldots - \let\ldots\pandocLdots} + \ifbxjsp@english\else \let\ldots\pandocLdots \fi} \IfFileExists{bxpandola.sty}{% \RequirePackage{bxpandola}\relax \PackageInfo\bxjsp@pkgname diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls index b051929376c..01fdb6a86ff 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls @@ -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@clsname{bxjsreport} \newif\ifjsc@needsp@tch @@ -2449,37 +2449,36 @@ \def\bxjs@iai{\noexpand~} \else \def\bxjs@iai{} \fi -\newcount\bxjs@jayear -\let\bxjs@gengo\@empty \bxjs@jayear\year -\@tempcnta=\the\year\two@digits\month\two@digits\day\relax -\ifnum\@tempcnta<19700101 -\else\ifnum\@tempcnta<19890108 - \def\bxjs@gengo{昭和}\advance\bxjs@jayear-1925\relax - \let\heisei\bxjs@jayear -\else\ifnum\@tempcnta<20190501 - \def\bxjs@gengo{平成}\advance\bxjs@jayear-1988\relax - \let\heisei\bxjs@jayear +\newif\ifbxjs@bxwareki@avail +\IfFileExists{bxwareki.sty}{% + \RequirePackage{bxwareki}[]% + \bxjs@bxwareki@availtrue}{} +\ifbxjs@bxwareki@avail + \let\jayear\warekiyear + \def\bxjs@tmpa{H}\ifx\bxjs@tmpa\warekigengoinitial + \newcount\heisei \heisei=\value{warekiyear} + \fi \else - \IfFileExists{bxwareki.sty}{\IfFileExists{bxwareki2019.def}{% - \RequirePackage{bxwareki}[]% - \let\bxjs@gengo\WarekiGengo - }{}}{}% - \if l\jsEngine \ifx\bxjs@gengo\@empty - \toks@{} - \directlua{pcall(function() - tex.toks[0] = bxjs.get_new_gengo() - end)} - \edef\bxjs@gengo{\the\toks@} + \@tempcnta=\the\year\two@digits\month\two@digits\day\relax + \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501 + \newcount\heisei \heisei\year \advance\heisei-1988\relax \fi\fi - \ifx\bxjs@gengo\@empty\else \advance\bxjs@jayear-2018\relax \fi -\fi\fi\fi -\edef\jayear{% - \ifx\bxjs@gengo\@empty \the\bxjs@jayear\bxjs@iai - \else \bxjs@onxp{\bxjs@gengo}% - \ifnum\bxjs@jayear=\@ne \bxjs@unxp{元}% - \else \bxjs@iai\the\bxjs@jayear\bxjs@iai - \fi - \fi} + \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne + \edef\jayear{\bxjs@unxp{平成}\bxjs@iai \the\heisei \bxjs@iai} + \else \edef\jayear{\the\year \bxjs@iai} + \fi +\fi +\let\bxjs@next\relax +\ifbxjs@bxwareki@avail + \ifx\warekigengo\@empty\else + \def\bxjs@next{\bxjs@onxp{\warekitoday}} + \fi +\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne + \def\bxjs@next{% + \bxjs@unxp{平成}\bxjs@iai\number\heisei\bxjs@iai\bxjs@unxp{年}% + \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% + \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}} +\fi\fi \edef\bxjs@today{% \if@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@if@use@seireki{% + \ifx\bxjs@next\relax \expandafter\@firstoftwo + \else \noexpand\bxjs@if@use@seireki + \fi {% \number\year\bxjs@iai\bxjs@unxp{年}% \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}% - }{% - \bxjs@onxp{\jayear}\bxjs@unxp{年}% - \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% - \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}% - }% + }{\bxjs@next}% \fi} \let\today\bxjs@today \g@addto@macro\bxjs@begin@document@hook{% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls index dc2e4981198..0c5ab74cecf 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls @@ -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@clsname{bxjsslide} \newif\ifjsc@needsp@tch @@ -2318,37 +2318,36 @@ \def\bxjs@iai{\noexpand~} \else \def\bxjs@iai{} \fi -\newcount\bxjs@jayear -\let\bxjs@gengo\@empty \bxjs@jayear\year -\@tempcnta=\the\year\two@digits\month\two@digits\day\relax -\ifnum\@tempcnta<19700101 -\else\ifnum\@tempcnta<19890108 - \def\bxjs@gengo{昭和}\advance\bxjs@jayear-1925\relax - \let\heisei\bxjs@jayear -\else\ifnum\@tempcnta<20190501 - \def\bxjs@gengo{平成}\advance\bxjs@jayear-1988\relax - \let\heisei\bxjs@jayear +\newif\ifbxjs@bxwareki@avail +\IfFileExists{bxwareki.sty}{% + \RequirePackage{bxwareki}[]% + \bxjs@bxwareki@availtrue}{} +\ifbxjs@bxwareki@avail + \let\jayear\warekiyear + \def\bxjs@tmpa{H}\ifx\bxjs@tmpa\warekigengoinitial + \newcount\heisei \heisei=\value{warekiyear} + \fi \else - \IfFileExists{bxwareki.sty}{\IfFileExists{bxwareki2019.def}{% - \RequirePackage{bxwareki}[]% - \let\bxjs@gengo\WarekiGengo - }{}}{}% - \if l\jsEngine \ifx\bxjs@gengo\@empty - \toks@{} - \directlua{pcall(function() - tex.toks[0] = bxjs.get_new_gengo() - end)} - \edef\bxjs@gengo{\the\toks@} + \@tempcnta=\the\year\two@digits\month\two@digits\day\relax + \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501 + \newcount\heisei \heisei\year \advance\heisei-1988\relax \fi\fi - \ifx\bxjs@gengo\@empty\else \advance\bxjs@jayear-2018\relax \fi -\fi\fi\fi -\edef\jayear{% - \ifx\bxjs@gengo\@empty \the\bxjs@jayear\bxjs@iai - \else \bxjs@onxp{\bxjs@gengo}% - \ifnum\bxjs@jayear=\@ne \bxjs@unxp{元}% - \else \bxjs@iai\the\bxjs@jayear\bxjs@iai - \fi - \fi} + \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne + \edef\jayear{\bxjs@unxp{平成}\bxjs@iai \the\heisei \bxjs@iai} + \else \edef\jayear{\the\year \bxjs@iai} + \fi +\fi +\let\bxjs@next\relax +\ifbxjs@bxwareki@avail + \ifx\warekigengo\@empty\else + \def\bxjs@next{\bxjs@onxp{\warekitoday}} + \fi +\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne + \def\bxjs@next{% + \bxjs@unxp{平成}\bxjs@iai\number\heisei\bxjs@iai\bxjs@unxp{年}% + \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% + \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}} +\fi\fi \edef\bxjs@today{% \if@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@if@use@seireki{% + \ifx\bxjs@next\relax \expandafter\@firstoftwo + \else \noexpand\bxjs@if@use@seireki + \fi {% \number\year\bxjs@iai\bxjs@unxp{年}% \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}% - }{% - \bxjs@onxp{\jayear}\bxjs@unxp{年}% - \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% - \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}% - }% + }{\bxjs@next}% \fi} \let\today\bxjs@today \g@addto@macro\bxjs@begin@document@hook{% |