%%
%% This is file `bxjsja-standard.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bxjscls.dtx  (with options: `drv,standard')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from bxjsja-standard.def.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file bxjscls.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\ProvidesFile{bxjsja-standard.def}
  [2017/04/01 v1.5b BXJS document classes]
%% このファイルは日本語文字を含みます
\input{bxjsja-minimal.def}
\bxjs@simplejasetupfalse
\ifjsWitheTeX
  \@tempdima=0.25mm
  \protected\edef\jQ{\dimexpr\the\@tempdima\relax}
  \let\jH\jQ
  \ifjsc@mag
    \@tempdimb=\jsBaseFontSize\relax
    \edef\bxjs@tmpa{\strip@pt\@tempdimb}%
    \@tempdima=2.5mm
    \bxjs@invscale\@tempdima\bxjs@tmpa
    \protected\edef\trueQ{\dimexpr\the\@tempdima\relax}
    \@tempdima=10pt
    \bxjs@invscale\@tempdima\bxjs@tmpa
    \protected\edef\bxjs@truept{\dimexpr\the\@tempdima\relax}
  \else \let\trueQ\jQ \let\bxjs@truept\p@
  \fi
  \let\trueH\trueQ
  \@tempdima\trueQ \bxjs@invscale\@tempdima\jsScale
  \protected\edef\ascQ{\dimexpr\the\@tempdima\relax}
  \@tempdima\bxjs@truept \bxjs@invscale\@tempdima\jsScale
  \protected\edef\ascpt{\dimexpr\the\@tempdima\relax}
