X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fpatches%2Flltjcore.sty;h=2d577fc687aa7d887776d392171b337fc5132f0a;hb=ed437f13e5e2fe4ffd25dc0176294908d9f86beb;hp=3dbcc41f757ed1a4b562715daa1a42f343bb9941;hpb=a15809ed77d030114ba89caff38e71b36e53cbcf;p=luatex-ja%2Fluatexja.git diff --git a/src/patches/lltjcore.sty b/src/patches/lltjcore.sty index 3dbcc41..2d577fc 100644 --- a/src/patches/lltjcore.sty +++ b/src/patches/lltjcore.sty @@ -1,12 +1,23 @@ % % lltjcore.sty: derived from plcore.dtx in pLaTeX. % This file does not include the code relating to "tategaki". -% +% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjcore}[2011/11/22 Patch to LaTeX2e Kernel for LuaLaTeX-ja] +\ProvidesPackage{lltjcore}[2016/05/05 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 - \iftdir + \ifnum\ltjgetparameter{direction}=4\else \dimen\z@\textwidth \textwidth\textheight \textheight\dimen\z@ \fi \let \protect \noexpand @@ -106,11 +118,11 @@ \fi \if@twoside \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot - \iftdir\let\@themargin\evensidemargin + \ifnum\ltjgetparameter{direction}=3 \let\@themargin\evensidemargin \else\let\@themargin\oddsidemargin\fi \else \let\@thehead\@evenhead \let\@thefoot\@evenfoot - \iftdir\let\@themargin\oddsidemargin + \ifnum\ltjgetparameter{direction}=3 \let\@themargin\oddsidemargin \else\let\@themargin\evensidemargin\fi \fi\fi \@@topmargin\topmargin @@ -154,7 +166,21 @@ \let\firstmark\botmark } -\def\@setref#1#2#3{% +%%% Remove extra xkanjiskip +\renewcommand\@makefnmark{% + \unless\ifnum\ltjgetparameter{direction}=3 + \hbox{}\hbox{\@textsuperscript{\normalfont\@thefnmark}}\hbox{}% + \else\hbox{\yoko \@textsuperscript{\normalfont\@thefnmark}}\fi} +\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,6 +189,7 @@ \else \expandafter#2#1\relax% change \null to \relax \fi} +\endgroup \if@compatibility\else \def\verb{\relax\ifmmode\hbox\else\leavevmode\fi \bgroup @@ -173,5 +200,75 @@ \gdef\@stopfield{\null\color@endgroup\egroup} \newcount\hour \newcount\minute +%%% etoolbox is loaded by everyhook +\ifltj@everyhook@avail + \patchcmd{\@tabular}{\leavevmode}{\leavevmode\null}{}{} + \apptocmd{\endtabular}{\null}{}{} + \expandafter \let \csname endtabular*\endcsname = \endtabular +\fi +\let\@parboxto\@empty +\long\def\@iiiparbox#1#2[#3]#4#5{% + \leavevmode + \@pboxswfalse + \setlength\@tempdima{#4}% + \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}% + \ifx\relax#2\else + \setlength\@tempdimb{#2}% + \edef\@parboxto{to\the\@tempdimb}% + \fi + \if#1b\vbox + \else\if #1t\vtop + \else\ifmmode\vcenter + \else\@pboxswtrue\null$\vcenter% !!! + \fi\fi\fi + \@parboxto{\let\hss\vss\let\unhbox\unvbox + \csname bm@#3\endcsname}% + \if@pboxsw \m@th$\null\fi% !!! + \@end@tempboxa} +\def\underline#1{% + \relax + \ifmmode\@@underline{#1}% + \else \leavevmode\null$\@@underline{\hbox{#1}}\m@th$\null\relax\fi} + +%%% 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