From 4f3140ae411ed163ddb5a960b9827e4f1b53ebec Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 30 Jan 2018 00:02:50 +0000
Subject: bxjscls (29jan18)

git-svn-id: svn://tug.org/texlive/trunk@46475 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/bxjscls/bxjsja-standard.def          | 51 +++++++++++++++++++---
 1 file changed, 45 insertions(+), 6 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def')

diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def
index 0e2707059e0..ef8c0b5989b 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}
-  [2017/12/09 v1.7a BXJS document classes]
+  [2018/01/28 v1.7b BXJS document classes]
 %% このファイルは日本語文字を含みます
 \input{bxjsja-minimal.def}
 \bxjs@simplejasetupfalse
@@ -30,6 +30,11 @@
 \bxjs@cslet{bxjs@kv@jis2004@false}\bxjs@jp@jismmivfalse
 \define@key{bxjsStd}{jis2004}[true]{%
   \bxjs@set@keyval{jis2004}{#1}{}}
+\newif\ifbxjs@jp@units
+\let\bxjs@kv@units@true\bxjs@jp@unitstrue
+\let\bxjs@kv@units@false\bxjs@jp@unitsfalse
+\define@key{bxjsStd}{units}[true]{%
+  \bxjs@set@keyval{units}{#1}{}}
 \let\bxjs@jp@font\@empty
 \define@key{bxjsStd}{font}{%
   \edef\bxjs@jp@font{#1}}
@@ -39,6 +44,21 @@
   \g@addto@macro\@classoptionslist{,jis2004}
   \PassOptionsToPackage{jis2004}{otf}
 \fi
+\ifbxjs@jp@units\if j\jsEngine\else
+  \IfFileExists{bxcalc.sty}{%
+    \RequirePackage{bxcalc}[2018/01/28]%v1.0a
+    \ifx\usepTeXunits\@undefined
+      \PackageWarningNoLine\bxjs@clsname
+       {Cannot support pTeX units (zw etc.), since\MessageBreak
+        the package 'bxcalc' is too old}%
+    \else \usepTeXunits
+    \fi
+  }{%else
+    \PackageWarningNoLine\bxjs@clsname
+     {Cannot support pTeX units (zw etc.), since\MessageBreak
+      the package 'bxcalc' is unavailable}%
+  }
+\fi\fi
 \ifjsWitheTeX
   \@tempdima=0.25mm
   \protected\edef\jQ{\dimexpr\the\@tempdima\relax}
@@ -70,6 +90,9 @@
   \endgroup
   #1=\bxjs@g@tmpa\relax}
 \if j\jsEngine
+\def\bxjs@parse@qh#1{%
+  \let\bxjs@tmpb\relax}
+\else\ifbxjs@jp@units
 \def\bxjs@parse@qh#1{%
   \let\bxjs@tmpb\relax}
 \else
@@ -86,7 +109,7 @@
   \fi}
 \def\bxjs@parse@qh@b#1#2#3{%
   \ifx\@nnil#2\@nnil\else \def\bxjs@tmpb{#1#3}\fi}
-\fi
+\fi\fi
 \def\jafontsize#1#2{%
   \begingroup
     \bxjs@jafontsize@a{#1}%
@@ -268,6 +291,15 @@
     }{}%
   }%
 }
+\def\bxjs@resolve@jafont@paren#1{%
+  \def\bxjs@tmpb{\let#1}%
+  \expandafter\bxjs@resolve@jafont@paren@a#1\@nil()\@nil\relax}
+\def\bxjs@resolve@jafont@paren@a#1(#2)#3\@nil#4\relax{%
+  \ifx\relax#4\relax \bxjs@tmpb\jsJaFont
+  \else
+    \edef\bxjs@tmpa{#1\bxjs@jafont@paren{#2}#3}%
+    \bxjs@tmpb\bxjs@tmpa
+  \fi}
 \if j\jsEngine
 \def\bxjs@apply@kanjiskip{%
   \kanjiskip\@tempskipa}
@@ -308,12 +340,14 @@
   \PassOptionsToPackage{prefer2004jis}{pxchfon}
   \PassOptionsToPackage{prefer2004jis}{pxbabel}
 \fi
+\let\bxjs@jafont@paren\@firstofone
 \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
+\bxjs@resolve@jafont@paren\bxjs@tmpa
 \edef\bxjs@tmpa{\bxjs@catopt\bxjs@tmpa\bxjs@jp@font}
 \ifx\bxjs@tmpa\@empty\else
   \edef\bxjs@next{%
@@ -385,6 +419,8 @@
 \fi
 \else\if p\jsEngine
 \bxjs@adjust@jafont{f}
+\let\bxjs@jafont@paren\@firstofone
+\bxjs@resolve@jafont@paren\bxjs@tmpa
 \edef\bxjs@tmpa{\bxjs@catopt\bxjs@tmpa\bxjs@jp@font}
 \edef\bxjs@tmpa{\bxjs@catopt\bxjs@tmpa{whole}}
 \def\bxjs@tmpb{pandoc}\ifx\bxjs@tmpb\bxjs@jadriver\else
@@ -457,6 +493,8 @@
   {xeCJK or zxjatype is too old}\@ehc
 \fi
 \bxjs@adjust@jafont{f}
+\let\bxjs@jafont@paren\@gobble
+\bxjs@resolve@jafont@paren\bxjs@tmpa
 \edef\bxjs@tmpa{\bxjs@catopt\bxjs@tmpa\bxjs@jp@font}
 \ifx\bxjs@tmpa\@empty
   \setCJKmainfont[BoldFont=IPAexGothic]{IPAexMincho}
@@ -516,14 +554,15 @@
 \else\if l\jsEngine
 \let\zw\@undefined
 \RequirePackage{luatexja}
-\RequirePackage{luatexja-fontspec}
-\ExplSyntaxOn
-\fp_gset:Nn \g_ltj_fontspec_scale_fp { \jsScale }
-\ExplSyntaxOff
+\edef\bxjs@next{%
+  \noexpand\RequirePackage[scale=\jsScale]{luatexja-fontspec}[2015/08/26]%
+}\bxjs@next
 \bxjs@adjust@jafont{t}
 \ifx\bxjs@tmpa\bxjs@@noEmbed
   \def\bxjs@tmpa{noembed}
 \fi
+\let\bxjs@jafont@paren\@gobble
+\bxjs@resolve@jafont@paren\bxjs@tmpa
 \edef\bxjs@tmpa{\bxjs@catopt\bxjs@tmpa\bxjs@jp@font}
 \ifx\bxjs@tmpa\@empty
   \defaultjfontfeatures{ Kerning=Off }
-- 
cgit v1.2.3