\fi
\def\bxjs@kanjiskip{0pt}
\newcommand*\setkanjiskip[1]{%
  \edef\bxjs@kanjiskip{#1}%
  \bxjs@reset@kanjiskip}
\newcommand*\getkanjiskip{%
  \bxjs@kanjiskip}
\newif\ifbxjs@kanjiskip@enabled \bxjs@kanjiskip@enabledtrue
\bxjs@robust@def\bxjs@enable@kanjiskip{%
  \bxjs@kanjiskip@enabledtrue
  \bxjs@reset@kanjiskip}
\bxjs@robust@def\bxjs@disable@kanjiskip{%
  \bxjs@kanjiskip@enabledfalse
  \bxjs@reset@kanjiskip}
\bxjs@robust@def\bxjs@reset@kanjiskip{%
  \ifbxjs@kanjiskip@enabled
    \setlength{\@tempskipa}{\bxjs@kanjiskip}%
  \else \@tempskipa\z@
  \fi
  \bxjs@apply@kanjiskip}
\def\bxjs@xkanjiskip{0pt}
\newcommand*\setxkanjiskip[1]{%
  \edef\bxjs@xkanjiskip{#1}%
  \bxjs@reset@xkanjiskip}
\newcommand*\getxkanjiskip{%
  \bxjs@xkanjiskip}
\newif\ifbxjs@xkanjiskip@enabled \bxjs@xkanjiskip@enabledtrue
\bxjs@robust@def\bxjs@enable@xkanjiskip{%
  \bxjs@xkanjiskip@enabledtrue
  \bxjs@reset@xkanjiskip}
\bxjs@robust@def\bxjs@disable@xkanjiskip{%
  \bxjs@xkanjiskip@enabledfalse
  \bxjs@reset@xkanjiskip}
\bxjs@robust@def\bxjs@reset@xkanjiskip{%
  \ifbxjs@xkanjiskip@enabled
    \setlength{\@tempskipa}{\bxjs@xkanjiskip}%
  \else \@tempskipa\z@
  \fi
  \bxjs@apply@xkanjiskip}
\g@addto@macro\jsResetDimen{%
  \bxjs@reset@kanjiskip
  \bxjs@reset@xkanjiskip}
\let\bxjs@apply@kanjiskip\relax
\let\bxjs@apply@xkanjiskip\relax
\@onlypreamble\bxjs@adjust@jafont
\def\bxjs@adjust@jafont#1{%
  \ifx\jsJaFont\bxjs@@auto
    \bxjs@get@kanjiEmbed
    \ifx\bxjs@kanjiEmbed\relax
      \let\bxjs@tmpa\@empty
    \else
      \let\bxjs@tmpa\bxjs@kanjiEmbed
    \fi
  \else
    \let\bxjs@tmpa\jsJaFont
  \fi
  \if f#1\ifx\bxjs@tmpa\bxjs@@noEmbed
    \ClassWarningNoLine\bxjs@clsname
     {Option 'jafont=noEmbed' is ignored, because it is\MessageBreak
      not available on the current situation}%
    \let\bxjs@tmpa\@empty
  \fi\fi
}
\def\bxjs@@auto{auto}
\def\bxjs@@noEmbed{noEmbed}
\let\bxjs@kanjiEmbed\relax
\@onlypreamble\bxjs@get@kanjiEmbed
\def\bxjs@get@kanjiEmbed{%
  \begingroup\setbox\z@=\hbox{%
    \global\let\bxjs@g@tmpa\relax
    \endlinechar\m@ne
    \let\do\@makeother\dospecials
    \catcode32=10 \catcode12=10 %form-feed
    \let\bxjs@tmpa\@empty
    \openin\@inputcheck="|kpsewhich updmap.cfg"\relax
    \ifeof\@inputcheck\else
      \read\@inputcheck to\bxjs@tmpa
      \closein\@inputcheck
    \fi
    \ifx\bxjs@tmpa\@empty\else
      \openin\@inputcheck="\bxjs@tmpa"\relax
      \@tempswatrue
      \loop\if@tempswa
        \read\@inputcheck to\bxjs@tmpa
        \expandafter\bxjs@get@ke@a\bxjs@tmpa\@nil kanjiEmbed \@nil\@nnil
        \ifx\bxjs@tmpa\relax\else
          \global\let\bxjs@g@tmpa\bxjs@tmpa
          \@tempswafalse
        \fi
        \ifeof\@inputcheck \@tempswafalse \fi
      \repeat
    \fi
  }\endgroup
  \let\bxjs@kanjiEmbed\bxjs@g@tmpa
}
\@onlypreamble\bxjs@get@ke@a
\def\bxjs@get@ke@a#1kanjiEmbed #2\@nil#3\@nnil{%
  \ifx$#1$\def\bxjs@tmpa{#2}%
  \else \let\bxjs@tmpa\relax
  \fi}
