%%
%% This is file `bxjsja-pandoc.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bxjscls.dtx  (with options: `drv,pandoc')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from bxjsja-pandoc.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-pandoc.def}
  [2020/09/22 v2.2a BXJS document classes]
\input{bxjsja-standard.def}
\RequirePackage{bxjspandoc}
\@onlypreamble\bxjs@endpreamble@hook
\let\bxjs@endpreamble@hook\@empty
\ifjsWitheTeX
  \RequirePackage{etoolbox}[2010/08/21]% v2.0
  \AtEndPreamble{\bxjs@endpreamble@hook}
\fi
\newif\ifbxjs@jp@fix@strong \bxjs@jp@fix@strongtrue
\let\bxjs@kv@fixstrong@true\bxjs@jp@fix@strongtrue
\let\bxjs@kv@fixstrong@false\bxjs@jp@fix@strongfalse
\define@key{bxjsPan}{fix-strong}[true]{%
  \bxjs@set@keyval{fixstrong}{#1}{}}
\newif\ifbxjs@jp@fix@code \bxjs@jp@fix@codetrue
\let\bxjs@kv@fixcode@true\bxjs@jp@fix@codetrue
\let\bxjs@kv@fixcode@false\bxjs@jp@fix@codefalse
\define@key{bxjsPan}{fix-code}[true]{%
  \bxjs@set@keyval{fixcode}{#1}{}}
\chardef\bxjs@jp@strong=0
\def\bxjs@kv@strong@bold{\chardef\bxjs@jp@strong=0 }
\def\bxjs@kv@strong@sans{\chardef\bxjs@jp@strong=1 }
\def\bxjs@kv@strong@boldsans{\chardef\bxjs@jp@strong=2 }
\define@key{bxjsPan}{strong}{%
  \bxjs@set@keyval{strong}{#1}{}}
\def\bxjs@next#1{\bxjs@safe@setkeys{bxjsPan}{#1}}
\expandafter\bxjs@next\expandafter{\jsJaParam}
\@onlypreamble\bxjs@set@dupload@proc
\def\bxjs@set@dupload@proc#1{%
  \expandafter\bxjs@set@dupload@proc@a\csname bxjs@dlp/#1\endcsname}
\@onlypreamble\bxjs@set@dupload@proc@a
\def\bxjs@set@dupload@proc@a#1{%
  \@onlypreamble#1\def#1##1}
\def\bxjs@unset@dupload@proc#1{%
  \expandafter\let\csname bxjs@dlp/#1\endcsname\@undefined}
\@onlypreamble\bxjs@org@if@ptions
\let\bxjs@org@if@ptions\@if@ptions
\@onlypreamble\bxjs@org@reset@ptions
\let\bxjs@org@reset@ptions\relax
\def\@if@ptions#1#2#3{%
  \let\bxjs@next\@secondoftwo
  \def\bxjs@tmpa{#1}\def\bxjs@tmpb{\@currext}%
  \ifx\bxjs@tmpa\bxjs@tmpb
    \expandafter\ifx\csname bxjs@dlp/#2.#1\endcsname\relax\else
      \let\bxjs@next\@firstoftwo \fi
  \fi
  \bxjs@next\bxjs@do@dupload@proc\bxjs@org@if@ptions{#1}{#2}{#3}}
\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{%
  \ifx\bxjs@org@reset@ptions\relax
    \let\bxjs@org@reset@ptions\@reset@ptions
  \fi
  \bxjs@csletcs{bxjs@next}{bxjs@dlp/#2.#1}%
  \def\@reset@ptions{%
    \let\@reset@ptions\bxjs@org@reset@ptions
    \@reset@ptions
    \bxjs@next{#3}}%
  \@firstoftwo}
\let\bxjs@polyglossia@options\relax
\let\bxjs@babel@options\relax
\ifnum0\if x\jsEngine1\fi\if l\jsEngine1\fi>0
\pandocSkipLoadPackage{polyglossia}
\bxjs@set@dupload@proc{polyglossia.sty}{%
  \bxjs@unset@dupload@proc{polyglossia.sty}%
  \ClassWarning\bxjs@clsname
   {Package polyglossia is required}%
  \def\bxjs@polyglossia@options{#1}%
  \newcommand*\setmainlanguage[2][]{%
    \ifblank{##2}{%
      \ClassWarning\bxjs@clsname
       {Main language is invalid, thus the fallback\MessageBreak
        definitions will be employed}%
      \bxjs@pandoc@polyglossia@ja
    }{%else
      \ClassWarning\bxjs@clsname
       {Main language is valid (##2),\MessageBreak
        thus polyglossia will be loaded}%
      \csundef{ver@polyglossia.sty}%
      \edef\bxjs@next{%
        \noexpand\RequirePackage[\bxjs@polyglossia@options]{polyglossia}[]%
      }\bxjs@next
      \setmainlanguage[##1]{##2}%
    }}}
\g@addto@macro\bxjs@endpreamble@hook{%
  \ifx\bxjs@polyglossia@options\relax
    \csundef{ver@polyglossia.sty}%
  \fi}
\@onlypreamble\bxjs@pandoc@polyglossia@ja
\def\bxjs@pandoc@polyglossia@ja{%
  \renewcommand*\setmainlanguage[2][]{}%
  \newcommand*\setotherlanguage[2][]{%
    \ifblank{##2}{}{%else
      \cslet{##2}\@empty \cslet{end##2}\@empty
      \cslet{text##2}\@firstofone}}%
  \newcommand*\setotherlanguages[2][]{%
    \@for\bxjs@tmpa:={##2}\do{%
      \setotherlangauge{\bxjs@tmpa}}}%
  \let\bxjs@polyglossia@options\relax}%
\fi
\if x\jsEngine\else
\pandocSkipLoadPackage{babel}
\bxjs@set@dupload@proc{babel.sty}{%
  \bxjs@unset@dupload@proc{babel.sty}%
  \ClassWarning\bxjs@clsname
   {Package babel is required}%
  \@tempswafalse \let\bxjs@babel@options\@empty
  \def\bxjs@tmpb{main=}%
  \@for\bxjs@tmpa:=#1\do{%
    \ifx\bxjs@tmpa\bxjs@tmpb \@tempswatrue
    \else \edef\bxjs@babel@options{\bxjs@babel@options,\bxjs@tmpa}%
    \fi}%
  \if@tempswa
    \ClassWarning\bxjs@clsname
     {Main language is invalid, so fallback\MessageBreak
      definitions will be employed}%
    \bxjs@pandoc@polyglossia@ja
  \else
    \ClassWarning\bxjs@clsname
     {Main language is valid,\MessageBreak
      thus babel will be loaded}%
    \expandafter\let\csname ver@babel.sty\endcsname\@undefined
    \RequirePackage[#1]{babel}[]%
  \fi}
\g@addto@macro\bxjs@endpreamble@hook{%
  \ifx\bxjs@babel@options\relax
    \expandafter\let\csname ver@babel.sty\endcsname\@undefined
  \fi}
\@onlypreamble\bxjs@pandoc@babel@ja
\def\bxjs@pandoc@babel@ja{%
  \expandafter\let\csname ver@babel.sty\endcsname\@undefined
  \edef\bxjs@next{%
    \noexpand\RequirePackage[\bxjs@babel@options,english]{babel}[]%
  }\bxjs@next
  \if j\jsEngine
    \RequirePackage[main=japanese]{pxbabel}[]%
  \else
    \RequirePackage{bxorigcapt}[]%
  \fi}
\fi
\bxjs@set@dupload@proc{geometry.sty}{%
  \setpagelayout*{#1}}
\if l\jsEngine
  \pandocSkipLoadPackage{xeCJK}
  \providecommand*{\setCJKmainfont}{\setmainjfont}
\fi
\if x\jsEngine
  \expandafter\g@addto@macro\csname opt@xeCJK.sty\endcsname{%
    ,space}
\fi
\g@addto@macro\bxjs@begin@document@hook{%
  \@tempswafalse
  \ifx\oldparagraph\@undefined\else
    \@tempswatrue
  \fi
  \ifnum\c@secnumdepth>3
    \@tempswatrue
  \fi
  \if@tempswa\ifx\jsParagraphMark\bxjs@org@paragraph@mark
    \let\jsParagraphMark\@empty
  \fi\fi}
\ifnum0\if x\jsEngine1\fi\if l\jsEngine1\fi>\z@
  \catcode"3000=\active
  \begingroup \catcode`\!=7
  \protected\gdef!!!!3000{\zwspace}
  \endgroup
\else\ifx\DeclareUnicodeCharacter\@undefined\else
  \DeclareUnicodeCharacter{3000}{\bxjs@zsp@char}
  \bxjs@protected\def\bxjs@zsp@char{\zwspace}
\fi\fi
\if j\jsEngine
  \bxjs@fix@hyperref@unicode{false}
\else
  \bxjs@fix@hyperref@unicode{true}
\fi
\ifbxjs@jp@fix@strong\ifbxjs@jp@strong@cmd
  \let\orgtextbf\textbf
  \DeclareRobustCommand\bxjstextbf[1]{%
    \begingroup
      \let\textbf\orgtextbf
      \strong{#1}%
    \endgroup}%
  \g@addto@macro\bxjs@begin@document@hook{%
    \let\textbf\bxjstextbf}
\fi\fi
\jsAtEndOfClass{%
  \ifx\strongfontdeclare\@undefined\else
    \ifcase\bxjs@jp@strong
    \or \strongfontdeclare{\sffamily}%
    \or \strongfontdeclare{\sffamily\bfseries}%
    \fi
  \fi}
\ifbxjs@jp@fix@code
  \chardef\bxjs@eghost@c=23
  \ifx j\jsEngine \xspcode\bxjs@eghost@c=3
  \else\ifx l\jsEngine \ltjsetparameter{alxspmode={\bxjs@eghost@c,3}}
  \else\ifx x\jsEngine %no-op
  \else \let\bxjs@eghost@c\@undefined
  \fi\fi\fi
  \ifx\bxjs@eghost@c\@undefined\else
    \font\bxjs@eghost@f=ec-lmr10 at 1.23456pt
    \def\bxjs@pan@eghost{\bgroup\bxjs@eghost@f\bxjs@eghost@c\egroup}
    \let\orgtexttt\texttt
    \DeclareRobustCommand\bxjstexttt[1]{%
      \ifmmode \nfss@text{\ttfamily #1}%
      \else
        \ifvmode \leavevmode \fi
        \bxjs@pan@eghost\null
        \begingroup \ttfamily #1\endgroup
        \null\bxjs@pan@eghost
      \fi}
    \g@addto@macro\bxjs@begin@document@hook{%
      \let\texttt\bxjstexttt}
    \expandafter\def\expandafter\verb\expandafter{%
      \expandafter\bxjs@pan@eghost\verb}
    \g@addto@macro\verb@egroup{\bxjs@pan@eghost}
  \fi
\fi
\endinput
%%
%% End of file `bxjsja-pandoc.def'.
