summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls')
-rw-r--r--Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls210
1 files changed, 112 insertions, 98 deletions
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
index 56d451894b3..de1e09102da 100644
--- a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
+++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls
@@ -20,24 +20,9 @@
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{bxjsbook}
- [2016/08/16 v1.2a BXJS document classes]
+ [2016/11/01 v1.3 BXJS document classes]
%% このファイルは日本語文字を含みます.
\RequirePackage{calc}
\RequirePackage{keyval}
@@ -76,7 +61,7 @@
\ifx O\jsEngine \def\bxjs@tmpa{Omega}\fi
\ifx\bxjs@tmpa\relax \expandafter\@gobble
\else
- \ClassError\@currname
+ \ClassError\bxjs@clsname
{The engine in use (\bxjs@tmpa) is not supported}
{It's a fatal error. I'll quit right now.}
\expandafter\@firstofone
@@ -119,9 +104,10 @@
\if@compatibility
\ClassError\bxjs@clsname
{Something went chaotic!\MessageBreak
+ (How come '\string\documentstyle' is there?)\MessageBreak
I cannot go a single step further...}
- {If the chant of \string\documentstyle\space was just a blunder
- of yours,\MessageBreak then there'll still be hope....}
+ {If the chant of '\string\documentstyle' was just a blunder of yours,\MessageBreak
+ then there'll still be hope....}
\expandafter\@firstofone
\else \expandafter\@gobble
\fi{\typeout{Farewell!}\endinput\@@end}
@@ -181,6 +167,7 @@
{You should not use 'true' lengths here}%
\fi}
\newif\ifjsc@mag
+\newif\ifjsc@mag@xreal
\DeclareOption{8pt}{\bxjs@setbasefontsize{8pt}}
\DeclareOption{9pt}{\bxjs@setbasefontsize{9pt}}
\DeclareOption{10pt}{\bxjs@setbasefontsize{10pt}}
@@ -272,6 +259,9 @@
\newif\if@english
\@englishfalse
\DeclareOption{english}{\@englishtrue}
+\newif\if@jslogo \@jslogofalse
+\DeclareOption{jslogo}{\@jslogotrue}
+\DeclareOption{nojslogo}{\@jslogofalse}
\mathchardef\bxjs@csta=259
\def\bxjs@invscale#1#2{%
\begingroup \@tempdima=#1\relax \@tempdimb#2\p@\relax
@@ -424,9 +414,6 @@
\DeclareOption{noscale}{%
\bxjs@scalesettrue
\def\jsScale{1}}
-\DeclareOption{CJK}{%
- \ClassWarning\bxjs@clsname
- {Option `CJK' was abolished}}
\let\bxjs@param@mag\relax
\define@key{bxjs}{mag}{\edef\bxjs@param@mag{#1}}
\define@key{bxjs}{paper}{\edef\bxjs@param@paper{#1}}
@@ -457,7 +444,7 @@
bxjs@magstyle@#1\endcsname
\ifx\bxjs@magstyle\relax
\ClassError\bxjs@clsname
- {Invalid magstyle value `#1'}\@ehc
+ {Invalid value '#1' for option magstyle}\@ehc
\let\bxjs@magstyle\bxjs@magstyle@default
\fi}
\let\bxjs@geometry@class=c
@@ -468,7 +455,7 @@
bxjs@geometry@#1\endcsname
\ifx\bxjs@geometry\relax
\ClassError\bxjs@clsname
- {Invalid geometry value `#1'}\@ehc
+ {Invalid value '#1' for option geometry}\@ehc
\let\bxjs@geometry\bxjs@geometry@class
\fi}
\newif\ifbxjs@fancyhdr \bxjs@fancyhdrtrue
@@ -486,13 +473,13 @@
bxjs@dvidriver@@#1\endcsname
\ifx\bxjs@tmpa\relax
\ClassError\bxjs@clsname
- {Invalid dvi value `#1'}\@ehc
+ {Invalid value '#1' for option dvi}\@ehc
\else
\def\bxjs@driver@opt{#1}%
\let\bxjs@driver@given\@undefined
\bxjs@dvi@opttrue
\fi}
-\newif\ifbxjs@layout@buggyhmargin \bxjs@layout@buggyhmargintrue
+\newif\ifbxjs@layout@buggyhmargin \bxjs@layout@buggyhmarginfalse
\@namedef{bxjs@kv@layout@v1}{%
\bxjs@layout@buggyhmargintrue}
\@namedef{bxjs@kv@layout@v2}{%
@@ -571,8 +558,8 @@
\fi
\ifx\bxjs@engine@given\@undefined\else
\ifx\bxjs@engine@given\bxjs@tmpb\else
- \ClassError\bxjs@clsname%
- {Option `\bxjs@engine@opt' used on wrong engine}\@ehc
+ \ClassError\bxjs@clsname
+ {Option '\bxjs@engine@opt' used on wrong engine}\@ehc
\fi
\fi
\ifjsWithpTeXng
@@ -600,8 +587,8 @@
\fi\fi
\fi
\if@tempswa\else
- \ClassError\bxjs@clsname%
- {Option `\bxjs@driver@opt' used on wrong engine}\@ehc
+ \ClassError\bxjs@clsname
+ {Option '\bxjs@driver@opt' used on wrong engine}\@ehc
\fi
\ifjsInPdfMode \@tempswafalse
\else\ifx x\jsEngine \@tempswafalse
@@ -639,18 +626,18 @@
\fi
\ifx\bxjs@jadriver@given\@undefined\else
\ifx\bxjs@engine@given\@undefined
- \ClassError\bxjs@clsname%
- {An engine option must be explicitly given}%
- {When you employ a Japanese-driver you must specify a
- correct\MessageBreak engine option.\MessageBreak\@ehc}
+ \ClassError\bxjs@clsname
+ {An engine option must be explicitly given}%
+ {When you use a Japanese-driver you must specify a correct\MessageBreak
+ engine option.\MessageBreak\@ehc}
\fi\fi
\ifx\bxjs@magstyle@default\bxjs@magstyle@mag\else
\ifx\bxjs@magstyle\bxjs@magstyle@mag
\let\bxjs@magstyle\bxjs@magstyle@default
- \ClassError\bxjs@clsname%
- {The engine does not support 'magstyle=mag'}%
- {LuaTeX v0.87 or later no longer supports "mag" feature.\MessageBreak
- The default value is used instead.\MessageBreak \@ehc}
+ \ClassError\bxjs@clsname
+ {The engine does not support 'magstyle=usemag'}%
+ {LuaTeX v0.87 or later no longer supports the "mag" feature of TeX.\MessageBreak
+ The default value 'nomag*' is used instead.\MessageBreak \@ehc}
\fi
\fi
\bxjs@do@opt@jbase
@@ -679,11 +666,10 @@
\fi
\ifdim\bxjs@param@basefontsize<10pt \def\n@baseline{15}%
\else \def\n@baseline{16}\fi
-\newif\ifbxjs@nfss@patch
\ifx\bxjs@magstyle\bxjs@magstyle@mag
\jsc@magtrue
\else\ifx\bxjs@magstyle\bxjs@magstyle@xreal
- \bxjs@nfss@patchtrue
+ \jsc@mag@xrealtrue
\fi\fi
\ifx\bxjs@param@mag\relax
\@tempdima=\bxjs@param@basefontsize
@@ -720,45 +706,46 @@
\ifbxjs@usezw
\providecommand*\zw{\jsZw}
\fi
-\ifbxjs@nfss@patch
-\RequirePackage{type1cm}
-\expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
-\expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax
-\let\bxjs@get@external@font\get@external@font
-\def\get@external@font{%
- \bxjs@preadjust@extract@font
- \bxjs@get@external@font}
-\def\bxjs@fstrunc#1{%
- \edef\bxjs@tmpa{\strip@pt#1}%
- \expandafter\bxjs@fstrunc@a\bxjs@tmpa.****\@nil}
-\def\bxjs@fstrunc@a#1.#2#3#4#5#6\@nil{%
- \if#5*\else
- \edef\bxjs@tmpa{#1%
- \ifnum#2#3>\z@ .#2\ifnum#3>\z@ #3\fi\fi}%
- \fi}
-\def\bxjs@preadjust@extract@font{%
- \let\bxjs@req@size\f@size
- \dimen@\f@size\p@ \bxjs@invscale\dimen@\jsc@magscale
- \advance\dimen@.005pt\relax \bxjs@fstrunc\dimen@
- \let\bxjs@ref@size\bxjs@tmpa
- \let\f@size\bxjs@ref@size}
-\def\execute@size@function#1{%
- \let\bxjs@cref@size\f@size
- \let\f@size\bxjs@req@size
- \csname s@fct@#1\endcsname}
-\let\bxjs@DeclareErrorFont\DeclareErrorFont
-\def\DeclareErrorFont#1#2#3#4#5{%
- \@tempdimc#5\p@ \@tempdimc\jsc@magscale\@tempdimc
- \edef\bxjs@tmpa{{#1}{#2}{#3}{#4}{\strip@pt\@tempdimc}}
- \expandafter\bxjs@DeclareErrorFont\bxjs@tmpa}
-\def\gen@sfcnt{%
- \edef\mandatory@arg{\mandatory@arg\bxjs@cref@size}%
- \empty@sfcnt}
-\def\genb@sfcnt{%
- \edef\mandatory@arg{%
- \mandatory@arg\expandafter\genb@x\bxjs@cref@size..\@@}%
- \empty@sfcnt}
-\DeclareErrorFont{OT1}{cmr}{m}{n}{10}
+\ifjsc@mag@xreal
+ \RequirePackage{type1cm}
+ \let\jsc@invscale\bxjs@invscale
+ \expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
+ \expandafter\let\csname OMX/cmex/m/n/10\endcsname\relax
+ \let\jsc@get@external@font\get@external@font
+ \def\get@external@font{%
+ \jsc@preadjust@extract@font
+ \jsc@get@external@font}
+ \def\jsc@fstrunc#1{%
+ \edef\jsc@tmpa{\strip@pt#1}%
+ \expandafter\jsc@fstrunc@a\jsc@tmpa.****\@nil}
+ \def\jsc@fstrunc@a#1.#2#3#4#5#6\@nil{%
+ \if#5*\else
+ \edef\jsc@tmpa{#1%
+ \ifnum#2#3>\z@ .#2\ifnum#3>\z@ #3\fi\fi}%
+ \fi}
+ \def\jsc@preadjust@extract@font{%
+ \let\jsc@req@size\f@size
+ \dimen@\f@size\p@ \jsc@invscale\dimen@\jsc@magscale
+ \advance\dimen@.005pt\relax \jsc@fstrunc\dimen@
+ \let\jsc@ref@size\jsc@tmpa
+ \let\f@size\jsc@ref@size}
+ \def\execute@size@function#1{%
+ \let\jsc@cref@size\f@size
+ \let\f@size\jsc@req@size
+ \csname s@fct@#1\endcsname}
+ \let\jsc@DeclareErrorFont\DeclareErrorFont
+ \def\DeclareErrorFont#1#2#3#4#5{%
+ \@tempdimc#5\p@ \@tempdimc\jsc@magscale\@tempdimc
+ \edef\jsc@tmpa{{#1}{#2}{#3}{#4}{\strip@pt\@tempdimc}}
+ \expandafter\jsc@DeclareErrorFont\jsc@tmpa}
+ \def\gen@sfcnt{%
+ \edef\mandatory@arg{\mandatory@arg\jsc@cref@size}%
+ \empty@sfcnt}
+ \def\genb@sfcnt{%
+ \edef\mandatory@arg{%
+ \mandatory@arg\expandafter\genb@x\jsc@cref@size..\@@}%
+ \empty@sfcnt}
+ \DeclareErrorFont{OT1}{cmr}{m}{n}{10}
\fi
\chardef\bxjs@periodchar=`\.
\bxjs@protected\def\bxjs@SE{\spacefactor\sfcode\bxjs@periodchar}
@@ -1016,8 +1003,8 @@
\def\bxjs@check@page@layout{%
\ifdim\textwidth=.5\maxdimen
\ClassError\bxjs@clsname
- {Page layout is not properly set}
- \@ehd
+ {Page layout is not properly set}%
+ {\@ehd}
\fi}
\def\jsUseMinimalPageLayout{%
\setlength{\textwidth}{6.5in}%
@@ -1027,7 +1014,7 @@
{\bxjs@pagelayout@a}{\bxjs@pagelayout@a}}
\def\bxjs@pagelayout@a#1{%
\ClassError\bxjs@clsname
- {Command \string\setpagelayout\space is not supported,\MessageBreak
+ {Command '\string\setpagelayout' is not supported,\MessageBreak
because 'geometry' value is not 'class'}\@eha}
\fi\fi
\footnotesep=11\p@? \footnotesep=0.7\footnotesep
@@ -1323,7 +1310,9 @@
\@afterheading
\fi
\if@slide
- {\vskip-6\p@?\maybeblue\hrule height0\p@? depth1\p@?\vskip7\p@?\relax}%
+ {\vskip\if@twocolumn-5\jsc@mpt\else-6\jsc@mpt\fi
+ \maybeblue\hrule height0\jsc@mpt depth1\jsc@mpt
+ \vskip\if@twocolumn 4\jsc@mpt\else 7\jsc@mpt\fi\relax}%
\fi
\par % 2000-12-18
\ignorespaces}
@@ -1500,7 +1489,7 @@
\fi
\if@twocolumn
\newcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
- {\z@}{\z@}%
+ {\z@}{\if@slide .4\Cvs \else \z@ \fi}%
{\normalfont\normalsize\headfont}}
\else
\newcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
@@ -1510,12 +1499,12 @@
\fi
\if@twocolumn
\newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
- {\z@}{\z@}%
+ {\z@}{\if@slide .4\Cvs \else \z@ \fi}%
{\normalfont\normalsize\headfont}}
\else
\newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
{\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
- {\z@}%
+ {\if@slide .5\Cvs \@plus.3\Cdp \else \z@ \fi}%
{\normalfont\normalsize\headfont}}
\fi
\newcommand\jsParagraphMark{\jsJaChar{■}}
@@ -1525,17 +1514,23 @@
\let\jsJaChar\@empty
\if@twocolumn
\newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
- {\z@}{-1\jsZw}% 改行せず 1\jsZw のアキ
+ {\z@}{\if@slide .4\Cvs \else -1\jsZw\fi}% 改行せず 1\jsZw のアキ
{\normalfont\normalsize\headfont\jsParagraphMark}}
\else
\newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
{0.5\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
- {-1\jsZw}% 改行せず 1\jsZw のアキ
+ {\if@slide .5\Cvs \@plus.3\Cdp \else -1\jsZw\fi}% 改行せず 1\jsZw のアキ
{\normalfont\normalsize\headfont\jsParagraphMark}}
\fi
-\newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
- {\z@}{-1\jsZw}%
- {\normalfont\normalsize\headfont}}
+\if@twocolumn
+ \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
+ {\z@}{\if@slide .4\Cvs \@plus.3\Cdp \else -1\jsZw\fi}%
+ {\normalfont\normalsize\headfont}}
+\else
+ \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
+ {\z@}{\if@slide .5\Cvs \@plus.3\Cdp \else -1\jsZw\fi}%
+ {\normalfont\normalsize\headfont}}
+\fi
\if@slide
\setlength\leftmargini{1\jsZw}
\else
@@ -1726,7 +1721,7 @@
\DeclareRobustCommand*{\jsc@warnoldfontcmd}[1]{%
\ClassInfo\bxjs@clsname
{Old font command '\string#1' is used!!\MessageBreak
- First occurrence is}%
+ The first occurrence is}%
}
\newcommand*{\allowoldfontcommands}{%
\@jsc@warnoldfontcmdexceptiontrue}
@@ -1753,7 +1748,7 @@
\ifx\@tempa\@empty\else
\ClassWarningNoLine\bxjs@clsname
{Some old font commands were used in text\MessageBreak
- (see the log output for detail)}%
+ (see the log file for detail)}%
\ClassInfo\bxjs@clsname
{Some old font commands were used in text:\MessageBreak
\space\@tempa\MessageBreak
@@ -1946,10 +1941,12 @@
\newcommand{\indexspace}{\par \vskip 10\p@? \@plus5\p@? \@minus3\p@?\relax}
\newcommand\seename{\if@english see\else →\fi}
\newcommand\alsoname{\if@english see also\else →\fi}
-\let\footnotes@ve=\footnote
-\def\footnote{\jsInhibitGlue\footnotes@ve}
-\let\footnotemarks@ve=\footnotemark
-\def\footnotemark{\jsInhibitGlue\footnotemarks@ve}
+\ifx\pltx@foot@penalty\@undefined
+ \let\footnotes@ve=\footnote
+ \def\footnote{\jsInhibitGlue\footnotes@ve}
+ \let\footnotemarks@ve=\footnotemark
+ \def\footnotemark{\jsInhibitGlue\footnotemarks@ve}
+\fi
\def\thefootnote{\ifnum\c@footnote>\z@\leavevmode\lower.5ex\hbox{*}\@arabic\c@footnote\fi}
\renewcommand{\footnoterule}{%
\kern-2.6\p@? \kern-.4\p@
@@ -1974,7 +1971,14 @@
\else \let\next\f@t\fi \next}
\def\f@@t{\bgroup\aftergroup\@foot\let\next}
\def\f@t#1{#1\@foot}
-\def\@foot{\@finalstrut\strutbox\color@endgroup\egroup}
+\def\@foot{\@finalstrut\strutbox\color@endgroup\egroup
+ \ifhmode\null\fi
+ \ifx\pltx@foot@penalty\@undefined\else
+ \ifnum\pltx@foot@penalty=\z@\else
+ \penalty\pltx@foot@penalty
+ \pltx@foot@penalty\z@
+ \fi
+ \fi}
\newcommand\@makefntext[1]{%
\advance\leftskip 3\jsZw
\parindent 1\jsZw
@@ -2090,6 +2094,16 @@
\unskip \reserved@e {\reserved@f#1}\nobreak \hfil \break \null
\jsInhibitGlue \ignorespaces
\fi}
+\if@jslogo
+ \IfFileExists{jslogo.sty}{%
+ \RequirePackage{jslogo}%
+ }{%
+ \ClassWarningNoLine\bxjs@clsname
+ {The package 'jslogo' is not installed.\MessageBreak
+ It is included in the recent release of\MessageBreak
+ the 'jsclasses' bundle}
+ }
+\fi
\newcommand{\prepartname}{\if@english Part~\else 第\fi}
\newcommand{\postpartname}{\if@english\else 部\fi}
\newcommand{\prechaptername}{\if@english Chapter~\else 第\fi}