diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty index 6517262f56c..7e4ec507c6f 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty @@ -12,7 +12,7 @@ \def\luatexjalatexLoaded{\endinput} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ltj-latex}[2021-03-18 LaTeX support of LuaTeX-ja] +\ProvidesPackage{ltj-latex}[2021-05-17 LaTeX support of LuaTeX-ja] \endlinechar=13 @@ -46,7 +46,6 @@ \ifcsname tex_shipout:D\endcsname \expandafter\let\csname tex_shipout:D\endcsname\ltj@shipout \fi - \directlua{luatexja.direction.shipout_lthook = nil} \else \directlua{% luatexbase.add_to_callback('pre_shipout_filter',luatexja.direction.shipout_lthook, 'ltj.direction', 1) @@ -122,6 +121,50 @@ \RequirePackage{lltjp-geometry} +\def\ltj@@q@stop{\ltj@@q@stop} +\ifdefined\ltj@stop@overwrite@primitive + \begingroup + \def\ltj@loop#1{% + \unless\ifx#1\ltj@@q@stop + \escapechar-1 + \ifcsname ltj@@orig@\string#1\endcsname + \ifcsname ltj@@\string#1\endcsname + \edef\ltj@@next{\unexpanded{\global\let#1}\csname ltj@@orig@\string#1\endcsname}% + \edef\ltj@@temp{ltj@@orig@\string#1}% + \escapechar92 + \PackageInfo{luatexja}{% + Restoring \string#1\space into its orignal meaning\MessageBreak + (\expandafter\meaning\csname\ltj@@temp\endcsname)}% + \ltj@@next% + \fi + \fi + \let\ltj@@next\ltj@loop + \else\let\ltj@@next\relax\fi\ltj@@next + }% + \expandafter\ltj@loop\ltj@stop@overwrite@primitive\ltj@@q@stop + \endgroup +\fi +\def\ltj@overwrite@primitive#1{% + \begingroup + \def\ltj@loop##1{% + \unless\ifx##1\ltj@@q@stop + \escapechar-1 + \edef\ltj@@next{\unexpanded{\let\ltj@@temp}\csname ltj@@\string##1\endcsname}\ltj@@next + \ifx\ltj@@temp\relax + \else\ifx\ltj@@temp##1 + \escapechar92 + \PackageInfo{luatexja}{No need to redefine \string##1}% + \else + \edef\ltj@@next{\unexpanded{\global\let##1}\csname ltj@@\string##1\endcsname}% + \escapechar92\PackageInfo{luatexja}{Redefining \string##1}\ltj@@next% + \fi\fi + \let\ltj@@next\ltj@loop + \else\let\ltj@@next\relax\fi\ltj@@next + }% + \ltj@loop#1\ltj@@q@stop + \endgroup +} + %%------------------ all done \ltj@latex@AtEnd \endinput |