summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty22
1 files changed, 17 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
index 58baa9ff9db..c6f976767ff 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
@@ -23,10 +23,25 @@
%! ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
% LuaTeX-ja macros against plain TeX
+%%%%\shipout
+\newluafunction\ltj@@lua@shipout@inner
+\directlua{
+ local t = lua.get_functions_table()
+ local getbox, setbox = tex.getbox, tex.setbox
+ local shipout_lthook = luatexja.direction.shipout_lthook
+ t[\the\ltj@@lua@shipout@inner]=function ()
+ local a = shipout_lthook(getbox(\the\ltj@afbox))
+ if a then setbox(\the\ltj@afbox, a) end
+ end
+}
+\protected\luadef\ltj@@lua@shipout\ltj@@lua@shipout@inner
+\def\ltj@shipout@{\ltj@@lua@shipout\primitive\shipout\box\ltj@afbox}%
+\protected\def\ltj@shipout{\ltj@afterbox\ltj@shipout@}
+\ifprimitive\shipout\let\shipout\ltj@shipout\fi
+\directlua{luatexja.direction.shipout_lthook = nil}
+
\ifdefined\ltj@stdmcfont\else\def\ltj@stdmcfont{file:HaranoAjiMincho-Regular.otf}\fi
\ifdefined\ltj@stdgtfont\else\def\ltj@stdgtfont{file:HaranoAjiGothic-Medium.otf}\fi
-%\ifdefined\ltj@stdmcfont\else\def\ltj@stdmcfont{IPAExMincho}\fi
-%\ifdefined\ltj@stdgtfont\else\def\ltj@stdgtfont{IPAExGothic}\fi
\ifdefined\ltj@stdyokojfm\else\def\ltj@stdyokojfm{ujis}\fi
\ifdefined\ltj@stdtatejfm\else\def\ltj@stdtatejfm{ujisv}\fi
\newread\ltj@@cfgread
@@ -96,9 +111,6 @@
\ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8, +9}}
\directlua{for x=128,255 do luatexja.math.is_math_letters[x] = true end}
-\let\ltj@@orig@end=\@@end
-\protected\def\@@end{%
- \directlua{luatexja.ext_cleanup()}\ltj@@orig@end}
\directlua{luatexja.jfont.register_vert_replace{
[',']='、', ['.']='。', ['“']=0x301D, ['”']=0x301F,