diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-19 21:28:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-19 21:28:53 +0000 |
commit | b1f9b2f01e127496176dbdce9f901ebd335b7ab8 (patch) | |
tree | 173ac72662f32aa3809e502a8775520671455aeb /Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty | |
parent | ad6aef2d80fb956bee8df8dc13c8a3814dd0b2c5 (diff) |
luatexja (19mar21)
git-svn-id: svn://tug.org/texlive/trunk@58542 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty | 118 |
1 files changed, 44 insertions, 74 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty index 2af25035a5f..19fe320fad4 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjcore}[2020-09-28 Patch to LaTeX2e Kernel for LuaTeX-ja] +\ProvidesPackage{lltjcore}[2021-03-19 Patch to LaTeX2e Kernel for LuaTeX-ja] \RequirePackage{etoolbox} %%% expl3 @@ -72,7 +72,10 @@ \fi\fi} \patchcmd\@vtryfc{\global\setbox\@outputbox\vbox{}} - {\global\setbox\@outputbox\vbox{\unless\ifnum\ltjgetparameter{direction}=4\hskip\z@\fi}}{}{} + {\global\setbox\@outputbox\vbox{% + \unless\ifnum\ltjgetparameter{direction}=4 + \primitive\everypar{}\hskip\z@\fi + }}{}{} \newif\iftombow \tombowfalse \newif\iftombowdate \tombowdatetrue @@ -86,7 +89,7 @@ \newbox\@BR\newbox\@Br \newbox\@CL \newbox\@CR -\font\@bannerfont=cmtt9 +\font\@bannerfont=file:lmmono9-regular.otf % cmtt9 in pLaTeX \newtoks\@bannertoken \@bannertoken{} \def\maketombowbox{% @@ -134,23 +137,23 @@ } \def\@outputtombow{% \iftombow - \vbox to\z@{\kern-\dimexpr 10mm+\@tombowbleed\relax + \vbox to\z@{\kern\dimexpr-10mm-\@tombowbleed\relax \boxmaxdepth\maxdimen \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 + \kern-10mm% \hbox to\@@paperwidth{\copy\@Tl\hfill\copy\@Tr}% \vfill \hbox to\@@paperwidth{\copy\@CL\hfill\copy\@CR}% \vfill \hbox to\@@paperwidth{\copy\@Bl\hfill\copy\@Br}% - \kern-10mm + \kern-10mm% \hbox to\@@paperwidth{\hskip\@tombowbleed\relax \copy\@BL\hfill\copy\@BC\hfill\copy\@BR\hskip\@tombowbleed}% - \color@endgroup + \color@endgroup }\vss }% \fi @@ -158,80 +161,45 @@ \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 + \@@topmargin \topmargin % only for compatibility + \iftombow + \@@paperwidth\dimexpr\paperwidth+2\dimexpr\@tombowbleed\relax + \@@paperheight\dimexpr\paperheight+10mm+2\dimexpr\@tombowbleed\relax + \advance\@@topmargin 1in\relax \advance\@themargin 1in\relax + \fi } \newdimen\@@paperheight \newdimen\@@paperwidth -\newdimen\@@topmargin -\def\@outputpage{% -\begingroup % the \endgroup is put in by \aftergroup +\newdimen\@@topmargin % not used by LuaTeX-ja; only to avoid existing codes +\patchcmd\@outputpage{\begingroup\let\protect\noexpand}{% tate direction +\begingroup \ifnum\ltjgetparameter{direction}=4\else \dimen\z@\textwidth \textwidth\textheight \textheight\dimen\z@ \fi \let \protect \noexpand - \language\document@default@language %LaTeX2e 2017/05/01 - \@resetactivechars - \global\let\@@if@newlist\if@newlist - \global\@newlistfalse - \@parboxrestore - \shipout\vbox{\yoko +}{}{} +\patchcmd\@outputpage{% supply \yoko \set@typeset@protect - \aftergroup\endgroup - \aftergroup\set@typeset@protect - \if@specialpage - \global\@specialpagefalse\@nameuse{ps@\@specialstyle}% - \fi - \if@twoside - \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot - \ifnum\ltjgetparameter{direction}=3 \let\@themargin\evensidemargin - \else\let\@themargin\oddsidemargin\fi - \else \let\@thehead\@evenhead - \let\@thefoot\@evenfoot - \ifnum\ltjgetparameter{direction}=3 \let\@themargin\oddsidemargin - \else\let\@themargin\evensidemargin\fi - \fi\fi - \@tombowreset@@paper - \reset@font - \normalsize - \normalsfcodes - \let\label\@gobble - \let\index\@gobble - \let\glossary\@gobble - \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@ - \@begindvi - \@outputtombow - \vskip \@@topmargin - \moveright\@themargin\vbox{% - \setbox\@tempboxa \vbox to\headheight{% - \vfil - \color@hbox - \normalcolor - \hb@xt@\textwidth{\@thehead}% - \color@endbox - }% %% 22 Feb 87 - \dp\@tempboxa \z@ - \box\@tempboxa - \vskip \headsep - \box\@outputbox - \baselineskip \footskip - \color@hbox - \normalcolor - \hb@xt@\textwidth{\@thefoot}% - \color@endbox - }% - }% - \global\let\if@newlist\@@if@newlist - \global \@colht \textheight - \stepcounter{page}% - \let\firstmark\botmark -} + \aftergroup \endgroup +}{% + \yoko \set@typeset@protect + \aftergroup \endgroup +}{}{} +\patchcmd\@outputpage{\let\@thefoot\@oddfoot\let\@themargin\oddsidemargin}{% tate direction + \let\@thefoot\@oddfoot + \ifnum\ltjgetparameter{direction}=3 \let\@themargin\evensidemargin + \else\let\@themargin\oddsidemargin\fi +}{}{} +\patchcmd\@outputpage{\let\@thefoot\@evenfoot\let\@themargin\evensidemargin}{% tate direction + \let\@thefoot\@evenfoot + \ifnum\ltjgetparameter{direction}=3 \let\@themargin\oddsidemargin + \else\let\@themargin\evensidemargin\fi +}{}{} + +% 将来は shipout hook で書き直したい +\patchcmd\@outputpage{\vskip\topmargin}{\vskip\topmargin\iftombow\vskip1in\fi}{}{} +\patchcmd\@outputpage{\reset@font}{\@tombowreset@@paper\reset@font}{}{} +\patchcmd\@outputpage{\@begindvi}{\@begindvi\@outputtombow}{}{} %%% Remove extra xkanjiskip \renewcommand\@makefnmark{% @@ -327,7 +295,9 @@ \@texttop \dimen@ \dp\@outputbox \unvbox \@outputbox - \unless\ifnum\ltjgetparameter{direction}=4\vbox{\hskip\z@}\fi %%% LuaTeX-ja + \unless\ifnum\ltjgetparameter{direction}=4 + \vbox{\primitive\everypar{}\hskip\z@}% + \fi %%% LuaTeX-ja \vskip -\dimen@ \ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi }% |