diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-25 21:09:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-25 21:09:59 +0000 |
commit | aef0ab66561e93d019e3cd7e3ffd80ae2e35b616 (patch) | |
tree | 2e4a06d1dc2ca47558a1c6433b64f765469bac86 /Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls | |
parent | 6bfd423111a83e0dbb18e43989c1602b7c203604 (diff) |
bxjscls (25mar20)
git-svn-id: svn://tug.org/texlive/trunk@54542 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls | 97 |
1 files changed, 34 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls index fd64e7a3369..bfc6bef9fe5 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} - [2020/02/15 v1.9k BXJS document classes] + [2020/03/25 v2.0 BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjs@clsname{bxjsbook} \newif\ifjsc@needsp@tch @@ -322,17 +322,9 @@ \define@key{bxjs}{enablejfam}[true]{% \bxjs@set@keyval{enablejfam}{#1}{}} \DeclareOption{disablejfam}{\let\bxjs@enablejfam=f} -\let\ifjsDraft\iffalse -\@onlypreamble\bxjs@draft -\def\bxjs@draft#1{% - \expandafter\let\expandafter\ifjsDraft\csname if#1\endcsname} -\DeclareOption{draft}{\bxjs@draft{true}\setlength\overfullrule{5pt}} -\DeclareOption{final}{\bxjs@draft{false}\setlength\overfullrule{0pt}} -\g@addto@macro\bxjs@begin@document@hook{% - \expandafter\ifx\csname ifdraft\endcsname\relax - \expandafter\let\csname ifdraft\expandafter\endcsname - \csname ifjsDraft\endcsname - \fi} +\newif\ifjsDraft +\DeclareOption{draft}{\jsDrafttrue \overfullrule=5pt } +\DeclareOption{final}{\jsDraftfalse \overfullrule=0pt } \newif\ifbxjs@papersize \bxjs@papersizetrue \DeclareOption{nopapersize}{\bxjs@papersizefalse} @@ -434,11 +426,7 @@ \let\bxjs@driver@given\bxjs@driver@@xetex} \DeclareOption{dvipdfmx-if-dvi}{% \setkeys{bxjs}{dvi=dvipdfmx}} -\newif\ifbxjs@bigcode \bxjs@bigcodefalse -\edef\bxjs@tmpa{\expandafter\noexpand\csname\endcsname} -\def\bxjs@tmpb#1 #2#3\@nil{% - \ifx1#2\bxjs@bigcodetrue \fi} -\expandafter\bxjs@tmpb\meaning\bxjs@tmpa1 0\@nil +\newif\ifbxjs@bigcode \bxjs@bigcodetrue \DeclareOption{nobigcode}{% \bxjs@bigcodefalse} \DeclareOption{bigcode}{% @@ -1178,14 +1166,10 @@ \bxjs@postproc@layout \g@addto@macro\bxjs@bd@pre@geometry@hook{% \@ifpackagelater{geometry}{2010/02/12}{}{%else - \PackageWarningNoLine\bxjs@clsname - {The 'geometry' package installed\MessageBreak - is too old (< v5.0)}% - \if x\jsEngine \ifnum\mag=\@m\else - \def\bxjs@Gm@driver{pdftex} - \ifx\pdfhorigin\@undefined \newdimen\pdfhorigin \fi - \ifx\pdfvorigin\@undefined \newdimen\pdfvorigin \fi - \fi\fi}% + \PackageError\bxjs@clsname + {Your 'geometry' package is too old (< v5.0)}% + {\@ehc}% + \let\Gm@driver\relax}% \ifjsWithpTeXng \ifx\Gm@driver\@empty \def\Gm@driver{pdftex}% @@ -2396,67 +2380,54 @@ \@tempswafalse \if p\jsEngine \@tempswatrue \fi \if n\jsEngine \@tempswatrue \fi -\if@tempswa \expandafter\@firstoftwo -\else \expandafter\@secondoftwo -\fi -{% +\bxjs@cond\if@tempswa\fi{% \newif\ifjsSeireki \jsSeirekitrue \def\bxjs@decl@Seireki@cmds{% \def\西暦{\jsSeirekitrue}% - \def\和暦{\jsSeirekifalse}} + \def\和暦{\jsSeirekifalse\bxjs@wareki@used}} \def\Seireki{\jsSeirekitrue} -\def\Wareki{\jsSeirekifalse} -\def\bxjs@if@use@seireki{% - \ifjsSeireki \expandafter\@firstoftwo - \else \expandafter\@secondoftwo \fi} +\def\Wareki{\jsSeirekifalse\bxjs@wareki@used} +\def\bxjs@if@use@seireki{\bxjs@cond\ifjsSeireki\fi} +\def\bxjs@iai{\noexpand~} }{% \newif\if西暦 \西暦true \def\bxjs@decl@Seireki@cmds{% \def\西暦{\西暦true}% - \def\和暦{\西暦false}} + \def\和暦{\西暦false\bxjs@wareki@used}} \def\Seireki{\西暦true} -\def\Wareki{\西暦false} -\def\bxjs@if@use@seireki{% - \if西暦 \expandafter\@firstoftwo - \else \expandafter\@secondoftwo \fi} +\def\Wareki{\西暦false\bxjs@wareki@used} +\def\bxjs@if@use@seireki{\bxjs@cond\if西暦\fi} +\let\bxjs@iai\@empty } \bxjs@decl@Seireki@cmds \let\bxjs@unxp\@firstofone \let\bxjs@onxp\@firstofone -\bxjs@test@engine\unexpanded{\let\bxjs@unxp\unexpanded - \def\bxjs@onxp{\unexpanded\expandafter}} -\if \if p\jsEngine T\else\if n\jsEngine T\else F\fi\fi T - \def\bxjs@iai{\noexpand~} -\else \def\bxjs@iai{} -\fi +\bxjs@test@engine\unexpanded{% + \let\bxjs@unxp\unexpanded \def\bxjs@onxp{\unexpanded\expandafter}} \newif\ifbxjs@bxwareki@avail \IfFileExists{bxwareki.sty}{% \RequirePackage{bxwareki}[]% \bxjs@bxwareki@availtrue}{} +\ifbxjs@bxwareki@avail \let\bxjs@wareki@used\@empty +\else + \bxjs@robust@def\bxjs@wareki@used{% + \global\let\bxjs@wareki@used\@empty + \ClassWarning\bxjs@clsname + {Wareki mode is not supported, since\MessageBreak + 'bxwareki' is unavailable, found}} + \g@addto@macro\bxjs@begin@document@hook{% + \let\bxjs@wareki@used\@empty} +\fi \ifbxjs@bxwareki@avail \let\jayear\warekiyear \def\bxjs@tmpa{H}\ifx\bxjs@tmpa\warekigengoinitial \newcount\heisei \heisei=\value{warekiyear} \fi \else - \@tempcnta=\the\year\two@digits\month\two@digits\day\relax - \ifnum\@tempcnta<19890108 \else \ifnum\@tempcnta<20190501 - \newcount\heisei \heisei\year \advance\heisei-1988\relax - \fi\fi - \ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne - \edef\jayear{\bxjs@unxp{平成}\bxjs@iai \the\heisei \bxjs@iai} - \else \edef\jayear{\the\year \bxjs@iai} - \fi + \edef\jayear{\the\year \bxjs@iai} \fi \let\bxjs@next\relax -\ifbxjs@bxwareki@avail - \ifx\warekigengo\@empty\else - \def\bxjs@next{\bxjs@onxp{\warekitoday}} - \fi -\else\ifnum \ifx\heisei\@undefined\z@\else\heisei\fi >\@ne - \def\bxjs@next{% - \bxjs@unxp{平成}\bxjs@iai\number\heisei\bxjs@iai\bxjs@unxp{年}% - \bxjs@iai\number\month\bxjs@iai\bxjs@unxp{月}% - \bxjs@iai\number\day\bxjs@iai\bxjs@unxp{日}} +\ifbxjs@bxwareki@avail \ifx\warekigengo\@empty\else + \def\bxjs@next{\bxjs@onxp{\warekitoday}} \fi\fi \edef\bxjs@today{% \if@english @@ -2475,7 +2446,7 @@ \fi} \let\today\bxjs@today \g@addto@macro\bxjs@begin@document@hook{% - \ifx\bbl@jpn@Seirekitrue\@undefined\else + \ifx\bbl@jpn@maybekansuji\@undefined\else \bxjs@decl@Seireki@cmds \g@addto@macro\datejapanese{% \let\today\bxjs@today}% |