X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fpatches%2Flltjcore.sty;h=2b301d89ad3c5fe3e92ef6a03168dfc0adea002a;hb=ab23049deb6fb90ca689fdf4924b3783f08f8f2e;hp=c4acde8e5be17b483946cefa652827ed9bc2a981;hpb=648ac28531637194fba2044dab10d285bf3b1a75;p=luatex-ja%2Fluatexja.git diff --git a/src/patches/lltjcore.sty b/src/patches/lltjcore.sty index c4acde8..2b301d8 100644 --- a/src/patches/lltjcore.sty +++ b/src/patches/lltjcore.sty @@ -4,9 +4,20 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjcore}[2013/05/14 Patch to LaTeX2e Kernel for LuaTeX-ja] +\ProvidesPackage{lltjcore}[2016/04/01 Patch to LaTeX2e Kernel for LuaTeX-ja] -\makeatletter +\def\cleardoublepage{\clearpage\if@twoside + \ifodd\c@page + \ifnum\ltjgetparameter{direction}=3 + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi + \else + \ifnum\ltjgetparameter{direction}=4 + \hbox{}\thispagestyle{empty}\newpage + \if@twocolumn\hbox{}\newpage\fi + \fi + \fi\fi} \newif\iftombow \tombowfalse \newif\iftombowdate \tombowdatetrue \newdimen\@tombowwidth @@ -68,6 +79,7 @@ \def\@outputtombow{% \iftombow \vbox to\z@{\kern-13mm\relax + \boxmaxdepth\maxdimen \moveleft3mm\vbox to\@@paperheight{% \hbox to\@@paperwidth{\hskip3mm\relax \copy\@TL\hfill\copy\@TC\hfill\copy\@TR\hskip3mm}% @@ -89,7 +101,7 @@ \newdimen\@@topmargin \def\@outputpage{% \begingroup % the \endgroup is put in by \aftergroup - \ifnum\ltjgetparameter{direction}=3 + \ifnum\ltjgetparameter{direction}=4\else \dimen\z@\textwidth \textwidth\textheight \textheight\dimen\z@ \fi \let \protect \noexpand @@ -153,8 +165,40 @@ \stepcounter{page}% \let\firstmark\botmark } - -\def\@setref#1#2#3{% +\renewcommand\@makefnmark{\hbox{% + \unless\ifnum\ltjgetparameter{direction}=3 + \@textsuperscript{\normalfont\@thefnmark}% + \else\hbox{\yoko \@textsuperscript{\normalfont\@thefnmark}}\fi}} +\long\def\@footnotetext#1{% + \ifcase\ltjgetparameter{direction}% + \or \let\@tempa\dtou + \or\or\let\@tempa\tate + \or \let\@tempa\yoko + \else \let\@tempa\utod + \fi + \insert\footins{\@tempa% + \reset@font\footnotesize + \interlinepenalty\interfootnotelinepenalty + \splittopskip\footnotesep + \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\columnwidth \@parboxrestore + \protected@edef\@currentlabel{% + \csname p@footnote\endcsname\@thefnmark + }% + \color@begingroup + \@makefntext{% + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}% + \color@endgroup}} +\def\@footnotemark{\leavevmode + \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi + \unless\ifnum\ltjgetparameter{direction}=3 \@makefnmark + \else\hbox to\z@{\hskip-.25\zw\raise.9\zh\@makefnmark\hss}\fi + \ifhmode\spacefactor\@x@sf\fi\relax} +\begingroup +\@ifpackageloaded{hyperref} + {\def\ltj@setrefprefix{real}} + {\def\ltj@setrefprefix{}} +\expandafter\gdef\csname \ltj@setrefprefix @setref\endcsname#1#2#3{% \ifx#1\relax \protect\G@refundefinedtrue \nfss@text{\reset@font\bfseries ??}% @@ -163,16 +207,57 @@ \else \expandafter#2#1\relax% change \null to \relax \fi} +\endgroup \if@compatibility\else \def\verb{\relax\ifmmode\hbox\else\leavevmode\fi \bgroup \verb@eol@error \let\do\@makeother \dospecials \verbatim@font\@noligs \@ifstar\@sverb\@verb} -\def\@makefnmark{\hbox{}\hbox{\@textsuperscript{\normalfont\@thefnmark}}\hbox{}} \fi \gdef\@stopfield{\null\color@endgroup\egroup} \newcount\hour \newcount\minute +%%% AtBeginDvi +\def \AtBeginDvi #1{% + \global \setbox \@begindvibox + \vbox{\yoko\unvbox \@begindvibox #1}% +} + +%%% @makecol +\gdef \@makecol {% + \ifvoid\footins + \setbox\@outputbox \box\@cclv + \else + \setbox\@outputbox \vbox {% + \boxmaxdepth \@maxdepth + \unvbox \@cclv + \vskip \skip\footins + \color@begingroup + \normalcolor + \footnoterule + \unvbox \footins + \color@endgroup + }% + \fi + \let\@elt\relax + \xdef\@freelist{\@freelist\@midlist}% + \global \let \@midlist \@empty + \@combinefloats + \ifvbox\@kludgeins + \@makespecialcolbox + \else + \setbox\@outputbox \vbox to\@colht {% + \@texttop + \dimen@ \dp\@outputbox + \unvbox \@outputbox + \ifnum\ltjgetparameter{direction}=4\else\hskip\z@\fi %%% LuaTeX-ja + \vskip -\dimen@ + \@textbottom + }% + \fi + \global \maxdepth \@maxdepth +} + \endinput