%%
%% This is file `bxjsja-standard.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bxjscls.dtx  (with options: `drvstandard')
%% 
%% 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.)
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\ProvidesFile{bxjsja-standard.def}
  [2015/08/23 v1.0a BXJS document classes]
\input{bxjsja-minimal.def}
\ifjsWitheTeX
  \@tempdima=0.25mm
  \protected\edef\jQ{\dimexpr\the\@tempdima\relax}
  \let\jH\jQ
  \ifbxjs@mag
    \@tempdima=2.5mm
    \@tempdimb=\jsBaseFontSize\relax
    \edef\bxjs@tmpa{\strip@pt\@tempdimb}%
    \bxjs@invscale\@tempdima\bxjs@tmpa
    \edef\trueQ{\dimexpr\the\@tempdima\relax}
  \else \let\trueQ\jQ
  \fi
  \let\trueH\trueQ
  \@tempdima\trueQ \bxjs@invscale\@tempdima\jsScale
  \edef\ascQ{\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
    \ClassWarning\bxjs@clsname
    {Option 'jafont=noEmbed' is ignored, because no-embed\MessageBreak
     is not available}%
    \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}
\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}
\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
\bxjs@fix@hyperref@unicode{false}
\ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx
  \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
    \bxjs@urgent@special{pdf:tounicode UTF8-UCS2}
  \fi\fi\fi
  \let\bxToUnicodeSpecialDone=t
\fi
\@namedef{ver@microtype.sty}{2000/01/01}
\newcommand*\UseMicrotypeSet[2][]{}
\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
\PassOptionsToPackage{unicode}{hyperref}
\begingroup
  \CJK@input{UTF8.bdg}
\endgroup
\g@addto@macro\pdfstringdefPreHook{%
  \@nameuse{CJK@UTF8Binding}%
}
\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}
\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}
\else\if x\jsEngine
\RequirePackage{zxjatype}
\PassOptionsToPackage{no-math}{fontspec}%!
\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
\let\jsInhibitGlueAtParTop\@inhibitglue
\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
\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}}%
\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
\bxjs@fix@hyperref@unicode{true}
\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}}}
\fi\fi\fi\fi
\DeclareJaTextFontCommand{\textmc}{\mcfamily}
\DeclareJaTextFontCommand{\textgt}{\gtfamily}
\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'.