\newcommand*\jachar[1]{%
  \begingroup
    \jsLetHeadChar\bxjs@tmpa{#1}%
    \ifx\bxjs@tmpa\relax
      \ClassWarningNoLine\bxjs@clsname
        {Illegal argument given to \string\jachar}%
    \else
      \expandafter\bxjs@jachar\expandafter{\bxjs@tmpa}%
    \fi
  \endgroup}
\let\jsJaChar\jachar
\let\bxjs@jachar\@firstofone
\PassOptionsToPackage{setpagesize=false}{hyperref}
\@onlypreamble\bxjs@fix@hyperref@unicode
\def\bxjs@fix@hyperref@unicode#1{%
  \PassOptionsToPackage{bxjs/hook=#1}{hyperref}%
  \@namedef{KV@Hyp@bxjs/hook}##1{%
    \KV@Hyp@unicode{##1}%
    \def\KV@Hyp@unicode####1{%
      \expandafter\ifx\csname if##1\expandafter\endcsname
         \csname if####1\endcsname\else
        \ClassWarningNoLine\bxjs@clsname
        {Blcoked hyperref option 'unicode=####1'}%
      \fi
    }%
  }%
}
\@onlypreamble\bxjs@urgent@special
\def\bxjs@urgent@special#1{%
  \AtBeginDvi{\special{#1}}%
  \AtBeginDocument{%
    \@ifpackageloaded{atbegshi}{%
      \begingroup
        \toks\z@{\special{#1}}%
        \toks\tw@\expandafter{\AtBegShi@HookFirst}%
        \xdef\AtBegShi@HookFirst{\the\toks@\the\toks\tw@}%
      \endgroup
    }{}%
  }%
}
\if j\jsEngine
\def\bxjs@apply@kanjiskip{%
  \kanjiskip\@tempskipa}
\def\bxjs@apply@xkanjiskip{%
  \xkanjiskip\@tempskipa}
\def\bxjs@jachar#1{%
  \bxjs@jachar@a#1....\@nil}
\def\bxjs@jachar@a#1#2#3#4#5\@nil{%
  \ifx.#2#1%
  \else\ifx.#3%
    \@tempcnta`#1 \multiply\@tempcnta64
    \advance\@tempcnta`#2 \advance\@tempcnta-"3080
    \bxjs@jachar@b
  \else\ifx.#4%
    \@tempcnta`#1 \multiply\@tempcnta64
    \advance\@tempcnta`#2 \multiply\@tempcnta64
    \advance\@tempcnta`#3 \advance\@tempcnta-"E2080
    \bxjs@jachar@b
  \else
    \@tempcnta`#1 \multiply\@tempcnta64
    \advance\@tempcnta`#2 \multiply\@tempcnta64
    \advance\@tempcnta`#3 \multiply\@tempcnta64
    \advance\@tempcnta`#4 \advance\@tempcnta-"3C82080
    \bxjs@jachar@b
  \fi\fi\fi}
\ifjsWithupTeX
  \def\bxjs@jachar@b{\kchar\@tempcnta}
\else
  \def\bxjs@jachar@b{%
    \ifx\bxUInt\@undefined\else
      \bxUInt{\@tempcnta}%
    \fi}
\fi
\ifbxjs@xkanjiskip@cmd
  \def\bxjs@put@xkanjiskip{%
    \relax\ifmmode \mskip\medmuskip
    \else \hskip\xkanjiskip
    \fi}
  \ifjsWitheTeX \protected\def\>{\bxjs@put@xkanjiskip}
  \else \def\>{\protect\bxjs@put@xkanjiskip}
  \fi
\fi
\let\bxjs@tmpa\jsJaFont
\ifx\bxjs@tmpa\bxjs@@auto
  \let\bxjs@tmpa\@empty
\else\ifx\bxjs@tmpa\bxjs@@noEmbed
  \def\bxjs@tmpa{noembed}
\fi\fi
\ifx\jsJaFont\@empty\else
  \edef\bxjs@nxt{%
    \noexpand\RequirePackage[\jsJaFont]
        {pxchfon}[2010/05/12]}% v0.5
  \bxjs@nxt
\fi
\begingroup
  \global\let\@gtempa\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}%
  |catcode`|\=0 \catcode`\|=12
  \def\bxjs@check@b#1keyval#2\@nnil{%
    \ifx$#2$\else
      \xdef\@gtempa{%
        \noexpand\PassOptionsToPackage{scale=\jsScale}{otf}}%
    \fi}
\@firstofone{%
  \catcode10=12 \endlinechar\m@ne
  \let\do\@makeother \dospecials \catcode32=10
  \openin\@inputcheck=otf.sty\relax
  \@tempswatrue
  \loop\if@tempswa
    \ifeof\@inputcheck \@tempswafalse \fi
    \if@tempswa
      \read\@inputcheck to\bxjs@line
      \expandafter\bxjs@check\bxjs@line\@nil
    \fi
  \repeat
  \closein\@inputcheck
\endgroup}
\@gtempa
\ifbxjs@hyperref@enc
  \bxjs@fix@hyperref@unicode{false}
\fi
\if \ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx T%
    \else\ifjsWithpTeXng T\else F\fi\fi T%
  \ifnum\jis"2121="A1A1 %euc
    \bxjs@urgent@special{pdf:tounicode EUC-UCS2}
  \else\ifnum\jis"2121="8140 %sjis
    \bxjs@urgent@special{pdf:tounicode 90ms-RKSJ-UCS2}
  \else\ifnum\jis"2121="3000 %uptex
    \ifbxjs@bigcode
      \bxjs@urgent@special{pdf:tounicode UTF8-UTF16}
      \PassOptionsToPackage{bigcode}{pxjahyper}
    \else
      \bxjs@urgent@special{pdf:tounicode UTF8-UCS2}
    \fi
  \fi\fi\fi
  \let\bxToUnicodeSpecialDone=t
\fi
\ifx f\bxjs@enablejfam\else
  \@enablejfamtrue
\fi
\if@enablejfam
  \DeclareSymbolFont{mincho}{\jsc@JYn}{mc}{m}{n}
  \DeclareSymbolFontAlphabet{\mathmc}{mincho}
  \SetSymbolFont{mincho}{bold}{\jsc@JYn}{gt}{m}{n}
  \jfam\symmincho
  \DeclareMathAlphabet{\mathgt}{\jsc@JYn}{gt}{m}{n}
  \AtBeginDocument{%
    \ifx\reDeclareMathAlphabet\@undefined\else
      \reDeclareMathAlphabet{\mathrm}{\@mathrm}{\@mathmc}%
      \reDeclareMathAlphabet{\mathbf}{\@mathbf}{\@mathgt}%
      \reDeclareMathAlphabet{\mathsf}{\@mathsf}{\@mathgt}%
    \fi}
\fi
\else\if p\jsEngine
\bxjs@adjust@jafont{f}
\edef\bxjs@nxt{%
  \noexpand\RequirePackage[%
      \ifx\bxjs@tmpa\@empty\else \bxjs@tmpa,\fi
      whole,autotilde]{bxcjkjatype}[2013/10/15]}% v0.2c
\bxjs@nxt
\bxjs@cjk@loaded
\ifbxjs@hyperref@enc
  \PassOptionsToPackage{unicode}{hyperref}
\fi
\ifx\bxcjkjatypeHyperrefPatchDone\@undefined
\begingroup
  \CJK@input{UTF8.bdg}
\endgroup
\g@addto@macro\pdfstringdefPreHook{%
  \@nameuse{CJK@UTF8Binding}%
}
\fi
\ifx\bxcjkjatypeHyperrefPatchDone\@undefined
\g@addto@macro\pdfstringdefPreHook{%
  \ifx~\bxjs@@CJKtilde
    \let\bxjs@org@LetUnexpandableSpace\HyPsd@LetUnexpandableSpace
    \let\HyPsd@LetUnexpandableSpace\bxjs@LetUnexpandableSpace
    \let~\@empty
  \fi
}
\def\bxjs@@CJKtilde{\CJKecglue\ignorespaces}
\def\bxjs@@tildecmd{~}
\def\bxjs@LetUnexpandableSpace#1{%
  \def\bxjs@tmpa{#1}\ifx\bxjs@tmpa\bxjs@@tildecmd\else
    \bxjs@org@LetUnexpandableSpace#1%
  \fi}
\fi
\newskip\jsKanjiSkip
\newskip\jsXKanjiSkip
\ifx\CJKecglue\@undefined
  \def\CJKtilde{\CJK@global\def~{\CJKecglue\ignorespaces}}
\fi
\let\autospacing\bxjs@enable@kanjiskip
\let\noautospacing\bxjs@disable@kanjiskip
\protected\def\bxjs@CJKglue{\hskip\jsKanjiSkip}
\def\bxjs@apply@kanjiskip{%
  \jsKanjiSkip\@tempskipa
  \let\CJKglue\bxjs@CJKglue}
\let\autoxspacing\bxjs@enable@xkanjiskip
\let\noautoxspacing\bxjs@disable@xkanjiskip
\protected\def\bxjs@CJKecglue{\hskip\jsXKanjiSkip}
\def\bxjs@apply@xkanjiskip{%
  \jsXKanjiSkip\@tempskipa
  \let\CJKecglue\bxjs@CJKecglue}
\def\bxjs@jachar#1{%
  \CJKforced{#1}}
\ifbxjs@xkanjiskip@cmd
  \protected\def\>{%
    \relax\ifmmode \mskip\medmuskip \else \CJKecglue\ignorespaces \fi}
\fi
\ifx t\bxjs@enablejfam
  \ClassWarningNoLine\bxjs@clsname
   {You cannot use 'enablejfam=true', since the\MessageBreak
    CJK package does not support Japanese math}
\fi
\else\if x\jsEngine
\RequirePackage{zxjatype}
\PassOptionsToPackage{no-math}{fontspec}%!
\PassOptionsToPackage{xetex}{graphicx}%!
\PassOptionsToPackage{xetex}{graphics}%!
\ifx\zxJaFamilyName\@undefined
  \ClassError\bxjs@clsname
  {xeCJK or zxjatype is too old}\@ehc
\fi
\bxjs@adjust@jafont{f}
\ifx\bxjs@tmpa\@empty
  \setCJKmainfont[BoldFont=IPAexGothic]{IPAexMincho}
  \setCJKsansfont[BoldFont=IPAexGothic]{IPAexGothic}
\else
  \edef\bxjs@nxt{%
    \noexpand\RequirePackage[\bxjs@tmpa]%
        {zxjafont}[2013/01/28]}% v0.2a
  \bxjs@nxt
\fi
\ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99992}>\m@ne
  \ifbxjs@hyperref@enc
    \PassOptionsToPackage{unicode}{hyperref}
  \fi
\fi
\let\jsInhibitGlueAtParTop\@empty
\newskip\jsKanjiSkip
\newskip\jsXKanjiSkip
\ifx\CJKecglue\@undefined
  \def\CJKtilde{\CJK@global\def~{\CJKecglue\ignorespaces}}
\fi
\let\autospacing\bxjs@enable@kanjiskip
\let\noautospacing\bxjs@disable@kanjiskip
\protected\def\bxjs@CJKglue{\hskip\jsKanjiSkip}
\def\bxjs@apply@kanjiskip{%
  \jsKanjiSkip\@tempskipa
  \xeCJKsetup{CJKglue={\bxjs@CJKglue}}}
\let\autoxspacing\bxjs@enable@xkanjiskip
\let\noautoxspacing\bxjs@disable@xkanjiskip
\protected\def\bxjs@CJKecglue{\hskip\jsXKanjiSkip}
\def\bxjs@apply@xkanjiskip{%
  \jsXKanjiSkip\@tempskipa
  \xeCJKsetup{CJKecglue={\bxjs@CJKecglue}}}
\ifx\mcfamily\@undefined
  \protected\def\mcfamily{\CJKfamily{\CJKrmdefault}}
  \protected\def\gtfamily{\CJKfamily{\CJKsfdefault}}
\fi
\def\bxjs@jachar#1{%
  \xeCJKDeclareCharClass{CJK}{`#1}\relax
  #1}
\ifbxjs@xkanjiskip@cmd
  \protected\def\>{%
    \relax\ifmmode \mskip\medmuskip \else \CJKecglue\ignorespaces \fi}
\fi
\ifx t\bxjs@enablejfam
  \@enablejfamtrue
\fi
\if@enablejfam
  \xeCJKsetup{CJKmath=true}
\fi
\else\if l\jsEngine
\let\zw\@undefined
\RequirePackage{luatexja}
\RequirePackage{luatexja-fontspec}
\ExplSyntaxOn
\fp_gset:Nn \g_ltj_fontspec_scale_fp { \jsScale }
\ExplSyntaxOff
\bxjs@adjust@jafont{t}
\ifx\bxjs@tmpa\bxjs@@noEmbed
  \def\bxjs@tmpa{noembed}
\fi
\ifx\bxjs@tmpa\@empty
  \defaultjfontfeatures{ Kerning=Off }
  \setmainjfont[BoldFont=IPAexGothic,JFM=ujis]{IPAexMincho}
  \setsansjfont[BoldFont=IPAexGothic,JFM=ujis]{IPAexGothic}
\else
  \edef\bxjs@nxt{%
    \noexpand\RequirePackage[\bxjs@tmpa]
        {luatexja-preset}}%
  \bxjs@nxt
\fi
\DeclareRobustCommand\rmfamily
  {\not@math@alphabet\rmfamily\mathrm
   \romanfamily\rmdefault\kanjifamily\mcdefault\selectfont}
\DeclareRobustCommand\sffamily
  {\not@math@alphabet\sffamily\mathsf
   \romanfamily\sfdefault\kanjifamily\gtdefault\selectfont}
\DeclareRobustCommand\ttfamily
  {\not@math@alphabet\ttfamily\mathtt
   \romanfamily\ttdefault\kanjifamily\gtdefault\selectfont}
\AtBeginDocument{%
  \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}
  \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}%
  \reDeclareMathAlphabet{\mathsf}{\mathsf}{\mathgt}}%
\bxjs@if@sf@default{%
  \renewcommand\kanjifamilydefault{\gtdefault}}
\ltjsetparameter{jaxspmode={`！,1}}
\ltjsetparameter{jaxspmode={`〒,2}}
\ltjsetparameter{alxspmode={`+,3}}
\ltjsetparameter{alxspmode={`\%,3}}
\protected\def\@inhibitglue{%
  \directlua{%
    luatexja.jfmglue.create_beginpar_node()}}
\let\bxjs@ltj@inhibitglue\@inhibitglue
\let\@@inhibitglue\@undefined
\ifbxjs@hyperref@enc
  \bxjs@fix@hyperref@unicode{true}
\fi
\protected\def\autospacing{%
  \ltjsetparameter{autospacing=true}}
\protected\def\noautospacing{%
  \ltjsetparameter{autospacing=false}}
\protected\def\autoxspacing{%
  \ltjsetparameter{autoxspacing=true}}
\protected\def\noautoxspacing{%
  \ltjsetparameter{autoxspacing=false}}
\def\bxjs@apply@kanjiskip{%
  \ltjsetparameter{kanjiskip={\@tempskipa}}}
\def\bxjs@apply@xkanjiskip{%
  \ltjsetparameter{xkanjiskip={\@tempskipa}}}
\def\bxjs@jachar#1{%
  \ltjjachar`#1\relax}
\ifbxjs@xkanjiskip@cmd
  \protected\def\>{%
    \relax\ifmmode \mskip\medmuskip
    \else \hskip\ltjgetparameter{xkanjiskip}\ignorespaces
    \fi}
\fi
\ifx f\bxjs@enablejfam
  \ClassWarningNoLine\bxjs@clsname
   {You cannot use 'enablejfam=false', since the\MessageBreak
    LuaTeX-ja always provides Japanese math families}
\fi
\fi\fi\fi\fi
\DeclareJaTextFontCommand{\textmc}{\mcfamily}
\DeclareJaTextFontCommand{\textgt}{\gtfamily}
\ifx\mathmc\@undefined
  \DeclareJaMathFontCommand{\mathmc}{\mcfamily}
  \DeclareJaMathFontCommand{\mathgt}{\gtfamily}
\fi
\setkanjiskip{0pt plus.1\jsZw minus.01\jsZw}
\ifx\jsDocClass\jsSlide \setxkanjiskip{0.1em}
\else \setxkanjiskip{0.25em plus 0.15em minus 0.06em}
\fi
\endinput
%%
%% End of file `bxjsja-standard.def'.
