X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fltjtbook.cls;h=328fd0ffc4d96a24995808f7c078c0ea3b3d54b5;hb=26142dfa8cafe366a32dff1459c8f0f4c60c83d3;hp=67c83d1c1aef6b91c8795e520392ca6132c39911;hpb=139371e5795ecb383bf072fa2376ca4db9d5fc73;p=luatex-ja%2Fluatexja.git diff --git a/src/ltjtbook.cls b/src/ltjtbook.cls index 67c83d1..328fd0f 100644 --- a/src/ltjtbook.cls +++ b/src/ltjtbook.cls @@ -21,9 +21,10 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% File: ltjclasses.dtx + \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ltjtbook} - [2018/01/13 v1.7h-ltj-15 + [2019/08/12 v1.8b-ltj-17 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -143,8 +144,6 @@ \if@compatibility \@mathrmmctrue \else - \DeclareOption{disablejfam}{% - \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}} \DeclareOption{mathrmmc}{\@mathrmmctrue} \fi \DeclareOption{draft}{\setlength\overfullrule{5pt}} @@ -158,6 +157,7 @@ \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.962216] \ltj@stdgtfont:jfm=min;jfmvar=goth}{} \ltjglobalsetparameter{differentjfm=both} \directlua{luatexbase.remove_from_callback('luatexja.load_jfm', 'ltj.jclasses_load_jfm')} +\DeclareOption{disablejfam}{} \ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright,tate} \ProcessOptions\relax \input{ltjtbk1\@ptsize.clo} @@ -260,9 +260,9 @@ \let\@mkboth\markboth \def\chaptermark##1{\markboth{% \ifnum \c@secnumdepth >\m@ne - \if@mainmatter + \if@mainmatter \@chapapp\thechapter\@chappos\hskip1\zw - \fi + \fi \fi ##1}{}}% \def\sectionmark##1{\markright{% @@ -276,9 +276,9 @@ \let\@mkboth\markboth \def\chaptermark##1{\markright{% \ifnum \c@secnumdepth >\m@ne - \if@mainmatter + \if@mainmatter \@chapapp\thechapter\@chappos\hskip1\zw - \fi + \fi \fi ##1}}% } @@ -292,9 +292,9 @@ \let\@mkboth\markboth \def\chaptermark##1{\markboth{% \ifnum \c@secnumdepth >\m@ne - \if@mainmatter + \if@mainmatter \@chapapp\thechapter\@chappos\hskip1\zw - \fi + \fi \fi ##1}{}}% \def\sectionmark##1{\markright{% @@ -308,9 +308,9 @@ \let\@mkboth\markboth \def\chaptermark##1{\markright{% \ifnum \c@secnumdepth >\m@ne - \if@mainmatter + \if@mainmatter \@chapapp\thechapter\@chappos\hskip1\zw - \fi + \fi \fi ##1}}% } @@ -326,7 +326,7 @@ \if@compatibility \newenvironment{titlepage} {% - \cleardoublepage + \cleardoublepage \if@twocolumn\@restonecoltrue\onecolumn \else\@restonecolfalse\newpage\fi \thispagestyle{empty}% @@ -741,6 +741,7 @@ \@addtoreset{equation}{chapter} \renewcommand{\theequation}{% \ifnum\c@chapter>\z@\thechapter.\fi \@arabic\c@equation} +\unless\ifltj@disablejfam \if@compatibility\else \DeclareSymbolFont{mincho}{JY3}{mc}{m}{n} \DeclareSymbolFontAlphabet{\mathmc}{mincho} @@ -754,6 +755,7 @@ \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt} }% \fi +\fi \DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc} \DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} @@ -788,12 +790,14 @@ \hb@xt@\@pnumwidth{\hss\normalfont \normalcolor #5}% \par}% \fi} +\providecommand*\protected@file@percent{} \def\addcontentsline#1#2#3{% \protected@write\@auxout {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble -\@temptokena{\rensuji{\thepage}}}% + \@temptokena{\rensuji{\thepage}}}% {\string\@writefile{#1}% - {\protect\contentsline{#2}{#3}{\the\@temptokena}}}% + {\protect\contentsline{#2}{#3}{\the\@temptokena}% +\protected@file@percent}}% } \newcommand{\tableofcontents}{% \if@twocolumn\@restonecoltrue\onecolumn @@ -897,31 +901,40 @@ \@addtoreset{footnote}{chapter} \newcommand\@makefntext[1]{\parindent 1\zw \noindent\hb@xt@ 2\zw{\hss\@makefnmark}#1} -\newif\if西暦 \西暦false +\newif\if西暦 \西暦true \def\西暦{\西暦true} \def\和暦{\西暦false} \newcount\heisei \heisei\year \advance\heisei-1988\relax -\def\today{{% - \ifnum\ltjgetparameter{direction}=3 - \if西暦 - \kansuji\year 年 - \kansuji\month 月 - \kansuji\day 日 +\def\pltx@today@year@#1{% + \ifnum\numexpr\year-#1=1 元\else + \ifnum\ltjgetparameter{direction}=3 + \kansuji\numexpr\year-#1\relax \else - 平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi - \kansuji\month 月 - \kansuji\day 日 + \number\numexpr\year-#1\relax\nobreak \fi + \fi 年 +} +\def\pltx@today@year{% + \ifnum\numexpr\year*10000+\month*100+\day<19890108 + 昭和\pltx@today@year@{1925}% + \else\ifnum\numexpr\year*10000+\month*100+\day<20190501 + 平成\pltx@today@year@{1988}% \else - \if西暦 - \number\year~年 - \number\month~月 - \number\day~日 - \else - 平成\ifnum\heisei=1 元年\else\number\heisei~年\fi - \number\month~月 - \number\day~日 - \fi + 令和\pltx@today@year@{2018}% + \fi\fi} +\def\today{{% + \if西暦 + \ifnum\ltjgetparameter{direction}=3 \kansuji\year + \else\number\year\nobreak\fi 年 + \else + \pltx@today@year + \fi + \ifnum\ltjgetparameter{direction}=3 + \kansuji\month 月 + \kansuji\day 日 + \else + \number\month\nobreak 月 + \number\day\nobreak 日 \fi}} \newcommand{\prepartname}{第} \newcommand{\postpartname}{部}