From 47872b2b657010d6a4d584c38a54b31d038b0539 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 10 Apr 2017 22:02:38 +0000
Subject: bxjscls

git-svn-id: svn://tug.org/texlive/trunk@43741 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls | 44 ++++++++++++++++++------
 1 file changed, 34 insertions(+), 10 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 9bf68abc4cc..6f2b0756d4a 100644
--- a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
+++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
@@ -22,7 +22,7 @@
 %% in the same archive or directory.)
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{bxjsbook}
-  [2017/03/14 v1.5a BXJS document classes]
+  [2017/04/01 v1.5b BXJS document classes]
 %% このファイルは日本語文字を含みます.
 \RequirePackage{calc}
 \RequirePackage{keyval}
@@ -270,16 +270,23 @@
 \newif\if@jslogo \@jslogofalse
 \DeclareOption{jslogo}{\@jslogotrue}
 \DeclareOption{nojslogo}{\@jslogofalse}
-\mathchardef\bxjs@csta=259
+\mathchardef\bxjs@isc@ll=128
+\mathchardef\bxjs@isc@sl=259
+\def\bxjs@isc@sl@h{65539 }
 \def\bxjs@invscale#1#2{%
   \begingroup \@tempdima=#1\relax \@tempdimb#2\p@\relax
-    \@tempcnta\@tempdima \multiply\@tempcnta\@cclvi
-    \divide\@tempcnta\@tempdimb \multiply\@tempcnta\@cclvi
+    \ifdim\@tempdima<\bxjs@isc@ll\p@
+      \@tempcnta\@tempdima \multiply\@tempcnta\@cclvi
+      \divide\@tempcnta\@tempdimb \multiply\@tempcnta\@cclvi
+    \else
+      \@tempcnta\@tempdima \divide\@tempcnta\@tempdimb
+      \multiply\@tempcnta\p@ \let\bxjs@isc@sl\bxjs@isc@sl@h
+    \fi
     \@tempcntb\p@ \divide\@tempcntb\@tempdimb
     \advance\@tempcnta-\@tempcntb \advance\@tempcnta-\tw@
     \@tempdimb\@tempcnta\@ne
     \advance\@tempcnta\@tempcntb \advance\@tempcnta\@tempcntb
-    \advance\@tempcnta\bxjs@csta \@tempdimc\@tempcnta\@ne
+    \advance\@tempcnta\bxjs@isc@sl \@tempdimc\@tempcnta\@ne
     \@whiledim\@tempdimb<\@tempdimc\do{%
       \@tempcntb\@tempdimb \advance\@tempcntb\@tempdimc
       \advance\@tempcntb\@ne \divide\@tempcntb\tw@
@@ -327,9 +334,11 @@
 \let\bxjs@driver@@dvipdfmx=1
 \let\bxjs@driver@@pdfmode=2
 \let\bxjs@driver@@xetex=3
+\let\bxjs@driver@@dvips=4
+\let\bxjs@driver@@none=5
 \DeclareOption{dvips}{%
   \def\bxjs@driver@opt{dvips}%
-  \let\bxjs@driver@given\bxjs@driver@@dvimode}
+  \let\bxjs@driver@given\bxjs@driver@@dvips}
 \DeclareOption{dviout}{%
   \def\bxjs@driver@opt{dviout}%
   \let\bxjs@driver@given\bxjs@driver@@dvimode}
@@ -339,6 +348,9 @@
 \DeclareOption{dvipdfmx}{%
   \def\bxjs@driver@opt{dvipdfmx}%
   \let\bxjs@driver@given\bxjs@driver@@dvipdfmx}
+\DeclareOption{nodvidriver}{%
+  \def\bxjs@driver@opt{nodvidriver}%
+  \let\bxjs@driver@given\bxjs@driver@@none}
 \DeclareOption{pdftex}{%
   \def\bxjs@driver@opt{pdftex}%
   \let\bxjs@driver@given\bxjs@driver@@pdfmode}
