summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bxjscls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/bxjscls')
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls224
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls250
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty128
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty25
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def33
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def2
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def6
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def32
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty6
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls224
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls224
11 files changed, 637 insertions, 517 deletions
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls
index 6539e7729df..8ca25226fb8 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
%% このファイルは日本語文字を含みます.
\def\bxjs@clsname{bxjsarticle}
\newif\ifjsc@needsp@tch
@@ -68,6 +68,9 @@
{It's a fatal error. I'll quit right now.}
\expandafter\@firstofone
\fi{\endinput\@@end}
+\ifx l\jsEngine
+ \directlua{ bxjs = {} }
+\fi
\ifjsWitheTeX \let\bxjs@protected\protected
\else \let\bxjs@protected\@empty
\fi
@@ -107,12 +110,12 @@
\fi
\endgroup
#1=\bxjs@g@tmpa\relax}
-\if j\jsEngine \def\bxjs@parse@qh@all{zw,zh}
-\else \def\bxjs@parse@qh@all{trueQ,trueH,Q,H,zw,zh}
+\if j\jsEngine \def\bxjs@parse@qh@units{zw,zh}
+\else \def\bxjs@parse@qh@units{trueQ,trueH,Q,H,zw,zh}
\fi
\def\bxjs@parse@qh#1{%
\let\bxjs@tmpb\relax
- \@for\bxjs@tmpa:=\bxjs@parse@qh@all\do{%
+ \@for\bxjs@tmpa:=\bxjs@parse@qh@units\do{%
\ifx\bxjs@tmpb\relax
\edef\bxjs@next{{\bxjs@tmpa}{#1}}%
\expandafter\bxjs@parse@qh@a\csname bxjs@unit@\bxjs@tmpa\expandafter
@@ -133,18 +136,28 @@
\fi
\fi}
\def\bxjs@unit@Q{0.25mm}\let\bxjs@unit@H\bxjs@unit@Q
+\@onlypreamble\bxjs@begin@document@hook
+\let\bxjs@begin@document@hook\@empty
+\AtBeginDocument{\bxjs@begin@document@hook}
+\@onlypreamble\bxjs@post@option@hook
+\let\bxjs@post@option@hook\@empty
+\@onlypreamble\bxjs@pre@jadriver@hook
+\let\bxjs@pre@jadriver@hook\@empty
\def\jsAtEndOfClass{%
\expandafter\g@addto@macro\csname\bxjs@clsname.cls-h@@k\endcsname}
-\@onlypreamble\bxjs@restore@jltrcc
-\let\bxjs@restore@jltrcc\@empty
+\@onlypreamble\bxjs@tmpdo
+\@onlypreamble\bxjs@tmpdo@a
+\@onlypreamble\bxjs@tmpdo@b
+\@onlypreamble\bxjs@tmpdo@c
+\@onlypreamble\bxjs@tmpdo@d
\if l\jsEngine
-\def\bxjs@change@jltrcc#1{%
- \xdef\bxjs@restore@jltrcc{%
- \bxjs@restore@jltrcc
+\def\bxjs@tmpdo#1{%
+ \xdef\bxjs@pre@jadriver@hook{%
+ \bxjs@pre@jadriver@hook
\catcode`#1=\the\catcode`#1\relax}%
\catcode`#1=11\relax}
-\@tfor\bxjs@x:=西暦\do
- {\expandafter\bxjs@change@jltrcc\bxjs@x}
+\@tfor\bxjs@tmpa:=和西暦\do
+ {\expandafter\bxjs@tmpdo\bxjs@tmpa}
\fi
\bxjs@robust@def\jsInhibitGlue{%
\ifx\inhibitglue\@undefined\else \inhibitglue \fi}
@@ -161,6 +174,7 @@
\newif\if@restonecol
\newif\if@titlepage
\newif\if@enablejfam \@enablejfamfalse
+\@onlypreamble\bxjs@setpaper
\def\bxjs@setpaper#1{\def\bxjs@param@paper{#1}}
\DeclareOption{a3paper}{\bxjs@setpaper{a3paper}}
\DeclareOption{a4paper}{\bxjs@setpaper{a4paper}}
@@ -301,7 +315,7 @@
\expandafter\let\expandafter\ifjsDraft\csname if#1\endcsname}
\DeclareOption{draft}{\bxjs@draft{true}\setlength\overfullrule{5pt}}
\DeclareOption{final}{\bxjs@draft{false}\setlength\overfullrule{0pt}}
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\expandafter\ifx\csname ifdraft\endcsname\relax
\expandafter\let\csname ifdraft\expandafter\endcsname
\csname ifjsDraft\endcsname
@@ -341,9 +355,8 @@
\else \@tempdimb=\@tempcntb\@ne \fi}%
\xdef\bxjs@gtmpa{\the\@tempdimb}%
\endgroup #1=\bxjs@gtmpa\relax}
-\let\bxjs@composite@proc\relax
\DeclareOption{pandoc}{%
- \def\bxjs@composite@proc{%
+ \g@addto@macro\bxjs@post@option@hook{%
\bxjs@oldfontcommandstrue
\setkeys{bxjs}{ja=pandoc}%
\let\bxjs@engine@given=*}%
@@ -408,26 +421,6 @@
\let\bxjs@driver@given\bxjs@driver@@xetex}
\DeclareOption{dvipdfmx-if-dvi}{%
\setkeys{bxjs}{dvi=dvipdfmx}}
-\newif\ifbxjs@usezw \bxjs@usezwtrue
-\DeclareOption{nozw}{%
- \bxjs@usezwfalse}
-\DeclareOption{zw}{%
- \bxjs@usezwtrue}
-\newif\ifbxjs@disguise@js \bxjs@disguise@jstrue
-\DeclareOption{nojs}{%
- \bxjs@disguise@jsfalse}
-\DeclareOption{js}{%
- \bxjs@disguise@jstrue}
-\newif\ifbxjs@precisetext
-\DeclareOption{noprecisetext}{%
- \bxjs@precisetextfalse}
-\DeclareOption{precisetext}{%
- \bxjs@precisetexttrue}
-\newif\ifbxjs@simplejasetup \bxjs@simplejasetuptrue
-\DeclareOption{nosimplejasetup}{%
- \bxjs@simplejasetupfalse}
-\DeclareOption{simplejasetup}{%
- \bxjs@simplejasetuptrue}
\newif\ifbxjs@bigcode \bxjs@bigcodefalse
\edef\bxjs@tmpa{\expandafter\noexpand\csname\endcsname}
\def\bxjs@tmpb#1 #2#3\@nil{%
@@ -442,16 +435,27 @@
\bxjs@oldfontcommandsfalse}
\DeclareOption{oldfontcommands}{%
\bxjs@oldfontcommandstrue}
-\def\bxjs@setkey{%
- \expandafter\bxjs@setkey@a\expandafter{\CurrentOption}}
-\def\bxjs@setkey@a{\bxjs@safe@setkeys{bxjs}}
-\DeclareOption*{\bxjs@setkey}
+\DeclareOption*{%
+ \def\bxjs@next{\bxjs@safe@setkeys{bxjs}}%
+ \expandafter\bxjs@next\expandafter{\CurrentOption}}
\def\bxjs@safe@setkeys#1#2{%
- \let\bxjs@KV@errx\KV@errx
- \let\KV@errx\bxjs@safe@setkeys@a
+ \let\bxjs@save@KV@errx\KV@errx \let\KV@errx\@gobble
\setkeys{#1}{#2}%
- \let\KV@errx\bxjs@KV@errx}
-\def\bxjs@safe@setkeys@a#1{}
+ \let\KV@errx\bxjs@save@KV@errx}
+\@onlypreamble\bxjs@declare@enum@option
+\def\bxjs@declare@enum@option#1#2{%
+ \define@key{bxjs}{#1}{%
+ \expandafter\ifx\csname bxjs@#2@@##1\endcsname\relax
+ \bxjs@error@keyval{#1}{##1}%
+ \else \bxjs@csletcs{bxjs@#2}{bxjs@#2@@##1}%
+ \fi}}
+\@onlypreamble\bxjs@declare@bool@option
+\def\bxjs@declare@bool@option#1#2{%
+ \define@key{bxjs}{#1}[true]{%
+ \expandafter\ifx\csname bxjs@#2##1\endcsname\relax
+ \bxjs@error@keyval{#1}{##1}%
+ \else \@nameuse{bxjs@#2##1}%
+ \fi}}
\def\bxjs@set@keyval#1#2#3{%
\expandafter\let\expandafter\bxjs@next\csname bxjs@kv@#1@#2\endcsname
\ifx\bxjs@next\relax
@@ -479,9 +483,9 @@
\define@key{bxjs}{mag}{\edef\bxjs@param@mag{#1}}
\define@key{bxjs}{paper}{\edef\bxjs@param@paper{#1}}
\let\bxjs@jadriver\relax
-\define@key{bxjs}{jadriver}{\edef\bxjs@jadriver{#1}}
+\define@key{bxjs}{jadriver}{\edef\bxjs@jadriver@opt{#1}}
\define@key{bxjs}{ja}[\relax]{%
- \ifx\relax#1\else\edef\bxjs@jadriver{#1}\fi}
+ \ifx\relax#1\else\edef\bxjs@jadriver@opt{#1}\fi}
\let\jsJaFont\@empty
\define@key{bxjs}{jafont}{\edef\jsJaFont{#1}}
\let\jsJaParam\@empty
@@ -550,7 +554,7 @@
\define@key{bxjs}{layout}{%
\bxjs@set@keyval{layout}{#1}{}}
\define@key{bxjs}{textwidth-limit}{%
- \edef\bxjs@textwidth@limit{#1}}
+ \edef\bxjs@textwidth@limit@opt{#1}}
\define@key{bxjs}{textwidth}{\edef\bxjs@textwidth@opt{#1}}
\define@key{bxjs}{line_length}{\setkeys{bxjs}{textwidth=#1}}
\define@key{bxjs}{number-of-lines}{\edef\bxjs@number@of@lines@opt{#1}}
@@ -594,15 +598,31 @@
\def\bxjs@kv@labelsection@compat{\let\bxjs@label@section\bxjs@label@section@compat}
\def\bxjs@kv@labelsection@modern{\let\bxjs@label@section\bxjs@label@section@modern}
\define@key{bxjs}{label-section}{\bxjs@set@keyval{labelsection}{#1}{}}
-\let\bxjs@ltx@removeelement\@removeelement
+\newif\ifbxjs@usezw \bxjs@usezwtrue
+\bxjs@declare@bool@option{use-zw}{usezw}
+\DeclareOption{nozw}{\setkeys{bxjs}{use-zw=false}}
+\DeclareOption{zw}{\setkeys{bxjs}{use-zw=true}}
+\newif\ifbxjs@disguise@js \bxjs@disguise@jstrue
+\bxjs@declare@bool@option{disguise-js}{disguise@js}
+\DeclareOption{nojs}{\setkeys{bxjs}{disguise-js=false}}
+\DeclareOption{js}{\setkeys{bxjs}{disguise-js=true}}
+\newif\ifbxjs@precisetext
+\bxjs@declare@bool@option{precise-text}{precisetext}
+\DeclareOption{noprecisetext}{\setkeys{bxjs}{precise-text=false}}
+\DeclareOption{precisetext}{\setkeys{bxjs}{precise-text=true}}
+\newif\ifbxjs@simplejasetup \bxjs@simplejasetuptrue
+\bxjs@declare@bool@option{simple-ja-setup}{simplejasetup}
+\DeclareOption{nosimplejasetup}{\setkeys{bxjs}{simple-ja-setup=false}}
+\DeclareOption{simplejasetup}{\setkeys{bxjs}{simple-ja-setup=true}}
+\let\bxjs@org@removeelement\@removeelement
\def\@removeelement#1#2#3{%
\def\reserved@a{#2}%
\ifx\reserved@a\@empty \let#3\@empty
- \else \bxjs@ltx@removeelement{#1}{#2}{#3}%
+ \else \bxjs@org@removeelement{#1}{#2}{#3}%
\fi}
\ExecuteOptions{a4paper,oneside,onecolumn,notitlepage,final}
\ProcessOptions\relax
-\bxjs@composite@proc
+\bxjs@post@option@hook
\if@slide
\def\maybeblue{\@ifundefined{ver@color.sty}{}{\color{blue}}}
\fi
@@ -611,32 +631,28 @@
\setlength\paperheight{\paperwidth}
\setlength\paperwidth {\@tempdima}
\fi
-\@onlypreamble\bxjs@purge@brace@elts
-\def\bxjs@purge@brace@elts{%
+\def\bxjs@tmpdo{%
\def\bxjs@tmpa{\@gobble}%
- \expandafter\bxjs@purge@be@a\@classoptionslist,\@nil,%
+ \expandafter\bxjs@tmpdo@a\@classoptionslist,\@nil,%
\let\@classoptionslist\bxjs@tmpa}
-\@onlypreamble\bxjs@purge@be@a
-\def\bxjs@purge@be@a#1,{%
+\def\bxjs@tmpdo@a#1,{%
\ifx\@nil#1\relax\else
- \bxjs@purge@be@b#1{}\@nil
+ \bxjs@tmpdo@b#1{}\@nil
\if@tempswa \edef\bxjs@tmpa{\bxjs@tmpa,#1}\fi
- \expandafter\bxjs@purge@be@a
+ \expandafter\bxjs@tmpdo@a
\fi}
-\@onlypreamble\bxjs@purge@be@b
-\def\bxjs@purge@be@b#1#{\bxjs@purge@be@c}
-\@onlypreamble\bxjs@purge@be@c
-\def\bxjs@purge@be@c#1\@nil{%
+\def\bxjs@tmpdo@b#1#{\bxjs@tmpdo@c}
+\def\bxjs@tmpdo@c#1\@nil{%
\ifx\@nil#1\@nil \@tempswatrue \else \@tempswafalse \fi}
-\bxjs@purge@brace@elts
+\bxjs@tmpdo
\@expandtwoargs\@removeelement
{papersize}\@classoptionslist\@classoptionslist
\@expandtwoargs\@removeelement
{10pt}\@classoptionslist\@classoptionslist
\@expandtwoargs\@removeelement
{noscale}\@classoptionslist\@classoptionslist
-\ifx\bxjs@jadriver\relax\else
- \let\bxjs@jadriver@given\bxjs@jadriver
+\ifx\bxjs@jadriver@opt\@undefined\else
+ \let\bxjs@jadriver\bxjs@jadriver@opt
\fi
\let\bxjs@tmpb\jsEngine
\ifx j\bxjs@tmpb\ifjsWithpTeXng
@@ -696,17 +712,17 @@
\else \@tempswatrue
\fi\fi\fi
\if@tempswa
- \ifx\bxjs@driver@opt\@undefined \ifx\bxjs@jadriver@given\@undefined\else
+ \ifx\bxjs@driver@opt\@undefined \ifx\bxjs@jadriver@opt\@undefined\else
\ClassWarningNoLine\bxjs@clsname
{No driver option is given}
\fi\fi
\ifbxjs@dvi@opt
- \edef\bxjs@nxt{%
+ \edef\bxjs@next{%
\let\noexpand\bxjs@driver@given
\csname bxjs@dvidriver@@\bxjs@driver@opt\endcsname
\noexpand\g@addto@macro\noexpand\@classoptionslist
{,\bxjs@driver@opt}%
- }\bxjs@nxt
+ }\bxjs@next
\fi
\fi
\ifjsWithpTeXng
@@ -727,7 +743,7 @@
\let\bxjs@jadriver\bxjs@@minimal
\fi
\fi
-\ifx\bxjs@jadriver@given\@undefined\else
+\ifx\bxjs@jadriver@opt\@undefined\else
\ifx\bxjs@engine@given\@undefined
\ClassError\bxjs@clsname
{An engine option must be explicitly given}%
@@ -821,6 +837,7 @@
\catcode`\?=11 \let\p@?\jsc@mpt
\fi
\chardef\bxjs@qmcc=\catcode`\?\relax
+\g@addto@macro\bxjs@pre@jadriver@hook{\catcode`\?=12\relax}
\newdimen\jsZw
\jsZw=10\jsc@mpt \jsZw=\jsScale\jsZw
\ifbxjs@usezw
@@ -920,10 +937,10 @@
\skip2=\abovedisplayshortskip
\skip4=\belowdisplayskip
\skip6=\belowdisplayshortskip
- \let\bxjs@ltx@nomath\@nomath
+ \let\bxjs@save@nomath\@nomath
\let\@nomath\@gobble
\@currsize\selectfont
- \let\@nomath\bxjs@ltx@nomath
+ \let\@nomath\bxjs@save@nomath
\abovedisplayskip=\skip0
\abovedisplayshortskip=\skip2
\belowdisplayskip=\skip4
@@ -1014,21 +1031,23 @@
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
+\@onlypreamble\bxjs@bd@pre@geometry@hook
+\let\bxjs@bd@pre@geometry@hook\@empty
\ifjsc@mag
\mag=\bxjs@param@mag
\fi
\setlength{\topskip}{10\p@?}
\def\bxjs@unit@trueQ{0.25truemm}\let\bxjs@unit@trueH\bxjs@unit@trueQ
\def\bxjs@unit@zw{\jsZw}\let\bxjs@unit@zh\bxjs@unit@zw
-\def\bxjs@read@a{\futurelet\bxjs@tmpa\bxjs@read@b}
-\def\bxjs@read@b{%
- \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@read@c
- \else \expandafter\bxjs@read@d \fi}
-\def\bxjs@read@c#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}}
-\def\bxjs@read@d#1\@nil{\bxjs@read@e#1,,\@nil}
-\def\bxjs@read@e#1,#2,#3\@nil{%
+\def\bxjs@tmpdo{\futurelet\bxjs@tmpa\bxjs@tmpdo@a}
+\def\bxjs@tmpdo@a{%
+ \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@tmpdo@b
+ \else \expandafter\bxjs@tmpdo@c \fi}
+\def\bxjs@tmpdo@b#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}}
+\def\bxjs@tmpdo@c#1\@nil{\bxjs@tmpdo@d#1,,\@nil}
+\def\bxjs@tmpdo@d#1,#2,#3\@nil{%
\ifx\@nil#3\@nil\else \edef\bxjs@param@paper{papersize={#1,#2}}\fi}
-\expandafter\bxjs@read@a\bxjs@param@paper\@empty\@empty\@nil
+\expandafter\bxjs@tmpdo\bxjs@param@paper\@empty\@empty\@nil
\edef\bxjs@layout@paper{%
\ifjsc@mag truedimen,\fi
\if@landscape landscape,\fi
@@ -1050,10 +1069,13 @@
\edef\bxjs@layout{\bxjs@layout lines=\the\@tempcnta,}
\fi
\newdimen\fullwidth
+\def\bxjs@preproc@layout{%
+ \edef\bxjs@save@ht@strutbox{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt}
\def\bxjs@postproc@layout{%
\ifx\bxjs@geometry@driver\relax\else
\let\Gm@driver\bxjs@geometry@driver
\fi
+ \ht\strutbox=\bxjs@save@ht@strutbox\relax
\ifbxjs@whole@zw@lines
\@tempdimb=\textwidth
\if@twocolumn \@tempdima=2\Cwd \else \@tempdima=1\Cwd \fi
@@ -1088,10 +1110,6 @@
\edef\jsGeometryOptions{%
\bxjs@layout@paper,\bxjs@layout}
\ifx\bxjs@geometry\bxjs@geometry@class
-\def\bxjs@geometry@guard@on{%
- \edef\bxjs@gg@tmp{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt}
-\def\bxjs@geometry@guard@off{%
- \ht\strutbox=\bxjs@gg@tmp\relax}
\ifbxjs@papersize
\ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx
\PassOptionsToPackage{dvipdfm}{geometry}
@@ -1102,19 +1120,16 @@
\else
\PassOptionsToPackage{driver=none}{geometry}
\fi
-\AtBeginDocument{\bxjs@pre@geometry@hook}
+\AtBeginDocument{\bxjs@bd@pre@geometry@hook}
\AtBeginDocument{\ImposeOldLuaTeXBehavior}
-\bxjs@geometry@guard@on
+\bxjs@preproc@layout
\edef\bxjs@next{%
\noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}%
}\bxjs@next
-\bxjs@geometry@guard@off
\AtBeginDocument{\RevokeOldLuaTeXBehavior}
\let\bxjs@geometry@driver\Gm@driver
\bxjs@postproc@layout
-\@onlypreamble\bxjs@pre@geometry@hook
-\def\bxjs@pre@geometry@hook{%
- \@ifpackageloaded{geometry}{%
+\g@addto@macro\bxjs@bd@pre@geometry@hook{%
\@ifpackagelater{geometry}{2010/02/12}{}{%else
\PackageWarningNoLine\bxjs@clsname
{The 'geometry' package installed\MessageBreak
@@ -1123,14 +1138,12 @@
\def\bxjs@Gm@driver{pdftex}
\ifx\pdfhorigin\@undefined \newdimen\pdfhorigin \fi
\ifx\pdfvorigin\@undefined \newdimen\pdfvorigin \fi
- \fi\fi
- }%
+ \fi\fi}%
\ifjsWithpTeXng
\ifx\Gm@driver\@empty
\def\Gm@driver{pdftex}%
\fi
- \fi
- }{}}
+ \fi}
\def\setpagelayout{%
\bxjs@ifplus{\bxjs@setpagelayout@a\tw@}{%else
\@ifstar{\bxjs@setpagelayout@a\@ne}{\bxjs@setpagelayout@a\z@}}}
@@ -1142,20 +1155,17 @@
\or% semireset(+)
\def\bxjs@next{reset,\bxjs@layout@paper,\bxjs@layout@base,#2}%
\fi
- \bxjs@geometry@guard@on
+ \bxjs@preproc@layout
\edef\bxjs@next{%
\noexpand\geometry{\bxjs@next}%
}\bxjs@next
- \bxjs@geometry@guard@off
\bxjs@postproc@layout}
\else\ifx\bxjs@geometry\bxjs@geometry@user
-\AtBeginDocument{\bxjs@check@page@layout}
-\@onlypreamble\bxjs@check@page@layout
-\def\bxjs@check@page@layout{%
+\g@addto@macro\bxjs@begin@document@hook{%
\ifdim\textwidth=.5\maxdimen
\ClassError\bxjs@clsname
{Page layout is not properly set}%
- {\@ehd}
+ {\@ehd}%
\fi}
\def\jsUseMinimalPageLayout{%
\setlength{\textwidth}{6.5in}%
@@ -2109,7 +2119,7 @@
\let\jsInhibitGlueAtParTop\@empty
\def\everyparhook{\jsInhibitGlueAtParTop}
\ifnum\bxjs@everyparhook=\bxjs@everyparhook@compat
-\AtBeginDocument{\everypar{\everyparhook}}
+\g@addto@macro\bxjs@begin@document@hook{\everypar{\everyparhook}}
\fi
\ifx j\jsEngine
\def\@inhibitglue{%
@@ -2262,6 +2272,7 @@
\newcommand{\tablename}{\if@english Table~\else 表\fi}
\newcommand{\appendixname}{\if@english \else 付録\fi}
\newcommand{\abstractname}{\if@english Abstract\else 概要\fi}
+\@onlypreamble\bxjs@decl@Seireki@cmds
\@tempswafalse
\if p\jsEngine \@tempswatrue \fi
\if n\jsEngine \@tempswatrue \fi
@@ -2308,6 +2319,18 @@
\def\bxjs@gengo{平成}\advance\bxjs@jayear-1988\relax
\let\heisei\bxjs@jayear
\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@}
+ \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
@@ -2334,7 +2357,7 @@
}%
\fi}
\let\today\bxjs@today
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\ifx\bbl@jpn@Seirekitrue\@undefined\else
\bxjs@decl@Seireki@cmds
\g@addto@macro\datejapanese{%
@@ -2351,11 +2374,8 @@
\onecolumn
\raggedbottom
\fi
-\catcode`\?=12
-\ifx\bxjs@jadriver\relax\else
+\bxjs@pre@jadriver@hook
\input{bxjsja-\bxjs@jadriver.def}
-\fi
-\bxjs@restore@jltrcc
\endinput
%%
%% End of file `bxjsarticle.cls'.
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
index ff744f4cfb9..1d77b5c493b 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
%% このファイルは日本語文字を含みます.
\def\bxjs@clsname{bxjsbook}
\newif\ifjsc@needsp@tch
@@ -68,6 +68,9 @@
{It's a fatal error. I'll quit right now.}
\expandafter\@firstofone
\fi{\endinput\@@end}
+\ifx l\jsEngine
+ \directlua{ bxjs = {} }
+\fi
\ifjsWitheTeX \let\bxjs@protected\protected
\else \let\bxjs@protected\@empty
\fi
@@ -107,12 +110,12 @@
\fi
\endgroup
#1=\bxjs@g@tmpa\relax}
-\if j\jsEngine \def\bxjs@parse@qh@all{zw,zh}
-\else \def\bxjs@parse@qh@all{trueQ,trueH,Q,H,zw,zh}
+\if j\jsEngine \def\bxjs@parse@qh@units{zw,zh}
+\else \def\bxjs@parse@qh@units{trueQ,trueH,Q,H,zw,zh}
\fi
\def\bxjs@parse@qh#1{%
\let\bxjs@tmpb\relax
- \@for\bxjs@tmpa:=\bxjs@parse@qh@all\do{%
+ \@for\bxjs@tmpa:=\bxjs@parse@qh@units\do{%
\ifx\bxjs@tmpb\relax
\edef\bxjs@next{{\bxjs@tmpa}{#1}}%
\expandafter\bxjs@parse@qh@a\csname bxjs@unit@\bxjs@tmpa\expandafter
@@ -133,18 +136,28 @@
\fi
\fi}
\def\bxjs@unit@Q{0.25mm}\let\bxjs@unit@H\bxjs@unit@Q
+\@onlypreamble\bxjs@begin@document@hook
+\let\bxjs@begin@document@hook\@empty
+\AtBeginDocument{\bxjs@begin@document@hook}
+\@onlypreamble\bxjs@post@option@hook
+\let\bxjs@post@option@hook\@empty
+\@onlypreamble\bxjs@pre@jadriver@hook
+\let\bxjs@pre@jadriver@hook\@empty
\def\jsAtEndOfClass{%
\expandafter\g@addto@macro\csname\bxjs@clsname.cls-h@@k\endcsname}
-\@onlypreamble\bxjs@restore@jltrcc
-\let\bxjs@restore@jltrcc\@empty
+\@onlypreamble\bxjs@tmpdo
+\@onlypreamble\bxjs@tmpdo@a
+\@onlypreamble\bxjs@tmpdo@b
+\@onlypreamble\bxjs@tmpdo@c
+\@onlypreamble\bxjs@tmpdo@d
\if l\jsEngine
-\def\bxjs@change@jltrcc#1{%
- \xdef\bxjs@restore@jltrcc{%
- \bxjs@restore@jltrcc
+\def\bxjs@tmpdo#1{%
+ \xdef\bxjs@pre@jadriver@hook{%
+ \bxjs@pre@jadriver@hook
\catcode`#1=\the\catcode`#1\relax}%
\catcode`#1=11\relax}
-\@tfor\bxjs@x:=西暦\do
- {\expandafter\bxjs@change@jltrcc\bxjs@x}
+\@tfor\bxjs@tmpa:=和西暦\do
+ {\expandafter\bxjs@tmpdo\bxjs@tmpa}
\fi
\bxjs@robust@def\jsInhibitGlue{%
\ifx\inhibitglue\@undefined\else \inhibitglue \fi}
@@ -164,6 +177,7 @@
\newif\if@openleft
\newif\if@mainmatter \@mainmattertrue
\newif\if@enablejfam \@enablejfamfalse
+\@onlypreamble\bxjs@setpaper
\def\bxjs@setpaper#1{\def\bxjs@param@paper{#1}}
\DeclareOption{a3paper}{\bxjs@setpaper{a3paper}}
\DeclareOption{a4paper}{\bxjs@setpaper{a4paper}}
@@ -307,7 +321,7 @@
\expandafter\let\expandafter\ifjsDraft\csname if#1\endcsname}
\DeclareOption{draft}{\bxjs@draft{true}\setlength\overfullrule{5pt}}
\DeclareOption{final}{\bxjs@draft{false}\setlength\overfullrule{0pt}}
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\expandafter\ifx\csname ifdraft\endcsname\relax
\expandafter\let\csname ifdraft\expandafter\endcsname
\csname ifjsDraft\endcsname
@@ -347,9 +361,8 @@
\else \@tempdimb=\@tempcntb\@ne \fi}%
\xdef\bxjs@gtmpa{\the\@tempdimb}%
\endgroup #1=\bxjs@gtmpa\relax}
-\let\bxjs@composite@proc\relax
\DeclareOption{pandoc}{%
- \def\bxjs@composite@proc{%
+ \g@addto@macro\bxjs@post@option@hook{%
\bxjs@oldfontcommandstrue
\setkeys{bxjs}{ja=pandoc}%
\let\bxjs@engine@given=*}%
@@ -414,26 +427,6 @@
\let\bxjs@driver@given\bxjs@driver@@xetex}
\DeclareOption{dvipdfmx-if-dvi}{%
\setkeys{bxjs}{dvi=dvipdfmx}}
-\newif\ifbxjs@usezw \bxjs@usezwtrue
-\DeclareOption{nozw}{%
- \bxjs@usezwfalse}
-\DeclareOption{zw}{%
- \bxjs@usezwtrue}
-\newif\ifbxjs@disguise@js \bxjs@disguise@jstrue
-\DeclareOption{nojs}{%
- \bxjs@disguise@jsfalse}
-\DeclareOption{js}{%
- \bxjs@disguise@jstrue}
-\newif\ifbxjs@precisetext
-\DeclareOption{noprecisetext}{%
- \bxjs@precisetextfalse}
-\DeclareOption{precisetext}{%
- \bxjs@precisetexttrue}
-\newif\ifbxjs@simplejasetup \bxjs@simplejasetuptrue
-\DeclareOption{nosimplejasetup}{%
- \bxjs@simplejasetupfalse}
-\DeclareOption{simplejasetup}{%
- \bxjs@simplejasetuptrue}
\newif\ifbxjs@bigcode \bxjs@bigcodefalse
\edef\bxjs@tmpa{\expandafter\noexpand\csname\endcsname}
\def\bxjs@tmpb#1 #2#3\@nil{%
@@ -448,16 +441,27 @@
\bxjs@oldfontcommandsfalse}
\DeclareOption{oldfontcommands}{%
\bxjs@oldfontcommandstrue}
-\def\bxjs@setkey{%
- \expandafter\bxjs@setkey@a\expandafter{\CurrentOption}}
-\def\bxjs@setkey@a{\bxjs@safe@setkeys{bxjs}}
-\DeclareOption*{\bxjs@setkey}
+\DeclareOption*{%
+ \def\bxjs@next{\bxjs@safe@setkeys{bxjs}}%
+ \expandafter\bxjs@next\expandafter{\CurrentOption}}
\def\bxjs@safe@setkeys#1#2{%
- \let\bxjs@KV@errx\KV@errx
- \let\KV@errx\bxjs@safe@setkeys@a
+ \let\bxjs@save@KV@errx\KV@errx \let\KV@errx\@gobble
\setkeys{#1}{#2}%
- \let\KV@errx\bxjs@KV@errx}
-\def\bxjs@safe@setkeys@a#1{}
+ \let\KV@errx\bxjs@save@KV@errx}
+\@onlypreamble\bxjs@declare@enum@option
+\def\bxjs@declare@enum@option#1#2{%
+ \define@key{bxjs}{#1}{%
+ \expandafter\ifx\csname bxjs@#2@@##1\endcsname\relax
+ \bxjs@error@keyval{#1}{##1}%
+ \else \bxjs@csletcs{bxjs@#2}{bxjs@#2@@##1}%
+ \fi}}
+\@onlypreamble\bxjs@declare@bool@option
+\def\bxjs@declare@bool@option#1#2{%
+ \define@key{bxjs}{#1}[true]{%
+ \expandafter\ifx\csname bxjs@#2##1\endcsname\relax
+ \bxjs@error@keyval{#1}{##1}%
+ \else \@nameuse{bxjs@#2##1}%
+ \fi}}
\def\bxjs@set@keyval#1#2#3{%
\expandafter\let\expandafter\bxjs@next\csname bxjs@kv@#1@#2\endcsname
\ifx\bxjs@next\relax
@@ -485,9 +489,9 @@
\define@key{bxjs}{mag}{\edef\bxjs@param@mag{#1}}
\define@key{bxjs}{paper}{\edef\bxjs@param@paper{#1}}
\let\bxjs@jadriver\relax
-\define@key{bxjs}{jadriver}{\edef\bxjs@jadriver{#1}}
+\define@key{bxjs}{jadriver}{\edef\bxjs@jadriver@opt{#1}}
\define@key{bxjs}{ja}[\relax]{%
- \ifx\relax#1\else\edef\bxjs@jadriver{#1}\fi}
+ \ifx\relax#1\else\edef\bxjs@jadriver@opt{#1}\fi}
\let\jsJaFont\@empty
\define@key{bxjs}{jafont}{\edef\jsJaFont{#1}}
\let\jsJaParam\@empty
@@ -559,7 +563,7 @@
\define@key{bxjs}{layout}{%
\bxjs@set@keyval{layout}{#1}{}}
\define@key{bxjs}{textwidth-limit}{%
- \edef\bxjs@textwidth@limit{#1}}
+ \edef\bxjs@textwidth@limit@opt{#1}}
\define@key{bxjs}{textwidth}{\edef\bxjs@textwidth@opt{#1}}
\define@key{bxjs}{line_length}{\setkeys{bxjs}{textwidth=#1}}
\define@key{bxjs}{number-of-lines}{\edef\bxjs@number@of@lines@opt{#1}}
@@ -603,15 +607,31 @@
\def\bxjs@kv@labelsection@compat{\let\bxjs@label@section\bxjs@label@section@compat}
\def\bxjs@kv@labelsection@modern{\let\bxjs@label@section\bxjs@label@section@modern}
\define@key{bxjs}{label-section}{\bxjs@set@keyval{labelsection}{#1}{}}
-\let\bxjs@ltx@removeelement\@removeelement
+\newif\ifbxjs@usezw \bxjs@usezwtrue
+\bxjs@declare@bool@option{use-zw}{usezw}
+\DeclareOption{nozw}{\setkeys{bxjs}{use-zw=false}}
+\DeclareOption{zw}{\setkeys{bxjs}{use-zw=true}}
+\newif\ifbxjs@disguise@js \bxjs@disguise@jstrue
+\bxjs@declare@bool@option{disguise-js}{disguise@js}
+\DeclareOption{nojs}{\setkeys{bxjs}{disguise-js=false}}
+\DeclareOption{js}{\setkeys{bxjs}{disguise-js=true}}
+\newif\ifbxjs@precisetext
+\bxjs@declare@bool@option{precise-text}{precisetext}
+\DeclareOption{noprecisetext}{\setkeys{bxjs}{precise-text=false}}
+\DeclareOption{precisetext}{\setkeys{bxjs}{precise-text=true}}
+\newif\ifbxjs@simplejasetup \bxjs@simplejasetuptrue
+\bxjs@declare@bool@option{simple-ja-setup}{simplejasetup}
+\DeclareOption{nosimplejasetup}{\setkeys{bxjs}{simple-ja-setup=false}}
+\DeclareOption{simplejasetup}{\setkeys{bxjs}{simple-ja-setup=true}}
+\let\bxjs@org@removeelement\@removeelement
\def\@removeelement#1#2#3{%
\def\reserved@a{#2}%
\ifx\reserved@a\@empty \let#3\@empty
- \else \bxjs@ltx@removeelement{#1}{#2}{#3}%
+ \else \bxjs@org@removeelement{#1}{#2}{#3}%
\fi}
\ExecuteOptions{a4paper,twoside,onecolumn,titlepage,openright,final}
\ProcessOptions\relax
-\bxjs@composite@proc
+\bxjs@post@option@hook
\if@slide
\def\maybeblue{\@ifundefined{ver@color.sty}{}{\color{blue}}}
\fi
@@ -620,32 +640,28 @@
\setlength\paperheight{\paperwidth}
\setlength\paperwidth {\@tempdima}
\fi
-\@onlypreamble\bxjs@purge@brace@elts
-\def\bxjs@purge@brace@elts{%
+\def\bxjs@tmpdo{%
\def\bxjs@tmpa{\@gobble}%
- \expandafter\bxjs@purge@be@a\@classoptionslist,\@nil,%
+ \expandafter\bxjs@tmpdo@a\@classoptionslist,\@nil,%
\let\@classoptionslist\bxjs@tmpa}
-\@onlypreamble\bxjs@purge@be@a
-\def\bxjs@purge@be@a#1,{%
+\def\bxjs@tmpdo@a#1,{%
\ifx\@nil#1\relax\else
- \bxjs@purge@be@b#1{}\@nil
+ \bxjs@tmpdo@b#1{}\@nil
\if@tempswa \edef\bxjs@tmpa{\bxjs@tmpa,#1}\fi
- \expandafter\bxjs@purge@be@a
+ \expandafter\bxjs@tmpdo@a
\fi}
-\@onlypreamble\bxjs@purge@be@b
-\def\bxjs@purge@be@b#1#{\bxjs@purge@be@c}
-\@onlypreamble\bxjs@purge@be@c
-\def\bxjs@purge@be@c#1\@nil{%
+\def\bxjs@tmpdo@b#1#{\bxjs@tmpdo@c}
+\def\bxjs@tmpdo@c#1\@nil{%
\ifx\@nil#1\@nil \@tempswatrue \else \@tempswafalse \fi}
-\bxjs@purge@brace@elts
+\bxjs@tmpdo
\@expandtwoargs\@removeelement
{papersize}\@classoptionslist\@classoptionslist
\@expandtwoargs\@removeelement
{10pt}\@classoptionslist\@classoptionslist
\@expandtwoargs\@removeelement
{noscale}\@classoptionslist\@classoptionslist
-\ifx\bxjs@jadriver\relax\else
- \let\bxjs@jadriver@given\bxjs@jadriver
+\ifx\bxjs@jadriver@opt\@undefined\else
+ \let\bxjs@jadriver\bxjs@jadriver@opt
\fi
\let\bxjs@tmpb\jsEngine
\ifx j\bxjs@tmpb\ifjsWithpTeXng
@@ -705,17 +721,17 @@
\else \@tempswatrue
\fi\fi\fi
\if@tempswa
- \ifx\bxjs@driver@opt\@undefined \ifx\bxjs@jadriver@given\@undefined\else
+ \ifx\bxjs@driver@opt\@undefined \ifx\bxjs@jadriver@opt\@undefined\else
\ClassWarningNoLine\bxjs@clsname
{No driver option is given}
\fi\fi
\ifbxjs@dvi@opt
- \edef\bxjs@nxt{%
+ \edef\bxjs@next{%
\let\noexpand\bxjs@driver@given
\csname bxjs@dvidriver@@\bxjs@driver@opt\endcsname
\noexpand\g@addto@macro\noexpand\@classoptionslist
{,\bxjs@driver@opt}%
- }\bxjs@nxt
+ }\bxjs@next
\fi
\fi
\ifjsWithpTeXng
@@ -736,7 +752,7 @@
\let\bxjs@jadriver\bxjs@@minimal
\fi
\fi
-\ifx\bxjs@jadriver@given\@undefined\else
+\ifx\bxjs@jadriver@opt\@undefined\else
\ifx\bxjs@engine@given\@undefined
\ClassError\bxjs@clsname
{An engine option must be explicitly given}%
@@ -830,6 +846,7 @@
\catcode`\?=11 \let\p@?\jsc@mpt
\fi
\chardef\bxjs@qmcc=\catcode`\?\relax
+\g@addto@macro\bxjs@pre@jadriver@hook{\catcode`\?=12\relax}
\newdimen\jsZw
\jsZw=10\jsc@mpt \jsZw=\jsScale\jsZw
\ifbxjs@usezw
@@ -929,10 +946,10 @@
\skip2=\abovedisplayshortskip
\skip4=\belowdisplayskip
\skip6=\belowdisplayshortskip
- \let\bxjs@ltx@nomath\@nomath
+ \let\bxjs@save@nomath\@nomath
\let\@nomath\@gobble
\@currsize\selectfont
- \let\@nomath\bxjs@ltx@nomath
+ \let\@nomath\bxjs@save@nomath
\abovedisplayskip=\skip0
\abovedisplayshortskip=\skip2
\belowdisplayskip=\skip4
@@ -1023,21 +1040,23 @@
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
+\@onlypreamble\bxjs@bd@pre@geometry@hook
+\let\bxjs@bd@pre@geometry@hook\@empty
\ifjsc@mag
\mag=\bxjs@param@mag
\fi
\setlength{\topskip}{10\p@?}
\def\bxjs@unit@trueQ{0.25truemm}\let\bxjs@unit@trueH\bxjs@unit@trueQ
\def\bxjs@unit@zw{\jsZw}\let\bxjs@unit@zh\bxjs@unit@zw
-\def\bxjs@read@a{\futurelet\bxjs@tmpa\bxjs@read@b}
-\def\bxjs@read@b{%
- \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@read@c
- \else \expandafter\bxjs@read@d \fi}
-\def\bxjs@read@c#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}}
-\def\bxjs@read@d#1\@nil{\bxjs@read@e#1,,\@nil}
-\def\bxjs@read@e#1,#2,#3\@nil{%
+\def\bxjs@tmpdo{\futurelet\bxjs@tmpa\bxjs@tmpdo@a}
+\def\bxjs@tmpdo@a{%
+ \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@tmpdo@b
+ \else \expandafter\bxjs@tmpdo@c \fi}
+\def\bxjs@tmpdo@b#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}}
+\def\bxjs@tmpdo@c#1\@nil{\bxjs@tmpdo@d#1,,\@nil}
+\def\bxjs@tmpdo@d#1,#2,#3\@nil{%
\ifx\@nil#3\@nil\else \edef\bxjs@param@paper{papersize={#1,#2}}\fi}
-\expandafter\bxjs@read@a\bxjs@param@paper\@empty\@empty\@nil
+\expandafter\bxjs@tmpdo\bxjs@param@paper\@empty\@empty\@nil
\edef\bxjs@layout@paper{%
\ifjsc@mag truedimen,\fi
\if@landscape landscape,\fi
@@ -1062,14 +1081,26 @@
\fi
\newdimen\fullwidth
\newcommand\jsTextWidthLimit{40}
-\ifx\bxjs@textwidth@limit\@undefined\else
- \bxjs@gset@tempcnta{\bxjs@textwidth@limit}
- \long\edef\jsTextWidthLimit{\the\@tempcnta}
+\@tempdima=\jsTextWidthLimit\Cwd
+\ifx\bxjs@textwidth@limit@opt\@undefined\else
+ \bxjs@gset@tempcnta{\bxjs@textwidth@limit@opt}
+ \@tempdima=\@tempcnta\Cwd
+\fi
+\ifx\bxjs@textwidth@opt\@undefined\else
+ \jsSetQHLength\@tempdima{\bxjs@textwidth@opt}
+\fi
+\edef\bxjs@textwidth@limit{\the\@tempdima}
+\ifdim\@tempdima=\jsTextWidthLimit\Cwd\else
+ \bxjs@invscale\@tempdima{\strip@pt\Cwd}
+ \long\edef\jsTextWidthLimit{\strip@pt\@tempdima}
\fi
+\def\bxjs@preproc@layout{%
+ \edef\bxjs@save@ht@strutbox{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt}
\def\bxjs@postproc@layout{%
\ifx\bxjs@geometry@driver\relax\else
\let\Gm@driver\bxjs@geometry@driver
\fi
+ \ht\strutbox=\bxjs@save@ht@strutbox\relax
\ifbxjs@whole@zw@lines
\@tempdimb=\textwidth
\if@twocolumn \@tempdima=2\Cwd \else \@tempdima=1\Cwd \fi
@@ -1080,13 +1111,10 @@
\advance\evensidemargin 0.5\@tempdimb
\fi
\fullwidth=\textwidth
- \@tempdima=\jsTextWidthLimit\Cwd
- \ifx\bxjs@textwidth@opt\@undefined\else
- \jsSetQHLength\@tempdima{\bxjs@textwidth@opt}
- \ifbxjs@whole@zw@lines
- \advance\@tempdima.005pt\relax
- \divide\@tempdima\Cwd \multiply\@tempdima\Cwd
- \fi
+ \@tempdima=\bxjs@textwidth@limit\relax
+ \ifbxjs@whole@zw@lines
+ \advance\@tempdima.005pt\relax
+ \divide\@tempdima\Cwd \multiply\@tempdima\Cwd
\fi
\ifdim\textwidth>\@tempdima
\textwidth=\@tempdima
@@ -1116,10 +1144,6 @@
\edef\jsGeometryOptions{%
\bxjs@layout@paper,\bxjs@layout}
\ifx\bxjs@geometry\bxjs@geometry@class
-\def\bxjs@geometry@guard@on{%
- \edef\bxjs@gg@tmp{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt}
-\def\bxjs@geometry@guard@off{%
- \ht\strutbox=\bxjs@gg@tmp\relax}
\ifbxjs@papersize
\ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx
\PassOptionsToPackage{dvipdfm}{geometry}
@@ -1130,19 +1154,16 @@
\else
\PassOptionsToPackage{driver=none}{geometry}
\fi
-\AtBeginDocument{\bxjs@pre@geometry@hook}
+\AtBeginDocument{\bxjs@bd@pre@geometry@hook}
\AtBeginDocument{\ImposeOldLuaTeXBehavior}
-\bxjs@geometry@guard@on
+\bxjs@preproc@layout
\edef\bxjs@next{%
\noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}%
}\bxjs@next
-\bxjs@geometry@guard@off
\AtBeginDocument{\RevokeOldLuaTeXBehavior}
\let\bxjs@geometry@driver\Gm@driver
\bxjs@postproc@layout
-\@onlypreamble\bxjs@pre@geometry@hook
-\def\bxjs@pre@geometry@hook{%
- \@ifpackageloaded{geometry}{%
+\g@addto@macro\bxjs@bd@pre@geometry@hook{%
\@ifpackagelater{geometry}{2010/02/12}{}{%else
\PackageWarningNoLine\bxjs@clsname
{The 'geometry' package installed\MessageBreak
@@ -1151,14 +1172,12 @@
\def\bxjs@Gm@driver{pdftex}
\ifx\pdfhorigin\@undefined \newdimen\pdfhorigin \fi
\ifx\pdfvorigin\@undefined \newdimen\pdfvorigin \fi
- \fi\fi
- }%
+ \fi\fi}%
\ifjsWithpTeXng
\ifx\Gm@driver\@empty
\def\Gm@driver{pdftex}%
\fi
- \fi
- }{}}
+ \fi}
\def\setpagelayout{%
\bxjs@ifplus{\bxjs@setpagelayout@a\tw@}{%else
\@ifstar{\bxjs@setpagelayout@a\@ne}{\bxjs@setpagelayout@a\z@}}}
@@ -1170,20 +1189,17 @@
\or% semireset(+)
\def\bxjs@next{reset,\bxjs@layout@paper,\bxjs@layout@base,#2}%
\fi
- \bxjs@geometry@guard@on
+ \bxjs@preproc@layout
\edef\bxjs@next{%
\noexpand\geometry{\bxjs@next}%
}\bxjs@next
- \bxjs@geometry@guard@off
\bxjs@postproc@layout}
\else\ifx\bxjs@geometry\bxjs@geometry@user
-\AtBeginDocument{\bxjs@check@page@layout}
-\@onlypreamble\bxjs@check@page@layout
-\def\bxjs@check@page@layout{%
+\g@addto@macro\bxjs@begin@document@hook{%
\ifdim\textwidth=.5\maxdimen
\ClassError\bxjs@clsname
{Page layout is not properly set}%
- {\@ehd}
+ {\@ehd}%
\fi}
\def\jsUseMinimalPageLayout{%
\setlength{\textwidth}{6.5in}%
@@ -2208,7 +2224,7 @@
\let\jsInhibitGlueAtParTop\@empty
\def\everyparhook{\jsInhibitGlueAtParTop}
\ifnum\bxjs@everyparhook=\bxjs@everyparhook@compat
-\AtBeginDocument{\everypar{\everyparhook}}
+\g@addto@macro\bxjs@begin@document@hook{\everypar{\everyparhook}}
\fi
\ifx j\jsEngine
\def\@inhibitglue{%
@@ -2362,6 +2378,7 @@
\newcommand{\figurename}{\if@english Fig.~\else 図\fi}
\newcommand{\tablename}{\if@english Table~\else 表\fi}
\newcommand{\appendixname}{\if@english \else 付録\fi}
+\@onlypreamble\bxjs@decl@Seireki@cmds
\@tempswafalse
\if p\jsEngine \@tempswatrue \fi
\if n\jsEngine \@tempswatrue \fi
@@ -2408,6 +2425,18 @@
\def\bxjs@gengo{平成}\advance\bxjs@jayear-1988\relax
\let\heisei\bxjs@jayear
\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@}
+ \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
@@ -2434,7 +2463,7 @@
}%
\fi}
\let\today\bxjs@today
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\ifx\bbl@jpn@Seirekitrue\@undefined\else
\bxjs@decl@Seireki@cmds
\g@addto@macro\datejapanese{%
@@ -2451,11 +2480,8 @@
\onecolumn
\raggedbottom
\fi
-\catcode`\?=12
-\ifx\bxjs@jadriver\relax\else
+\bxjs@pre@jadriver@hook
\input{bxjsja-\bxjs@jadriver.def}
-\fi
-\bxjs@restore@jltrcc
\endinput
%%
%% End of file `bxjsbook.cls'.
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty
index 0e17f16b345..d919a6c8547 100644
--- a/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty
+++ b/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty
@@ -21,20 +21,23 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\ProvidesPackage{bxjscjkcat}
- [2018/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
\def\bxjx@pkgname{bxjscjkcat}
\newcount\bxjx@cnta
+\@onlypreamble\bxjx@tmpdo
+\@onlypreamble\bxjx@tmpdo@a
+\@onlypreamble\bxjx@tmpdo@b
\let\bxjx@engine=n
-\def\bxjx@do#1#2{%
+\def\bxjx@tmpdo#1#2{%
\edef\bxjx@tmpa{\string#1}%
\edef\bxjx@tmpb{\meaning#1}%
\ifx\bxjx@tmpa\bxjx@tmpb #2\fi}
-\bxjx@do\kanjiskip{\let\bxjx@engine=j}
-\bxjx@do\enablecjktoken{\let\bxjx@engine=u}
-\bxjx@do\XeTeXversion{\let\bxjx@engine=x}
-\bxjx@do\pdftexversion{\let\bxjx@engine=p}
-\bxjx@do\luatexversion{\let\bxjx@engine=l}
-\def\bxjx@do#1#2{%
+\bxjx@tmpdo\kanjiskip{\let\bxjx@engine=j}
+\bxjx@tmpdo\enablecjktoken{\let\bxjx@engine=u}
+\bxjx@tmpdo\XeTeXversion{\let\bxjx@engine=x}
+\bxjx@tmpdo\pdftexversion{\let\bxjx@engine=p}
+\bxjx@tmpdo\luatexversion{\let\bxjx@engine=l}
+\def\bxjx@tmpdo#1#2{%
\if#1\bxjx@engine
\@ifpackageloaded{#2}{}{%else
\PackageError\bxjx@pkgname
@@ -42,39 +45,47 @@
{Package loading is aborted.\MessageBreak\@ehc}%
\endinput}
\fi}
-\bxjx@do{p}{bxcjkjatype}
-\bxjx@do{x}{xeCJK}
-\bxjx@do{l}{luatexja}
+\bxjx@tmpdo{p}{bxcjkjatype}
+\bxjx@tmpdo{x}{xeCJK}
+\bxjx@tmpdo{l}{luatexja}
\ifx\TextOrMath\@undefined
\RequirePackage{fixltx2e}
\fi
\if u\bxjx@engine
-\@for\bxjx@x:={%
+\@for\bxjx@tmpa:={%
0080,0100,0180,0250,02B0,0300,0500,0530,0590,0600,%
-0700,0750,0780,07C0,0800,0840,08A0,0900,0980,0A00,%
-0A80,0B00,0B80,0C00,0C80,0D00,0D80,0E00,0E80,0F00,%
-1000,10A0,1200,1380,13A0,1400,1680,16A0,1700,1720,%
-1740,1760,1780,1800,18B0,1900,1950,1980,19E0,1A00,%
-1A20,1AB0,1B00,1B80,1BC0,1C00,1C50,1CC0,1CD0,1D00,%
-1D80,1DC0,1E00,2440,27C0,27F0,2800,2A00,2C00,2C60,%
-2C80,2D00,2D30,2D80,2DE0,2E00,4DC0,A4D0,A500,A640,%
-A6A0,A700,A720,A800,A830,A840,A880,A8E0,A900,A930,%
-A980,A9E0,AA00,AA60,AA80,AAE0,AB00,AB30,AB70,ABC0,%
-D800,DB80,DC00,E000,FB00,FB50,FE00,FE70,%
+0700,0750,0780,07C0,0800,0840,0860,08A0,0900,0980,%
+0A00,0A80,0B00,0B80,0C00,0C80,0D00,0D80,0E00,0E80,%
+0F00,1000,10A0,1200,1380,13A0,1400,1680,16A0,1700,%
+1720,1740,1760,1780,1800,18B0,1900,1950,1980,19E0,%
+1A00,1A20,1AB0,1B00,1B80,1BC0,1C00,1C50,1C80,1CC0,%
+1CD0,1D00,1D80,1DC0,1E00,1F00,2440,27C0,27F0,2800,%
+2A00,2C00,2C60,2C80,2D00,2D30,2D80,2DE0,2E00,4DC0,%
+A4D0,A500,A640,A6A0,A700,A720,A800,A830,A840,A880,%
+A8E0,A900,A930,A980,A9E0,AA00,AA60,AA80,AAE0,AB00,%
+AB30,AB70,ABC0,D800,DB80,DC00,E000,FB00,FB50,FE00,%
+FE70,FFF0,%
10000,10080,10100,10140,10190,101D0,10280,102A0,%
102E0,10300,10330,10350,10380,103A0,10400,10450,%
-10480,10500,10530,10600,10800,10840,10860,10880,%
-108E0,10900,10920,10980,109A0,10A00,10A60,10A80,%
-10AC0,10B00,10B40,10B60,10B80,10C00,10C80,10E60,%
-11000,11080,110D0,11100,11150,11180,111E0,11200,%
-11280,112B0,11300,11480,11580,11600,11680,11700,%
-118A0,11AC0,12000,12400,12480,13000,14400,16800,%
+10480,104B0,10500,10530,10600,10800,10840,10860,%
+10880,108E0,10900,10920,10980,109A0,10A00,10A60,%
+10A80,10AC0,10B00,10B40,10B60,10B80,10C00,10C80,%
+10E60,11000,11080,110D0,11100,11150,11180,111E0,%
+11200,11280,112B0,11300,11400,11480,11580,11600,%
+11660,11680,11700,118A0,11A00,11A50,11AC0,11C00,%
+11C70,11D00,12000,12400,12480,13000,14400,16800,%
16A40,16AD0,16B00,16F00,1BC00,1BCA0,1D000,1D100,%
-1D200,1D300,1D360,1D400,1D800,1E800,1EE00,1F000,%
-1F030,1F0A0,1F100,1F200,1F300,1F600,1F650,1F680,%
-1F700,1F780,1F800,1F900,E0000,F0000,100000%
-}\do{\kcatcode"\bxjx@x=15 }
+1D200,1D300,1D360,1D400,1D800,1E000,1E800,1E900,%
+1EE00,1F000,1F030,1F0A0,1F300,1F600,1F650,1F680,%
+1F700,1F780,1F800,1F900,E0000,E0100,F0000,100000,%
+00C0%
+}\do{%
+\@tempcnta="\bxjx@tmpa\relax
+\@tempcntb\@tempcnta \advance\@tempcntb\m@ne
+\chardef\bxjx@tmpb\kcatcode\@tempcntb
+\kcatcode\@tempcnta=15 \kcatcode\@tempcntb\bxjx@tmpb}
\fi
+\@onlypreamble\bxjx@grkcyr@list
\def\bxjx@grkcyr@list{%
\do{0391}{LGR}{\textAlpha}{A}% % GR. C. L. ALPHA
\do{0392}{LGR}{\textBeta}{B}% % GR. C. L. BETA
@@ -206,7 +217,7 @@ D800,DB80,DC00,E000,FB00,FB50,FE00,FE70,%
\bxjx@gcc@cjktrue}
\newcommand*\nogreekasCJK{%
\bxjx@gcc@cjkfalse}
-\def\bxjx@do#1\relax{%
+\def\bxjx@tmpdo#1\relax{%
\def\bxjx@fake@grk##1##2{%
\expandafter\bxjx@fake@grk@a\meaning##2#1\@nil{##1}{##2}}%
\def\bxjx@fake@grk@a##1#1##2\@nil##3##4{%
@@ -215,7 +226,7 @@ D800,DB80,DC00,E000,FB00,FB50,FE00,FE70,%
\multiply\bxjx@cnta\@cclvi \advance\bxjx@cnta`##3\relax
\mathchar\bxjx@cnta
\else ##3\fi}
-}\expandafter\bxjx@do\string\mathchar\relax
+}\expandafter\bxjx@tmpdo\string\mathchar\relax
\ifnum0\if p\bxjx@engine1\fi\if u\bxjx@engine1\fi>0
\@ifpackageloaded{inputenc}{}{%else
\RequirePackage[utf8]{inputenc}}
@@ -230,12 +241,10 @@ D800,DB80,DC00,E000,FB00,FB50,FE00,FE70,%
\kcatcode"0400=15
\kcatcode"0500=15
\fi
-\def\do#1{%
+\def\bxjx@tmpdo#1{%
\@tempcnta="#1\relax
- \@tempcntb=\@tempcnta \divide\@tempcntb256
- \expandafter\let\csname bxjx@KCR/\the\@tempcntb\endcsname=t%
- \expandafter\bxjx@do@a\csname bxjx@KC/\the\@tempcnta\endcsname{#1}}
-\def\bxjx@do@a#1#2#3#4#5{%
+ \expandafter\bxjx@tmpdo@a\csname bxjx@KC/\the\@tempcnta\endcsname{#1}}
+\def\bxjx@tmpdo@a#1#2#3#4#5{%
\ifx\\#5\\%
\def\bxjx@tmpa{\@inmathwarn#4}%
\else\ifcat A\noexpand#5%
@@ -243,34 +252,30 @@ D800,DB80,DC00,E000,FB00,FB50,FE00,FE70,%
{\ifnum\uccode`#5=`#5\noexpand\Pi\else\noexpand\pi\fi}}%
\else \def\bxjx@tmpa{#5}%
\fi\fi
- \def\bxjx@tmpb{\bxjx@do@b{#1}{#2}{#3}{#4}}%
+ \def\bxjx@tmpb{\bxjx@tmpdo@b{#1}{#2}{#3}{#4}}%
\expandafter\bxjx@tmpb\expandafter{\bxjx@tmpa}}
\if u\bxjx@engine
-\def\bxjx@do@b#1#2#3#4#5{%
+\def\bxjx@tmpdo@b#1#2#3#4#5{%
\kchardef#1=\@tempcnta
\DeclareTextCommandDefault{#4}{\bxjx@ja@or@not{#1}{#3}{#4}}%
\DeclareUnicodeCharacter{#2}{\TextOrMath{#4}{#5}}}
\else\if p\bxjx@engine
-\def\bxjx@do@b#1#2#3#4#5{%
+\def\bxjx@tmpdo@b#1#2#3#4#5{%
\mathchardef#1=\@tempcnta
\DeclareTextCommandDefault{#4}{\bxjx@ja@or@not{\UTF{#2}}{#3}{#4}}%
\DeclareUnicodeCharacter{#2}{\TextOrMath{#4}{#5}}}
\fi\fi
-\bxjx@grkcyr@list
-\let\bxjx@do@a\undefined
-\let\bxjx@do@b\undefined
+\let\do\bxjx@tmpdo \bxjx@grkcyr@list
\@onlypreamble\bxjx@org@DeclareUnicodeCharacter
\let\bxjx@org@DeclareUnicodeCharacter\DeclareUnicodeCharacter
\@onlypreamble\bxjx@DeclareUnicodeCharacter
\def\bxjx@DeclareUnicodeCharacter#1#2{%
- \count@="#1\relax \bxjx@cnta\count@ \divide\bxjx@cnta256
- \expandafter\ifx\csname bxjx@KCR/\the\bxjx@cnta\endcsname\relax
- \bxjx@org@DeclareUnicodeCharacter{#1}{#2}%
- \else\expandafter\ifx\csname bxjx@KC/\the\count@\endcsname\relax
+ \count@="#1\relax
+ \expandafter\ifx\csname bxjx@KC/\the\count@\endcsname\relax
\bxjx@org@DeclareUnicodeCharacter{#1}{#2}%
\else
\wlog{ \space\space skipped defining Unicode char U+#1}%
- \fi\fi}
+ \fi}
\def\bxjx@ja@or@not#1#2#3{%
\ifbxjx@gcc@cjk #1%
\else\expandafter\ifx\csname T@#2\endcsname\relax #1%
@@ -286,15 +291,16 @@ D800,DB80,DC00,E000,FB00,FB50,FE00,FE70,%
\def\bxjx@swap@DUC@cmd{%
\let\bxjx@tmpa\DeclareUnicodeCharacter
\let\DeclareUnicodeCharacter\bxjx@DeclareUnicodeCharacter
- \let\bxjx@DeclareUnicodeCharacter\bxjx@tmpa}
+ \let\bxjx@DeclareUnicodeCharacter\bxjx@tmpa
+ \let\bxjx@tmpa\relax}
\else\ifnum0\if x\bxjx@engine1\fi\if l\bxjx@engine1\fi>0
-\def\do#1{%
+\def\bxjx@tmpdo#1{%
\bxjx@cnta="#1\relax
\begingroup
\lccode`~=\bxjx@cnta
\lowercase{\endgroup
- \bxjx@do@a{~}}{#1}}
-\def\bxjx@do@a#1#2#3#4#5{%
+ \bxjx@tmpdo@a{~}}{#1}}
+\def\bxjx@tmpdo@a#1#2#3#4#5{%
\ifx\\#5\\\let\bxjx@tmpa\relax
\else\ifcat A\noexpand#5%
\edef\bxjx@tmpa{\noexpand\bxjx@fake@grk{#5}%
@@ -305,8 +311,7 @@ D800,DB80,DC00,E000,FB00,FB50,FE00,FE70,%
\mathcode\bxjx@cnta"8000 \let#1\bxjx@tmpa
\fi}
\mathchardef\bxjx@tmpa="119
-\ifx\bxjx@tmpa\pi \bxjx@grkcyr@list \fi
-\let\bxjx@do@a\undefined
+\ifx\bxjx@tmpa\pi \let\do\bxjx@tmpdo \bxjx@grkcyr@list \fi
\if l\bxjx@engine
\protected\def\greekasCJK{%
\bxjx@gcc@cjktrue
@@ -316,14 +321,17 @@ D800,DB80,DC00,E000,FB00,FB50,FE00,FE70,%
\ltjsetparameter{jacharrange={-2, -8}}}
\fi
\if x\bxjx@engine
+ \let\bxjx@gcc@cjk@list\@empty
+ \def\do#1#2#3#4{%
+ \edef\bxjx@gcc@cjk@list{\bxjx@gcc@cjk@list
+ \noexpand\XeTeXcharclass"#1\bxjx@cnta}}
+ \bxjx@grkcyr@list
\protected\def\greekasCJK{%
\bxjx@gcc@cjktrue
- \def\do##1##2##3##4{\XeTeXcharclass"##1\@ne}%
- \bxjx@grkcyr@list}
+ \bxjx@cnta=\@ne \bxjx@gcc@cjk@list}
\protected\def\nogreekasCJK{%
\bxjx@gcc@cjkfalse
- \def\do##1##2##3##4{\XeTeXcharclass"##1\z@}%
- \bxjx@grkcyr@list}
+ \bxjx@cnta=\z@ \bxjx@gcc@cjk@list}
\fi
\fi\fi
\nogreekasCJK
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
%%
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def
index 13532504376..040e4bb7a3a 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
%% このファイルは日本語文字を含みます
\def\DeclareJaTextFontCommand#1#2{%
\DeclareRobustCommand#1[1]{%
@@ -42,7 +42,7 @@
\@onlypreamble\bxjs@if@sf@default
\def\bxjs@if@sf@default#1{%
\ifx\familydefault\bxjs@@CSsfdefault#1\fi
- \AtBeginDocument{%
+ \g@addto@macro\bxjs@begin@document@hook{%
\ifx\familydefault\bxjs@@CSsfdefault#1\fi}%
}
\@tempdima\p@ \bxjs@invscale\@tempdima\jsScale
@@ -141,17 +141,17 @@
}
\def\bxjs@sizereference{jis}
\fi
-\def\bxjs@tmpa#1/#2/#3/#4/#5\relax{%
- \def\bxjs@y{#5}}
-\ifjsWithpTeXng \def\bxjs@y{10}%
+\def\bxjs@next#1/#2/#3/#4/#5\relax{%
+ \def\bxjs@tmpb{#5}}
+\ifjsWithpTeXng \def\bxjs@tmpb{10}%
\else
-\expandafter\expandafter\expandafter\bxjs@tmpa
+\expandafter\expandafter\expandafter\bxjs@next
\expandafter\string\the\jfont\relax
\fi
-\@for\bxjs@x:={\jsc@JYn/mc/m/n,\jsc@JYn/gt/m/n,%
+\@for\bxjs@tmpa:={\jsc@JYn/mc/m/n,\jsc@JYn/gt/m/n,%
\jsc@JTn/mc/m/n,\jsc@JTn/gt/m/n}\do
- {\expandafter\let\csname\bxjs@x/10\endcsname=\@undefined
- \expandafter\let\csname\bxjs@x/\bxjs@y\endcsname=\@undefined}
+ {\expandafter\let\csname\bxjs@tmpa/10\endcsname=\@undefined
+ \expandafter\let\csname\bxjs@tmpa/\bxjs@tmpb\endcsname=\@undefined}
\begingroup
\font\bxjs@tmpa=\bxjs@sizereference\space at 10pt
\setbox\z@\hbox{\bxjs@tmpa\char\jis"2121\relax}
@@ -243,7 +243,7 @@
\relax}%
\let\bxjs@cjk@loaded\relax
}
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\@ifpackageloaded{CJK}{%
\bxjs@cjk@loaded
}{}%
@@ -257,6 +257,7 @@
\def\bxjs@let@hchar@chr@xe#1{%
\lccode`0=`#1\relax
\lowercase{\bxjs@let@hchar@out\def{{0}}}}
+\@onlypreamble\bxjs@do@precisetext
\ifx\XeTeXgenerateactualtext\@undefined\else
\def\bxjs@do@precisetext{%
\XeTeXgenerateactualtext=\@ne}
@@ -275,7 +276,7 @@
\XeTeXlinebreakpenalty=0\relax}
\fi\fi\fi
\ifx\bxjs@do@simplejasetup\@undefined\else
- \AtBeginDocument{%
+ \g@addto@macro\bxjs@begin@document@hook{%
\ifbxjs@simplejasetup
\bxjs@do@simplejasetup
\fi}
@@ -283,21 +284,19 @@
\ifbxjs@precisetext
\ifx\bxjs@do@precisetext\@undefined
\ClassWarning\bxjs@clsname
- {The current engine does not supprt the\MessageBreak
- 'precisetext' option\@gobble}
+ {The current engine does not support the\MessageBreak
+ 'precise-text' option\@gobble}
\else
\bxjs@do@precisetext
\fi
\fi
-\@onlypreamble\bxjs@check@everyparhook
-\def\bxjs@check@everyparhook{%
+\g@addto@macro\bxjs@begin@document@hook{%
\ifx\jsInhibitGlueAtParTop\@empty
\def\bxjs@tmpa{\jsInhibitGlueAtParTop}%
\ifx\everyparhook\bxjs@tmpa
\let\everyparhook\@empty
\fi
\fi}
-\AtBeginDocument{\bxjs@check@everyparhook}
\ifnum\bxjs@everyparhook=\bxjs@everyparhook@modern
\let\bxjs@everypar\everypar
\newtoks\everypar
@@ -338,7 +337,7 @@
\let\bxjs@org@pagestyle\pagestyle
\def\pagestyle{%
\bxjs@pagestyle@hook \bxjs@org@pagestyle}
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\bxjs@pagestyle@hook
\global\let\bxjs@pagestyle@hook\relax}
\ifbxjs@jaspace@cmd
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def
index 2a3258cdca3..5b061670130 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 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 b07b1b68a07..7d5b8829aa1 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
\input{bxjsja-standard.def}
\RequirePackage{bxjspandoc}
\@onlypreamble\bxjs@set@dupload@proc
@@ -43,7 +43,7 @@
\ifbxjs@dlp \expandafter\bxjs@do@dupload@proc
\else \expandafter\bxjs@org@if@ptions
\fi {#1}{#2}{#3}}
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\let\@if@ptions\bxjs@org@if@ptions}
\@onlypreamble\bxjs@do@dupload@proc
\def\bxjs@do@dupload@proc#1#2#3{%
@@ -81,7 +81,7 @@
\pandocSkipLoadPackage{xeCJK}
\providecommand*{\setCJKmainfont}{\setmainjfont}
\fi
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\@tempswafalse
\ifx\oldparagraph\@undefined\else
\@tempswatrue
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def
index 592bf6a07a7..cb6e1a69729 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
%% このファイルは日本語文字を含みます
\input{bxjsja-minimal.def}
\bxjs@simplejasetupfalse
@@ -247,7 +247,7 @@
}
\@onlypreamble\jsCheckHyperrefUnicode
\let\jsCheckHyperrefUnicode\@empty
-\AtBeginDocument{\jsCheckHyperrefUnicode}
+\g@addto@macro\bxjs@begin@document@hook{\jsCheckHyperrefUnicode}
\@onlypreamble\bxjs@check@hyperref@unicode
\def\bxjs@check@hyperref@unicode#1{%
\g@addto@macro\jsCheckHyperrefUnicode{%
@@ -268,7 +268,7 @@
\@onlypreamble\bxjs@urgent@special
\def\bxjs@urgent@special#1{%
\AtBeginDvi{\special{#1}}%
- \AtBeginDocument{%
+ \g@addto@macro\bxjs@begin@document@hook{%
\@ifpackageloaded{atbegshi}{%
\begingroup
\toks\z@{\special{#1}}%
@@ -278,9 +278,11 @@
}{}%
}%
}
+\@onlypreamble\bxjs@resolve@jafont@paren
\def\bxjs@resolve@jafont@paren#1{%
\def\bxjs@tmpb{\let#1}%
\expandafter\bxjs@resolve@jafont@paren@a#1\@nil()\@nil\relax}
+\@onlypreamble\bxjs@resolve@jafont@paren@a
\def\bxjs@resolve@jafont@paren@a#1(#2)#3\@nil#4\relax{%
\ifx\relax#4\relax \bxjs@tmpb\jsJaFont
\else
@@ -342,16 +344,16 @@
}\bxjs@next
\fi
\begingroup
- \global\let\@gtempa\relax
+ \global\let\bxjs@g@tmpa\relax
\catcode`\|=0 \catcode`\\=12
- |def|bxjs@check#1|@nil{%
- |bxjs@check@a#1|@nil\RequirePackage|@nnil}%
- |def|bxjs@check@a#1\RequirePackage#2|@nnil{%
- |ifx$#1$|bxjs@check@b#2|@nil keyval|@nnil |fi}%
+ |def|bxjs@tmpdo#1|@nil{%
+ |bxjs@tmpdo@a#1|@nil\RequirePackage|@nnil}%
+ |def|bxjs@tmpdo@a#1\RequirePackage#2|@nnil{%
+ |ifx$#1$|bxjs@tmpdo@b#2|@nil keyval|@nnil |fi}%
|catcode`|\=0 \catcode`\|=12
- \def\bxjs@check@b#1keyval#2\@nnil{%
+ \def\bxjs@tmpdo@b#1keyval#2\@nnil{%
\ifx$#2$\else
- \xdef\@gtempa{%
+ \xdef\bxjs@g@tmpa{%
\noexpand\PassOptionsToPackage{scale=\jsScale}{otf}}%
\fi}
\@firstofone{%
@@ -362,13 +364,13 @@
\loop\if@tempswa
\ifeof\@inputcheck \@tempswafalse \fi
\if@tempswa
- \read\@inputcheck to\bxjs@line
- \expandafter\bxjs@check\bxjs@line\@nil
+ \read\@inputcheck to\bxjs@next
+ \expandafter\bxjs@tmpdo\bxjs@next\@nil
\fi
\repeat
\closein\@inputcheck
\endgroup}
-\@gtempa
+\bxjs@g@tmpa
\ifbxjs@hyperref@enc
\bxjs@check@hyperref@unicode{false}
\fi
@@ -397,7 +399,7 @@
\SetSymbolFont{mincho}{bold}{\jsc@JYn}{gt}{m}{n}
\jfam\symmincho
\DeclareMathAlphabet{\mathgt}{\jsc@JYn}{gt}{m}{n}
- \AtBeginDocument{%
+ \g@addto@macro\bxjs@begin@document@hook{%
\ifx\reDeclareMathAlphabet\@undefined\else
\reDeclareMathAlphabet{\mathrm}{\@mathrm}{\@mathmc}%
\reDeclareMathAlphabet{\mathbf}{\@mathbf}{\@mathgt}%
@@ -569,7 +571,7 @@
\DeclareRobustCommand\ttfamily
{\not@math@alphabet\ttfamily\mathtt
\romanfamily\ttdefault\kanjifamily\gtdefault\selectfont}
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}
\reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}%
\reDeclareMathAlphabet{\mathsf}{\mathsf}{\mathgt}}%
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty
index c6b88c6405d..fa8ccb349ad 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
%% このファイルは日本語文字を含みます.
\def\bxjsp@pkgname{bxjscjkcat}
\let\bxjsp@engine=n
@@ -34,6 +34,7 @@
\bxjsp@do\XeTeXversion{\let\bxjsp@engine=x}
\bxjsp@do\pdftexversion{\let\bxjsp@engine=p}
\bxjsp@do\luatexversion{\let\bxjsp@engine=l}
+\@onlypreamble\pandocSkipLoadFile
\newcommand*\pandocSkipLoadFile[1]{%
\expandafter\bxjsp@skip@load@file@a\csname ver@#1\endcsname{#1}}
\def\bxjsp@skip@load@file@a#1#2{%
@@ -42,6 +43,7 @@
\PackageInfo\bxjsp@pkgname
{File '#2' marked as loaded\@gobble}%
\fi}
+\@onlypreamble\pandocSkipLoadPackage
\newcommand*\pandocSkipLoadPackage[1]{%
\pandocSkipLoadFile{#1.sty}}
\ifx\@IncludeInRelease\@undefined\else
@@ -81,7 +83,7 @@
\bxjsp@ja@ellipsis \let\bxjsp@tok=}
\def\bxjsp@ldots@g{%
\expandafter\bxjsp@org@ldots\expandafter{\romannumeral-`} }
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\let\bxjsp@org@ldots\ldots
\let\ldots\pandocLdots}
\IfFileExists{bxpandola.sty}{%
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls
index 86e632f6b97..82bd30f44aa 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
%% このファイルは日本語文字を含みます.
\def\bxjs@clsname{bxjsreport}
\newif\ifjsc@needsp@tch
@@ -68,6 +68,9 @@
{It's a fatal error. I'll quit right now.}
\expandafter\@firstofone
\fi{\endinput\@@end}
+\ifx l\jsEngine
+ \directlua{ bxjs = {} }
+\fi
\ifjsWitheTeX \let\bxjs@protected\protected
\else \let\bxjs@protected\@empty
\fi
@@ -107,12 +110,12 @@
\fi
\endgroup
#1=\bxjs@g@tmpa\relax}
-\if j\jsEngine \def\bxjs@parse@qh@all{zw,zh}
-\else \def\bxjs@parse@qh@all{trueQ,trueH,Q,H,zw,zh}
+\if j\jsEngine \def\bxjs@parse@qh@units{zw,zh}
+\else \def\bxjs@parse@qh@units{trueQ,trueH,Q,H,zw,zh}
\fi
\def\bxjs@parse@qh#1{%
\let\bxjs@tmpb\relax
- \@for\bxjs@tmpa:=\bxjs@parse@qh@all\do{%
+ \@for\bxjs@tmpa:=\bxjs@parse@qh@units\do{%
\ifx\bxjs@tmpb\relax
\edef\bxjs@next{{\bxjs@tmpa}{#1}}%
\expandafter\bxjs@parse@qh@a\csname bxjs@unit@\bxjs@tmpa\expandafter
@@ -133,18 +136,28 @@
\fi
\fi}
\def\bxjs@unit@Q{0.25mm}\let\bxjs@unit@H\bxjs@unit@Q
+\@onlypreamble\bxjs@begin@document@hook
+\let\bxjs@begin@document@hook\@empty
+\AtBeginDocument{\bxjs@begin@document@hook}
+\@onlypreamble\bxjs@post@option@hook
+\let\bxjs@post@option@hook\@empty
+\@onlypreamble\bxjs@pre@jadriver@hook
+\let\bxjs@pre@jadriver@hook\@empty
\def\jsAtEndOfClass{%
\expandafter\g@addto@macro\csname\bxjs@clsname.cls-h@@k\endcsname}
-\@onlypreamble\bxjs@restore@jltrcc
-\let\bxjs@restore@jltrcc\@empty
+\@onlypreamble\bxjs@tmpdo
+\@onlypreamble\bxjs@tmpdo@a
+\@onlypreamble\bxjs@tmpdo@b
+\@onlypreamble\bxjs@tmpdo@c
+\@onlypreamble\bxjs@tmpdo@d
\if l\jsEngine
-\def\bxjs@change@jltrcc#1{%
- \xdef\bxjs@restore@jltrcc{%
- \bxjs@restore@jltrcc
+\def\bxjs@tmpdo#1{%
+ \xdef\bxjs@pre@jadriver@hook{%
+ \bxjs@pre@jadriver@hook
\catcode`#1=\the\catcode`#1\relax}%
\catcode`#1=11\relax}
-\@tfor\bxjs@x:=西暦\do
- {\expandafter\bxjs@change@jltrcc\bxjs@x}
+\@tfor\bxjs@tmpa:=和西暦\do
+ {\expandafter\bxjs@tmpdo\bxjs@tmpa}
\fi
\bxjs@robust@def\jsInhibitGlue{%
\ifx\inhibitglue\@undefined\else \inhibitglue \fi}
@@ -164,6 +177,7 @@
\newif\if@openleft
\newif\if@mainmatter \@mainmattertrue
\newif\if@enablejfam \@enablejfamfalse
+\@onlypreamble\bxjs@setpaper
\def\bxjs@setpaper#1{\def\bxjs@param@paper{#1}}
\DeclareOption{a3paper}{\bxjs@setpaper{a3paper}}
\DeclareOption{a4paper}{\bxjs@setpaper{a4paper}}
@@ -307,7 +321,7 @@
\expandafter\let\expandafter\ifjsDraft\csname if#1\endcsname}
\DeclareOption{draft}{\bxjs@draft{true}\setlength\overfullrule{5pt}}
\DeclareOption{final}{\bxjs@draft{false}\setlength\overfullrule{0pt}}
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\expandafter\ifx\csname ifdraft\endcsname\relax
\expandafter\let\csname ifdraft\expandafter\endcsname
\csname ifjsDraft\endcsname
@@ -347,9 +361,8 @@
\else \@tempdimb=\@tempcntb\@ne \fi}%
\xdef\bxjs@gtmpa{\the\@tempdimb}%
\endgroup #1=\bxjs@gtmpa\relax}
-\let\bxjs@composite@proc\relax
\DeclareOption{pandoc}{%
- \def\bxjs@composite@proc{%
+ \g@addto@macro\bxjs@post@option@hook{%
\bxjs@oldfontcommandstrue
\setkeys{bxjs}{ja=pandoc}%
\let\bxjs@engine@given=*}%
@@ -414,26 +427,6 @@
\let\bxjs@driver@given\bxjs@driver@@xetex}
\DeclareOption{dvipdfmx-if-dvi}{%
\setkeys{bxjs}{dvi=dvipdfmx}}
-\newif\ifbxjs@usezw \bxjs@usezwtrue
-\DeclareOption{nozw}{%
- \bxjs@usezwfalse}
-\DeclareOption{zw}{%
- \bxjs@usezwtrue}
-\newif\ifbxjs@disguise@js \bxjs@disguise@jstrue
-\DeclareOption{nojs}{%
- \bxjs@disguise@jsfalse}
-\DeclareOption{js}{%
- \bxjs@disguise@jstrue}
-\newif\ifbxjs@precisetext
-\DeclareOption{noprecisetext}{%
- \bxjs@precisetextfalse}
-\DeclareOption{precisetext}{%
- \bxjs@precisetexttrue}
-\newif\ifbxjs@simplejasetup \bxjs@simplejasetuptrue
-\DeclareOption{nosimplejasetup}{%
- \bxjs@simplejasetupfalse}
-\DeclareOption{simplejasetup}{%
- \bxjs@simplejasetuptrue}
\newif\ifbxjs@bigcode \bxjs@bigcodefalse
\edef\bxjs@tmpa{\expandafter\noexpand\csname\endcsname}
\def\bxjs@tmpb#1 #2#3\@nil{%
@@ -448,16 +441,27 @@
\bxjs@oldfontcommandsfalse}
\DeclareOption{oldfontcommands}{%
\bxjs@oldfontcommandstrue}
-\def\bxjs@setkey{%
- \expandafter\bxjs@setkey@a\expandafter{\CurrentOption}}
-\def\bxjs@setkey@a{\bxjs@safe@setkeys{bxjs}}
-\DeclareOption*{\bxjs@setkey}
+\DeclareOption*{%
+ \def\bxjs@next{\bxjs@safe@setkeys{bxjs}}%
+ \expandafter\bxjs@next\expandafter{\CurrentOption}}
\def\bxjs@safe@setkeys#1#2{%
- \let\bxjs@KV@errx\KV@errx
- \let\KV@errx\bxjs@safe@setkeys@a
+ \let\bxjs@save@KV@errx\KV@errx \let\KV@errx\@gobble
\setkeys{#1}{#2}%
- \let\KV@errx\bxjs@KV@errx}
-\def\bxjs@safe@setkeys@a#1{}
+ \let\KV@errx\bxjs@save@KV@errx}
+\@onlypreamble\bxjs@declare@enum@option
+\def\bxjs@declare@enum@option#1#2{%
+ \define@key{bxjs}{#1}{%
+ \expandafter\ifx\csname bxjs@#2@@##1\endcsname\relax
+ \bxjs@error@keyval{#1}{##1}%
+ \else \bxjs@csletcs{bxjs@#2}{bxjs@#2@@##1}%
+ \fi}}
+\@onlypreamble\bxjs@declare@bool@option
+\def\bxjs@declare@bool@option#1#2{%
+ \define@key{bxjs}{#1}[true]{%
+ \expandafter\ifx\csname bxjs@#2##1\endcsname\relax
+ \bxjs@error@keyval{#1}{##1}%
+ \else \@nameuse{bxjs@#2##1}%
+ \fi}}
\def\bxjs@set@keyval#1#2#3{%
\expandafter\let\expandafter\bxjs@next\csname bxjs@kv@#1@#2\endcsname
\ifx\bxjs@next\relax
@@ -485,9 +489,9 @@
\define@key{bxjs}{mag}{\edef\bxjs@param@mag{#1}}
\define@key{bxjs}{paper}{\edef\bxjs@param@paper{#1}}
\let\bxjs@jadriver\relax
-\define@key{bxjs}{jadriver}{\edef\bxjs@jadriver{#1}}
+\define@key{bxjs}{jadriver}{\edef\bxjs@jadriver@opt{#1}}
\define@key{bxjs}{ja}[\relax]{%
- \ifx\relax#1\else\edef\bxjs@jadriver{#1}\fi}
+ \ifx\relax#1\else\edef\bxjs@jadriver@opt{#1}\fi}
\let\jsJaFont\@empty
\define@key{bxjs}{jafont}{\edef\jsJaFont{#1}}
\let\jsJaParam\@empty
@@ -558,7 +562,7 @@
\define@key{bxjs}{layout}{%
\bxjs@set@keyval{layout}{#1}{}}
\define@key{bxjs}{textwidth-limit}{%
- \edef\bxjs@textwidth@limit{#1}}
+ \edef\bxjs@textwidth@limit@opt{#1}}
\define@key{bxjs}{textwidth}{\edef\bxjs@textwidth@opt{#1}}
\define@key{bxjs}{line_length}{\setkeys{bxjs}{textwidth=#1}}
\define@key{bxjs}{number-of-lines}{\edef\bxjs@number@of@lines@opt{#1}}
@@ -602,15 +606,31 @@
\def\bxjs@kv@labelsection@compat{\let\bxjs@label@section\bxjs@label@section@compat}
\def\bxjs@kv@labelsection@modern{\let\bxjs@label@section\bxjs@label@section@modern}
\define@key{bxjs}{label-section}{\bxjs@set@keyval{labelsection}{#1}{}}
-\let\bxjs@ltx@removeelement\@removeelement
+\newif\ifbxjs@usezw \bxjs@usezwtrue
+\bxjs@declare@bool@option{use-zw}{usezw}
+\DeclareOption{nozw}{\setkeys{bxjs}{use-zw=false}}
+\DeclareOption{zw}{\setkeys{bxjs}{use-zw=true}}
+\newif\ifbxjs@disguise@js \bxjs@disguise@jstrue
+\bxjs@declare@bool@option{disguise-js}{disguise@js}
+\DeclareOption{nojs}{\setkeys{bxjs}{disguise-js=false}}
+\DeclareOption{js}{\setkeys{bxjs}{disguise-js=true}}
+\newif\ifbxjs@precisetext
+\bxjs@declare@bool@option{precise-text}{precisetext}
+\DeclareOption{noprecisetext}{\setkeys{bxjs}{precise-text=false}}
+\DeclareOption{precisetext}{\setkeys{bxjs}{precise-text=true}}
+\newif\ifbxjs@simplejasetup \bxjs@simplejasetuptrue
+\bxjs@declare@bool@option{simple-ja-setup}{simplejasetup}
+\DeclareOption{nosimplejasetup}{\setkeys{bxjs}{simple-ja-setup=false}}
+\DeclareOption{simplejasetup}{\setkeys{bxjs}{simple-ja-setup=true}}
+\let\bxjs@org@removeelement\@removeelement
\def\@removeelement#1#2#3{%
\def\reserved@a{#2}%
\ifx\reserved@a\@empty \let#3\@empty
- \else \bxjs@ltx@removeelement{#1}{#2}{#3}%
+ \else \bxjs@org@removeelement{#1}{#2}{#3}%
\fi}
\ExecuteOptions{a4paper,oneside,onecolumn,titlepage,openany,final}
\ProcessOptions\relax
-\bxjs@composite@proc
+\bxjs@post@option@hook
\if@slide
\def\maybeblue{\@ifundefined{ver@color.sty}{}{\color{blue}}}
\fi
@@ -619,32 +639,28 @@
\setlength\paperheight{\paperwidth}
\setlength\paperwidth {\@tempdima}
\fi
-\@onlypreamble\bxjs@purge@brace@elts
-\def\bxjs@purge@brace@elts{%
+\def\bxjs@tmpdo{%
\def\bxjs@tmpa{\@gobble}%
- \expandafter\bxjs@purge@be@a\@classoptionslist,\@nil,%
+ \expandafter\bxjs@tmpdo@a\@classoptionslist,\@nil,%
\let\@classoptionslist\bxjs@tmpa}
-\@onlypreamble\bxjs@purge@be@a
-\def\bxjs@purge@be@a#1,{%
+\def\bxjs@tmpdo@a#1,{%
\ifx\@nil#1\relax\else
- \bxjs@purge@be@b#1{}\@nil
+ \bxjs@tmpdo@b#1{}\@nil
\if@tempswa \edef\bxjs@tmpa{\bxjs@tmpa,#1}\fi
- \expandafter\bxjs@purge@be@a
+ \expandafter\bxjs@tmpdo@a
\fi}
-\@onlypreamble\bxjs@purge@be@b
-\def\bxjs@purge@be@b#1#{\bxjs@purge@be@c}
-\@onlypreamble\bxjs@purge@be@c
-\def\bxjs@purge@be@c#1\@nil{%
+\def\bxjs@tmpdo@b#1#{\bxjs@tmpdo@c}
+\def\bxjs@tmpdo@c#1\@nil{%
\ifx\@nil#1\@nil \@tempswatrue \else \@tempswafalse \fi}
-\bxjs@purge@brace@elts
+\bxjs@tmpdo
\@expandtwoargs\@removeelement
{papersize}\@classoptionslist\@classoptionslist
\@expandtwoargs\@removeelement
{10pt}\@classoptionslist\@classoptionslist
\@expandtwoargs\@removeelement
{noscale}\@classoptionslist\@classoptionslist
-\ifx\bxjs@jadriver\relax\else
- \let\bxjs@jadriver@given\bxjs@jadriver
+\ifx\bxjs@jadriver@opt\@undefined\else
+ \let\bxjs@jadriver\bxjs@jadriver@opt
\fi
\let\bxjs@tmpb\jsEngine
\ifx j\bxjs@tmpb\ifjsWithpTeXng
@@ -704,17 +720,17 @@
\else \@tempswatrue
\fi\fi\fi
\if@tempswa
- \ifx\bxjs@driver@opt\@undefined \ifx\bxjs@jadriver@given\@undefined\else
+ \ifx\bxjs@driver@opt\@undefined \ifx\bxjs@jadriver@opt\@undefined\else
\ClassWarningNoLine\bxjs@clsname
{No driver option is given}
\fi\fi
\ifbxjs@dvi@opt
- \edef\bxjs@nxt{%
+ \edef\bxjs@next{%
\let\noexpand\bxjs@driver@given
\csname bxjs@dvidriver@@\bxjs@driver@opt\endcsname
\noexpand\g@addto@macro\noexpand\@classoptionslist
{,\bxjs@driver@opt}%
- }\bxjs@nxt
+ }\bxjs@next
\fi
\fi
\ifjsWithpTeXng
@@ -735,7 +751,7 @@
\let\bxjs@jadriver\bxjs@@minimal
\fi
\fi
-\ifx\bxjs@jadriver@given\@undefined\else
+\ifx\bxjs@jadriver@opt\@undefined\else
\ifx\bxjs@engine@given\@undefined
\ClassError\bxjs@clsname
{An engine option must be explicitly given}%
@@ -829,6 +845,7 @@
\catcode`\?=11 \let\p@?\jsc@mpt
\fi
\chardef\bxjs@qmcc=\catcode`\?\relax
+\g@addto@macro\bxjs@pre@jadriver@hook{\catcode`\?=12\relax}
\newdimen\jsZw
\jsZw=10\jsc@mpt \jsZw=\jsScale\jsZw
\ifbxjs@usezw
@@ -928,10 +945,10 @@
\skip2=\abovedisplayshortskip
\skip4=\belowdisplayskip
\skip6=\belowdisplayshortskip
- \let\bxjs@ltx@nomath\@nomath
+ \let\bxjs@save@nomath\@nomath
\let\@nomath\@gobble
\@currsize\selectfont
- \let\@nomath\bxjs@ltx@nomath
+ \let\@nomath\bxjs@save@nomath
\abovedisplayskip=\skip0
\abovedisplayshortskip=\skip2
\belowdisplayskip=\skip4
@@ -1022,21 +1039,23 @@
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
+\@onlypreamble\bxjs@bd@pre@geometry@hook
+\let\bxjs@bd@pre@geometry@hook\@empty
\ifjsc@mag
\mag=\bxjs@param@mag
\fi
\setlength{\topskip}{10\p@?}
\def\bxjs@unit@trueQ{0.25truemm}\let\bxjs@unit@trueH\bxjs@unit@trueQ
\def\bxjs@unit@zw{\jsZw}\let\bxjs@unit@zh\bxjs@unit@zw
-\def\bxjs@read@a{\futurelet\bxjs@tmpa\bxjs@read@b}
-\def\bxjs@read@b{%
- \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@read@c
- \else \expandafter\bxjs@read@d \fi}
-\def\bxjs@read@c#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}}
-\def\bxjs@read@d#1\@nil{\bxjs@read@e#1,,\@nil}
-\def\bxjs@read@e#1,#2,#3\@nil{%
+\def\bxjs@tmpdo{\futurelet\bxjs@tmpa\bxjs@tmpdo@a}
+\def\bxjs@tmpdo@a{%
+ \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@tmpdo@b
+ \else \expandafter\bxjs@tmpdo@c \fi}
+\def\bxjs@tmpdo@b#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}}
+\def\bxjs@tmpdo@c#1\@nil{\bxjs@tmpdo@d#1,,\@nil}
+\def\bxjs@tmpdo@d#1,#2,#3\@nil{%
\ifx\@nil#3\@nil\else \edef\bxjs@param@paper{papersize={#1,#2}}\fi}
-\expandafter\bxjs@read@a\bxjs@param@paper\@empty\@empty\@nil
+\expandafter\bxjs@tmpdo\bxjs@param@paper\@empty\@empty\@nil
\edef\bxjs@layout@paper{%
\ifjsc@mag truedimen,\fi
\if@landscape landscape,\fi
@@ -1058,10 +1077,13 @@
\edef\bxjs@layout{\bxjs@layout lines=\the\@tempcnta,}
\fi
\newdimen\fullwidth
+\def\bxjs@preproc@layout{%
+ \edef\bxjs@save@ht@strutbox{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt}
\def\bxjs@postproc@layout{%
\ifx\bxjs@geometry@driver\relax\else
\let\Gm@driver\bxjs@geometry@driver
\fi
+ \ht\strutbox=\bxjs@save@ht@strutbox\relax
\ifbxjs@whole@zw@lines
\@tempdimb=\textwidth
\if@twocolumn \@tempdima=2\Cwd \else \@tempdima=1\Cwd \fi
@@ -1096,10 +1118,6 @@
\edef\jsGeometryOptions{%
\bxjs@layout@paper,\bxjs@layout}
\ifx\bxjs@geometry\bxjs@geometry@class
-\def\bxjs@geometry@guard@on{%
- \edef\bxjs@gg@tmp{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt}
-\def\bxjs@geometry@guard@off{%
- \ht\strutbox=\bxjs@gg@tmp\relax}
\ifbxjs@papersize
\ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx
\PassOptionsToPackage{dvipdfm}{geometry}
@@ -1110,19 +1128,16 @@
\else
\PassOptionsToPackage{driver=none}{geometry}
\fi
-\AtBeginDocument{\bxjs@pre@geometry@hook}
+\AtBeginDocument{\bxjs@bd@pre@geometry@hook}
\AtBeginDocument{\ImposeOldLuaTeXBehavior}
-\bxjs@geometry@guard@on
+\bxjs@preproc@layout
\edef\bxjs@next{%
\noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}%
}\bxjs@next
-\bxjs@geometry@guard@off
\AtBeginDocument{\RevokeOldLuaTeXBehavior}
\let\bxjs@geometry@driver\Gm@driver
\bxjs@postproc@layout
-\@onlypreamble\bxjs@pre@geometry@hook
-\def\bxjs@pre@geometry@hook{%
- \@ifpackageloaded{geometry}{%
+\g@addto@macro\bxjs@bd@pre@geometry@hook{%
\@ifpackagelater{geometry}{2010/02/12}{}{%else
\PackageWarningNoLine\bxjs@clsname
{The 'geometry' package installed\MessageBreak
@@ -1131,14 +1146,12 @@
\def\bxjs@Gm@driver{pdftex}
\ifx\pdfhorigin\@undefined \newdimen\pdfhorigin \fi
\ifx\pdfvorigin\@undefined \newdimen\pdfvorigin \fi
- \fi\fi
- }%
+ \fi\fi}%
\ifjsWithpTeXng
\ifx\Gm@driver\@empty
\def\Gm@driver{pdftex}%
\fi
- \fi
- }{}}
+ \fi}
\def\setpagelayout{%
\bxjs@ifplus{\bxjs@setpagelayout@a\tw@}{%else
\@ifstar{\bxjs@setpagelayout@a\@ne}{\bxjs@setpagelayout@a\z@}}}
@@ -1150,20 +1163,17 @@
\or% semireset(+)
\def\bxjs@next{reset,\bxjs@layout@paper,\bxjs@layout@base,#2}%
\fi
- \bxjs@geometry@guard@on
+ \bxjs@preproc@layout
\edef\bxjs@next{%
\noexpand\geometry{\bxjs@next}%
}\bxjs@next
- \bxjs@geometry@guard@off
\bxjs@postproc@layout}
\else\ifx\bxjs@geometry\bxjs@geometry@user
-\AtBeginDocument{\bxjs@check@page@layout}
-\@onlypreamble\bxjs@check@page@layout
-\def\bxjs@check@page@layout{%
+\g@addto@macro\bxjs@begin@document@hook{%
\ifdim\textwidth=.5\maxdimen
\ClassError\bxjs@clsname
{Page layout is not properly set}%
- {\@ehd}
+ {\@ehd}%
\fi}
\def\jsUseMinimalPageLayout{%
\setlength{\textwidth}{6.5in}%
@@ -2236,7 +2246,7 @@
\let\jsInhibitGlueAtParTop\@empty
\def\everyparhook{\jsInhibitGlueAtParTop}
\ifnum\bxjs@everyparhook=\bxjs@everyparhook@compat
-\AtBeginDocument{\everypar{\everyparhook}}
+\g@addto@macro\bxjs@begin@document@hook{\everypar{\everyparhook}}
\fi
\ifx j\jsEngine
\def\@inhibitglue{%
@@ -2391,6 +2401,7 @@
\newcommand{\tablename}{\if@english Table~\else 表\fi}
\newcommand{\appendixname}{\if@english \else 付録\fi}
\newcommand{\abstractname}{\if@english Abstract\else 概要\fi}
+\@onlypreamble\bxjs@decl@Seireki@cmds
\@tempswafalse
\if p\jsEngine \@tempswatrue \fi
\if n\jsEngine \@tempswatrue \fi
@@ -2437,6 +2448,18 @@
\def\bxjs@gengo{平成}\advance\bxjs@jayear-1988\relax
\let\heisei\bxjs@jayear
\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@}
+ \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
@@ -2463,7 +2486,7 @@
}%
\fi}
\let\today\bxjs@today
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\ifx\bbl@jpn@Seirekitrue\@undefined\else
\bxjs@decl@Seireki@cmds
\g@addto@macro\datejapanese{%
@@ -2480,11 +2503,8 @@
\onecolumn
\raggedbottom
\fi
-\catcode`\?=12
-\ifx\bxjs@jadriver\relax\else
+\bxjs@pre@jadriver@hook
\input{bxjsja-\bxjs@jadriver.def}
-\fi
-\bxjs@restore@jltrcc
\endinput
%%
%% End of file `bxjsreport.cls'.
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls
index 4f1e4290376..fc865c7eb3d 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/03/29 v1.8a BXJS document classes]
+ [2018/04/19 v1.9 BXJS document classes]
%% このファイルは日本語文字を含みます.
\def\bxjs@clsname{bxjsslide}
\newif\ifjsc@needsp@tch
@@ -68,6 +68,9 @@
{It's a fatal error. I'll quit right now.}
\expandafter\@firstofone
\fi{\endinput\@@end}
+\ifx l\jsEngine
+ \directlua{ bxjs = {} }
+\fi
\ifjsWitheTeX \let\bxjs@protected\protected
\else \let\bxjs@protected\@empty
\fi
@@ -107,12 +110,12 @@
\fi
\endgroup
#1=\bxjs@g@tmpa\relax}
-\if j\jsEngine \def\bxjs@parse@qh@all{zw,zh}
-\else \def\bxjs@parse@qh@all{trueQ,trueH,Q,H,zw,zh}
+\if j\jsEngine \def\bxjs@parse@qh@units{zw,zh}
+\else \def\bxjs@parse@qh@units{trueQ,trueH,Q,H,zw,zh}
\fi
\def\bxjs@parse@qh#1{%
\let\bxjs@tmpb\relax
- \@for\bxjs@tmpa:=\bxjs@parse@qh@all\do{%
+ \@for\bxjs@tmpa:=\bxjs@parse@qh@units\do{%
\ifx\bxjs@tmpb\relax
\edef\bxjs@next{{\bxjs@tmpa}{#1}}%
\expandafter\bxjs@parse@qh@a\csname bxjs@unit@\bxjs@tmpa\expandafter
@@ -133,18 +136,28 @@
\fi
\fi}
\def\bxjs@unit@Q{0.25mm}\let\bxjs@unit@H\bxjs@unit@Q
+\@onlypreamble\bxjs@begin@document@hook
+\let\bxjs@begin@document@hook\@empty
+\AtBeginDocument{\bxjs@begin@document@hook}
+\@onlypreamble\bxjs@post@option@hook
+\let\bxjs@post@option@hook\@empty
+\@onlypreamble\bxjs@pre@jadriver@hook
+\let\bxjs@pre@jadriver@hook\@empty
\def\jsAtEndOfClass{%
\expandafter\g@addto@macro\csname\bxjs@clsname.cls-h@@k\endcsname}
-\@onlypreamble\bxjs@restore@jltrcc
-\let\bxjs@restore@jltrcc\@empty
+\@onlypreamble\bxjs@tmpdo
+\@onlypreamble\bxjs@tmpdo@a
+\@onlypreamble\bxjs@tmpdo@b
+\@onlypreamble\bxjs@tmpdo@c
+\@onlypreamble\bxjs@tmpdo@d
\if l\jsEngine
-\def\bxjs@change@jltrcc#1{%
- \xdef\bxjs@restore@jltrcc{%
- \bxjs@restore@jltrcc
+\def\bxjs@tmpdo#1{%
+ \xdef\bxjs@pre@jadriver@hook{%
+ \bxjs@pre@jadriver@hook
\catcode`#1=\the\catcode`#1\relax}%
\catcode`#1=11\relax}
-\@tfor\bxjs@x:=西暦\do
- {\expandafter\bxjs@change@jltrcc\bxjs@x}
+\@tfor\bxjs@tmpa:=和西暦\do
+ {\expandafter\bxjs@tmpdo\bxjs@tmpa}
\fi
\bxjs@robust@def\jsInhibitGlue{%
\ifx\inhibitglue\@undefined\else \inhibitglue \fi}
@@ -161,6 +174,7 @@
\newif\if@restonecol
\newif\if@titlepage
\newif\if@enablejfam \@enablejfamfalse
+\@onlypreamble\bxjs@setpaper
\def\bxjs@setpaper#1{\def\bxjs@param@paper{#1}}
\DeclareOption{a3paper}{\bxjs@setpaper{a3paper}}
\DeclareOption{a4paper}{\bxjs@setpaper{a4paper}}
@@ -301,7 +315,7 @@
\expandafter\let\expandafter\ifjsDraft\csname if#1\endcsname}
\DeclareOption{draft}{\bxjs@draft{true}\setlength\overfullrule{5pt}}
\DeclareOption{final}{\bxjs@draft{false}\setlength\overfullrule{0pt}}
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\expandafter\ifx\csname ifdraft\endcsname\relax
\expandafter\let\csname ifdraft\expandafter\endcsname
\csname ifjsDraft\endcsname
@@ -341,9 +355,8 @@
\else \@tempdimb=\@tempcntb\@ne \fi}%
\xdef\bxjs@gtmpa{\the\@tempdimb}%
\endgroup #1=\bxjs@gtmpa\relax}
-\let\bxjs@composite@proc\relax
\DeclareOption{pandoc}{%
- \def\bxjs@composite@proc{%
+ \g@addto@macro\bxjs@post@option@hook{%
\bxjs@oldfontcommandstrue
\setkeys{bxjs}{ja=pandoc}%
\let\bxjs@engine@given=*}%
@@ -408,26 +421,6 @@
\let\bxjs@driver@given\bxjs@driver@@xetex}
\DeclareOption{dvipdfmx-if-dvi}{%
\setkeys{bxjs}{dvi=dvipdfmx}}
-\newif\ifbxjs@usezw \bxjs@usezwtrue
-\DeclareOption{nozw}{%
- \bxjs@usezwfalse}
-\DeclareOption{zw}{%
- \bxjs@usezwtrue}
-\newif\ifbxjs@disguise@js \bxjs@disguise@jstrue
-\DeclareOption{nojs}{%
- \bxjs@disguise@jsfalse}
-\DeclareOption{js}{%
- \bxjs@disguise@jstrue}
-\newif\ifbxjs@precisetext
-\DeclareOption{noprecisetext}{%
- \bxjs@precisetextfalse}
-\DeclareOption{precisetext}{%
- \bxjs@precisetexttrue}
-\newif\ifbxjs@simplejasetup \bxjs@simplejasetuptrue
-\DeclareOption{nosimplejasetup}{%
- \bxjs@simplejasetupfalse}
-\DeclareOption{simplejasetup}{%
- \bxjs@simplejasetuptrue}
\newif\ifbxjs@bigcode \bxjs@bigcodefalse
\edef\bxjs@tmpa{\expandafter\noexpand\csname\endcsname}
\def\bxjs@tmpb#1 #2#3\@nil{%
@@ -442,16 +435,27 @@
\bxjs@oldfontcommandsfalse}
\DeclareOption{oldfontcommands}{%
\bxjs@oldfontcommandstrue}
-\def\bxjs@setkey{%
- \expandafter\bxjs@setkey@a\expandafter{\CurrentOption}}
-\def\bxjs@setkey@a{\bxjs@safe@setkeys{bxjs}}
-\DeclareOption*{\bxjs@setkey}
+\DeclareOption*{%
+ \def\bxjs@next{\bxjs@safe@setkeys{bxjs}}%
+ \expandafter\bxjs@next\expandafter{\CurrentOption}}
\def\bxjs@safe@setkeys#1#2{%
- \let\bxjs@KV@errx\KV@errx
- \let\KV@errx\bxjs@safe@setkeys@a
+ \let\bxjs@save@KV@errx\KV@errx \let\KV@errx\@gobble
\setkeys{#1}{#2}%
- \let\KV@errx\bxjs@KV@errx}
-\def\bxjs@safe@setkeys@a#1{}
+ \let\KV@errx\bxjs@save@KV@errx}
+\@onlypreamble\bxjs@declare@enum@option
+\def\bxjs@declare@enum@option#1#2{%
+ \define@key{bxjs}{#1}{%
+ \expandafter\ifx\csname bxjs@#2@@##1\endcsname\relax
+ \bxjs@error@keyval{#1}{##1}%
+ \else \bxjs@csletcs{bxjs@#2}{bxjs@#2@@##1}%
+ \fi}}
+\@onlypreamble\bxjs@declare@bool@option
+\def\bxjs@declare@bool@option#1#2{%
+ \define@key{bxjs}{#1}[true]{%
+ \expandafter\ifx\csname bxjs@#2##1\endcsname\relax
+ \bxjs@error@keyval{#1}{##1}%
+ \else \@nameuse{bxjs@#2##1}%
+ \fi}}
\def\bxjs@set@keyval#1#2#3{%
\expandafter\let\expandafter\bxjs@next\csname bxjs@kv@#1@#2\endcsname
\ifx\bxjs@next\relax
@@ -479,9 +483,9 @@
\define@key{bxjs}{mag}{\edef\bxjs@param@mag{#1}}
\define@key{bxjs}{paper}{\edef\bxjs@param@paper{#1}}
\let\bxjs@jadriver\relax
-\define@key{bxjs}{jadriver}{\edef\bxjs@jadriver{#1}}
+\define@key{bxjs}{jadriver}{\edef\bxjs@jadriver@opt{#1}}
\define@key{bxjs}{ja}[\relax]{%
- \ifx\relax#1\else\edef\bxjs@jadriver{#1}\fi}
+ \ifx\relax#1\else\edef\bxjs@jadriver@opt{#1}\fi}
\let\jsJaFont\@empty
\define@key{bxjs}{jafont}{\edef\jsJaFont{#1}}
\let\jsJaParam\@empty
@@ -550,7 +554,7 @@
\define@key{bxjs}{layout}{%
\bxjs@set@keyval{layout}{#1}{}}
\define@key{bxjs}{textwidth-limit}{%
- \edef\bxjs@textwidth@limit{#1}}
+ \edef\bxjs@textwidth@limit@opt{#1}}
\define@key{bxjs}{textwidth}{\edef\bxjs@textwidth@opt{#1}}
\define@key{bxjs}{line_length}{\setkeys{bxjs}{textwidth=#1}}
\define@key{bxjs}{number-of-lines}{\edef\bxjs@number@of@lines@opt{#1}}
@@ -594,15 +598,31 @@
\def\bxjs@kv@labelsection@compat{\let\bxjs@label@section\bxjs@label@section@compat}
\def\bxjs@kv@labelsection@modern{\let\bxjs@label@section\bxjs@label@section@modern}
\define@key{bxjs}{label-section}{\bxjs@set@keyval{labelsection}{#1}{}}
-\let\bxjs@ltx@removeelement\@removeelement
+\newif\ifbxjs@usezw \bxjs@usezwtrue
+\bxjs@declare@bool@option{use-zw}{usezw}
+\DeclareOption{nozw}{\setkeys{bxjs}{use-zw=false}}
+\DeclareOption{zw}{\setkeys{bxjs}{use-zw=true}}
+\newif\ifbxjs@disguise@js \bxjs@disguise@jstrue
+\bxjs@declare@bool@option{disguise-js}{disguise@js}
+\DeclareOption{nojs}{\setkeys{bxjs}{disguise-js=false}}
+\DeclareOption{js}{\setkeys{bxjs}{disguise-js=true}}
+\newif\ifbxjs@precisetext
+\bxjs@declare@bool@option{precise-text}{precisetext}
+\DeclareOption{noprecisetext}{\setkeys{bxjs}{precise-text=false}}
+\DeclareOption{precisetext}{\setkeys{bxjs}{precise-text=true}}
+\newif\ifbxjs@simplejasetup \bxjs@simplejasetuptrue
+\bxjs@declare@bool@option{simple-ja-setup}{simplejasetup}
+\DeclareOption{nosimplejasetup}{\setkeys{bxjs}{simple-ja-setup=false}}
+\DeclareOption{simplejasetup}{\setkeys{bxjs}{simple-ja-setup=true}}
+\let\bxjs@org@removeelement\@removeelement
\def\@removeelement#1#2#3{%
\def\reserved@a{#2}%
\ifx\reserved@a\@empty \let#3\@empty
- \else \bxjs@ltx@removeelement{#1}{#2}{#3}%
+ \else \bxjs@org@removeelement{#1}{#2}{#3}%
\fi}
\ExecuteOptions{36pt,a4paper,landscape,oneside,onecolumn,titlepage,final}
\ProcessOptions\relax
-\bxjs@composite@proc
+\bxjs@post@option@hook
\if@slide
\def\maybeblue{\@ifundefined{ver@color.sty}{}{\color{blue}}}
\fi
@@ -611,32 +631,28 @@
\setlength\paperheight{\paperwidth}
\setlength\paperwidth {\@tempdima}
\fi
-\@onlypreamble\bxjs@purge@brace@elts
-\def\bxjs@purge@brace@elts{%
+\def\bxjs@tmpdo{%
\def\bxjs@tmpa{\@gobble}%
- \expandafter\bxjs@purge@be@a\@classoptionslist,\@nil,%
+ \expandafter\bxjs@tmpdo@a\@classoptionslist,\@nil,%
\let\@classoptionslist\bxjs@tmpa}
-\@onlypreamble\bxjs@purge@be@a
-\def\bxjs@purge@be@a#1,{%
+\def\bxjs@tmpdo@a#1,{%
\ifx\@nil#1\relax\else
- \bxjs@purge@be@b#1{}\@nil
+ \bxjs@tmpdo@b#1{}\@nil
\if@tempswa \edef\bxjs@tmpa{\bxjs@tmpa,#1}\fi
- \expandafter\bxjs@purge@be@a
+ \expandafter\bxjs@tmpdo@a
\fi}
-\@onlypreamble\bxjs@purge@be@b
-\def\bxjs@purge@be@b#1#{\bxjs@purge@be@c}
-\@onlypreamble\bxjs@purge@be@c
-\def\bxjs@purge@be@c#1\@nil{%
+\def\bxjs@tmpdo@b#1#{\bxjs@tmpdo@c}
+\def\bxjs@tmpdo@c#1\@nil{%
\ifx\@nil#1\@nil \@tempswatrue \else \@tempswafalse \fi}
-\bxjs@purge@brace@elts
+\bxjs@tmpdo
\@expandtwoargs\@removeelement
{papersize}\@classoptionslist\@classoptionslist
\@expandtwoargs\@removeelement
{10pt}\@classoptionslist\@classoptionslist
\@expandtwoargs\@removeelement
{noscale}\@classoptionslist\@classoptionslist
-\ifx\bxjs@jadriver\relax\else
- \let\bxjs@jadriver@given\bxjs@jadriver
+\ifx\bxjs@jadriver@opt\@undefined\else
+ \let\bxjs@jadriver\bxjs@jadriver@opt
\fi
\let\bxjs@tmpb\jsEngine
\ifx j\bxjs@tmpb\ifjsWithpTeXng
@@ -696,17 +712,17 @@
\else \@tempswatrue
\fi\fi\fi
\if@tempswa
- \ifx\bxjs@driver@opt\@undefined \ifx\bxjs@jadriver@given\@undefined\else
+ \ifx\bxjs@driver@opt\@undefined \ifx\bxjs@jadriver@opt\@undefined\else
\ClassWarningNoLine\bxjs@clsname
{No driver option is given}
\fi\fi
\ifbxjs@dvi@opt
- \edef\bxjs@nxt{%
+ \edef\bxjs@next{%
\let\noexpand\bxjs@driver@given
\csname bxjs@dvidriver@@\bxjs@driver@opt\endcsname
\noexpand\g@addto@macro\noexpand\@classoptionslist
{,\bxjs@driver@opt}%
- }\bxjs@nxt
+ }\bxjs@next
\fi
\fi
\ifjsWithpTeXng
@@ -727,7 +743,7 @@
\let\bxjs@jadriver\bxjs@@minimal
\fi
\fi
-\ifx\bxjs@jadriver@given\@undefined\else
+\ifx\bxjs@jadriver@opt\@undefined\else
\ifx\bxjs@engine@given\@undefined
\ClassError\bxjs@clsname
{An engine option must be explicitly given}%
@@ -820,6 +836,7 @@
\catcode`\?=11 \let\p@?\jsc@mpt
\fi
\chardef\bxjs@qmcc=\catcode`\?\relax
+\g@addto@macro\bxjs@pre@jadriver@hook{\catcode`\?=12\relax}
\newdimen\jsZw
\jsZw=10\jsc@mpt \jsZw=\jsScale\jsZw
\ifbxjs@usezw
@@ -919,10 +936,10 @@
\skip2=\abovedisplayshortskip
\skip4=\belowdisplayskip
\skip6=\belowdisplayshortskip
- \let\bxjs@ltx@nomath\@nomath
+ \let\bxjs@save@nomath\@nomath
\let\@nomath\@gobble
\@currsize\selectfont
- \let\@nomath\bxjs@ltx@nomath
+ \let\@nomath\bxjs@save@nomath
\abovedisplayskip=\skip0
\abovedisplayshortskip=\skip2
\belowdisplayskip=\skip4
@@ -1013,21 +1030,23 @@
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
+\@onlypreamble\bxjs@bd@pre@geometry@hook
+\let\bxjs@bd@pre@geometry@hook\@empty
\ifjsc@mag
\mag=\bxjs@param@mag
\fi
\setlength{\topskip}{10\p@?}
\def\bxjs@unit@trueQ{0.25truemm}\let\bxjs@unit@trueH\bxjs@unit@trueQ
\def\bxjs@unit@zw{\jsZw}\let\bxjs@unit@zh\bxjs@unit@zw
-\def\bxjs@read@a{\futurelet\bxjs@tmpa\bxjs@read@b}
-\def\bxjs@read@b{%
- \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@read@c
- \else \expandafter\bxjs@read@d \fi}
-\def\bxjs@read@c#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}}
-\def\bxjs@read@d#1\@nil{\bxjs@read@e#1,,\@nil}
-\def\bxjs@read@e#1,#2,#3\@nil{%
+\def\bxjs@tmpdo{\futurelet\bxjs@tmpa\bxjs@tmpdo@a}
+\def\bxjs@tmpdo@a{%
+ \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@tmpdo@b
+ \else \expandafter\bxjs@tmpdo@c \fi}
+\def\bxjs@tmpdo@b#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}}
+\def\bxjs@tmpdo@c#1\@nil{\bxjs@tmpdo@d#1,,\@nil}
+\def\bxjs@tmpdo@d#1,#2,#3\@nil{%
\ifx\@nil#3\@nil\else \edef\bxjs@param@paper{papersize={#1,#2}}\fi}
-\expandafter\bxjs@read@a\bxjs@param@paper\@empty\@empty\@nil
+\expandafter\bxjs@tmpdo\bxjs@param@paper\@empty\@empty\@nil
\edef\bxjs@layout@paper{%
\ifjsc@mag truedimen,\fi
\if@landscape landscape,\fi
@@ -1048,10 +1067,13 @@
\edef\bxjs@layout{\bxjs@layout lines=\the\@tempcnta,}
\fi
\newdimen\fullwidth
+\def\bxjs@preproc@layout{%
+ \edef\bxjs@save@ht@strutbox{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt}
\def\bxjs@postproc@layout{%
\ifx\bxjs@geometry@driver\relax\else
\let\Gm@driver\bxjs@geometry@driver
\fi
+ \ht\strutbox=\bxjs@save@ht@strutbox\relax
\ifbxjs@whole@zw@lines
\@tempdimb=\textwidth
\if@twocolumn \@tempdima=2\Cwd \else \@tempdima=1\Cwd \fi
@@ -1086,10 +1108,6 @@
\edef\jsGeometryOptions{%
\bxjs@layout@paper,\bxjs@layout}
\ifx\bxjs@geometry\bxjs@geometry@class
-\def\bxjs@geometry@guard@on{%
- \edef\bxjs@gg@tmp{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt}
-\def\bxjs@geometry@guard@off{%
- \ht\strutbox=\bxjs@gg@tmp\relax}
\ifbxjs@papersize
\ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx
\PassOptionsToPackage{dvipdfm}{geometry}
@@ -1100,19 +1118,16 @@
\else
\PassOptionsToPackage{driver=none}{geometry}
\fi
-\AtBeginDocument{\bxjs@pre@geometry@hook}
+\AtBeginDocument{\bxjs@bd@pre@geometry@hook}
\AtBeginDocument{\ImposeOldLuaTeXBehavior}
-\bxjs@geometry@guard@on
+\bxjs@preproc@layout
\edef\bxjs@next{%
\noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}%
}\bxjs@next
-\bxjs@geometry@guard@off
\AtBeginDocument{\RevokeOldLuaTeXBehavior}
\let\bxjs@geometry@driver\Gm@driver
\bxjs@postproc@layout
-\@onlypreamble\bxjs@pre@geometry@hook
-\def\bxjs@pre@geometry@hook{%
- \@ifpackageloaded{geometry}{%
+\g@addto@macro\bxjs@bd@pre@geometry@hook{%
\@ifpackagelater{geometry}{2010/02/12}{}{%else
\PackageWarningNoLine\bxjs@clsname
{The 'geometry' package installed\MessageBreak
@@ -1121,14 +1136,12 @@
\def\bxjs@Gm@driver{pdftex}
\ifx\pdfhorigin\@undefined \newdimen\pdfhorigin \fi
\ifx\pdfvorigin\@undefined \newdimen\pdfvorigin \fi
- \fi\fi
- }%
+ \fi\fi}%
\ifjsWithpTeXng
\ifx\Gm@driver\@empty
\def\Gm@driver{pdftex}%
\fi
- \fi
- }{}}
+ \fi}
\def\setpagelayout{%
\bxjs@ifplus{\bxjs@setpagelayout@a\tw@}{%else
\@ifstar{\bxjs@setpagelayout@a\@ne}{\bxjs@setpagelayout@a\z@}}}
@@ -1140,20 +1153,17 @@
\or% semireset(+)
\def\bxjs@next{reset,\bxjs@layout@paper,\bxjs@layout@base,#2}%
\fi
- \bxjs@geometry@guard@on
+ \bxjs@preproc@layout
\edef\bxjs@next{%
\noexpand\geometry{\bxjs@next}%
}\bxjs@next
- \bxjs@geometry@guard@off
\bxjs@postproc@layout}
\else\ifx\bxjs@geometry\bxjs@geometry@user
-\AtBeginDocument{\bxjs@check@page@layout}
-\@onlypreamble\bxjs@check@page@layout
-\def\bxjs@check@page@layout{%
+\g@addto@macro\bxjs@begin@document@hook{%
\ifdim\textwidth=.5\maxdimen
\ClassError\bxjs@clsname
{Page layout is not properly set}%
- {\@ehd}
+ {\@ehd}%
\fi}
\def\jsUseMinimalPageLayout{%
\setlength{\textwidth}{6.5in}%
@@ -2107,7 +2117,7 @@
\let\jsInhibitGlueAtParTop\@empty
\def\everyparhook{\jsInhibitGlueAtParTop}
\ifnum\bxjs@everyparhook=\bxjs@everyparhook@compat
-\AtBeginDocument{\everypar{\everyparhook}}
+\g@addto@macro\bxjs@begin@document@hook{\everypar{\everyparhook}}
\fi
\ifx j\jsEngine
\def\@inhibitglue{%
@@ -2260,6 +2270,7 @@
\newcommand{\tablename}{\if@english Table~\else 表\fi}
\newcommand{\appendixname}{\if@english \else 付録\fi}
\newcommand{\abstractname}{\if@english Abstract\else 概要\fi}
+\@onlypreamble\bxjs@decl@Seireki@cmds
\@tempswafalse
\if p\jsEngine \@tempswatrue \fi
\if n\jsEngine \@tempswatrue \fi
@@ -2306,6 +2317,18 @@
\def\bxjs@gengo{平成}\advance\bxjs@jayear-1988\relax
\let\heisei\bxjs@jayear
\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@}
+ \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
@@ -2332,7 +2355,7 @@
}%
\fi}
\let\today\bxjs@today
-\AtBeginDocument{%
+\g@addto@macro\bxjs@begin@document@hook{%
\ifx\bbl@jpn@Seirekitrue\@undefined\else
\bxjs@decl@Seireki@cmds
\g@addto@macro\datejapanese{%
@@ -2351,11 +2374,8 @@
\fi
\renewcommand\familydefault{\sfdefault}
\raggedright
-\catcode`\?=12
-\ifx\bxjs@jadriver\relax\else
+\bxjs@pre@jadriver@hook
\input{bxjsja-\bxjs@jadriver.def}
-\fi
-\bxjs@restore@jltrcc
\endinput
%%
%% End of file `bxjsslide.cls'.