summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-30 22:40:21 +0000
committerKarl Berry <karl@freefriends.org>2018-04-30 22:40:21 +0000
commitd310a5884150cb8753e7fbea759cc579c2a305b4 (patch)
treecc70a768d9a00bc231c70af94d69a72a93e866fb /Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty
parenta28e1bfccd6fe522fcd296426e4d89c7fb4f19b6 (diff)
bxjscls (30apr18)
git-svn-id: svn://tug.org/texlive/trunk@47517 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty')
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty25
1 files changed, 24 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty
index d6328630024..c27000bcf02 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
\def\bxac@pkgname{bxjscompat}
\let\bxac@engine=n
\def\bxac@do#1#2{%
@@ -119,6 +119,29 @@
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
%%