From b5dbda049c2bf74cc5506b25d92d7c03fb8cdc6a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 12 Feb 2018 22:55:46 +0000 Subject: bxjscls (12feb18) git-svn-id: svn://tug.org/texlive/trunk@46612 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/bxjscls/bxjsarticle.cls | 47 ++++++++++++++++++---- Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls | 29 +++++++++++-- Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty | 2 +- Master/texmf-dist/tex/latex/bxjscls/bxjscompat.sty | 2 +- .../tex/latex/bxjscls/bxjsja-minimal.def | 2 +- .../texmf-dist/tex/latex/bxjscls/bxjsja-modern.def | 2 +- .../texmf-dist/tex/latex/bxjscls/bxjsja-pandoc.def | 2 +- .../tex/latex/bxjscls/bxjsja-standard.def | 20 ++++++--- Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty | 2 +- Master/texmf-dist/tex/latex/bxjscls/bxjsreport.cls | 29 +++++++++++-- Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls | 47 ++++++++++++++++++---- 11 files changed, 149 insertions(+), 35 deletions(-) (limited to 'Master/texmf-dist/tex/latex/bxjscls') diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsarticle.cls index 710ebf42235..99867ff3506 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjs@clsname{bxjsarticle} \newif\ifjsc@needsp@tch @@ -566,6 +566,14 @@ \def\bxjs@kv@everyparhook@compat{\let\bxjs@everyparhook\bxjs@everyparhook@compat} \def\bxjs@kv@everyparhook@modern{\let\bxjs@everyparhook\bxjs@everyparhook@modern} \define@key{bxjs}{everyparhook}{\bxjs@set@keyval{everyparhook}{#1}{}} +\chardef\bxjs@label@section@none=0 +\chardef\bxjs@label@section@compat=1 +\chardef\bxjs@label@section@modern=2 +\let\bxjs@label@section\bxjs@label@section@compat +\def\bxjs@kv@labelsection@none{\let\bxjs@label@section\bxjs@label@section@none} +\def\bxjs@kv@labelsection@compat{\let\bxjs@label@section\bxjs@label@section@compat} +\def\bxjs@kv@labelsection@modern{\let\bxjs@label@section\bxjs@label@section@modern} +\define@key{bxjs}{label-section}{\bxjs@set@keyval{labelsection}{#1}{}} \let\bxjs@ltx@removeelement\@removeelement \def\@removeelement#1#2#3{% \def\reserved@a{#2}% @@ -1163,10 +1171,10 @@ \hbox to \fullwidth{{\rightmark}\hfil\textbf{\thepage}}}\hss}% \let\@mkboth\markboth \def\sectionmark##1{\markboth{% - \ifnum \c@secnumdepth >\z@ \thesection \hskip1\jsZw\fi + \ifnum \c@secnumdepth >\z@ \bxjs@label@sect{section}\hskip1\jsZw\fi ##1}{}}% \def\subsectionmark##1{\markright{% - \ifnum \c@secnumdepth >\@ne \thesubsection \hskip1\jsZw\fi + \ifnum \c@secnumdepth >\@ne \bxjs@label@sect{subsection}\hskip1\jsZw\fi ##1}}% } \else % if not twoside @@ -1177,7 +1185,7 @@ \hbox to \fullwidth{{\rightmark}\hfil\textbf{\thepage}}}\hss}% \let\@mkboth\markboth \def\sectionmark##1{\markright{% - \ifnum \c@secnumdepth >\z@ \thesection \hskip1\jsZw\fi + \ifnum \c@secnumdepth >\z@ \bxjs@label@sect{section}\hskip1\jsZw\fi ##1}}} \fi \def\ps@myheadings{% @@ -1328,6 +1336,19 @@ \ifvoid\@abstractbox\else\centerline{\box\@abstractbox}\vskip1.5em\fi } \fi +\def\bxjs@label@sect#1{% + \expandafter\ifx\csname label#1\endcsname\relax + \csname the#1\endcsname + \else \csname label#1\endcsname + \fi} +\def\@seccntformat#1{\bxjs@label@sect{#1}\quad} +\ifnum\bxjs@label@section=\bxjs@label@section@compat\else +\def\@secapp{\presectionname} +\def\@secpos{\postsectionname} +\fi +\ifnum\bxjs@label@section=\bxjs@label@section@modern +\def\labelsection{\@secapp\thesection\@secpos} +\fi \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi \par @@ -1371,7 +1392,7 @@ \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% + \protect\numberline{\bxjs@label@sect{#1}}% \fi #7}}% 目次にフルネームを載せるなら #8 \else @@ -1384,7 +1405,7 @@ \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% + \protect\numberline{\bxjs@label@sect{#1}}% \fi #7}% 目次にフルネームを載せるならここは #8 \fi @@ -1440,9 +1461,13 @@ \newcounter{paragraph}[subsubsection] \newcounter{subparagraph}[paragraph] \renewcommand{\thepart}{\@Roman\c@part} -% \renewcommand{\thesection}{\@arabic\c@section} +\ifnum\bxjs@label@section=\bxjs@label@section@compat \renewcommand{\thesection}{\presectionname\@arabic\c@section\postsectionname} \renewcommand{\thesubsection}{\@arabic\c@section.\@arabic\c@subsection} +\else +\renewcommand{\thesection}{\@arabic\c@section} +\renewcommand{\thesubsection}{\thesection.\@arabic\c@subsection} +\fi \renewcommand{\thesubsubsection}{% \thesubsection.\@arabic\c@subsubsection} \renewcommand{\theparagraph}{% @@ -1710,10 +1735,16 @@ \newcommand{\appendix}{\par \setcounter{section}{0}% \setcounter{subsection}{0}% + \ifnum\bxjs@label@section=\bxjs@label@section@compat \gdef\presectionname{\appendixname}% \gdef\postsectionname{}% \gdef\thesection{\presectionname\@Alph\c@section\postsectionname}% - \gdef\thesubsection{\@Alph\c@section.\@arabic\c@subsection}} + \gdef\thesubsection{\@Alph\c@section.\@arabic\c@subsection}% + \else + \gdef\@secapp{\appendixname}% + \gdef\@secpos{}% + \gdef\thesection{\@Alph\c@section}% + \fi} \setlength\arraycolsep{5\p@?} \setlength\tabcolsep{6\p@?} \setlength\arrayrulewidth{.4\p@} diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsbook.cls index 2c810c8d032..c1b656e1aaf 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjs@clsname{bxjsbook} \newif\ifjsc@needsp@tch @@ -575,6 +575,14 @@ \def\bxjs@kv@everyparhook@compat{\let\bxjs@everyparhook\bxjs@everyparhook@compat} \def\bxjs@kv@everyparhook@modern{\let\bxjs@everyparhook\bxjs@everyparhook@modern} \define@key{bxjs}{everyparhook}{\bxjs@set@keyval{everyparhook}{#1}{}} +\chardef\bxjs@label@section@none=0 +\chardef\bxjs@label@section@compat=1 +\chardef\bxjs@label@section@modern=2 +\let\bxjs@label@section\bxjs@label@section@compat +\def\bxjs@kv@labelsection@none{\let\bxjs@label@section\bxjs@label@section@none} +\def\bxjs@kv@labelsection@compat{\let\bxjs@label@section\bxjs@label@section@compat} +\def\bxjs@kv@labelsection@modern{\let\bxjs@label@section\bxjs@label@section@modern} +\define@key{bxjs}{label-section}{\bxjs@set@keyval{labelsection}{#1}{}} \let\bxjs@ltx@removeelement\@removeelement \def\@removeelement#1#2#3{% \def\reserved@a{#2}% @@ -1206,7 +1214,7 @@ \fi ##1}{}}% \def\sectionmark##1{\markright{% - \ifnum \c@secnumdepth >\z@ \thesection \hskip1\jsZw\fi + \ifnum \c@secnumdepth >\z@ \bxjs@label@sect{section}\hskip1\jsZw\fi ##1}}}% \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty @@ -1355,6 +1363,19 @@ \par\vskip 1.5em } \fi +\def\bxjs@label@sect#1{% + \expandafter\ifx\csname label#1\endcsname\relax + \csname the#1\endcsname + \else \csname label#1\endcsname + \fi} +\def\@seccntformat#1{\bxjs@label@sect{#1}\quad} +\ifnum\bxjs@label@section=\bxjs@label@section@compat\else +\def\@secapp{\presectionname} +\def\@secpos{\postsectionname} +\fi +\ifnum\bxjs@label@section=\bxjs@label@section@modern +\def\labelsection{\@secapp\thesection\@secpos} +\fi \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi \par @@ -1398,7 +1419,7 @@ \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% + \protect\numberline{\bxjs@label@sect{#1}}% \fi #7}}% 目次にフルネームを載せるなら #8 \else @@ -1411,7 +1432,7 @@ \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% + \protect\numberline{\bxjs@label@sect{#1}}% \fi #7}% 目次にフルネームを載せるならここは #8 \fi diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjscjkcat.sty index 2e167e1a0ef..24395431610 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c 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 d314fb6f334..619c62af509 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c 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 a6ea021beac..f9d90b5ce1a 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c BXJS document classes] %% このファイルは日本語文字を含みます \def\DeclareJaTextFontCommand#1#2{% \DeclareRobustCommand#1[1]{% diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def b/Master/texmf-dist/tex/latex/bxjscls/bxjsja-modern.def index 88fd3452075..721d7b14da7 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c 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 1ceba42b7e7..48778b0b716 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c 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 ef8c0b5989b..2485dcf0910 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c BXJS document classes] %% このファイルは日本語文字を含みます \input{bxjsja-minimal.def} \bxjs@simplejasetupfalse @@ -44,7 +44,10 @@ \g@addto@macro\@classoptionslist{,jis2004} \PassOptionsToPackage{jis2004}{otf} \fi -\ifbxjs@jp@units\if j\jsEngine\else +\if j\jsEngine + \bxjs@jp@unitsfalse +\fi +\ifbxjs@jp@units \IfFileExists{bxcalc.sty}{% \RequirePackage{bxcalc}[2018/01/28]%v1.0a \ifx\usepTeXunits\@undefined @@ -58,7 +61,14 @@ {Cannot support pTeX units (zw etc.), since\MessageBreak the package 'bxcalc' is unavailable}% } -\fi\fi +\fi +\ifbxjs@jp@units + \def\bxjs@let@lenexpr#1#2{% + \edef#1{#2}% + \expandafter\CUXParseExpr\expandafter#1\expandafter{#1}} +\else + \def\bxjs@let@lenexpr{\edef} +\fi \ifjsWitheTeX \@tempdima=0.25mm \protected\edef\jQ{\dimexpr\the\@tempdima\relax} @@ -124,7 +134,7 @@ \@defaultunits\@tempdima\bxjs@tmpb pt\relax\@nnil} \def\bxjs@kanjiskip{0pt} \newcommand*\setkanjiskip[1]{% - \edef\bxjs@kanjiskip{#1}% + \bxjs@let@lenexpr\bxjs@kanjiskip{#1}% \bxjs@reset@kanjiskip} \newcommand*\getkanjiskip{% \bxjs@kanjiskip} @@ -143,7 +153,7 @@ \bxjs@apply@kanjiskip} \def\bxjs@xkanjiskip{0pt} \newcommand*\setxkanjiskip[1]{% - \edef\bxjs@xkanjiskip{#1}% + \bxjs@let@lenexpr\bxjs@xkanjiskip{#1}% \bxjs@reset@xkanjiskip} \newcommand*\getxkanjiskip{% \bxjs@xkanjiskip} diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty b/Master/texmf-dist/tex/latex/bxjscls/bxjspandoc.sty index da67cf9921c..ad454c36832 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c 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 a559b5dab58..3d794a67c70 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjs@clsname{bxjsreport} \newif\ifjsc@needsp@tch @@ -574,6 +574,14 @@ \def\bxjs@kv@everyparhook@compat{\let\bxjs@everyparhook\bxjs@everyparhook@compat} \def\bxjs@kv@everyparhook@modern{\let\bxjs@everyparhook\bxjs@everyparhook@modern} \define@key{bxjs}{everyparhook}{\bxjs@set@keyval{everyparhook}{#1}{}} +\chardef\bxjs@label@section@none=0 +\chardef\bxjs@label@section@compat=1 +\chardef\bxjs@label@section@modern=2 +\let\bxjs@label@section\bxjs@label@section@compat +\def\bxjs@kv@labelsection@none{\let\bxjs@label@section\bxjs@label@section@none} +\def\bxjs@kv@labelsection@compat{\let\bxjs@label@section\bxjs@label@section@compat} +\def\bxjs@kv@labelsection@modern{\let\bxjs@label@section\bxjs@label@section@modern} +\define@key{bxjs}{label-section}{\bxjs@set@keyval{labelsection}{#1}{}} \let\bxjs@ltx@removeelement\@removeelement \def\@removeelement#1#2#3{% \def\reserved@a{#2}% @@ -1188,7 +1196,7 @@ \fi ##1}{}}% \def\sectionmark##1{\markright{% - \ifnum \c@secnumdepth >\z@ \thesection \hskip1\jsZw\fi + \ifnum \c@secnumdepth >\z@ \bxjs@label@sect{section}\hskip1\jsZw\fi ##1}}}% \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty @@ -1337,6 +1345,19 @@ \par\vskip 1.5em } \fi +\def\bxjs@label@sect#1{% + \expandafter\ifx\csname label#1\endcsname\relax + \csname the#1\endcsname + \else \csname label#1\endcsname + \fi} +\def\@seccntformat#1{\bxjs@label@sect{#1}\quad} +\ifnum\bxjs@label@section=\bxjs@label@section@compat\else +\def\@secapp{\presectionname} +\def\@secpos{\postsectionname} +\fi +\ifnum\bxjs@label@section=\bxjs@label@section@modern +\def\labelsection{\@secapp\thesection\@secpos} +\fi \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi \par @@ -1380,7 +1401,7 @@ \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% + \protect\numberline{\bxjs@label@sect{#1}}% \fi #7}}% 目次にフルネームを載せるなら #8 \else @@ -1393,7 +1414,7 @@ \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% + \protect\numberline{\bxjs@label@sect{#1}}% \fi #7}% 目次にフルネームを載せるならここは #8 \fi diff --git a/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls b/Master/texmf-dist/tex/latex/bxjscls/bxjsslide.cls index da673d9f45b..211b0c71777 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/01/28 v1.7b BXJS document classes] + [2018/02/04 v1.7c BXJS document classes] %% このファイルは日本語文字を含みます. \def\bxjs@clsname{bxjsslide} \newif\ifjsc@needsp@tch @@ -566,6 +566,14 @@ \def\bxjs@kv@everyparhook@compat{\let\bxjs@everyparhook\bxjs@everyparhook@compat} \def\bxjs@kv@everyparhook@modern{\let\bxjs@everyparhook\bxjs@everyparhook@modern} \define@key{bxjs}{everyparhook}{\bxjs@set@keyval{everyparhook}{#1}{}} +\chardef\bxjs@label@section@none=0 +\chardef\bxjs@label@section@compat=1 +\chardef\bxjs@label@section@modern=2 +\let\bxjs@label@section\bxjs@label@section@compat +\def\bxjs@kv@labelsection@none{\let\bxjs@label@section\bxjs@label@section@none} +\def\bxjs@kv@labelsection@compat{\let\bxjs@label@section\bxjs@label@section@compat} +\def\bxjs@kv@labelsection@modern{\let\bxjs@label@section\bxjs@label@section@modern} +\define@key{bxjs}{label-section}{\bxjs@set@keyval{labelsection}{#1}{}} \let\bxjs@ltx@removeelement\@removeelement \def\@removeelement#1#2#3{% \def\reserved@a{#2}% @@ -1161,10 +1169,10 @@ \hbox to \fullwidth{{\rightmark}\hfil\textbf{\thepage}}}\hss}% \let\@mkboth\markboth \def\sectionmark##1{\markboth{% - \ifnum \c@secnumdepth >\z@ \thesection \hskip1\jsZw\fi + \ifnum \c@secnumdepth >\z@ \bxjs@label@sect{section}\hskip1\jsZw\fi ##1}{}}% \def\subsectionmark##1{\markright{% - \ifnum \c@secnumdepth >\@ne \thesubsection \hskip1\jsZw\fi + \ifnum \c@secnumdepth >\@ne \bxjs@label@sect{subsection}\hskip1\jsZw\fi ##1}}% } \else % if not twoside @@ -1175,7 +1183,7 @@ \hbox to \fullwidth{{\rightmark}\hfil\textbf{\thepage}}}\hss}% \let\@mkboth\markboth \def\sectionmark##1{\markright{% - \ifnum \c@secnumdepth >\z@ \thesection \hskip1\jsZw\fi + \ifnum \c@secnumdepth >\z@ \bxjs@label@sect{section}\hskip1\jsZw\fi ##1}}} \fi \def\ps@myheadings{% @@ -1326,6 +1334,19 @@ \ifvoid\@abstractbox\else\centerline{\box\@abstractbox}\vskip1.5em\fi } \fi +\def\bxjs@label@sect#1{% + \expandafter\ifx\csname label#1\endcsname\relax + \csname the#1\endcsname + \else \csname label#1\endcsname + \fi} +\def\@seccntformat#1{\bxjs@label@sect{#1}\quad} +\ifnum\bxjs@label@section=\bxjs@label@section@compat\else +\def\@secapp{\presectionname} +\def\@secpos{\postsectionname} +\fi +\ifnum\bxjs@label@section=\bxjs@label@section@modern +\def\labelsection{\@secapp\thesection\@secpos} +\fi \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi \par @@ -1369,7 +1390,7 @@ \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% + \protect\numberline{\bxjs@label@sect{#1}}% \fi #7}}% 目次にフルネームを載せるなら #8 \else @@ -1382,7 +1403,7 @@ \csname #1mark\endcsname{#7}% \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else - \protect\numberline{\csname the#1\endcsname}% + \protect\numberline{\bxjs@label@sect{#1}}% \fi #7}% 目次にフルネームを載せるならここは #8 \fi @@ -1438,9 +1459,13 @@ \newcounter{paragraph}[subsubsection] \newcounter{subparagraph}[paragraph] \renewcommand{\thepart}{\@Roman\c@part} -% \renewcommand{\thesection}{\@arabic\c@section} +\ifnum\bxjs@label@section=\bxjs@label@section@compat \renewcommand{\thesection}{\presectionname\@arabic\c@section\postsectionname} \renewcommand{\thesubsection}{\@arabic\c@section.\@arabic\c@subsection} +\else +\renewcommand{\thesection}{\@arabic\c@section} +\renewcommand{\thesubsection}{\thesection.\@arabic\c@subsection} +\fi \renewcommand{\thesubsubsection}{% \thesubsection.\@arabic\c@subsubsection} \renewcommand{\theparagraph}{% @@ -1708,10 +1733,16 @@ \newcommand{\appendix}{\par \setcounter{section}{0}% \setcounter{subsection}{0}% + \ifnum\bxjs@label@section=\bxjs@label@section@compat \gdef\presectionname{\appendixname}% \gdef\postsectionname{}% \gdef\thesection{\presectionname\@Alph\c@section\postsectionname}% - \gdef\thesubsection{\@Alph\c@section.\@arabic\c@subsection}} + \gdef\thesubsection{\@Alph\c@section.\@arabic\c@subsection}% + \else + \gdef\@secapp{\appendixname}% + \gdef\@secpos{}% + \gdef\thesection{\@Alph\c@section}% + \fi} \setlength\arraycolsep{5\p@?} \setlength\tabcolsep{6\p@?} \setlength\arrayrulewidth{.4\p@} -- cgit v1.2.3