X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fpatches%2Flltjcore.sty;h=a6b71f3b6aa5a57bb3e13752ea790b3ebc69241e;hb=6ac92d18f5cd3ccdc4cc1e4beba88763ad95b159;hp=55c1537239231bde897335157c8c83a6bf4972f6;hpb=5ad46396b21eeac6f200fe6ce95dbb0b3dbf4dd7;p=luatex-ja%2Fluatexja.git diff --git a/src/patches/lltjcore.sty b/src/patches/lltjcore.sty index 55c1537..a6b71f3 100644 --- a/src/patches/lltjcore.sty +++ b/src/patches/lltjcore.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjcore}[2017/08/27 Patch to LaTeX2e Kernel for LuaTeX-ja] +\ProvidesPackage{lltjcore}[2019/09/26 Patch to LaTeX2e Kernel for LuaTeX-ja] \RequirePackage{etoolbox} \def\cleardoublepage{\clearpage\if@twoside @@ -35,39 +35,39 @@ \@bannertoken{} \def\maketombowbox{% \setbox\@TL\hbox to\z@{\yoko\hss - \vrule width13mm height\@tombowwidth depth\z@ + \vrule width\dimexpr 10mm+\@tombowbleed\relax height\@tombowwidth depth\z@ \vrule height10mm width\@tombowwidth depth\z@ \iftombowdate \raise4pt\hbox to\z@{\hskip5mm\@bannerfont\the\@bannertoken\hss}% \fi}% \setbox\@Tl\hbox to\z@{\yoko\hss \vrule width10mm height\@tombowwidth depth\z@ - \vrule height13mm width\@tombowwidth depth\z@}% + \vrule height\dimexpr 10mm+\@tombowbleed\relax width\@tombowwidth depth\z@}% \setbox\@TC\hbox{\yoko \vrule width10mm height\@tombowwidth depth\z@ \vrule height10mm width\@tombowwidth depth\z@ \vrule width10mm height\@tombowwidth depth\z@}% \setbox\@TR\hbox to\z@{\yoko \vrule height10mm width\@tombowwidth depth\z@ - \vrule width13mm height\@tombowwidth depth\z@\hss}% + \vrule width\dimexpr 10mm+\@tombowbleed\relax height\@tombowwidth depth\z@\hss}% \setbox\@Tr\hbox to\z@{\yoko - \vrule height13mm width\@tombowwidth depth\z@ + \vrule height\dimexpr 10mm+\@tombowbleed\relax width\@tombowwidth depth\z@ \vrule width10mm height\@tombowwidth depth\z@\hss}% \setbox\@BL\hbox to\z@{\yoko\hss - \vrule width13mm depth\@tombowwidth height\z@ + \vrule width\dimexpr 10mm+\@tombowbleed\relax depth\@tombowwidth height\z@ \vrule depth10mm width\@tombowwidth height\z@}% \setbox\@Bl\hbox to\z@{\yoko\hss \vrule width10mm depth\@tombowwidth height\z@ - \vrule depth13mm width\@tombowwidth height\z@}% + \vrule depth\dimexpr 10mm+\@tombowbleed\relax width\@tombowwidth height\z@}% \setbox\@BC\hbox{\yoko \vrule width10mm depth\@tombowwidth height\z@ \vrule depth10mm width\@tombowwidth height\z@ \vrule width10mm depth\@tombowwidth height\z@}% \setbox\@BR\hbox to\z@{\yoko \vrule depth10mm width\@tombowwidth height\z@ - \vrule width13mm depth\@tombowwidth height\z@\hss}% + \vrule width\dimexpr 10mm+\@tombowbleed\relax depth\@tombowwidth height\z@\hss}% \setbox\@Br\hbox to\z@{\yoko - \vrule depth13mm width\@tombowwidth height\z@ + \vrule depth\dimexpr 10mm+\@tombowbleed\relax width\@tombowwidth height\z@ \vrule width10mm depth\@tombowwidth height\z@\hss}% \setbox\@CL\hbox to\z@{\yoko\hss \vrule width10mm height.5\@tombowwidth depth.5\@tombowwidth @@ -78,11 +78,13 @@ } \def\@outputtombow{% \iftombow - \vbox to\z@{\kern-13mm\relax + \vbox to\z@{\kern-\dimexpr 10mm+\@tombowbleed\relax \boxmaxdepth\maxdimen - \moveleft3mm\vbox to\@@paperheight{% - \hbox to\@@paperwidth{\hskip3mm\relax - \copy\@TL\hfill\copy\@TC\hfill\copy\@TR\hskip3mm}% + \moveleft\@tombowbleed\vbox to\@@paperheight{% + \color@begingroup + \@tombowcolor + \hbox to\@@paperwidth{\hskip\@tombowbleed\relax + \copy\@TL\hfill\copy\@TC\hfill\copy\@TR\hskip\@tombowbleed}% \kern-10mm \hbox to\@@paperwidth{\copy\@Tl\hfill\copy\@Tr}% \vfill @@ -90,12 +92,25 @@ \vfill \hbox to\@@paperwidth{\copy\@Bl\hfill\copy\@Br}% \kern-10mm - \hbox to\@@paperwidth{\hskip3mm\relax - \copy\@BL\hfill\copy\@BC\hfill\copy\@BR\hskip3mm}% + \hbox to\@@paperwidth{\hskip\@tombowbleed\relax + \copy\@BL\hfill\copy\@BC\hfill\copy\@BR\hskip\@tombowbleed}% + \color@endgroup }\vss }% \fi } +\def\@tombowcolor{\normalcolor} +\def\@tombowbleed{3mm} +\def\@tombowreset@@paper{% + \@@topmargin\topmargin + \iftombow + \@@paperwidth\paperwidth + \advance\@@paperwidth 2\dimexpr\@tombowbleed\relax + \@@paperheight\paperheight\advance\@@paperheight 10mm\relax + \advance\@@paperheight 2\dimexpr\@tombowbleed\relax + \advance\@@topmargin 1in\relax \advance\@themargin 1in\relax + \fi +} \newdimen\@@paperheight \newdimen\@@paperwidth \newdimen\@@topmargin @@ -126,12 +141,7 @@ \ifnum\ltjgetparameter{direction}=3 \let\@themargin\oddsidemargin \else\let\@themargin\evensidemargin\fi \fi\fi - \@@topmargin\topmargin - \iftombow - \@@paperwidth\paperwidth \advance\@@paperwidth 6mm\relax - \@@paperheight\paperheight \advance\@@paperheight 16mm\relax - \advance\@@topmargin 1in\relax \advance\@themargin 1in\relax - \fi + \@tombowreset@@paper \reset@font \normalsize \normalsfcodes @@ -183,8 +193,9 @@ \@latex@warning{Reference `#3' on page \thepage \space undefined}% \else - \expandafter#2#1\spacefactor\@m{}% change \null to \spacefactor\@m{} + \expandafter#2#1\protect\@setref@{}% change \null to \protect\@setref@{} \fi} +\gdef\@setref@{\ifhmode\spacefactor\@m\fi} \endgroup \if@compatibility\else \def\verb{\relax\ifmmode\hbox\else\leavevmode\vadjust{}\fi @@ -194,18 +205,16 @@ \language\l@nohyphenation \@ifstar\@sverb\@verb} \fi -\gdef\@stopfield{\null\color@endgroup\egroup} -\newcount\hour -\newcount\minute +\patchcmd{\do@noligs}{\kern\z@}{\vadjust{}}{}{} % reported by p_typo +\gdef\@stopfield{% + \inhibitglue\@tempskipa\lastskip\unskip + \hskip\@tempskipa\color@endgroup\egroup} \pretocmd{\footnote}{\inhibitglue}{}{} \pretocmd{\footnotemark}{\inhibitglue}{}{} \patchcmd{\@footnotemark}{\@makefnmark}{% \unless\ifnum\ltjgetparameter{direction}=3 \@makefnmark% \else\hbox to\z@{\hskip-.25\zw\raise.9\zh\@makefnmark\hss}\fi% }{}{} -\patchcmd{\@tabular}{\leavevmode}{\leavevmode\null}{}{} -\apptocmd{\endtabular}{\null}{}{} -\expandafter \let \csname endtabular*\endcsname = \endtabular \let\@parboxto\@empty \long\def\@iiiparbox#1#2[#3]#4#5{% \leavevmode @@ -225,13 +234,13 @@ \csname bm@#3\endcsname}% \if@pboxsw \m@th$\null\fi% !!! \@end@tempboxa} -\def\underline#1{% +\DeclareRobustCommand\underline[1]{% \relax \ifmmode\@@underline{#1}% \else \leavevmode\null$\@@underline{\hbox{#1}}\m@th$\null\relax\fi} %%% AtBeginDvi -\def \AtBeginDvi #1{% +\DeclareRobustCommand \AtBeginDvi [1]{% \global \setbox \@begindvibox \vbox{\yoko\unvbox \@begindvibox #1}% } @@ -290,7 +299,7 @@ %%%%%% tabular (platex/#43) \@tabclassz -\def\ltj@sharp{\ltjfakeboxbdd\ignorespaces\@sharp\unskip\ltjfakeboxbdd} +\def\ltj@sharp{\relax\pltx@next@inhibitglue\ltjfakeboxbdd\ignorespaces\@sharp\unskip\ltjfakeboxbdd} \def\@tabclassz{% \ifcase\@lastchclass \@acolampacol @@ -308,7 +317,7 @@ \edef\@preamble{% \@preamble{% \ifcase\@chnum - \hfil\ltj@sharp\hfil + \hfil\hskip1sp\ltj@sharp\hfil \or \hskip1sp\ltj@sharp\hfil \or @@ -319,11 +328,13 @@ }{% \everypar\expandafter{\the\everypar\ltjfakeboxbdd}\ignorespaces\@sharp\unskip }{}{} +\patchcmd{\@tabular}{\leavevmode}{\leavevmode\null}{}{} +\apptocmd{\endtabular}{\null}{}{} +\expandafter \let \csname endtabular*\endcsname = \endtabular %%%%%% tabbing (platex/#53) \patchcmd\@startline{\strut}{\strut\inhibitglue}{}{} \def\ltj@unhbox@curfield{\ltjfakeboxbdd\unhbox\@curfield\ltjfakeboxbdd} %\patchcmd\@contfield{\unhbox\@curfield}{\ltj@unhbox@curfield}{}{} \patchcmd\@addfield{\unhbox\@curfield}{\ltj@unhbox@curfield}{}{} -\pretocmd\@stopfield{\inhibitglue}{}{} \endinput