From 1a8e2128cdbe579f531b4b842afe17b2da07dc6c Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 24 Aug 2015 21:30:47 +0000
Subject: bxjscls (24aug15)

git-svn-id: svn://tug.org/texlive/trunk@38196 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls | 26 ++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 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 05f1b5c886e..8b52df4ffdb 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/05 v1.0 BXJS document classes]
+  [2015/08/23 v1.0a BXJS document classes]
 \RequirePackage{calc}
 \RequirePackage{keyval}
 \let\jsEngine=n
@@ -119,12 +119,30 @@
 \def\bxjs@param@basefontsize{10pt}
 \def\jsUnusualPtSize{-20}
 \def\bxjs@setbasefontsize#1{%
-  \setlength\@tempdima{#1}%
+  \bxjs@setbasefontlength\@tempdima{#1}%
   \edef\bxjs@param@basefontsize{\the\@tempdima}%
   \ifdim\@tempdima=10pt         \long\def\@ptsize{0}%
   \else\ifdim\@tempdima=10.95pt \long\def\@ptsize{1}%
   \else\ifdim\@tempdima=12pt    \long\def\@ptsize{2}%
   \else \long\edef\@ptsize{\jsUnusualPtSize}\fi\fi\fi}
+\def\bxjs@setbasefontlength#1#2{%
+  \bxjs@setbasefontlength@a#2true\@nnil
+  \ifx j\jsEngine \setlength#1{#2}%
+  \else
+    \bxjs@setbasefontlength@b#2\@nil Q\@nil\@nnil
+    \ifx\bxjs@tmpa\relax \setlength#1{#2}%
+    \else \@tempdimc0.25mm #1=\bxjs@tmpa\@tempdimc
+    \fi
+  \fi}
+\def\bxjs@setbasefontlength@b#1Q\@nil#2\@nnil{%
+  \ifx\@nnil#2\@nnil \let\bxjs@tmpa\relax
+  \else \def\bxjs@tmpa{#1}%
+  \fi}
+\def\bxjs@setbasefontlength@a#1true#2\@nnil{%
+  \ifx\@nnil#2\@nnil\else
+    \ClassWarningNoLine\bxjs@clsname
+    {You should not use 'true' lengths here}%
+  \fi}
 \DeclareOption{8pt}{\bxjs@setbasefontsize{8pt}}
 \DeclareOption{9pt}{\bxjs@setbasefontsize{9pt}}
 \DeclareOption{10pt}{\bxjs@setbasefontsize{10pt}}
@@ -301,7 +319,7 @@
 \define@key{bxjs}{jbase}{\bxjs@setjbasefontsize{#1}}
 \def\bxjs@setjbasefontsize#1{%
   \def\bxjs@do@opt@jbase{%
-    \setlength\@tempdima{#1}%
+    \bxjs@setbasefontlength\@tempdima{#1}%
     \bxjs@invscale\@tempdima\jsScale
     \bxjs@setbasefontsize{\@tempdima}}}
 \define@key{bxjs}{scale}{%
@@ -1402,7 +1420,7 @@
   \settowidth\js@tocl@width{\headfont\prechaptername\postchaptername}%
   \settowidth\@tempdima{\headfont\appendixname}%
   \ifdim\js@tocl@width<\@tempdima \setlength\js@tocl@width{\@tempdima}\fi
-  \ifdim\js@tocl@width<2zw \divide\js@tocl@width by 2 \advance\js@tocl@width 1zw\fi
+  \ifdim\js@tocl@width<2\jsZw \divide\js@tocl@width by 2 \advance\js@tocl@width 1\jsZw\fi
   \if@twocolumn
     \@restonecoltrue\onecolumn
   \else
-- 
cgit v1.2.3

