diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-05 22:10:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-05 22:10:32 +0000 |
commit | 4f8b3e4ed4705d02b41abf5a895611ea067f1802 (patch) | |
tree | d1b1dda195e8111c484f0f645fe15eec6fd51778 /Master/texmf-dist/tex/latex/bxjscls | |
parent | 45b6a4705fb0917584f76cd9b3389ff3bd2822e4 (diff) |
bxjscls (5mar18)
git-svn-id: svn://tug.org/texlive/trunk@46845 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bxjscls')
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls | 189 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls | 201 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def | 17 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def | 39 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls | 189 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls | 189 |
11 files changed, 520 insertions, 314 deletions
diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls index 99867ff3506..5fad2575f07 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls @@ -22,7 +22,7 @@ %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e} \ProvidesClass{bxjsarticle} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjs@clsname{bxjsarticle} \newif\ifjsc@needsp@tch @@ -94,6 +94,45 @@ \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname} \def\bxjs@catopt#1#2{% #1\if\relax#1\relax\else\if\relax#2\relax\else,\fi\fi#2} +\def\bxjs@ifplus#1{\@ifnextchar+{\@firstoftwo{#1}}} +\let\c@bxjs@tempcnta\@tempcnta +\def\bxjs@gset@tempcnta{\setcounter{bxjs@tempcnta}} +\def\jsSetQHLength#1#2{% + \begingroup + \bxjs@parse@qh{#2}% + \ifx\bxjs@tmpb\relax + \setlength\@tempdima{#2}% + \xdef\bxjs@g@tmpa{\the\@tempdima}% + \else \global\let\bxjs@g@tmpa\bxjs@tmpb + \fi + \endgroup + #1=\bxjs@g@tmpa\relax} +\if j\jsEngine \def\bxjs@parse@qh@all{zw,zh} +\else \def\bxjs@parse@qh@all{trueQ,trueH,Q,H,zw,zh} +\fi +\def\bxjs@parse@qh#1{% + \let\bxjs@tmpb\relax + \@for\bxjs@tmpa:=\bxjs@parse@qh@all\do{% + \ifx\bxjs@tmpb\relax + \edef\bxjs@next{{\bxjs@tmpa}{#1}}% + \expandafter\bxjs@parse@qh@a\csname bxjs@unit@\bxjs@tmpa\expandafter + \endcsname\bxjs@next + \fi}} +\def\bxjs@parse@qh@a#1#2#3{% + \def\bxjs@next##1#2\@nil##2\@nnil{\bxjs@parse@qh@b{##1}{##2}#1}% + \bxjs@next#3\@nil#2\@nil\@nnil} +\def\bxjs@parse@qh@b#1#2#3{% + \ifx\@nnil#2\@nnil\else + \ifx#3\relax + \ClassError\bxjs@clsname + {You cannot use '\bxjs@tmpa' here}{\@ehc}% + \def\bxjs@tmpb{0pt}% + \else + \@tempdimb#3\relax \@tempdimb#1\@tempdimb + \edef\bxjs@tmpb{\the\@tempdimb}% + \fi + \fi} + \def\bxjs@unit@Q{0.25mm}\let\bxjs@unit@H\bxjs@unit@Q \def\jsAtEndOfClass{% \expandafter\g@addto@macro\csname\bxjs@clsname.cls-h@@k\endcsname} \@onlypreamble\bxjs@restore@jltrcc @@ -150,30 +189,12 @@ \def\bxjs@param@basefontsize{10pt} \def\jsUnusualPtSize{-20} \def\bxjs@setbasefontsize#1{% - \bxjs@setbasefontlength\@tempdima{#1}% + \jsSetQHLength\@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} \newif\ifjsc@mag \newif\ifjsc@mag@xreal \DeclareOption{8pt}{\bxjs@setbasefontsize{8pt}} @@ -442,23 +463,18 @@ \def\bxjs@error@keyval#1#2{% \ClassError\bxjs@clsname {Invalid value '#2' for option #1}\@ehc} -\newif\ifbxjs@scaleset \def\jsScale{0.924715} -\define@key{bxjs}{base}{\bxjs@setbasefontsize{#1}} -\@onlypreamble\bxjs@do@opt@jbase -\let\bxjs@do@opt@jbase\relax -\define@key{bxjs}{jbase}{\bxjs@setjbasefontsize{#1}} -\def\bxjs@setjbasefontsize#1{% - \def\bxjs@do@opt@jbase{% - \bxjs@setbasefontlength\@tempdima{#1}% - \bxjs@invscale\@tempdima\jsScale - \bxjs@setbasefontsize{\@tempdima}}} +\define@key{bxjs}{base}{% + \edef\bxjs@base@opt{#1}% + \bxjs@setbasefontsize{#1}} +\define@key{bxjs}{fontsize}{\setkeys{bxjs}{base=#1}} +\define@key{bxjs}{jbase}{\edef\bxjs@jbase@opt{#1}} +\define@key{bxjs}{jafontsize}{\setkeys{bxjs}{jbase=#1}} \define@key{bxjs}{scale}{% - \bxjs@scalesettrue - \edef\jsScale{#1}} -\DeclareOption{noscale}{% - \bxjs@scalesettrue - \def\jsScale{1}} + \edef\bxjs@scale@opt{#1}% + \let\jsScale\bxjs@scale@opt} +\define@key{bxjs}{jsfontscale}{\setkeys{bxjs}{scale=#1}} +\DeclareOption{noscale}{\setkeys{bxjs}{scale=1}} \let\bxjs@param@mag\relax \define@key{bxjs}{mag}{\edef\bxjs@param@mag{#1}} \define@key{bxjs}{paper}{\edef\bxjs@param@paper{#1}} @@ -535,6 +551,10 @@ \bxjs@set@keyval{layout}{#1}{}} \define@key{bxjs}{textwidth-limit}{% \edef\bxjs@textwidth@limit{#1}} +\define@key{bxjs}{textwidth}{\edef\bxjs@textwidth@opt{#1}} +\define@key{bxjs}{line_length}{\setkeys{bxjs}{textwidth=#1}} +\define@key{bxjs}{number-of-lines}{\edef\bxjs@number@of@lines@opt{#1}} +\define@key{bxjs}{number_of_lines}{\setkeys{bxjs}{number-of-lines=#1}} \define@key{bxjs}{paragraph-mark}{% \edef\bxjs@paragraph@mark{#1}} \newif\ifbxjs@whole@zw@lines \bxjs@whole@zw@linestrue @@ -723,7 +743,23 @@ The default value 'nomag*' is used instead.\MessageBreak \@ehc} \fi \fi -\bxjs@do@opt@jbase +\ifx\bxjs@jbase@opt\@undefined\else + \ifx\bxjs@base@opt\@undefined + \jsSetQHLength\@tempdima{\bxjs@jbase@opt}% + \bxjs@invscale\@tempdima\jsScale + \bxjs@setbasefontsize{\@tempdima}% + \else + \ifx\bxjs@scale@opt\@undefined\else + \ClassWarningNoLine\bxjs@clsname + {Redundant 'scale' option is ignored}% + \fi + \jsSetQHLength\@tempdima{\bxjs@jbase@opt}% + \@tempdimb=\bxjs@param@basefontsize\relax + \edef\jsScale{\strip@pt\@tempdimb}% + \bxjs@invscale\@tempdima\jsScale + \edef\jsScale{\strip@pt\@tempdima}% + \fi +\fi \let\Cjascale\jsScale \if \if p\jsEngine T\else\if n\jsEngine T\else F\fi\fi T \@tempcnta="80 \loop \ifnum\@tempcnta<"100 @@ -760,8 +796,7 @@ \divide\@tempdima16384\relax \@tempcnta\@tempdima\relax \edef\bxjs@param@mag{\the\@tempcnta} \else - \let\c@bxjs@cnta\@tempcnta - \setcounter{bxjs@cnta}{\bxjs@param@mag} + \bxjs@gset@tempcnta{\bxjs@param@mag} \ifnum\@tempcnta<\z@ \@tempcnta=\z@ \fi \edef\bxjs@param@mag{\the\@tempcnta} \advance\@tempcnta100000 @@ -983,23 +1018,37 @@ \mag=\bxjs@param@mag \fi \setlength{\topskip}{10\p@?} +\def\bxjs@unit@trueQ{0.25truemm}\let\bxjs@unit@trueH\bxjs@unit@trueQ +\def\bxjs@unit@zw{\jsZw}\let\bxjs@unit@zh\bxjs@unit@zw \def\bxjs@read@a{\futurelet\bxjs@tmpa\bxjs@read@b} \def\bxjs@read@b{% \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@read@c \else \expandafter\bxjs@read@d \fi} -\def\bxjs@read@c#1#2#3\@nil{\def\bxjs@param@paper{papersize={#1,#2}}} -\def\bxjs@read@d#1\@nil{} -\expandafter\bxjs@read@a\bxjs@param@paper\@nil +\def\bxjs@read@c#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}} +\def\bxjs@read@d#1\@nil{\bxjs@read@e#1,,\@nil} +\def\bxjs@read@e#1,#2,#3\@nil{% + \ifx\@nil#3\@nil\else \edef\bxjs@param@paper{papersize={#1,#2}}\fi} +\expandafter\bxjs@read@a\bxjs@param@paper\@empty\@empty\@nil \edef\bxjs@layout@paper{% \ifjsc@mag truedimen,\fi \if@landscape landscape,\fi \bxjs@param@paper} -\def\bxjs@layout{% +\def\bxjs@layout@base{% headheight=\topskip,footskip=0.03367\paperheight,% headsep=\footskip-\topskip,includeheadfoot,% +} +\edef\bxjs@layout{\bxjs@layout@base hscale=0.76,hmarginratio=1:1,% vscale=0.83,vmarginratio=1:1,% } +\ifx\bxjs@textwidth@opt\@undefined\else + \jsSetQHLength\@tempdima{\bxjs@textwidth@opt} + \edef\bxjs@layout{\bxjs@layout width=\the\@tempdima,} +\fi +\ifx\bxjs@number@of@lines@opt\@undefined\else + \bxjs@gset@tempcnta{\bxjs@number@of@lines@opt} + \edef\bxjs@layout{\bxjs@layout lines=\the\@tempcnta,} +\fi \newdimen\fullwidth \def\bxjs@postproc@layout{% \ifx\bxjs@geometry@driver\relax\else @@ -1008,6 +1057,7 @@ \ifbxjs@whole@zw@lines \@tempdimb=\textwidth \if@twocolumn \@tempdima=2\Cwd \else \@tempdima=1\Cwd \fi + \advance\textwidth.005pt\relax \divide\textwidth\@tempdima \multiply\textwidth\@tempdima \advance\@tempdimb-\textwidth \advance\oddsidemargin 0.5\@tempdimb @@ -1016,6 +1066,7 @@ \fullwidth=\textwidth \@tempdimb=\textheight \advance\textheight-\topskip + \advance\textheight.005pt\relax \divide\textheight\baselineskip \multiply\textheight\baselineskip \advance\textheight\topskip \advance\@tempdimb-\textheight @@ -1037,11 +1088,10 @@ \edef\jsGeometryOptions{% \bxjs@layout@paper,\bxjs@layout} \ifx\bxjs@geometry\bxjs@geometry@class -\@onlypreamble\bxjs@revert -\let\bxjs@revert\@empty -\edef\bxjs@tmpa{\the\ht\strutbox} -\ht\strutbox=10\p@? -\g@addto@macro\bxjs@revert{\ht\strutbox=\bxjs@tmpa\relax} +\def\bxjs@geometry@guard@on{% + \edef\bxjs@gg@tmp{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt} +\def\bxjs@geometry@guard@off{% + \ht\strutbox=\bxjs@gg@tmp\relax} \ifbxjs@papersize \ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx \PassOptionsToPackage{dvipdfm}{geometry} @@ -1052,11 +1102,13 @@ \else \PassOptionsToPackage{driver=none}{geometry} \fi -\edef\bxjs@nxt{% - \noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}} \AtBeginDocument{\bxjs@pre@geometry@hook} \AtBeginDocument{\ImposeOldLuaTeXBehavior} -\bxjs@nxt \bxjs@revert +\bxjs@geometry@guard@on +\edef\bxjs@next{% + \noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}% +}\bxjs@next +\bxjs@geometry@guard@off \AtBeginDocument{\RevokeOldLuaTeXBehavior} \let\bxjs@geometry@driver\Gm@driver \bxjs@postproc@layout @@ -1079,14 +1131,23 @@ \fi \fi }{}} -\def\setpagelayout{\@ifstar - {\bxjs@reset@layout}{\bxjs@modify@layout}} -\def\bxjs@modify@layout#1{% - \edef\bxjs@nxt{\noexpand\geometry{#1,truedimen}}% - \bxjs@nxt\bxjs@postproc@layout} -\def\bxjs@reset@layout#1{% - \edef\bxjs@nxt{\noexpand\geometry{reset,\bxjs@layout@paper,#1,truedimen}}% - \bxjs@nxt\bxjs@postproc@layout} +\def\setpagelayout{% + \bxjs@ifplus{\bxjs@setpagelayout@a\tw@}{%else + \@ifstar{\bxjs@setpagelayout@a\@ne}{\bxjs@setpagelayout@a\z@}}} +\def\bxjs@setpagelayout@a#1#2{% + \ifcase#1% modify + \def\bxjs@next{\ifjsc@mag truedimen,\fi #2}% + \or% reset(*) + \def\bxjs@next{reset,\bxjs@layout@paper,#2}% + \or% semireset(+) + \def\bxjs@next{reset,\bxjs@layout@paper,\bxjs@layout@base,#2}% + \fi + \bxjs@geometry@guard@on + \edef\bxjs@next{% + \noexpand\geometry{\bxjs@next}% + }\bxjs@next + \bxjs@geometry@guard@off + \bxjs@postproc@layout} \else\ifx\bxjs@geometry\bxjs@geometry@user \AtBeginDocument{\bxjs@check@page@layout} \@onlypreamble\bxjs@check@page@layout @@ -1100,8 +1161,9 @@ \setlength{\textwidth}{6.5in}% \setlength{\textheight}{8in}} \let\bxjs@geometry@driver\relax -\def\setpagelayout{\@ifstar - {\bxjs@pagelayout@a}{\bxjs@pagelayout@a}} +\def\setpagelayout{% + \bxjs@ifplus{\bxjs@pagelayout@a}{%else + \@ifstar{\bxjs@pagelayout@a}{\bxjs@pagelayout@a}}} \def\bxjs@pagelayout@a#1{% \ClassError\bxjs@clsname {Command '\string\setpagelayout' is not supported,\MessageBreak @@ -1831,18 +1893,13 @@ \bxjs@oldfontcmd@list \ifx\@tempa\@empty\else \ClassWarningNoLine\bxjs@clsname - {Some old font commands were used in text\MessageBreak - (see the log file for detail)}% - \ClassInfo\bxjs@clsname {Some old font commands were used in text:\MessageBreak \space\@tempa\MessageBreak You should note, that since 1994 LaTeX2e provides a\MessageBreak new font selection scheme called NFSS2 with several\MessageBreak new, combinable font commands. The class provides\MessageBreak - the old font commands - only for compatibility% - \@gobble}% + the old font commands only for compatibility} \fi} \def\bxjs@warnoldfontcmd@kick@final{% \g@addto@macro\clearpage{\bxjs@warnoldfontcmd@final}} diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls index c1b656e1aaf..1bd2325456d 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} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjs@clsname{bxjsbook} \newif\ifjsc@needsp@tch @@ -94,6 +94,45 @@ \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname} \def\bxjs@catopt#1#2{% #1\if\relax#1\relax\else\if\relax#2\relax\else,\fi\fi#2} +\def\bxjs@ifplus#1{\@ifnextchar+{\@firstoftwo{#1}}} +\let\c@bxjs@tempcnta\@tempcnta +\def\bxjs@gset@tempcnta{\setcounter{bxjs@tempcnta}} +\def\jsSetQHLength#1#2{% + \begingroup + \bxjs@parse@qh{#2}% + \ifx\bxjs@tmpb\relax + \setlength\@tempdima{#2}% + \xdef\bxjs@g@tmpa{\the\@tempdima}% + \else \global\let\bxjs@g@tmpa\bxjs@tmpb + \fi + \endgroup + #1=\bxjs@g@tmpa\relax} +\if j\jsEngine \def\bxjs@parse@qh@all{zw,zh} +\else \def\bxjs@parse@qh@all{trueQ,trueH,Q,H,zw,zh} +\fi +\def\bxjs@parse@qh#1{% + \let\bxjs@tmpb\relax + \@for\bxjs@tmpa:=\bxjs@parse@qh@all\do{% + \ifx\bxjs@tmpb\relax + \edef\bxjs@next{{\bxjs@tmpa}{#1}}% + \expandafter\bxjs@parse@qh@a\csname bxjs@unit@\bxjs@tmpa\expandafter + \endcsname\bxjs@next + \fi}} +\def\bxjs@parse@qh@a#1#2#3{% + \def\bxjs@next##1#2\@nil##2\@nnil{\bxjs@parse@qh@b{##1}{##2}#1}% + \bxjs@next#3\@nil#2\@nil\@nnil} +\def\bxjs@parse@qh@b#1#2#3{% + \ifx\@nnil#2\@nnil\else + \ifx#3\relax + \ClassError\bxjs@clsname + {You cannot use '\bxjs@tmpa' here}{\@ehc}% + \def\bxjs@tmpb{0pt}% + \else + \@tempdimb#3\relax \@tempdimb#1\@tempdimb + \edef\bxjs@tmpb{\the\@tempdimb}% + \fi + \fi} + \def\bxjs@unit@Q{0.25mm}\let\bxjs@unit@H\bxjs@unit@Q \def\jsAtEndOfClass{% \expandafter\g@addto@macro\csname\bxjs@clsname.cls-h@@k\endcsname} \@onlypreamble\bxjs@restore@jltrcc @@ -153,30 +192,12 @@ \def\bxjs@param@basefontsize{10pt} \def\jsUnusualPtSize{-20} \def\bxjs@setbasefontsize#1{% - \bxjs@setbasefontlength\@tempdima{#1}% + \jsSetQHLength\@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} \newif\ifjsc@mag \newif\ifjsc@mag@xreal \DeclareOption{8pt}{\bxjs@setbasefontsize{8pt}} @@ -448,23 +469,18 @@ \def\bxjs@error@keyval#1#2{% \ClassError\bxjs@clsname {Invalid value '#2' for option #1}\@ehc} -\newif\ifbxjs@scaleset \def\jsScale{0.924715} -\define@key{bxjs}{base}{\bxjs@setbasefontsize{#1}} -\@onlypreamble\bxjs@do@opt@jbase -\let\bxjs@do@opt@jbase\relax -\define@key{bxjs}{jbase}{\bxjs@setjbasefontsize{#1}} -\def\bxjs@setjbasefontsize#1{% - \def\bxjs@do@opt@jbase{% - \bxjs@setbasefontlength\@tempdima{#1}% - \bxjs@invscale\@tempdima\jsScale - \bxjs@setbasefontsize{\@tempdima}}} +\define@key{bxjs}{base}{% + \edef\bxjs@base@opt{#1}% + \bxjs@setbasefontsize{#1}} +\define@key{bxjs}{fontsize}{\setkeys{bxjs}{base=#1}} +\define@key{bxjs}{jbase}{\edef\bxjs@jbase@opt{#1}} +\define@key{bxjs}{jafontsize}{\setkeys{bxjs}{jbase=#1}} \define@key{bxjs}{scale}{% - \bxjs@scalesettrue - \edef\jsScale{#1}} -\DeclareOption{noscale}{% - \bxjs@scalesettrue - \def\jsScale{1}} + \edef\bxjs@scale@opt{#1}% + \let\jsScale\bxjs@scale@opt} +\define@key{bxjs}{jsfontscale}{\setkeys{bxjs}{scale=#1}} +\DeclareOption{noscale}{\setkeys{bxjs}{scale=1}} \let\bxjs@param@mag\relax \define@key{bxjs}{mag}{\edef\bxjs@param@mag{#1}} \define@key{bxjs}{paper}{\edef\bxjs@param@paper{#1}} @@ -544,6 +560,10 @@ \bxjs@set@keyval{layout}{#1}{}} \define@key{bxjs}{textwidth-limit}{% \edef\bxjs@textwidth@limit{#1}} +\define@key{bxjs}{textwidth}{\edef\bxjs@textwidth@opt{#1}} +\define@key{bxjs}{line_length}{\setkeys{bxjs}{textwidth=#1}} +\define@key{bxjs}{number-of-lines}{\edef\bxjs@number@of@lines@opt{#1}} +\define@key{bxjs}{number_of_lines}{\setkeys{bxjs}{number-of-lines=#1}} \define@key{bxjs}{paragraph-mark}{% \edef\bxjs@paragraph@mark{#1}} \newif\ifbxjs@whole@zw@lines \bxjs@whole@zw@linestrue @@ -732,7 +752,23 @@ The default value 'nomag*' is used instead.\MessageBreak \@ehc} \fi \fi -\bxjs@do@opt@jbase +\ifx\bxjs@jbase@opt\@undefined\else + \ifx\bxjs@base@opt\@undefined + \jsSetQHLength\@tempdima{\bxjs@jbase@opt}% + \bxjs@invscale\@tempdima\jsScale + \bxjs@setbasefontsize{\@tempdima}% + \else + \ifx\bxjs@scale@opt\@undefined\else + \ClassWarningNoLine\bxjs@clsname + {Redundant 'scale' option is ignored}% + \fi + \jsSetQHLength\@tempdima{\bxjs@jbase@opt}% + \@tempdimb=\bxjs@param@basefontsize\relax + \edef\jsScale{\strip@pt\@tempdimb}% + \bxjs@invscale\@tempdima\jsScale + \edef\jsScale{\strip@pt\@tempdima}% + \fi +\fi \let\Cjascale\jsScale \if \if p\jsEngine T\else\if n\jsEngine T\else F\fi\fi T \@tempcnta="80 \loop \ifnum\@tempcnta<"100 @@ -769,8 +805,7 @@ \divide\@tempdima16384\relax \@tempcnta\@tempdima\relax \edef\bxjs@param@mag{\the\@tempcnta} \else - \let\c@bxjs@cnta\@tempcnta - \setcounter{bxjs@cnta}{\bxjs@param@mag} + \bxjs@gset@tempcnta{\bxjs@param@mag} \ifnum\@tempcnta<\z@ \@tempcnta=\z@ \fi \edef\bxjs@param@mag{\the\@tempcnta} \advance\@tempcnta100000 @@ -992,35 +1027,43 @@ \mag=\bxjs@param@mag \fi \setlength{\topskip}{10\p@?} +\def\bxjs@unit@trueQ{0.25truemm}\let\bxjs@unit@trueH\bxjs@unit@trueQ +\def\bxjs@unit@zw{\jsZw}\let\bxjs@unit@zh\bxjs@unit@zw \def\bxjs@read@a{\futurelet\bxjs@tmpa\bxjs@read@b} \def\bxjs@read@b{% \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@read@c \else \expandafter\bxjs@read@d \fi} -\def\bxjs@read@c#1#2#3\@nil{\def\bxjs@param@paper{papersize={#1,#2}}} -\def\bxjs@read@d#1\@nil{} -\expandafter\bxjs@read@a\bxjs@param@paper\@nil +\def\bxjs@read@c#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}} +\def\bxjs@read@d#1\@nil{\bxjs@read@e#1,,\@nil} +\def\bxjs@read@e#1,#2,#3\@nil{% + \ifx\@nil#3\@nil\else \edef\bxjs@param@paper{papersize={#1,#2}}\fi} +\expandafter\bxjs@read@a\bxjs@param@paper\@empty\@empty\@nil \edef\bxjs@layout@paper{% \ifjsc@mag truedimen,\fi \if@landscape landscape,\fi \bxjs@param@paper} -\ifbxjs@layout@buggyhmargin %--- -\def\bxjs@layout{% +\def\bxjs@layout@base{% headheight=\topskip,headsep=6\jsc@mmm,nofoot,includeheadfoot,% +} +\ifbxjs@layout@buggyhmargin %--- +\edef\bxjs@layout{\bxjs@layout@base hmargin=36\jsc@mmm,hmarginratio=1:1,% vscale=0.83,vmarginratio=1:1,% } \else %--- -\def\bxjs@layout{% - headheight=\topskip,headsep=6\jsc@mmm,nofoot,includeheadfoot,% +\edef\bxjs@layout{\bxjs@layout@base hmargin=18\jsc@mmm,% vscale=0.83,vmarginratio=1:1,% } \fi %--- +\ifx\bxjs@number@of@lines@opt\@undefined\else + \bxjs@gset@tempcnta{\bxjs@number@of@lines@opt} + \edef\bxjs@layout{\bxjs@layout lines=\the\@tempcnta,} +\fi \newdimen\fullwidth \newcommand\jsTextWidthLimit{40} \ifx\bxjs@textwidth@limit\@undefined\else - \let\c@bxjs@cnta\@tempcnta - \setcounter{bxjs@cnta}{\bxjs@textwidth@limit} + \bxjs@gset@tempcnta{\bxjs@textwidth@limit} \long\edef\jsTextWidthLimit{\the\@tempcnta} \fi \def\bxjs@postproc@layout{% @@ -1030,18 +1073,24 @@ \ifbxjs@whole@zw@lines \@tempdimb=\textwidth \if@twocolumn \@tempdima=2\Cwd \else \@tempdima=1\Cwd \fi + \advance\textwidth.005pt\relax \divide\textwidth\@tempdima \multiply\textwidth\@tempdima \advance\@tempdimb-\textwidth \advance\oddsidemargin 0.5\@tempdimb \advance\evensidemargin 0.5\@tempdimb \fi \fullwidth=\textwidth - \ifdim\textwidth>\jsTextWidthLimit\Cwd - \textwidth=\jsTextWidthLimit\Cwd + \@tempdima=\jsTextWidthLimit\Cwd + \ifx\bxjs@textwidth@opt\@undefined\else + \jsSetQHLength\@tempdima{\bxjs@textwidth@opt} + \fi + \ifdim\textwidth>\@tempdima + \textwidth=\@tempdima \addtolength\evensidemargin{\fullwidth-\textwidth} \fi \@tempdimb=\textheight \advance\textheight-\topskip + \advance\textheight.005pt\relax \divide\textheight\baselineskip \multiply\textheight\baselineskip \advance\textheight\topskip \advance\@tempdimb-\textheight @@ -1063,11 +1112,10 @@ \edef\jsGeometryOptions{% \bxjs@layout@paper,\bxjs@layout} \ifx\bxjs@geometry\bxjs@geometry@class -\@onlypreamble\bxjs@revert -\let\bxjs@revert\@empty -\edef\bxjs@tmpa{\the\ht\strutbox} -\ht\strutbox=10\p@? -\g@addto@macro\bxjs@revert{\ht\strutbox=\bxjs@tmpa\relax} +\def\bxjs@geometry@guard@on{% + \edef\bxjs@gg@tmp{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt} +\def\bxjs@geometry@guard@off{% + \ht\strutbox=\bxjs@gg@tmp\relax} \ifbxjs@papersize \ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx \PassOptionsToPackage{dvipdfm}{geometry} @@ -1078,11 +1126,13 @@ \else \PassOptionsToPackage{driver=none}{geometry} \fi -\edef\bxjs@nxt{% - \noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}} \AtBeginDocument{\bxjs@pre@geometry@hook} \AtBeginDocument{\ImposeOldLuaTeXBehavior} -\bxjs@nxt \bxjs@revert +\bxjs@geometry@guard@on +\edef\bxjs@next{% + \noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}% +}\bxjs@next +\bxjs@geometry@guard@off \AtBeginDocument{\RevokeOldLuaTeXBehavior} \let\bxjs@geometry@driver\Gm@driver \bxjs@postproc@layout @@ -1105,14 +1155,23 @@ \fi \fi }{}} -\def\setpagelayout{\@ifstar - {\bxjs@reset@layout}{\bxjs@modify@layout}} -\def\bxjs@modify@layout#1{% - \edef\bxjs@nxt{\noexpand\geometry{#1,truedimen}}% - \bxjs@nxt\bxjs@postproc@layout} -\def\bxjs@reset@layout#1{% - \edef\bxjs@nxt{\noexpand\geometry{reset,\bxjs@layout@paper,#1,truedimen}}% - \bxjs@nxt\bxjs@postproc@layout} +\def\setpagelayout{% + \bxjs@ifplus{\bxjs@setpagelayout@a\tw@}{%else + \@ifstar{\bxjs@setpagelayout@a\@ne}{\bxjs@setpagelayout@a\z@}}} +\def\bxjs@setpagelayout@a#1#2{% + \ifcase#1% modify + \def\bxjs@next{\ifjsc@mag truedimen,\fi #2}% + \or% reset(*) + \def\bxjs@next{reset,\bxjs@layout@paper,#2}% + \or% semireset(+) + \def\bxjs@next{reset,\bxjs@layout@paper,\bxjs@layout@base,#2}% + \fi + \bxjs@geometry@guard@on + \edef\bxjs@next{% + \noexpand\geometry{\bxjs@next}% + }\bxjs@next + \bxjs@geometry@guard@off + \bxjs@postproc@layout} \else\ifx\bxjs@geometry\bxjs@geometry@user \AtBeginDocument{\bxjs@check@page@layout} \@onlypreamble\bxjs@check@page@layout @@ -1126,8 +1185,9 @@ \setlength{\textwidth}{6.5in}% \setlength{\textheight}{8in}} \let\bxjs@geometry@driver\relax -\def\setpagelayout{\@ifstar - {\bxjs@pagelayout@a}{\bxjs@pagelayout@a}} +\def\setpagelayout{% + \bxjs@ifplus{\bxjs@pagelayout@a}{%else + \@ifstar{\bxjs@pagelayout@a}{\bxjs@pagelayout@a}}} \def\bxjs@pagelayout@a#1{% \ClassError\bxjs@clsname {Command '\string\setpagelayout' is not supported,\MessageBreak @@ -1907,18 +1967,13 @@ \bxjs@oldfontcmd@list \ifx\@tempa\@empty\else \ClassWarningNoLine\bxjs@clsname - {Some old font commands were used in text\MessageBreak - (see the log file for detail)}% - \ClassInfo\bxjs@clsname {Some old font commands were used in text:\MessageBreak \space\@tempa\MessageBreak You should note, that since 1994 LaTeX2e provides a\MessageBreak new font selection scheme called NFSS2 with several\MessageBreak new, combinable font commands. The class provides\MessageBreak - the old font commands - only for compatibility% - \@gobble}% + the old font commands only for compatibility} \fi} \def\bxjs@warnoldfontcmd@kick@final{% \g@addto@macro\clearpage{\bxjs@warnoldfontcmd@final}} diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty index 24395431610..9dac9a4767c 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \ProvidesPackage{bxjscjkcat} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] \def\bxjx@pkgname{bxjscjkcat} \newcount\bxjx@cnta \let\bxjx@engine=n diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty index 619c62af509..f809e173920 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \ProvidesPackage{bxjscompat} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] \def\bxac@pkgname{bxjscompat} \let\bxac@engine=n \def\bxac@do#1#2{% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def index f9d90b5ce1a..fb4b292fd58 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-minimal.def @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \ProvidesFile{bxjsja-minimal.def} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] %% このファイルは日本語文字を含みます \def\DeclareJaTextFontCommand#1#2{% \DeclareRobustCommand#1[1]{% @@ -111,13 +111,13 @@ \def\bxjs@let@hchar@chr@ue@d#1#2#3#4{% \bxjs@let@hchar@out\def{{#1#2#3#4}}} \ifx j\jsEngine -\def\bxjs@let@hchar@chr@pp#1{% - \expandafter\bxjs@let@hchar@chr@pp@a\meaning#1\relax#1} -\def\bxjs@let@hchar@chr@pp@a#1#2\relax#3{% - \bxjs@cond\if#1t\fi{% - \bxjs@let@hchar@chr@ue#3% +\def\bxjs@let@hchar@chr@pp#1#2{% + \expandafter\bxjs@let@hchar@chr@pp@a\meaning#2\relax#1#2} +\def\bxjs@let@hchar@chr@pp@a#1#2\relax#3#4{% + \bxjs@cond\if#1k\fi{% + \bxjs@let@hchar@out\def{{#4}}% }{%else - \bxjs@let@hchar@out\def{{#3}}% + \bxjs@let@hchar@chr@ue#3#4% }} \let\bxjs@let@hchar@chr\bxjs@let@hchar@chr@pp \edef\jsc@JYn{\ifjsWithupTeX JY2\else JY1\fi} @@ -195,6 +195,9 @@ \bxjs@if@sf@default{% \renewcommand\kanjifamilydefault{\gtdefault}} \selectfont +\def\bxjs@parse@qh#1{\let\bxjs@tmpb\relax} +\let\bxjs@parse@qh@a\@undefined +\let\bxjs@parse@qh@b\@undefined \prebreakpenalty\jis"2147=10000 \postbreakpenalty\jis"2148=10000 \prebreakpenalty\jis"2149=10000 diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def index 721d7b14da7..66db17297bc 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \ProvidesFile{bxjsja-modern.def} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] \input{bxjsja-standard.def} \ifnum0\if x\jsEngine1\fi\if l\jsEngine1\fi=\z@ \def\encodingdefault{T1}% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def index 48778b0b716..781af49b0f9 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \ProvidesFile{bxjsja-pandoc.def} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] \input{bxjsja-standard.def} \RequirePackage{bxjspandoc} \@onlypreamble\bxjs@set@dupload@proc diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-standard.def index 2485dcf0910..8d3dadeede5 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} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] %% このファイルは日本語文字を含みます \input{bxjsja-minimal.def} \bxjs@simplejasetupfalse @@ -54,15 +54,22 @@ \PackageWarningNoLine\bxjs@clsname {Cannot support pTeX units (zw etc.), since\MessageBreak the package 'bxcalc' is too old}% + \bxjs@jp@unitsfalse \else \usepTeXunits \fi }{%else \PackageWarningNoLine\bxjs@clsname {Cannot support pTeX units (zw etc.), since\MessageBreak the package 'bxcalc' is unavailable}% + \bxjs@jp@unitsfalse } \fi \ifbxjs@jp@units +\def\bxjs@parse@qh#1{\let\bxjs@tmpb\relax} +\let\bxjs@parse@qh@a\@undefined +\let\bxjs@parse@qh@b\@undefined +\fi +\ifbxjs@jp@units \def\bxjs@let@lenexpr#1#2{% \edef#1{#2}% \expandafter\CUXParseExpr\expandafter#1\expandafter{#1}} @@ -90,36 +97,6 @@ \@tempdima\bxjs@truept \bxjs@invscale\@tempdima\jsScale \protected\edef\ascpt{\dimexpr\the\@tempdima\relax} \fi -\def\jsSetQHLength#1#2{% - \begingroup - \bxjs@parse@qh{#2}% - \ifx\bxjs@tmpb\relax \setlength\@tempdima{#2}% - \else \@tempdima\bxjs@tmpb\relax - \fi - \xdef\bxjs@g@tmpa{\the\@tempdima}% - \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 -\def\bxjs@parse@qh#1{% - \def\bxjs@tmpa{#1}\let\bxjs@tmpb\relax - \bxjs@parse@qh@a{trueQ}\trueQ - \bxjs@parse@qh@a{trueH}\trueH - \bxjs@parse@qh@a{Q}\jQ - \bxjs@parse@qh@a{H}\jH} -\def\bxjs@parse@qh@a#1#2{% - \ifx\bxjs@tmpb\relax - \def\bxjs@next##1#1\@nil##2\@nnil{\bxjs@parse@qh@b{##1}{##2}}% - \expandafter\bxjs@next\bxjs@tmpa\@nil#1\@nil\@nnil{#2}% - \fi} -\def\bxjs@parse@qh@b#1#2#3{% - \ifx\@nnil#2\@nnil\else \def\bxjs@tmpb{#1#3}\fi} -\fi\fi \def\jafontsize#1#2{% \begingroup \bxjs@jafontsize@a{#1}% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty index ad454c36832..e2396410491 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) \ProvidesPackage{bxjspandoc} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjsp@pkgname{bxjscjkcat} \let\bxjsp@engine=n diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls index 3d794a67c70..0081e761935 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls @@ -22,7 +22,7 @@ %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e} \ProvidesClass{bxjsreport} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjs@clsname{bxjsreport} \newif\ifjsc@needsp@tch @@ -94,6 +94,45 @@ \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname} \def\bxjs@catopt#1#2{% #1\if\relax#1\relax\else\if\relax#2\relax\else,\fi\fi#2} +\def\bxjs@ifplus#1{\@ifnextchar+{\@firstoftwo{#1}}} +\let\c@bxjs@tempcnta\@tempcnta +\def\bxjs@gset@tempcnta{\setcounter{bxjs@tempcnta}} +\def\jsSetQHLength#1#2{% + \begingroup + \bxjs@parse@qh{#2}% + \ifx\bxjs@tmpb\relax + \setlength\@tempdima{#2}% + \xdef\bxjs@g@tmpa{\the\@tempdima}% + \else \global\let\bxjs@g@tmpa\bxjs@tmpb + \fi + \endgroup + #1=\bxjs@g@tmpa\relax} +\if j\jsEngine \def\bxjs@parse@qh@all{zw,zh} +\else \def\bxjs@parse@qh@all{trueQ,trueH,Q,H,zw,zh} +\fi +\def\bxjs@parse@qh#1{% + \let\bxjs@tmpb\relax + \@for\bxjs@tmpa:=\bxjs@parse@qh@all\do{% + \ifx\bxjs@tmpb\relax + \edef\bxjs@next{{\bxjs@tmpa}{#1}}% + \expandafter\bxjs@parse@qh@a\csname bxjs@unit@\bxjs@tmpa\expandafter + \endcsname\bxjs@next + \fi}} +\def\bxjs@parse@qh@a#1#2#3{% + \def\bxjs@next##1#2\@nil##2\@nnil{\bxjs@parse@qh@b{##1}{##2}#1}% + \bxjs@next#3\@nil#2\@nil\@nnil} +\def\bxjs@parse@qh@b#1#2#3{% + \ifx\@nnil#2\@nnil\else + \ifx#3\relax + \ClassError\bxjs@clsname + {You cannot use '\bxjs@tmpa' here}{\@ehc}% + \def\bxjs@tmpb{0pt}% + \else + \@tempdimb#3\relax \@tempdimb#1\@tempdimb + \edef\bxjs@tmpb{\the\@tempdimb}% + \fi + \fi} + \def\bxjs@unit@Q{0.25mm}\let\bxjs@unit@H\bxjs@unit@Q \def\jsAtEndOfClass{% \expandafter\g@addto@macro\csname\bxjs@clsname.cls-h@@k\endcsname} \@onlypreamble\bxjs@restore@jltrcc @@ -153,30 +192,12 @@ \def\bxjs@param@basefontsize{10pt} \def\jsUnusualPtSize{-20} \def\bxjs@setbasefontsize#1{% - \bxjs@setbasefontlength\@tempdima{#1}% + \jsSetQHLength\@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} \newif\ifjsc@mag \newif\ifjsc@mag@xreal \DeclareOption{8pt}{\bxjs@setbasefontsize{8pt}} @@ -448,23 +469,18 @@ \def\bxjs@error@keyval#1#2{% \ClassError\bxjs@clsname {Invalid value '#2' for option #1}\@ehc} -\newif\ifbxjs@scaleset \def\jsScale{0.924715} -\define@key{bxjs}{base}{\bxjs@setbasefontsize{#1}} -\@onlypreamble\bxjs@do@opt@jbase -\let\bxjs@do@opt@jbase\relax -\define@key{bxjs}{jbase}{\bxjs@setjbasefontsize{#1}} -\def\bxjs@setjbasefontsize#1{% - \def\bxjs@do@opt@jbase{% - \bxjs@setbasefontlength\@tempdima{#1}% - \bxjs@invscale\@tempdima\jsScale - \bxjs@setbasefontsize{\@tempdima}}} +\define@key{bxjs}{base}{% + \edef\bxjs@base@opt{#1}% + \bxjs@setbasefontsize{#1}} +\define@key{bxjs}{fontsize}{\setkeys{bxjs}{base=#1}} +\define@key{bxjs}{jbase}{\edef\bxjs@jbase@opt{#1}} +\define@key{bxjs}{jafontsize}{\setkeys{bxjs}{jbase=#1}} \define@key{bxjs}{scale}{% - \bxjs@scalesettrue - \edef\jsScale{#1}} -\DeclareOption{noscale}{% - \bxjs@scalesettrue - \def\jsScale{1}} + \edef\bxjs@scale@opt{#1}% + \let\jsScale\bxjs@scale@opt} +\define@key{bxjs}{jsfontscale}{\setkeys{bxjs}{scale=#1}} +\DeclareOption{noscale}{\setkeys{bxjs}{scale=1}} \let\bxjs@param@mag\relax \define@key{bxjs}{mag}{\edef\bxjs@param@mag{#1}} \define@key{bxjs}{paper}{\edef\bxjs@param@paper{#1}} @@ -543,6 +559,10 @@ \bxjs@set@keyval{layout}{#1}{}} \define@key{bxjs}{textwidth-limit}{% \edef\bxjs@textwidth@limit{#1}} +\define@key{bxjs}{textwidth}{\edef\bxjs@textwidth@opt{#1}} +\define@key{bxjs}{line_length}{\setkeys{bxjs}{textwidth=#1}} +\define@key{bxjs}{number-of-lines}{\edef\bxjs@number@of@lines@opt{#1}} +\define@key{bxjs}{number_of_lines}{\setkeys{bxjs}{number-of-lines=#1}} \define@key{bxjs}{paragraph-mark}{% \edef\bxjs@paragraph@mark{#1}} \newif\ifbxjs@whole@zw@lines \bxjs@whole@zw@linestrue @@ -731,7 +751,23 @@ The default value 'nomag*' is used instead.\MessageBreak \@ehc} \fi \fi -\bxjs@do@opt@jbase +\ifx\bxjs@jbase@opt\@undefined\else + \ifx\bxjs@base@opt\@undefined + \jsSetQHLength\@tempdima{\bxjs@jbase@opt}% + \bxjs@invscale\@tempdima\jsScale + \bxjs@setbasefontsize{\@tempdima}% + \else + \ifx\bxjs@scale@opt\@undefined\else + \ClassWarningNoLine\bxjs@clsname + {Redundant 'scale' option is ignored}% + \fi + \jsSetQHLength\@tempdima{\bxjs@jbase@opt}% + \@tempdimb=\bxjs@param@basefontsize\relax + \edef\jsScale{\strip@pt\@tempdimb}% + \bxjs@invscale\@tempdima\jsScale + \edef\jsScale{\strip@pt\@tempdima}% + \fi +\fi \let\Cjascale\jsScale \if \if p\jsEngine T\else\if n\jsEngine T\else F\fi\fi T \@tempcnta="80 \loop \ifnum\@tempcnta<"100 @@ -768,8 +804,7 @@ \divide\@tempdima16384\relax \@tempcnta\@tempdima\relax \edef\bxjs@param@mag{\the\@tempcnta} \else - \let\c@bxjs@cnta\@tempcnta - \setcounter{bxjs@cnta}{\bxjs@param@mag} + \bxjs@gset@tempcnta{\bxjs@param@mag} \ifnum\@tempcnta<\z@ \@tempcnta=\z@ \fi \edef\bxjs@param@mag{\the\@tempcnta} \advance\@tempcnta100000 @@ -991,23 +1026,37 @@ \mag=\bxjs@param@mag \fi \setlength{\topskip}{10\p@?} +\def\bxjs@unit@trueQ{0.25truemm}\let\bxjs@unit@trueH\bxjs@unit@trueQ +\def\bxjs@unit@zw{\jsZw}\let\bxjs@unit@zh\bxjs@unit@zw \def\bxjs@read@a{\futurelet\bxjs@tmpa\bxjs@read@b} \def\bxjs@read@b{% \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@read@c \else \expandafter\bxjs@read@d \fi} -\def\bxjs@read@c#1#2#3\@nil{\def\bxjs@param@paper{papersize={#1,#2}}} -\def\bxjs@read@d#1\@nil{} -\expandafter\bxjs@read@a\bxjs@param@paper\@nil +\def\bxjs@read@c#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}} +\def\bxjs@read@d#1\@nil{\bxjs@read@e#1,,\@nil} +\def\bxjs@read@e#1,#2,#3\@nil{% + \ifx\@nil#3\@nil\else \edef\bxjs@param@paper{papersize={#1,#2}}\fi} +\expandafter\bxjs@read@a\bxjs@param@paper\@empty\@empty\@nil \edef\bxjs@layout@paper{% \ifjsc@mag truedimen,\fi \if@landscape landscape,\fi \bxjs@param@paper} -\def\bxjs@layout{% +\def\bxjs@layout@base{% headheight=\topskip,footskip=0.03367\paperheight,% headsep=\footskip-\topskip,includeheadfoot,% +} +\edef\bxjs@layout{\bxjs@layout@base hscale=0.76,hmarginratio=1:1,% vscale=0.83,vmarginratio=1:1,% } +\ifx\bxjs@textwidth@opt\@undefined\else + \jsSetQHLength\@tempdima{\bxjs@textwidth@opt} + \edef\bxjs@layout{\bxjs@layout width=\the\@tempdima,} +\fi +\ifx\bxjs@number@of@lines@opt\@undefined\else + \bxjs@gset@tempcnta{\bxjs@number@of@lines@opt} + \edef\bxjs@layout{\bxjs@layout lines=\the\@tempcnta,} +\fi \newdimen\fullwidth \def\bxjs@postproc@layout{% \ifx\bxjs@geometry@driver\relax\else @@ -1016,6 +1065,7 @@ \ifbxjs@whole@zw@lines \@tempdimb=\textwidth \if@twocolumn \@tempdima=2\Cwd \else \@tempdima=1\Cwd \fi + \advance\textwidth.005pt\relax \divide\textwidth\@tempdima \multiply\textwidth\@tempdima \advance\@tempdimb-\textwidth \advance\oddsidemargin 0.5\@tempdimb @@ -1024,6 +1074,7 @@ \fullwidth=\textwidth \@tempdimb=\textheight \advance\textheight-\topskip + \advance\textheight.005pt\relax \divide\textheight\baselineskip \multiply\textheight\baselineskip \advance\textheight\topskip \advance\@tempdimb-\textheight @@ -1045,11 +1096,10 @@ \edef\jsGeometryOptions{% \bxjs@layout@paper,\bxjs@layout} \ifx\bxjs@geometry\bxjs@geometry@class -\@onlypreamble\bxjs@revert -\let\bxjs@revert\@empty -\edef\bxjs@tmpa{\the\ht\strutbox} -\ht\strutbox=10\p@? -\g@addto@macro\bxjs@revert{\ht\strutbox=\bxjs@tmpa\relax} +\def\bxjs@geometry@guard@on{% + \edef\bxjs@gg@tmp{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt} +\def\bxjs@geometry@guard@off{% + \ht\strutbox=\bxjs@gg@tmp\relax} \ifbxjs@papersize \ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx \PassOptionsToPackage{dvipdfm}{geometry} @@ -1060,11 +1110,13 @@ \else \PassOptionsToPackage{driver=none}{geometry} \fi -\edef\bxjs@nxt{% - \noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}} \AtBeginDocument{\bxjs@pre@geometry@hook} \AtBeginDocument{\ImposeOldLuaTeXBehavior} -\bxjs@nxt \bxjs@revert +\bxjs@geometry@guard@on +\edef\bxjs@next{% + \noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}% +}\bxjs@next +\bxjs@geometry@guard@off \AtBeginDocument{\RevokeOldLuaTeXBehavior} \let\bxjs@geometry@driver\Gm@driver \bxjs@postproc@layout @@ -1087,14 +1139,23 @@ \fi \fi }{}} -\def\setpagelayout{\@ifstar - {\bxjs@reset@layout}{\bxjs@modify@layout}} -\def\bxjs@modify@layout#1{% - \edef\bxjs@nxt{\noexpand\geometry{#1,truedimen}}% - \bxjs@nxt\bxjs@postproc@layout} -\def\bxjs@reset@layout#1{% - \edef\bxjs@nxt{\noexpand\geometry{reset,\bxjs@layout@paper,#1,truedimen}}% - \bxjs@nxt\bxjs@postproc@layout} +\def\setpagelayout{% + \bxjs@ifplus{\bxjs@setpagelayout@a\tw@}{%else + \@ifstar{\bxjs@setpagelayout@a\@ne}{\bxjs@setpagelayout@a\z@}}} +\def\bxjs@setpagelayout@a#1#2{% + \ifcase#1% modify + \def\bxjs@next{\ifjsc@mag truedimen,\fi #2}% + \or% reset(*) + \def\bxjs@next{reset,\bxjs@layout@paper,#2}% + \or% semireset(+) + \def\bxjs@next{reset,\bxjs@layout@paper,\bxjs@layout@base,#2}% + \fi + \bxjs@geometry@guard@on + \edef\bxjs@next{% + \noexpand\geometry{\bxjs@next}% + }\bxjs@next + \bxjs@geometry@guard@off + \bxjs@postproc@layout} \else\ifx\bxjs@geometry\bxjs@geometry@user \AtBeginDocument{\bxjs@check@page@layout} \@onlypreamble\bxjs@check@page@layout @@ -1108,8 +1169,9 @@ \setlength{\textwidth}{6.5in}% \setlength{\textheight}{8in}} \let\bxjs@geometry@driver\relax -\def\setpagelayout{\@ifstar - {\bxjs@pagelayout@a}{\bxjs@pagelayout@a}} +\def\setpagelayout{% + \bxjs@ifplus{\bxjs@pagelayout@a}{%else + \@ifstar{\bxjs@pagelayout@a}{\bxjs@pagelayout@a}}} \def\bxjs@pagelayout@a#1{% \ClassError\bxjs@clsname {Command '\string\setpagelayout' is not supported,\MessageBreak @@ -1937,18 +1999,13 @@ \bxjs@oldfontcmd@list \ifx\@tempa\@empty\else \ClassWarningNoLine\bxjs@clsname - {Some old font commands were used in text\MessageBreak - (see the log file for detail)}% - \ClassInfo\bxjs@clsname {Some old font commands were used in text:\MessageBreak \space\@tempa\MessageBreak You should note, that since 1994 LaTeX2e provides a\MessageBreak new font selection scheme called NFSS2 with several\MessageBreak new, combinable font commands. The class provides\MessageBreak - the old font commands - only for compatibility% - \@gobble}% + the old font commands only for compatibility} \fi} \def\bxjs@warnoldfontcmd@kick@final{% \g@addto@macro\clearpage{\bxjs@warnoldfontcmd@final}} diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls index 211b0c71777..bd9d15db150 100644 --- a/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls +++ b/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls @@ -22,7 +22,7 @@ %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e} \ProvidesClass{bxjsslide} - [2018/02/04 v1.7c BXJS document classes] + [2018/03/03 v1.8 BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjs@clsname{bxjsslide} \newif\ifjsc@needsp@tch @@ -94,6 +94,45 @@ \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname} \def\bxjs@catopt#1#2{% #1\if\relax#1\relax\else\if\relax#2\relax\else,\fi\fi#2} +\def\bxjs@ifplus#1{\@ifnextchar+{\@firstoftwo{#1}}} +\let\c@bxjs@tempcnta\@tempcnta +\def\bxjs@gset@tempcnta{\setcounter{bxjs@tempcnta}} +\def\jsSetQHLength#1#2{% + \begingroup + \bxjs@parse@qh{#2}% + \ifx\bxjs@tmpb\relax + \setlength\@tempdima{#2}% + \xdef\bxjs@g@tmpa{\the\@tempdima}% + \else \global\let\bxjs@g@tmpa\bxjs@tmpb + \fi + \endgroup + #1=\bxjs@g@tmpa\relax} +\if j\jsEngine \def\bxjs@parse@qh@all{zw,zh} +\else \def\bxjs@parse@qh@all{trueQ,trueH,Q,H,zw,zh} +\fi +\def\bxjs@parse@qh#1{% + \let\bxjs@tmpb\relax + \@for\bxjs@tmpa:=\bxjs@parse@qh@all\do{% + \ifx\bxjs@tmpb\relax + \edef\bxjs@next{{\bxjs@tmpa}{#1}}% + \expandafter\bxjs@parse@qh@a\csname bxjs@unit@\bxjs@tmpa\expandafter + \endcsname\bxjs@next + \fi}} +\def\bxjs@parse@qh@a#1#2#3{% + \def\bxjs@next##1#2\@nil##2\@nnil{\bxjs@parse@qh@b{##1}{##2}#1}% + \bxjs@next#3\@nil#2\@nil\@nnil} +\def\bxjs@parse@qh@b#1#2#3{% + \ifx\@nnil#2\@nnil\else + \ifx#3\relax + \ClassError\bxjs@clsname + {You cannot use '\bxjs@tmpa' here}{\@ehc}% + \def\bxjs@tmpb{0pt}% + \else + \@tempdimb#3\relax \@tempdimb#1\@tempdimb + \edef\bxjs@tmpb{\the\@tempdimb}% + \fi + \fi} + \def\bxjs@unit@Q{0.25mm}\let\bxjs@unit@H\bxjs@unit@Q \def\jsAtEndOfClass{% \expandafter\g@addto@macro\csname\bxjs@clsname.cls-h@@k\endcsname} \@onlypreamble\bxjs@restore@jltrcc @@ -150,30 +189,12 @@ \def\bxjs@param@basefontsize{10pt} \def\jsUnusualPtSize{-20} \def\bxjs@setbasefontsize#1{% - \bxjs@setbasefontlength\@tempdima{#1}% + \jsSetQHLength\@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} \newif\ifjsc@mag \newif\ifjsc@mag@xreal \DeclareOption{8pt}{\bxjs@setbasefontsize{8pt}} @@ -442,23 +463,18 @@ \def\bxjs@error@keyval#1#2{% \ClassError\bxjs@clsname {Invalid value '#2' for option #1}\@ehc} -\newif\ifbxjs@scaleset \def\jsScale{0.924715} -\define@key{bxjs}{base}{\bxjs@setbasefontsize{#1}} -\@onlypreamble\bxjs@do@opt@jbase -\let\bxjs@do@opt@jbase\relax -\define@key{bxjs}{jbase}{\bxjs@setjbasefontsize{#1}} -\def\bxjs@setjbasefontsize#1{% - \def\bxjs@do@opt@jbase{% - \bxjs@setbasefontlength\@tempdima{#1}% - \bxjs@invscale\@tempdima\jsScale - \bxjs@setbasefontsize{\@tempdima}}} +\define@key{bxjs}{base}{% + \edef\bxjs@base@opt{#1}% + \bxjs@setbasefontsize{#1}} +\define@key{bxjs}{fontsize}{\setkeys{bxjs}{base=#1}} +\define@key{bxjs}{jbase}{\edef\bxjs@jbase@opt{#1}} +\define@key{bxjs}{jafontsize}{\setkeys{bxjs}{jbase=#1}} \define@key{bxjs}{scale}{% - \bxjs@scalesettrue - \edef\jsScale{#1}} -\DeclareOption{noscale}{% - \bxjs@scalesettrue - \def\jsScale{1}} + \edef\bxjs@scale@opt{#1}% + \let\jsScale\bxjs@scale@opt} +\define@key{bxjs}{jsfontscale}{\setkeys{bxjs}{scale=#1}} +\DeclareOption{noscale}{\setkeys{bxjs}{scale=1}} \let\bxjs@param@mag\relax \define@key{bxjs}{mag}{\edef\bxjs@param@mag{#1}} \define@key{bxjs}{paper}{\edef\bxjs@param@paper{#1}} @@ -535,6 +551,10 @@ \bxjs@set@keyval{layout}{#1}{}} \define@key{bxjs}{textwidth-limit}{% \edef\bxjs@textwidth@limit{#1}} +\define@key{bxjs}{textwidth}{\edef\bxjs@textwidth@opt{#1}} +\define@key{bxjs}{line_length}{\setkeys{bxjs}{textwidth=#1}} +\define@key{bxjs}{number-of-lines}{\edef\bxjs@number@of@lines@opt{#1}} +\define@key{bxjs}{number_of_lines}{\setkeys{bxjs}{number-of-lines=#1}} \define@key{bxjs}{paragraph-mark}{% \edef\bxjs@paragraph@mark{#1}} \newif\ifbxjs@whole@zw@lines \bxjs@whole@zw@linestrue @@ -723,7 +743,23 @@ The default value 'nomag*' is used instead.\MessageBreak \@ehc} \fi \fi -\bxjs@do@opt@jbase +\ifx\bxjs@jbase@opt\@undefined\else + \ifx\bxjs@base@opt\@undefined + \jsSetQHLength\@tempdima{\bxjs@jbase@opt}% + \bxjs@invscale\@tempdima\jsScale + \bxjs@setbasefontsize{\@tempdima}% + \else + \ifx\bxjs@scale@opt\@undefined\else + \ClassWarningNoLine\bxjs@clsname + {Redundant 'scale' option is ignored}% + \fi + \jsSetQHLength\@tempdima{\bxjs@jbase@opt}% + \@tempdimb=\bxjs@param@basefontsize\relax + \edef\jsScale{\strip@pt\@tempdimb}% + \bxjs@invscale\@tempdima\jsScale + \edef\jsScale{\strip@pt\@tempdima}% + \fi +\fi \let\Cjascale\jsScale \if \if p\jsEngine T\else\if n\jsEngine T\else F\fi\fi T \@tempcnta="80 \loop \ifnum\@tempcnta<"100 @@ -759,8 +795,7 @@ \divide\@tempdima16384\relax \@tempcnta\@tempdima\relax \edef\bxjs@param@mag{\the\@tempcnta} \else - \let\c@bxjs@cnta\@tempcnta - \setcounter{bxjs@cnta}{\bxjs@param@mag} + \bxjs@gset@tempcnta{\bxjs@param@mag} \ifnum\@tempcnta<\z@ \@tempcnta=\z@ \fi \edef\bxjs@param@mag{\the\@tempcnta} \advance\@tempcnta100000 @@ -982,22 +1017,36 @@ \mag=\bxjs@param@mag \fi \setlength{\topskip}{10\p@?} +\def\bxjs@unit@trueQ{0.25truemm}\let\bxjs@unit@trueH\bxjs@unit@trueQ +\def\bxjs@unit@zw{\jsZw}\let\bxjs@unit@zh\bxjs@unit@zw \def\bxjs@read@a{\futurelet\bxjs@tmpa\bxjs@read@b} \def\bxjs@read@b{% \ifx\bxjs@tmpa\bgroup \expandafter\bxjs@read@c \else \expandafter\bxjs@read@d \fi} -\def\bxjs@read@c#1#2#3\@nil{\def\bxjs@param@paper{papersize={#1,#2}}} -\def\bxjs@read@d#1\@nil{} -\expandafter\bxjs@read@a\bxjs@param@paper\@nil +\def\bxjs@read@c#1#2#3\@nil{\edef\bxjs@param@paper{papersize={#1,#2}}} +\def\bxjs@read@d#1\@nil{\bxjs@read@e#1,,\@nil} +\def\bxjs@read@e#1,#2,#3\@nil{% + \ifx\@nil#3\@nil\else \edef\bxjs@param@paper{papersize={#1,#2}}\fi} +\expandafter\bxjs@read@a\bxjs@param@paper\@empty\@empty\@nil \edef\bxjs@layout@paper{% \ifjsc@mag truedimen,\fi \if@landscape landscape,\fi \bxjs@param@paper} -\def\bxjs@layout{% +\def\bxjs@layout@base{% noheadfoot,% +} +\edef\bxjs@layout{\bxjs@layout@base hscale=0.9,hmarginratio=1:1,% vscale=0.944,vmarginratio=1:1,% } +\ifx\bxjs@textwidth@opt\@undefined\else + \jsSetQHLength\@tempdima{\bxjs@textwidth@opt} + \edef\bxjs@layout{\bxjs@layout width=\the\@tempdima,} +\fi +\ifx\bxjs@number@of@lines@opt\@undefined\else + \bxjs@gset@tempcnta{\bxjs@number@of@lines@opt} + \edef\bxjs@layout{\bxjs@layout lines=\the\@tempcnta,} +\fi \newdimen\fullwidth \def\bxjs@postproc@layout{% \ifx\bxjs@geometry@driver\relax\else @@ -1006,6 +1055,7 @@ \ifbxjs@whole@zw@lines \@tempdimb=\textwidth \if@twocolumn \@tempdima=2\Cwd \else \@tempdima=1\Cwd \fi + \advance\textwidth.005pt\relax \divide\textwidth\@tempdima \multiply\textwidth\@tempdima \advance\@tempdimb-\textwidth \advance\oddsidemargin 0.5\@tempdimb @@ -1014,6 +1064,7 @@ \fullwidth=\textwidth \@tempdimb=\textheight \advance\textheight-\topskip + \advance\textheight.005pt\relax \divide\textheight\baselineskip \multiply\textheight\baselineskip \advance\textheight\topskip \advance\@tempdimb-\textheight @@ -1035,11 +1086,10 @@ \edef\jsGeometryOptions{% \bxjs@layout@paper,\bxjs@layout} \ifx\bxjs@geometry\bxjs@geometry@class -\@onlypreamble\bxjs@revert -\let\bxjs@revert\@empty -\edef\bxjs@tmpa{\the\ht\strutbox} -\ht\strutbox=10\p@? -\g@addto@macro\bxjs@revert{\ht\strutbox=\bxjs@tmpa\relax} +\def\bxjs@geometry@guard@on{% + \edef\bxjs@gg@tmp{\the\ht\strutbox}\ht\strutbox=10\jsc@mpt} +\def\bxjs@geometry@guard@off{% + \ht\strutbox=\bxjs@gg@tmp\relax} \ifbxjs@papersize \ifx\bxjs@driver@given\bxjs@driver@@dvipdfmx \PassOptionsToPackage{dvipdfm}{geometry} @@ -1050,11 +1100,13 @@ \else \PassOptionsToPackage{driver=none}{geometry} \fi -\edef\bxjs@nxt{% - \noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}} \AtBeginDocument{\bxjs@pre@geometry@hook} \AtBeginDocument{\ImposeOldLuaTeXBehavior} -\bxjs@nxt \bxjs@revert +\bxjs@geometry@guard@on +\edef\bxjs@next{% + \noexpand\RequirePackage[\bxjs@layout@paper,\bxjs@layout]{geometry}% +}\bxjs@next +\bxjs@geometry@guard@off \AtBeginDocument{\RevokeOldLuaTeXBehavior} \let\bxjs@geometry@driver\Gm@driver \bxjs@postproc@layout @@ -1077,14 +1129,23 @@ \fi \fi }{}} -\def\setpagelayout{\@ifstar - {\bxjs@reset@layout}{\bxjs@modify@layout}} -\def\bxjs@modify@layout#1{% - \edef\bxjs@nxt{\noexpand\geometry{#1,truedimen}}% - \bxjs@nxt\bxjs@postproc@layout} -\def\bxjs@reset@layout#1{% - \edef\bxjs@nxt{\noexpand\geometry{reset,\bxjs@layout@paper,#1,truedimen}}% - \bxjs@nxt\bxjs@postproc@layout} +\def\setpagelayout{% + \bxjs@ifplus{\bxjs@setpagelayout@a\tw@}{%else + \@ifstar{\bxjs@setpagelayout@a\@ne}{\bxjs@setpagelayout@a\z@}}} +\def\bxjs@setpagelayout@a#1#2{% + \ifcase#1% modify + \def\bxjs@next{\ifjsc@mag truedimen,\fi #2}% + \or% reset(*) + \def\bxjs@next{reset,\bxjs@layout@paper,#2}% + \or% semireset(+) + \def\bxjs@next{reset,\bxjs@layout@paper,\bxjs@layout@base,#2}% + \fi + \bxjs@geometry@guard@on + \edef\bxjs@next{% + \noexpand\geometry{\bxjs@next}% + }\bxjs@next + \bxjs@geometry@guard@off + \bxjs@postproc@layout} \else\ifx\bxjs@geometry\bxjs@geometry@user \AtBeginDocument{\bxjs@check@page@layout} \@onlypreamble\bxjs@check@page@layout @@ -1098,8 +1159,9 @@ \setlength{\textwidth}{6.5in}% \setlength{\textheight}{8in}} \let\bxjs@geometry@driver\relax -\def\setpagelayout{\@ifstar - {\bxjs@pagelayout@a}{\bxjs@pagelayout@a}} +\def\setpagelayout{% + \bxjs@ifplus{\bxjs@pagelayout@a}{%else + \@ifstar{\bxjs@pagelayout@a}{\bxjs@pagelayout@a}}} \def\bxjs@pagelayout@a#1{% \ClassError\bxjs@clsname {Command '\string\setpagelayout' is not supported,\MessageBreak @@ -1829,18 +1891,13 @@ \bxjs@oldfontcmd@list \ifx\@tempa\@empty\else \ClassWarningNoLine\bxjs@clsname - {Some old font commands were used in text\MessageBreak - (see the log file for detail)}% - \ClassInfo\bxjs@clsname {Some old font commands were used in text:\MessageBreak \space\@tempa\MessageBreak You should note, that since 1994 LaTeX2e provides a\MessageBreak new font selection scheme called NFSS2 with several\MessageBreak new, combinable font commands. The class provides\MessageBreak - the old font commands - only for compatibility% - \@gobble}% + the old font commands only for compatibility} \fi} \def\bxjs@warnoldfontcmd@kick@final{% \g@addto@macro\clearpage{\bxjs@warnoldfontcmd@final}} |