From ed130e6ed833172773a0b433147d723a3edec508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Tue, 16 Jun 2020 21:14:52 +0200 Subject: [PATCH] Be compatible with LaTeX-dev main branch --- luametalatex-init.lua | 4 +++- luametalatex-ltexpl-hook.tex | 5 ++++- luametaplain.ini | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/luametalatex-init.lua b/luametalatex-init.lua index 8316016..d26ce87 100644 --- a/luametalatex-init.lua +++ b/luametalatex-init.lua @@ -67,9 +67,11 @@ do return kpse.find_file(name, 'tex', true) end if status.ini_version then + function unhook_expl() + callback_register('find_data_file', normal_find_data_file) + end callback_register('find_data_file', function(name) if name == 'ltexpl.ltx' then - callback_register('find_data_file', normal_find_data_file) name = 'luametalatex-ltexpl-hook' end return normal_find_data_file(name) diff --git a/luametalatex-ltexpl-hook.tex b/luametalatex-ltexpl-hook.tex index af7e453..1c0f262 100644 --- a/luametalatex-ltexpl-hook.tex +++ b/luametalatex-ltexpl-hook.tex @@ -1,3 +1,6 @@ +\directlua{unhook_expl()} \input luametalatex-baseregisters -\def\@tfor#1\do#2{} +\ifx\@tfor\undefined + \def\@tfor#1\do#2{} +\fi \input ltexpl.ltx diff --git a/luametaplain.ini b/luametaplain.ini index 07f3795..59616be 100644 --- a/luametaplain.ini +++ b/luametaplain.ini @@ -13,6 +13,7 @@ \catcode`\}=2 \global\chardef\eTeXversion=2 \global\def\eTeXrevision{.2} +\directlua{unhook_expl()} \endgroup \input load-unicode-data.tex \input etex.src