From 34722e1da36fa4241609e892451a3bf9af62db35 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 8 Sep 2015 21:25:44 +0000
Subject: bxjscls (8sep15)

git-svn-id: svn://tug.org/texlive/trunk@38324 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls | 30 ++++++++++++++++++------
 1 file changed, 23 insertions(+), 7 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls')

diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
index 8b52df4ffdb..e524370fe84 100644
--- a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
+++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
@@ -37,7 +37,7 @@
 %%   Right brace   \}     Tilde         \~}
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{bxjsbook}
-  [2015/08/23 v1.0a BXJS document classes]
+  [2015/09/07 v1.0b BXJS document classes]
 \RequirePackage{calc}
 \RequirePackage{keyval}
 \let\jsEngine=n
@@ -308,8 +308,14 @@
   \bxjs@disguise@jstrue}
 \def\bxjs@setkey{%
   \expandafter\bxjs@setkey@a\expandafter{\CurrentOption}}
-\def\bxjs@setkey@a{\setkeys{bxjs}}
+\def\bxjs@setkey@a{\bxjs@safe@setkeys{bxjs}}
 \DeclareOption*{\bxjs@setkey}
+\def\bxjs@safe@setkeys#1#2{%
+  \let\bxjs@KV@errx\KV@errx
+  \let\KV@errx\bxjs@safe@setkeys@a
+  \setkeys{#1}{#2}%
+  \let\KV@errx\bxjs@KV@errx}
+\def\bxjs@safe@setkeys@a#1{}
 \newif\ifbxjs@scaleset
 \def\jsScale{0.924715}
 \def\Cjascale{\jsScale}
@@ -353,11 +359,11 @@
     {Invalid magstyle value `#1'}\@ehc
     \let\bxjs@magstyle\bxjs@magstyle@mag
   \fi}
-\let\ltx@removeelement\@removeelement
+\let\bxjs@ltx@removeelement\@removeelement
 \def\@removeelement#1#2#3{%
   \def\reserved@a{#2}%
   \ifx\reserved@a\@empty \let#3\@empty
-  \else \ltx@removeelement{#1}{#2}{#3}%
+  \else \bxjs@ltx@removeelement{#1}{#2}{#3}%
   \fi}
 \ExecuteOptions{a4paper,twoside,onecolumn,titlepage,openright,final}
 \ProcessOptions\relax
@@ -365,6 +371,9 @@
   {papersize}\@classoptionslist\@classoptionslist
 \@expandtwoargs\@removeelement
   {10pt}\@classoptionslist\@classoptionslist
+\ifx\bxjs@jadriver\relax\else
+  \let\bxjs@jadriver@given\bxjs@jadriver
+\fi
 \let\bxjs@tmpb\jsEngine
 \ifx j\bxjs@tmpb\ifjsWithupTeX
   \let\bxjs@tmpb=u
@@ -405,8 +414,9 @@
 \fi
 \ifjsInPdfMode \@tempswafalse
 \else\ifx x\jsEngine \@tempswafalse
+\else\ifx\bxjs@jadriver@given\@undefined \@tempswafalse
 \else \@tempswatrue
-\fi\fi
+\fi\fi\fi
 \if@tempswa
   \ifx\bxjs@driver@opt\@undefined
     \ClassWarningNoLine\bxjs@clsname
@@ -427,7 +437,7 @@
     \let\bxjs@jadriver\bxjs@@minimal
   \fi
 \fi
-\ifx\bxjs@jadriver\bxjs@@minimal\else
+\ifx\bxjs@jadriver@given\@undefined\else
   \ifx\bxjs@engine@given\@undefined
     \ClassError\bxjs@clsname%
     {An engine option must be explicitly given}%
@@ -572,7 +582,10 @@
   \skip2=\abovedisplayshortskip
   \skip4=\belowdisplayskip
   \skip6=\belowdisplayshortskip
+  \let\bxjs@ltx@nomath\@nomath
+  \let\@nomath\@gobble
   \@currsize\selectfont
+  \let\@nomath\bxjs@ltx@nomath
   \abovedisplayskip=\skip0
   \abovedisplayshortskip=\skip2
   \belowdisplayskip=\skip4
@@ -1286,8 +1299,11 @@
 \renewcommand{\theenumii}{\@alph\c@enumii}
 \renewcommand{\theenumiii}{\@roman\c@enumiii}
 \renewcommand{\theenumiv}{\@Alph\c@enumiv}
+\def\bxjs@dust{\vrule\@width\z@\@height\z@\@depth\z@}
+\newcommand*{\jsInJaParen}[1]{%
+  \bxjs@dust\jsInhibitGlue（\theenumii）\jsInhibitGlue\bxjs@dust}
 \newcommand{\labelenumi}{\theenumi.}
-\newcommand{\labelenumii}{\jsInhibitGlue（\theenumii）\jsInhibitGlue}
+\newcommand{\labelenumii}{\jsInJaParen{（\theenumii）}}
 \newcommand{\labelenumiii}{\theenumiii.}
 \newcommand{\labelenumiv}{\theenumiv.}
 \renewcommand{\p@enumii}{\theenumi}
-- 
cgit v1.2.3