@@ -473,9 +485,10 @@
   \bxjs@set@keyval{fancyhdr}{#1}{}}
 \newif\ifbxjs@dvi@opt
 \let\bxjs@dvidriver@@dvipdfmx=\bxjs@driver@@dvipdfmx
-\let\bxjs@dvidriver@@dvips=\bxjs@driver@@dvimode
+\let\bxjs@dvidriver@@dvips=\bxjs@driver@@dvips
 \let\bxjs@dvidriver@@dviout=\bxjs@driver@@dvimode
 \let\bxjs@dvidriver@@xdvi=\bxjs@driver@@dvimode
+\let\bxjs@dvidriver@@nodvidriver=\bxjs@driver@@none
 \define@key{bxjs}{dvi}{%
   \expandafter\let\expandafter\bxjs@tmpa\csname
    bxjs@dvidriver@@#1\endcsname
@@ -506,6 +519,10 @@
 \let\bxjs@kv@wholezwlines@true\bxjs@whole@zw@linestrue
 \let\bxjs@kv@wholezwlines@false\bxjs@whole@zw@linesfalse
 \define@key{bxjs}{whole-zw-lines}{\bxjs@set@keyval{wholezwlines}{#1}{}}
+\newif\ifbxjs@xkanjiskip@cmd \bxjs@xkanjiskip@cmdtrue
+\let\bxjs@kv@xkanjiskipcmd@true\bxjs@xkanjiskip@cmdtrue
+\let\bxjs@kv@xkanjiskipcmd@false\bxjs@xkanjiskip@cmdfalse
+\define@key{bxjs}{xkanjiskip-cmd}{\bxjs@set@keyval{xkanjiskipcmd}{#1}{}}
 \newif\ifbxjs@hyperref@enc \bxjs@hyperref@enctrue
 \let\bxjs@kv@hyperrefenc@true\bxjs@hyperref@enctrue
 \let\bxjs@kv@hyperrefenc@false\bxjs@hyperref@encfalse
@@ -624,6 +641,9 @@
     \g@addto@macro\@classoptionslist{,dvipdfmx}
   \fi\fi
 \fi
+\ifx\bxjs@driver@given\bxjs@driver@@none
+  \bxjs@papersizefalse
+\fi
 \def\bxjs@@minimal{minimal}
 \ifx\bxjs@jadriver\relax
   \ifx j\jsEngine
@@ -973,7 +993,9 @@
 \ifbxjs@papersize
   \ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx
     \PassOptionsToPackage{dvipdfm}{geometry}
-  \fi
+  \else\ifx\bxjs@driver@given\bxjs@driver@@dvimode
+    \PassOptionsToPackage{dvipdfm}{geometry}
+  \fi\fi
   \let\bxPapersizeSpecialDone=t
 \else
   \PassOptionsToPackage{driver=none}{geometry}
@@ -1090,16 +1112,18 @@
   \def\@oddhead{%
     \hbox to \fullwidth{\hfil\textbf{\thepage}}\hss}}
 \let\ps@plain\ps@plainhead
+\def\bxjs@maybe@autoxspacing{%
+  \ifx\autoxspacing\@undefined\else \autoxspacing \fi}
 \newif\if@omit@number
 \def\ps@headings{%
   \let\@oddfoot\@empty
   \let\@evenfoot\@empty
   \def\@evenhead{%
     \if@mparswitch \hss \fi
-    \underline{\hbox to \fullwidth{\autoxspacing
+    \underline{\hbox to \fullwidth{\bxjs@maybe@autoxspacing
         \textbf{\thepage}\hfil\leftmark}}%
     \if@mparswitch\else \hss \fi}%
-  \def\@oddhead{\underline{\hbox to \fullwidth{\autoxspacing
+  \def\@oddhead{\underline{\hbox to \fullwidth{\bxjs@maybe@autoxspacing
         {\if@twoside\rightmark\else\leftmark\fi}\hfil\textbf{\thepage}}}\hss}%
   \let\@mkboth\markboth
   \def\chaptermark##1{\markboth{%
-- 
cgit v1.2.3

