X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fltjtarticle.cls;h=2d1fe3159f314709aa21289de251d936c638215f;hb=0f0921ced2b53537326ad20ce546020b3cae2670;hp=a94a06932bbe997368f0926756c33cff5f2dca9b;hpb=c1821b1cd6d2fcb8ac79d6c896cf1fbe43d9ee69;p=luatex-ja%2Fluatexja.git diff --git a/src/ltjtarticle.cls b/src/ltjtarticle.cls index a94a069..2d1fe31 100644 --- a/src/ltjtarticle.cls +++ b/src/ltjtarticle.cls @@ -21,25 +21,9 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% File: ltjclasses.dtx -%% \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{ltjtarticle} - [2016/01/31 v1.6-ltj-11 + [2017/03/06 v1.7e-ltj-14 Standard LuaLaTeX-ja class] \RequirePackage{luatexja} \newcounter{@paper} @@ -104,8 +88,8 @@ \tombowtrue \tombowdatetrue \setlength{\@tombowwidth}{.1\p@}% \@bannertoken{% - \jobname\space:\space\number\year/\number\month/\number\day - (\number\hour:\number\minute)} + \jobname\space(\number\year-\two@digits\month-\two@digits\day + \space\two@digits\hour:\two@digits\minute)}% \maketombowbox} \DeclareOption{tombo}{% \tombowtrue \tombowdatefalse @@ -174,22 +158,28 @@ \setlength\columnsep{10\p@} \fi \setlength\columnseprule{0\p@} -\setlength{\@tempdima}{\paperwidth} -\setlength{\@tempdimb}{\paperheight} -\ifdefined\pdfpagewidth - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in +\iftombow + \newlength{\stockwidth} + \newlength{\stockheight} + \setlength{\stockwidth}{\paperwidth} + \setlength{\stockheight}{\paperheight} + \advance \stockwidth 2in + \advance \stockheight 2in + \ifdefined\pdfpagewidth + \setlength{\pdfpagewidth}{\stockwidth} + \setlength{\pdfpageheight}{\stockheight} + \else + \setlength{\pagewidth}{\stockwidth} + \setlength{\pageheight}{\stockheight} \fi - \setlength{\pdfpagewidth}{\@tempdima} - \setlength{\pdfpageheight}{\@tempdimb} \else - \iftombow - \advance \@tempdima 2in - \advance \@tempdimb 2in + \ifdefined\pdfpagewidth + \setlength{\pdfpagewidth}{\paperwidth} + \setlength{\pdfpageheight}{\paperheight} + \else + \setlength{\pagewidth}{\paperwidth} + \setlength{\pageheight}{\paperheight} \fi - \setlength{\pagewidth}{\@tempdima} - \setlength{\pageheight}{\@tempdimb} \fi \setlength\lineskip{1\p@} \setlength\normallineskip{1\p@} @@ -209,6 +199,26 @@ \renewcommand{\floatpagefraction}{.5} \renewcommand{\dbltopfraction}{.7} \renewcommand{\dblfloatpagefraction}{.5} +\def\pltx@cleartorightpage{\clearpage\if@twoside + \unless\ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoleftpage{\clearpage\if@twoside + \ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartooddpage{\clearpage\if@twoside + \ifodd\c@page\else + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} +\def\pltx@cleartoevenpage{\clearpage\if@twoside + \ifodd\c@page + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi\fi} \def\ps@plain{\let\@mkboth\@gobbletwo \let\ps@jpl@in\ps@plain \let\@oddhead\@empty @@ -300,7 +310,7 @@ \@restonecolfalse\newpage \fi \thispagestyle{empty}% - \setcounter{page}\@ne + \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi %% 2017/02/15 }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else @@ -310,7 +320,7 @@ \fi \def\p@thanks#1{\footnotemark \protected@xdef\@thanks{\@thanks - \protect{\noindent$\m@th^\thefootnote$~#1\protect\par}}} + \protect{\noindent\hbox{\yoko$\m@th^\thefootnote$}#1\protect\par}}} \if@titlepage \newcommand{\maketitle}{\begin{titlepage}% \let\footnotesize\small @@ -354,7 +364,7 @@ \def\@makefnmark{\hbox{\unless\ifnum\ltjgetparameter{direction}=3 $\m@th^{\@thefnmark}$ \else\hbox{\yoko$\m@th^{\@thefnmark}$}\fi}}% \long\def\@makefntext##1{\parindent 1\zw\noindent - \hbox to 2\zw{\hss\@makefnmark}##1}% + \hb@xt@ 2\zw{\hss\@makefnmark}##1}% \if@twocolumn \ifnum \col@number=\@ne \@maketitle \else \twocolumn[\@maketitle]% @@ -369,6 +379,7 @@ \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax + \global\let\@maketitle\relax \global\let\p@thanks\relax \global\let\@thanks\@empty \global\let\@author\@empty @@ -434,7 +445,9 @@ \thesubsubsection・\rensuji{\@arabic\c@paragraph}} \renewcommand{\thesubparagraph}{% \theparagraph・\rensuji{\@arabic\c@subparagraph}} -\newcommand{\part}{\par\addvspace{4ex}% +\newcommand{\part}{% + \if@noskipsec \leavevmode \fi + \par\addvspace{4ex}% \@afterindenttrue \secdef\@part\@spart} \def\@part[#1]#2{% @@ -447,7 +460,7 @@ \fi \markboth{}{}% {\parindent\z@\raggedright - \interlinepenalty\@M\reset@font + \interlinepenalty\@M\normalfont \ifnum \c@secnumdepth >\m@ne \Large\bfseries\prepartname\thepart\postpartname \par\nobreak @@ -456,29 +469,29 @@ \nobreak\vskip3ex\@afterheading} \def\@spart#1{{% \parindent\z@\raggedright - \interlinepenalty\@M\reset@font + \interlinepenalty\@M\normalfont \huge\bfseries#1\par}% \nobreak\vskip3ex\@afterheading} \newcommand{\section}{\@startsection{section}{1}{\z@}% {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}% {.5\Cvs \@plus.3\Cvs}% - {\reset@font\Large\bfseries}} + {\normalfont\Large\bfseries}} \newcommand{\subsection}{\@startsection{subsection}{2}{\z@}% {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}% {.5\Cvs \@plus.3\Cvs}% - {\reset@font\large\bfseries}} + {\normalfont\large\bfseries}} \newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}% {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}% {.5\Cvs \@plus.3\Cvs}% - {\reset@font\normalsize\bfseries}} + {\normalfont\normalsize\bfseries}} \newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus 1ex \@minus .2ex}% {-1em}% - {\reset@font\normalsize\bfseries}} + {\normalfont\normalsize\bfseries}} \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}% {3.25ex \@plus 1ex \@minus .2ex}% {-1em}% - {\reset@font\normalsize\bfseries}} + {\normalfont\normalsize\bfseries}} \newcommand{\appendix}{\par \setcounter{section}{0}% \setcounter{subsection}{0}% @@ -519,7 +532,7 @@ {\ifnum \@enumdepth >\thr@@\@toodeep\else \advance\@enumdepth\@ne \edef\@enumctr{enum\romannumeral\the\@enumdepth}% - \list{\csname label\@enumctr\endcsname}{% + \expandafter \list \csname label\@enumctr\endcsname{% \ifnum\ltjgetparameter{direction}=3 \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip \else\topsep\z@\fi @@ -546,8 +559,7 @@ {\ifnum \@itemdepth >\thr@@\@toodeep\else \advance\@itemdepth\@ne \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% - \expandafter - \list{\csname \@itemitem\endcsname}{% + \expandafter \list \csname \@itemitem\endcsname{% \ifnum\ltjgetparameter{direction}=3 \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip \else\topsep\z@\fi @@ -623,7 +635,7 @@ \else #1: #2\relax\par\fi \else \global \@minipagefalse - \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} \setlength\arraycolsep{5\p@} @@ -666,7 +678,7 @@ \newdimen\toclineskip \setlength\toclineskip{2\p@} \newdimen\@lnumwidth -\def\numberline#1{\hbox to\@lnumwidth{#1\hfil}} +\def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}} \def\@dottedtocline#1#2#3#4#5{% \ifnum #1>\c@tocdepth \else \vskip\toclineskip \@plus.2\p@ @@ -675,7 +687,7 @@ \interlinepenalty\@M \leavevmode \@lnumwidth #3\relax - \advance\leftskip \@lnumwidth \hbox{}\hskip -\leftskip + \advance\leftskip \@lnumwidth \null\nobreak\hskip -\leftskip {#4}\nobreak \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}% \hfill\nobreak @@ -704,7 +716,7 @@ {\leavevmode\large\bfseries \setlength\@lnumwidth{4\zw}% #1\hfil\nobreak - \hbox to\@pnumwidth{\hss#2}}\par + \hb@xt@\@pnumwidth{\hss#2}}\par \nobreak \if@compatibility \global\@nobreaktrue @@ -721,7 +733,7 @@ \leavevmode\bfseries \setlength\@lnumwidth{1.5em}% \advance\leftskip\@lnumwidth \hskip-\leftskip - #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par + #1\nobreak\hfil\nobreak\hb@xt@\@pnumwidth{\hss#2}\par \endgroup \fi} \newcommand*{\l@subsection} {\@dottedtocline{2}{1\zw}{4\zw}} @@ -729,14 +741,14 @@ \newcommand*{\l@paragraph} {\@dottedtocline{4}{3\zw}{8\zw}} \newcommand*{\l@subparagraph} {\@dottedtocline{5}{4\zw}{9\zw}} \newcommand{\listoffigures}{% - \section*{\listfigurename - \@mkboth{\listfigurename}{\listfigurename}}% + \section*{\listfigurename}% + \@mkboth{\listfigurename}{\listfigurename}% \@starttoc{lof}% } \newcommand*{\l@figure}{\@dottedtocline{1}{1\zw}{4\zw}} \newcommand{\listoftables}{% - \section*{\listtablename - \@mkboth{\listtablename}{\listtablename}}% + \section*{\listtablename}% + \@mkboth{\listtablename}{\listtablename}% \@starttoc{lot}% } \let\l@table\l@figure @@ -744,7 +756,7 @@ \setlength\bibindent{1.5em} \newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em} \newenvironment{thebibliography}[1] -{\section*{\refname\@mkboth{\refname}{\refname}}% +{\section*{\refname}\@mkboth{\refname}{\refname}% \list{\@biblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth @@ -764,11 +776,11 @@ \let\@openbib@code\@empty \newenvironment{theindex} {\if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi - \columnseprule\z@ \columnsep 35\p@ \twocolumn[\section*{\indexname}]% \@mkboth{\indexname}{\indexname}% \thispagestyle{jpl@in}\parindent\z@ \parskip\z@ \@plus .3\p@\relax + \columnseprule\z@ \columnsep 35\p@ \let\item\@idxitem} {\if@restonecol\onecolumn\else\clearpage\fi} \newcommand{\@idxitem}{\par\hangindent 40\p@} @@ -777,10 +789,10 @@ \newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} \renewcommand{\footnoterule}{% \kern-3\p@ - \hrule width .4\columnwidth - \kern 2.6\p@} + \hrule\@width.4\columnwidth + \kern2.6\p@} \newcommand\@makefntext[1]{\parindent 1\zw - \noindent\hbox to 2\zw{\hss\@makefnmark}#1} + \noindent\hb@xt@ 2\zw{\hss\@makefnmark}#1} \newif\if西暦 \西暦false \def\西暦{\西暦true} \def\和暦{\西暦false} @@ -821,6 +833,8 @@ \pagestyle{plain} \pagenumbering{arabic} \raggedbottom +\fnfixbottomtrue % 2017-02-19 +\IfFileExists{stfloats.sty}{\RequirePackage{stfloats}\fnbelowfloat}{} \if@twocolumn \twocolumn \sloppy @@ -829,6 +843,8 @@ \fi \normalmarginpar \@mparswitchfalse +\AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext} +\AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext} \endinput %% %% End of file `ltjtarticle.cls'.